Method, device, equipment and medium for online viewing of prototype design files based on Git

Through Git-based methods, listen to users push prototype design files to remote warehouses, construct web page addresses and display prototype design files, solving the problem that traditional file management systems do not support online viewing, and realizing online browsing and collaborative development of prototype design files.

CN113609428BActive Publication Date: 2024-12-03SHENZHEN PING AN SMART HEALTHCARE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110909194.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-09
Publication Date
2024-12-03
Estimated Expiration
2041-08-09

AI Technical Summary

Technical Problem

Traditional file management systems do not support the online viewing function of prototype design files. Designers and R&D personnel need to download files locally to browse prototype design files.

Method used

Using Git-based method, we listen to the instructions of users to push prototype design files to remote repository, obtain the latest version of the file, construct the web page address, and display the prototype design files through the preset browsing platform to realize online viewing.

Benefits of technology

You can view prototype design files online without downloading files locally, which improves management efficiency and supports multi-person collaborative development and version management of prototype design files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113609428B_ABST
    Figure CN113609428B_ABST
Patent Text Reader

Abstract

The present invention relates to development assistance technology, and discloses a method for online viewing of prototype design files based on Git, comprising: obtaining a preset static site address of a remote warehouse where the prototype design file is located, obtaining a file path of an index file in the prototype design file, constructing a web page address of the prototype design file using the static site address and the file path of the index file, accessing the web page address using a preset browsing platform, and displaying the prototype design file online. The present invention also proposes an online viewing device, equipment, and storage medium for prototype design files based on Git. The present invention can solve the problem that the current file management system does not support online viewing of prototype design files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data engines, and in particular to a Git-based online viewing method, device, electronic device and computer-readable storage medium for prototyping files. Background Art

[0002] Traditional file management systems such as SVN (Subversion, version control system) provide basic functions such as file upload, download, document collaboration, version management and online viewing of office files. However, traditional file management systems do not support the online viewing function of prototype design files. The prototype design file refers to a folder composed of multiple HTML files that is output by construction actions such as design and organization of related elements according to specific needs, such as prototype design files such as web pages and APPs. When using a traditional file management system to manage prototype design files, both designers and R&D personnel need to first download the prototype design files to the local computer, and then browse the prototype design files through a local browser or other tools. Summary of the invention

[0003] The present invention provides a Git-based prototype design file online viewing method, device and computer-readable storage medium, the main purpose of which is to solve the problem that the current file management system does not support online viewing of prototype design files.

[0004] To achieve the above purpose, the present invention provides a Git-based prototype design file online viewing method, comprising:

[0005] When a user pushes a prototype design file to a remote warehouse, the latest version of the prototype design file is obtained from the remote warehouse;

[0006] Acquire an index file and a file path of the index file from the acquired prototype design file;

[0007] Obtaining the preset static site address of the remote warehouse;

[0008] Constructing a web page address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publishing the web page address to a preset browsing platform;

[0009] When a prototype design file viewing instruction is monitored, the web page address of the prototype design file to be viewed in the viewing instruction is retrieved using the preset browsing platform, and the prototype design file to be viewed is displayed according to the web page address.

[0010] Optionally, obtaining the latest version of the prototype design file from the remote repository includes:

[0011] Parsing the instruction of the user to push the prototype design file to the remote warehouse to obtain the ID of the remote warehouse and the prototype design file ID;

[0012] According to the ID of the remote warehouse, searching for the address information of the remote warehouse in a preset remote warehouse address table;

[0013] Using the address information of the remote warehouse, access the remote warehouse;

[0014] The latest version of the prototype design file corresponding to the prototype design file ID is obtained from the remote repository using a preset Git management tool.

[0015] Optionally, obtaining an index file and a file path of the index file from the acquired prototype design file includes:

[0016] In the prototype design file, searching for an index file according to a preset index file name;

[0017] The relative path of the index file is obtained, and the relative path is used as the file path of the index file.

[0018] Optionally, obtaining a preset static site address of the remote warehouse includes:

[0019] According to the ID of the remote warehouse, the preset static site address of the remote warehouse is searched in the preset remote warehouse static site address table.

[0020] Optionally, constructing the webpage address of the prototype design file by using the static site address of the remote warehouse and the file path of the index file includes:

[0021] Using HTTP / HTTPS protocol, the static site address and the file path are combined into a web page address;

[0022] The remote warehouse ID, the prototype design file ID and the web page address are written into a preset remote warehouse network address table in a preset browsing platform.

[0023] Optionally, the using the preset browsing platform to retrieve the webpage address of the prototype design file to be viewed in the viewing instruction includes:

[0024] Parsing the prototype design file viewing instruction to obtain the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed;

[0025] According to the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed, querying the webpage address of the prototype design file to be viewed from the preset remote warehouse network address table;

[0026] The webpage address is retrieved using the preset browsing platform, and the prototype design file corresponding to the webpage is displayed.

[0027] Optionally, before monitoring the user's instruction to push the prototype design file to the remote repository, the method further includes:

[0028] Allocate a listening port to each of the remote warehouses;

[0029] The automatic monitoring function is set using the monitoring port.

[0030] In order to solve the above problems, the present invention also provides a Git-based prototype design file online viewing device, the device comprising:

[0031] A prototype design file acquisition module, used to acquire the latest version of the prototype design file from the remote warehouse when monitoring the user's instruction to push the prototype design file to the remote warehouse;

[0032] A prototype design file web page address generation module is used to obtain an index file and a file path of the index file from the acquired prototype design file; obtain a preset static site address of the remote warehouse; construct a web page address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publish the web page address to a preset browsing platform;

[0033] The prototype design file online viewing module is used to use the preset browsing platform to retrieve the web address of the prototype design file to be viewed in the viewing instruction when monitoring the viewing instruction of the prototype design file, and display the prototype design file to be viewed according to the web address.

[0034] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0035] a memory storing at least one instruction; and

[0036] The processor executes the instructions stored in the memory to implement the above-mentioned Git-based prototype design file online viewing method.

[0037] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned Git-based prototype design file online viewing method.

[0038] The embodiment of the present invention is based on the Git distributed warehouse file management principle, assigns a preset static site address to each remote warehouse, and based on the feature that the prototype design file is a folder composed of multiple html files, obtains the file path of the index file in the prototype design file, and constructs the web page address of the prototype design file by using the static site address and the file path of the index file. The web page address is accessed by using a preset browsing platform to realize the function of displaying the prototype design file online. The prototype design file can be viewed without downloading the prototype design file to the local computer, thereby improving the management efficiency of the prototype design file. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a system architecture diagram of a preferred embodiment of the Git-based prototype design file online viewing system of the present invention.

[0040] Figure 2 A schematic diagram of a process for viewing a prototype design file online based on Git provided by an embodiment of the present invention;

[0041] Figure 3 for Figure 2 A detailed implementation flow chart of one of the steps in the online viewing method of prototype design files based on Git is shown;

[0042] Figure 4 A functional module diagram of a Git-based prototype design file online viewing device provided by an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of the structure of an electronic device for realizing online viewing of Git-based prototype design files provided by an embodiment of the present invention.

[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] The embodiment of the present application provides a method for viewing prototype design files online based on Git. The execution subject of the method for viewing prototype design files online based on Git includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for viewing prototype design files online based on Git can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0047] Reference Figure 1 The above is a system architecture diagram of a preferred embodiment of the online viewing system for prototype design files based on Git of the present invention. The online viewing system for prototype design files based on Git of the present invention includes a server and multiple clients.

[0048] The server includes prototype design file management service, Node.js static server service and Nodepage prototype design file browsing service.

[0049] The prototype design file management service has the function of using the Git distributed version management mechanism to provide multi-person collaborative development of prototype design files and version management of the prototype design files. After the user completes the modification of the prototype design file on the client, the modified prototype design file is pushed to the corresponding remote warehouse through the Git management tool. The remote warehouse uses the Git distributed version management mechanism to synthesize the modified contents of the same prototype design file from different clients and generate the latest version of the prototype design file under multi-person collaboration.

[0050] Node.js and NPM are installed on the server. Node.js is a JavaScript runtime environment based on the V8 engine. NPM (Node Package Manager) is a code package or file package manager running on Node.js. In the embodiment of the present invention, the functions provided by Nodepage in NPM are mainly utilized.

[0051] The Node.js static server service utilizes the automatic monitoring function of Node.js to detect changes in the prototype design files in each remote warehouse in real time. At the same time, utilizing the characteristics of the prototype design files as static web pages, a static site is allocated to each remote warehouse, and accessible address information of the same prototype design file under each remote warehouse is generated.

[0052] The Nodepage prototype design file browsing service utilizes Nodepage to manage the address information of all prototype design files and provides a function of viewing the prototype design files online.

[0053] The client can be deployed on terminal devices such as computers and mobile phones. If a user needs to edit a prototype design file, for example, a designer needs to modify and improve the prototype design file, a local warehouse needs to be set up on the client corresponding to the designer to store the local prototype design file. If a user only views the prototype design file, for example, a research and development staff develops a related module based on the prototype design file, there is no need to set up this local warehouse on the corresponding client. Figure 1 The number of clients shown is only an example, and all the clients need to install a browser so as to view the prototype design file online through the browser.

[0054] See also Figure 2 FIG. 1 is a flow chart of a method for viewing a prototype design file online based on Git according to an embodiment of the present invention. In this embodiment, the method for viewing a prototype design file online based on Git includes:

[0055] S1. When a user pushes a prototype design file to a remote warehouse, the latest version of the prototype design file is obtained from the remote warehouse;

[0056] In an embodiment of the present invention, according to the Git distributed version management principle, a remote repository can be separately allocated for prototype design files of different projects according to the different projects where the prototype design files are located. The remote repository is a file storage device used to collaboratively manage the same prototype design file edited by different designers under the same project.

[0057] In the real-time example of the present invention, according to the characteristics that the prototype design files are all static web pages, Node.js can be installed and deployed on the server side of the prototype design file management system, and the automatic monitoring function of the Node.js can be used to automatically monitor the changes of the prototype design files in each remote warehouse.

[0058] Preferably, before the monitoring of the user's instruction to push the prototype design file to the remote warehouse, the method further includes: allocating a monitoring port to each remote warehouse; and setting an automatic monitoring function using the monitoring port.

[0059] For details, see Figure 3 As shown, the S1 includes:

[0060] S11, parsing the instruction of the user to push the prototype design file to the remote warehouse to obtain the ID of the remote warehouse and the prototype design file ID;

[0061] S12. According to the ID of the remote warehouse, searching for the address information of the remote warehouse in a preset remote warehouse address table;

[0062] S13, using the address information of the remote warehouse to access the remote warehouse;

[0063] S14. Using a preset Git management tool, obtain the latest version of the prototype design file corresponding to the prototype design file ID from the remote repository.

[0064] In the embodiment of the present invention, the remote warehouse ID is a unique identifier used to refer to a remote warehouse. The preset remote warehouse address table is used to record storage path information of different remote warehouses, and the storage path information is the address information of the remote warehouse.

[0065] In an embodiment of the present invention, corresponding prototype design files can be stored in the same remote warehouse according to business module classification, and a unique ID, namely the prototype design file ID, is assigned to the prototype design files under the same business module. Files under the same prototype design file ID are distinguished according to the file editing time.

[0066] S2. Obtaining an index file and a file path of the index file from the acquired prototype design file;

[0067] In the embodiment of the present invention, the index file refers to the homepage file of the latest version of the prototype design file, and the index file has the characteristic of associating all the contents of the latest version of the prototype design file together, and the index file provides a unified entrance for viewing all the contents of the latest version of the prototype design file. For example, the homepage of Baidu News, after entering the homepage of Baidu News, the user can further browse various types of information provided by Baidu News.

[0068] In detail, obtaining the index file and the file path of the index file from the acquired prototype design file includes:

[0069] In the prototype design file, an index file is searched according to a preset index file name; a relative path of the index file is obtained, and the relative path is used as the file path of the index file.

[0070] The preset index file name may be index.html. In actual applications, please set the name of the index file according to actual conditions.

[0071] In an embodiment of the present invention, for example, the folder where the prototype design file is located is the user interaction module design prototype, wherein the path of the index file of the prototype design file is D:\Project 1\User Interaction Module Design Prototype\article\details\index.html, wherein D:\Project 1\User Interaction Module Design Prototype\article\details\index.html is the absolute path of the index file, and article\details\index.html is the relative path of the index file.

[0072] S3. Obtaining a preset static site address of the remote warehouse;

[0073] In an embodiment of the present invention, the preset static site address refers to setting each remote warehouse as an independent network site and assigning a unique network address in the prototype design file management system. The static site address can be set as an IP address or a different domain name. For example, different logical IP addresses are assigned to different remote warehouses, or different domain names are set according to the different projects corresponding to the prototype design files stored in each remote warehouse.

[0074] In detail, the obtaining of the preset static site address of the remote warehouse includes: searching for the preset static site address of the remote warehouse in a preset remote warehouse static site address table according to the ID of the remote warehouse.

[0075] In the embodiment of the present invention, the preset remote warehouse static site address table is used to store static site address information of different remote warehouses, and different remote warehouses are distinguished by remote warehouse IDs.

[0076] S4, constructing a webpage address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publishing the webpage address to a preset browsing platform;

[0077] Usually, a web page address includes three parts: protocol type, network domain name and home page address. In an embodiment of the present invention, the protocol type may be HTTP or HTTPS protocol, the network domain name corresponds to the preset static site address go.documents.com of the remote warehouse, the home page address corresponds to the file path article\details\index.html of the index file, and the network address of the latest version of the prototype design file is https: / / go.documents.com / article / details / index.html.

[0078] In detail, the method of constructing the web address of the prototype design file by utilizing the static site address of the remote warehouse and the file path of the index file includes: utilizing the HTTP / HTTPS protocol to combine the static site address and the file path into a web address; and writing the remote warehouse ID, the prototype design file ID and the web address into a preset remote warehouse network address table in a preset browsing platform.

[0079] In the embodiment of the present invention, the preset remote warehouse network address table is used to store the web address information of the latest version of the prototype design file.

[0080] S5. When a prototype design file viewing instruction is monitored, the web address of the prototype design file to be viewed in the viewing instruction is retrieved by using the preset browsing platform, and the prototype design file to be viewed is displayed according to the web address.

[0081] In the embodiment of the present invention, at the server end of the prototype design file management system, the automatic monitoring function of Node.js is used to monitor the request sent by the client in real time.

[0082] In detail, the method of using the preset browsing platform to retrieve the network address of the prototype design file to be viewed in the user's instruction to view the prototype design file includes: parsing the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed from the viewing instruction of the prototype design file; querying the web page address of the prototype design file to be viewed from the preset remote warehouse network address table according to the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed; and retrieving the web page address by using the preset browsing platform, and displaying the prototype design file corresponding to the web page.

[0083] The embodiment of the present invention is based on the Git distributed warehouse file management principle, assigns a preset static site address to each remote warehouse, and based on the feature that the prototype design file is a folder composed of multiple html files, obtains the file path of the index file in the prototype design file, and constructs the web page address of the prototype design file by using the static site address and the file path of the index file. The web page address is accessed by using a preset browsing platform to realize the function of displaying the prototype design file online. The prototype design file can be viewed without downloading the prototype design file to the local computer, thereby improving the management efficiency of the prototype design file.

[0084] like Figure 4 , which is a functional module diagram of a Git-based prototype design file online viewing device provided by an embodiment of the present invention.

[0085] The prototype design file online viewing device 100 based on Git of the present invention can be installed in an electronic device. According to the functions to be implemented, the prototype design file online viewing device 100 based on Git can include a prototype design file acquisition module 101, a prototype design file web address generation module 102 and a prototype design file online viewing module 103. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0086] In this embodiment, the functions of each module / unit are as follows:

[0087] The prototype design file acquisition module 101 is used to acquire the latest version of the prototype design file from the remote warehouse when monitoring the user's instruction to push the prototype design file to the remote warehouse;

[0088] The prototype design file web page address generation module 102 is used to obtain an index file and a file path of the index file from the acquired prototype design file; obtain a preset static site address of the remote warehouse; construct a web page address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publish the web page address to a preset browsing platform;

[0089] The prototype design file online viewing module 103 is used to, when a prototype design file viewing instruction is monitored, retrieve the web address of the prototype design file to be viewed in the viewing instruction using the preset browsing platform, and display the prototype design file to be viewed according to the web address.

[0090] In detail, each module in the Git-based prototype design file online viewing device 100 in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The technical means described in the online viewing method of prototype design files based on Git are the same and can produce the same technical effects, so I will not go into details here.

[0091] like Figure 5 , which is a schematic diagram of the structure of an electronic device for implementing a Git-based online prototype design file viewing method provided by an embodiment of the present invention.

[0092] The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a prototype design file online viewing program.

[0093] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as code for online viewing of prototype design files based on Git, etc., but also can be used to temporarily store data that has been output or is to be output.

[0094] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as online viewing programs for prototype design files, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0095] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0096] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0097] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0098] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0099] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0100] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0101] The prototype design file online viewing program stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0102] When a user pushes a prototype design file to a remote warehouse, the latest version of the prototype design file is obtained from the remote warehouse;

[0103] Acquire an index file and a file path of the index file from the acquired prototype design file;

[0104] Obtaining the preset static site address of the remote warehouse;

[0105] Constructing a web page address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publishing the web page address to a preset browsing platform;

[0106] When a prototype design file viewing instruction is monitored, the web page address of the prototype design file to be viewed in the viewing instruction is retrieved using the preset browsing platform, and the prototype design file to be viewed is displayed according to the web page address.

[0107] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0108] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0109] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0110] When a user pushes a prototype design file to a remote warehouse, the latest version of the prototype design file is obtained from the remote warehouse;

[0111] Acquire an index file and a file path of the index file from the acquired prototype design file;

[0112] Obtaining the preset static site address of the remote warehouse;

[0113] Constructing a web page address of the prototype design file using the static site address of the remote warehouse and the file path of the index file, and publishing the web page address to a preset browsing platform;

[0114] When a viewing instruction of a prototype design file is monitored, the preset browsing platform is used to retrieve the web address of the prototype design file to be viewed in the viewing instruction, and the prototype design file to be viewed is displayed according to the web address. In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0117] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0118] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0119] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0120] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for viewing prototype design files online based on Git, characterized in that: The method comprises: When a user's instruction to push a prototype design file to a remote warehouse is monitored, the remote warehouse ID and the prototype design file ID are parsed from the user's instruction to push the prototype design file to the remote warehouse, and the address information of the remote warehouse is searched in a preset remote warehouse address table according to the remote warehouse ID. The remote warehouse is accessed using the address information of the remote warehouse, and the latest version of the prototype design file corresponding to the prototype design file ID is obtained from the remote warehouse using a preset Git management tool; Acquire an index file and a file path of the index file from the acquired prototype design file; Obtaining the preset static site address of the remote warehouse; Using HTTP / HTTPS protocol, the static site address and the file path are combined into a web page address, the remote warehouse ID, the prototype design file ID and the web page address are written into a preset remote warehouse network address table in a preset browsing platform, the web page address of the prototype design file is obtained, and the web page address of the prototype design file is published to the preset browsing platform; When a viewing instruction of a prototype design file is monitored, the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed are parsed from the viewing instruction of the prototype design file, and the web address of the prototype design file to be viewed is queried from the preset remote warehouse network address table according to the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed, the preset browsing platform is used to retrieve the web address, and the prototype design file corresponding to the web address is displayed.

2. The Git-based online prototype design file viewing method according to claim 1, characterized in that: The step of obtaining an index file and a file path of the index file from the acquired prototype design file includes: In the prototype design file, searching for an index file according to a preset index file name; The relative path of the index file is obtained, and the relative path is used as the file path of the index file.

3. The Git-based online prototype design file viewing method according to claim 1, characterized in that: The obtaining of the preset static site address of the remote warehouse includes: According to the ID of the remote warehouse, the preset static site address of the remote warehouse is searched in the preset remote warehouse static site address table.

4. The Git-based online prototype design file viewing method according to any one of claims 1 to 3, characterized in that: Before monitoring the user's instruction to push the prototype design file to the remote warehouse, the method further includes: Allocate a listening port to each of the remote warehouses; The automatic monitoring function is set using the monitoring port.

5. A prototype design file online viewing device based on Git, characterized in that: The device comprises: A prototype design file acquisition module is used to parse the remote warehouse ID and the prototype design file ID from the user's instruction to push the prototype design file to the remote warehouse when monitoring the user's instruction to push the prototype design file to the remote warehouse, and according to the remote warehouse ID, search the remote warehouse address information in a preset remote warehouse address table, use the remote warehouse address information to access the remote warehouse, and use the preset Git management tool to obtain the latest version of the prototype design file corresponding to the prototype design file ID from the remote warehouse; The prototype design file web page address generation module is used to obtain the index file and the file path of the index file from the acquired prototype design file; obtain the preset static site address of the remote warehouse; use the HTTP / HTTPS protocol to combine the static site address and the file path into a web page address, write the remote warehouse ID, the prototype design file ID and the web page address into the preset remote warehouse network address table in the preset browsing platform, obtain the web page address of the prototype design file, and publish the web page address of the prototype design to the preset browsing platform; The prototype design file online viewing module is used to, when listening to the viewing instruction of the prototype design file, parse the viewing instruction of the prototype design file to obtain the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed, query the web page address of the prototype design file to be viewed from the preset remote warehouse network address table according to the prototype design file ID to be viewed and the remote warehouse ID corresponding to the prototype design file to be viewed, use the preset browsing platform to call the web page address, and display the prototype design file corresponding to the web page address.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the Git-based prototype design file online viewing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for online viewing of prototype design files based on Git as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method, device and computer-readable storage medium for document generation

    CN108376127A

  • File configuration editing method and system in service deployment

    CN111399856A

  • Automatic multi-product document unified publishing and displaying method

    CN112817915A

  • Tools for Storing, Accessing and Restoring Website Content via a Website Repository

    US20140344224A1