[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112685029B - Method, device, equipment and storage medium for generating visual template - Google Patents

Method, device, equipment and storage medium for generating visual template Download PDF

Info

Publication number
CN112685029B
CN112685029B CN202011613782.8A CN202011613782A CN112685029B CN 112685029 B CN112685029 B CN 112685029B CN 202011613782 A CN202011613782 A CN 202011613782A CN 112685029 B CN112685029 B CN 112685029B
Authority
CN
China
Prior art keywords
template
file
engineering project
server
identification information
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
CN202011613782.8A
Other languages
Chinese (zh)
Other versions
CN112685029A (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202011613782.8A priority Critical patent/CN112685029B/en
Publication of CN112685029A publication Critical patent/CN112685029A/en
Priority to PCT/CN2021/133085 priority patent/WO2022142896A1/en
Application granted granted Critical
Publication of CN112685029B publication Critical patent/CN112685029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a visual template development method, a visual template development device, visual template development equipment and a visual template storage medium. Relates to the technical field of computers, and the method comprises the following steps: acquiring template identification information to be created and a development scaffold of a main engineering project through the created auxiliary engineering project; initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information; and sending the target template file obtained by developing and compiling the initial template file to a server. According to the technical scheme, the template creation and the page building can be decoupled, the problem of interference caused by the template creation on the page building is avoided, the online burden of a main project is reduced, and the micro front end modularization is achieved.

Description

Method, device, equipment and storage medium for generating visual template
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for generating a visual template.
Background
With the rapid development of the mobile internet and the full popularization of smart phones, people's life style and consumption mode have changed greatly. Designing web pages via the latest revised version of the hypertext markup language (HTML 5, hyper Markup Language) is an important way for large enterprises to advertise brand images and attract attention of audience groups.
In the visual H5 page building platform, the number of templates determines the complexity of building the page and the convenient and universal degree of service use, and a large number of visual templates are often required to be combined in the page building process.
In the process of realizing the invention, the prior art is found to have at least the following technical problems: the construction of the page and the development of the visual templates in the existing page construction platform are completed in one engineering project, the coupling between the page and the templates is strong, and the visual templates have strong project dependence. The template may interfere with the page building during the creation process, causing problems that may result in immeasurable impact on the whole project.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for generating a visual template, which are used for decoupling the creation of the template from the construction of a page and avoiding the problem of interference caused by the creation of the template to the construction of the page.
In a first aspect, an embodiment of the present invention provides a method for generating a visual template, including:
Acquiring template identification information to be created and a development scaffold of a main engineering project through the created auxiliary engineering project;
Initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
and sending the target template file obtained by developing and compiling the initial template file to a server.
In a second aspect, an embodiment of the present invention further provides a device for generating a visualization template, where the device includes:
the acquisition module is used for acquiring template identification information to be created and a development scaffold of the main engineering project through the created auxiliary engineering project;
The initialization module is used for initializing the auxiliary engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
And the sending module is used for sending the target template file obtained by developing and compiling the initial template file to a server.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a method for generating a visualization template according to any one of the embodiments of the present invention when the processor executes the program.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for generating a visualization template according to any of the embodiments of the present invention.
According to the embodiment of the invention, the template identification information to be created and the development scaffold of the main project are obtained through the created sub project, the sub project is initialized according to the template identification information and the development scaffold to obtain the initial template file, then the target template file obtained by developing and compiling the initial template file is sent to the server, the page building is realized in the main project by realizing the template creation in the sub project, the decoupling of the template creation and the page building is realized, and the problem of interference caused by the template creation on the page building is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of generating a visualization template in accordance with a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for generating a visualization template in a second embodiment of the present invention;
FIG. 2a is a schematic diagram of a method for generating a visualization template in a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a sub-project execution flow in a second embodiment of the present invention;
FIG. 2c is a schematic diagram of a main project execution flow in a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a visual template generating device in a third embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a computer device in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Example 1
Fig. 1 is a flowchart of a method for generating a visual template according to a first embodiment of the present invention, where the method may be applied to a case of generating a visual template such as an HTML5 page template, and the method may be performed by a device for generating a visual template according to the embodiment of the present invention, where the device may be implemented in a software and/or hardware manner, as shown in fig. 1, and the method specifically includes the following steps:
s110, acquiring template identification information to be created and a development scaffold of the main engineering project through the created sub engineering project.
Typically the creation of a visual page may require a large number of templates, which may come from different enterprises or departments. When a developer needs to create a visual template, firstly, an account number and a password are required to be logged in a terminal, if the logged-in account number has research and development rights, the developer can create a sub-engineering project, and the template identification information to be created and a development scaffold of the main engineering project are acquired through the created sub-engineering project.
Wherein, the template identification information to be created can comprise the name and ID of the template. The development scaffold of the main engineering project comprises an infrastructure of the main engineering project, such as a package management tool, a configuration file, a project foundation dependent package, a software architecture, a local development environment and the like. The development scaffold is a tool for quickly forming an engineering catalog, and is essentially characterized by the encapsulation of a scheme, and a user can realize the creation of an initial file of a project by a simple command.
And S120, initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information.
Specifically, initializing the secondary engineering project according to the template identification information and the development scaffold to obtain 5 initial template files corresponding to the template identification information, including: index. Js, readme. Md, element-settings. Vue, render. Vue, and template-settings. Vue. Wherein index. Js is an entry file of the main project, readme. Md is a project information description file, element-settings. Vue is a template element setting file, render. Vue is a template rendering file, and template-settings is a template parameter setting file. Template development personnel mainly realize template development by modifying three files with vue as suffix names.
S130, the target template file obtained by developing and compiling the initial template file is sent to a server.
Specifically, the file with vue as the suffix name in the initial template file is developed and compiled to obtain target template files corresponding to 5 initial template files, and the target template files are sent to a server for auditing and testing of a main project.
The advantages of this arrangement are that: different template research and development personnel can execute template development business through the auxiliary engineering project, and execute template auditing and testing and page building business in the original main engineering project, so that the template building business of the auxiliary engineering project and the page building business of the main engineering project are not interfered with each other.
According to the technical scheme, the template identification information to be created and the development scaffold of the main engineering project are obtained through the created auxiliary engineering project, the auxiliary engineering project is initialized according to the template identification information and the development scaffold to obtain an initial template file, then the target template file obtained by developing and compiling the initial template file is sent to a server, decoupling of template creation and page building is achieved, and the problem of interference caused by the template creation on the page building is avoided.
Example two
Fig. 2 is a flowchart of a method for generating a visualization template according to a second embodiment of the present invention, where the second embodiment is further optimized based on the first embodiment. As shown in fig. 2, the method includes:
S210, acquiring template identification information to be created and a development scaffold of the main engineering project through the created sub engineering project.
Optionally, the step of obtaining the template identification information to be created and the development scaffold of the main engineering project through the created sub engineering project includes:
acquiring an input template name to be created and a template thumbnail through the created sub engineering project;
The template name and the template thumbnail are sent to a main engineering project, and a template ID corresponding to the template name returned by the main engineering project is received;
And obtaining a development scaffold of the main engineering project.
In general, a large number of templates are required to be used in the construction of a webpage, if a user wants to see the style of the template, each template file needs to be opened to see the style of the template, and thus, a lot of inconvenience is brought to the template selection of the user. Therefore, the template thumbnail can be uploaded in the template file development process, so that a user can conveniently browse and select the template.
Specifically, after the sub-project is created, the template name and the template thumbnail to be created, which are input by a user, are acquired, the template name and the corresponding template thumbnail are sent to the main project, and the main project allocates a template ID for the template to be created according to the received template name and template thumbnail and returns to the sub-project. Since the names and template thumbnails of different templates may be identical, each template needs to be assigned a template ID with a unique identification to identify the different templates. The template ID may be allocated to the template to be created in a random manner, or may be allocated according to a preset rule, for example, the type or style of the template, which is not limited in the embodiment of the present invention. Because the template construction business of the auxiliary project needs to depend on the development environment of the main project, the auxiliary project developed by each template also needs to acquire the development scaffold of the latest version of the main project.
S220, initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information.
Optionally, initializing the secondary engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information includes:
And executing the input initialization command statement through the sub engineering project, and writing the template identification information into the configuration file of the development scaffold to obtain an initial template file corresponding to the template identification information.
For example, using npm tools to install a main project dependency package, executing an input initialization command statement "npm init" through the auxiliary project, generating a configuration file package of a development scaffold under a root directory of the auxiliary project, writing template identification information into the configuration file package, completing one-key initialization of the auxiliary project, and obtaining 5 initial template files corresponding to the template identification information, including: index. Js, readme. Md, element-settings. Vue, render. Vue, and template-settings. Vue.
S230, the target template file obtained by developing and compiling the initial template file is sent to a server.
Optionally, the sending the target template file obtained by developing and compiling the initial template file to the server includes:
Acquiring a target template source file obtained by developing the initial template file;
Compiling the target template source file to obtain a target template compiling file;
Encoding and compressing the target template source file and the target template compiling file to obtain a target template compression package;
and sending the target template compression packet to a server.
Specifically, template code development is carried out in an initial template file obtained by initializing a sub engineering project to obtain a target template source file, and the template source file is compiled to obtain a target template compiling file. Encoding and compressing the target template source file and the target template compiling file to obtain a target template compression package, and sending the target template compression package to a server for a main engineering project to download, audit and test the target template file. And decompressing the target template compression package in the server to obtain a target template file. The encoding mode of the target template source file and the target template compiled file can be realized by calling encodeURIComponent functions, and the decoding mode of the target template compressed package can be realized by calling decodeURIComponent functions. Encoding and decoding of the target template file may also be performed in other manners, which are not limited in this embodiment of the present invention.
In addition, after the sub engineering project sends the target template compression package to the server, prompt information of the template file to be audited is sent to an audit terminal of the main engineering project, so that personnel of the main engineering project can audit the submitted target template file.
S240, acquiring the target template file from a server through the main engineering project so as to enable a user to conduct code auditing on the target template file; and sending the target template file which passes the code verification and the corresponding template identification information to a server.
Specifically, after the sub-engineering project sends the target template compression package to the server, the main engineering project obtains the target template file from the server so as to enable a user to audit the code layer of the target template file. If the target template file passes the code audit, the target template file passing the code audit and the corresponding template identification information are subjected to code compression to obtain a target template compressed file, and the target template compressed file is sent to the server. And compressing and decompressing the file of the target template which is received and passes the code verification at the server. The target template file passing the code audit can be subjected to code compression by using a front-end compressing library, and the server can receive the code through a node service and decompress the code. If the code audit of the target template file is not passed, a prompt message indicating that the code audit is not passed is returned to the sub-engineering project, so that the template research personnel can conveniently modify the template file which is not passed by the code audit in the sub-engineering project.
It should be noted that, in order to facilitate different users to browse different template information and execute operations with different functions in the main engineering project, the main engineering project is divided into an auditing end, a testing end, a management end and a user end. The user who carries out code auditing on the target template file in the sub engineering project mainly refers to an auditing person with auditing rights. Therefore, at the auditing end in the main engineering project, authority auditing needs to be carried out on the account number and the password of the login user. If the login user has the template auditing authority, the prompt message to be audited of the template file sent by the auxiliary engineering project is received, so that auditing personnel can conveniently audit the submitted template file in a code layer, and the method comprises the following steps: code logic auditing and code specification auditing. Meanwhile, prompt information of the template file to be tested is sent to a testing end of the engineering project, so that testing staff can conveniently test the target template file which passes code auditing.
S250, acquiring the code-audited target template file from a server through the main engineering project so as to test the code-audited target template file by a user; and sending the target template file passing the test and the corresponding template identification information to the server.
Specifically, at a testing end in the main engineering project, authority checking is carried out on an account number and a password of a login user. If the login user has the template test authority, receiving prompt information to be tested of the template file sent by the main engineering project auditing end, and acquiring the target template file which is audited and passed from the server end so as to test the target template file according to the template description by the user. If the target template file passes the test, the code compression is carried out on the target template file passing the test and the corresponding template identification information, and the code compression is sent to the server. If the target template file fails the test, a prompt message and a test report of the failed template test are returned to the sub-engineering project, so that a template research and development personnel can conveniently modify the template file which fails the template test according to the test report in the sub-engineering project.
In addition, after the main project testing end sends the target template compression package to the server end, the main project testing end also sends the prompt information of the template file to be online to the management end of the main project, so that main project personnel can carry out auditing treatment on the submitted target template file.
S260, acquiring the target template file passing the test from a server through the main engineering project; and when the online instruction is detected, sending the online instruction to a server, so that the server performs online operation on the tested target template file.
Specifically, at a management end in the main engineering project, authority checking is carried out on an account number and a password of a login user. If the login user has the management authority, receiving prompt information of the template file to be online, which is sent by the main engineering project testing end, and acquiring a target template file passing the test from the service end so as to be browsed and managed by the user. When the management end of the main engineering project detects an online instruction, the online instruction is sent to a server end, so that the server end performs online operation on the target template file passing the test.
Optionally, the method further comprises:
acquiring the use frequency of the target template file through the main engineering project;
If the using frequency is lower than the preset frequency, sending an offline instruction containing template identification information to a server, so that the server performs offline operation on a target template file corresponding to the template identification information.
Specifically, after the target template file is online, the use frequency of all online templates can be monitored through third-party software. A management end in a main engineering project acquires the use frequency of a target template file acquired by the third party software, and if the use frequency is lower than a preset frequency, the management end sends a downloading instruction containing template identification information to a server end so that the server end performs downloading operation on the target template file corresponding to the template identification information; or the management end sends a template display position adjustment instruction containing template identification information to the server end, so that the server end adjusts the template display position of the target template file corresponding to the template identification information according to the template use frequency.
S270, sending the online instruction to a server, so that after the server performs online operation on the target template file passing the test, the method further comprises:
acquiring at least one target template file from a server through the main engineering project;
And building and previewing the visual page according to the at least one target template file.
Specifically, after the management end of the main engineering project submits the auxiliary engineering project and the online operation is carried out on the target template file passing the test, authority checking is carried out on the account number and the password of the login user at the user end in the main engineering project. If the login user has the template use authority, at least one target template file can be obtained from the server, and the page is built through dragging, moving, embedding, shunting and combining the page template.
As shown in fig. 2a, the execution flow of the present embodiment includes: in creating templates, one sub-engineering project needs to be created for each template. And checking the authority of the login user through the auxiliary engineering project, and if the login user has a developer with development authority, the developer can send the template name and the template thumbnail to the main engineering project, develop and self-test the template file and then submit the template code to the main engineering project. And submitting the templates created by each sub-engineering project into the main engineering project. Judging the authority of the login user through the main engineering project, and if the login user has the auditing authority, carrying out code auditing on the template submitted by the auxiliary engineering project; if the login user has the test authority, the template which is passed by the code audit can be tested; if the login user has the management authority, the online operation can be performed on the template which passes both code auditing and testing. If the login user has the template use authority, the online template can be used for page building.
As shown in fig. 2b, the execution flow of the sub-engineering project includes: the development scaffold of the main engineering project is obtained, and the development scaffold comprises a js file of the main engineering project; initializing a git warehouse of the auxiliary project according to the main project development scaffold to obtain a template file. If the user account logged in the sub-project has the template authority, creating a sub-project for each template, rendering and developing codes of the files with vue as the suffix name in the template files to obtain a target template, previewing and viewing the target template, and submitting the target template to the main project.
As shown in fig. 2c, the execution flow of the main engineering project includes: checking authority of a login user, wherein the user with the checking authority can receive a template submitting prompt message of a secondary engineering project at a checking end, download a target template code from a server end, perform code logic checking and code specification checking and send the code logic checking and code specification checking to a testing end; a user with test authority can terminate detention the target templates which pass through the core, and further test the target templates which pass through the verification according to the template description submitted by the research personnel; the user with the management authority can send an online instruction to the server at the management end aiming at the template passing the examination and the test, so that the template is online for the business side to use. The template creation and the page building can be executed in different projects by the template generation method, so that decoupling of the template creation and the page building is realized, and the problem of interference caused by the template creation on the page building is avoided.
According to the technical scheme, the template identification information to be created and the development scaffold of the main engineering project are obtained through the created auxiliary engineering project, the auxiliary engineering project is initialized according to the template identification information and the development scaffold to obtain an initial template file, then the target template file obtained by developing and compiling the initial template file is sent to the server, decoupling of template creation and page building can be achieved, the problem of interference caused by the template creation on the page building is avoided, and template display is adjusted according to the use frequency of the template.
Example III
Fig. 3 is a schematic structural diagram of a device for generating a visual template according to a third embodiment of the present invention. The present embodiment may be applicable to the case of generating a visual template such as an HTML5 page template, where the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides a function of generating a visual template, as shown in fig. 3, where the apparatus for generating a visual template specifically includes a first obtaining module 310, an initializing module 320, and a developing and compiling module 330.
The first obtaining module 310 is configured to obtain, through the created sub-engineering project, template identification information to be created and a development scaffold of the main engineering project;
The initialization module 320 is configured to initialize the secondary engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
And the development and compiling module 330 is used for sending the target template file obtained by developing and compiling the initial template file to the server.
Optionally, the apparatus further includes:
The auditing module is used for acquiring the target template file from the server through the main engineering project after the target template file obtained by developing and compiling the initial template file is sent to the server, so that a user can audit the code of the target template file;
and the first sending module is used for sending the target template file which is checked by the codes and the corresponding template identification information to the server.
Optionally, the apparatus further includes:
The testing module is used for acquiring the code-audited target template file from the server through the main engineering project after the code-audited target template file and the corresponding template identification information are sent to the server, so that a user can test the code-audited target template file;
And the second sending module is used for sending the target template file passing the test and the corresponding template identification information to the server.
Optionally, the apparatus further includes:
the second acquisition module is used for acquiring the target template file passing the test from the server through the main engineering project after transmitting the target template file passing the test and the corresponding template identification information to the server;
and the online module is used for sending the online instruction to a server when the online instruction is detected, so that the server performs online operation on the target template file passing the test.
Optionally, the apparatus further includes:
the third acquisition module is used for sending the online instruction to a server side so that the server side acquires at least one target template file from the server side through the main engineering project after carrying out online operation on the target template file passing the test;
and the page building module is used for building and previewing the visual page according to the at least one target template file.
Optionally, the first obtaining module includes:
The template information acquisition unit is used for acquiring an input template name to be created and a template thumbnail through the created sub-engineering project;
The first sending unit is used for sending the template name and the template thumbnail to a main engineering project and receiving a template ID corresponding to the template name returned by the main engineering project;
and the scaffold acquisition unit is used for acquiring the development scaffold of the main engineering project.
Optionally, the initialization module is specifically configured to:
And executing the input initialization command statement through the sub engineering project, and writing the template identification information into the configuration file of the development scaffold to obtain an initial template file corresponding to the template identification information.
Optionally, the development compiling module includes:
the development unit is used for obtaining a target template source file obtained by developing the initial template file;
the compiling unit is used for compiling the target template source file to obtain a target template compiling file;
the encoding compression unit is used for encoding and compressing the target template source file and the target template compiling file to obtain a target template compression package;
and the second sending unit is used for sending the target template compression packet to a server.
Optionally, the method further comprises:
The using frequency obtaining unit is used for obtaining the using frequency of the target template file through the main engineering project;
and the offline unit is used for sending an offline instruction containing the template identification information to the server side if the use frequency is lower than the preset frequency, so that the server side performs offline operation on the target template file corresponding to the template identification information.
The product can execute the visual template generation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
According to the technical scheme, the template identification information to be created and the development scaffold of the main engineering project are obtained through the created auxiliary engineering project, the auxiliary engineering project is initialized according to the template identification information and the development scaffold to obtain an initial template file, then the target template file obtained by developing and compiling the initial template file is sent to the server, decoupling of template creation and page building can be achieved, the problem of interference caused by the template creation on the page building is avoided, and template display is adjusted according to the use frequency of the template.
Example IV
Fig. 4 is a schematic structural diagram of a computer device in a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary computer device 412 suitable for use in implementing embodiments of the invention. The computer device 412 shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in FIG. 4, computer device 412 is in the form of a general purpose computing device. Components of computer device 412 may include, but are not limited to: one or more processors or processing units 416, a system memory 428, and a bus 418 that connects the various system components (including the system memory 428 and processing units 416).
Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 428 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 430 and/or cache memory 432. The computer device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 418 via one or more data medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored in, for example, memory 428, such program modules 442 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. Program modules 442 generally perform the functions and/or methodologies in the described embodiments of the invention.
The computer device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), one or more devices that enable a user to interact with the computer device 412, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 412 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 422. Moreover, computer device 412 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 420. As shown, network adapter 420 communicates with other modules of computer device 412 over bus 418. It should be appreciated that although not shown in fig. 4, other hardware and/or software modules may be used in connection with computer device 412, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 416 executes various functional applications and data processing by running a program stored in the system memory 428, for example, to implement a method for generating a visualization template according to an embodiment of the present invention, including:
Acquiring template identification information to be created and a development scaffold of a main engineering project through the created auxiliary engineering project;
Initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
and sending the target template file obtained by developing and compiling the initial template file to a server.
Example five
A fifth embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method for generating a visualization template as provided in all embodiments of the present application: acquiring template identification information to be created and a development scaffold of a main engineering project through the created auxiliary engineering project;
Initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
and sending the target template file obtained by developing and compiling the initial template file to a server.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. A method for generating a visualization template, comprising:
Acquiring template identification information to be created and a development scaffold of a main engineering project through the created auxiliary engineering project;
Initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
The target template file obtained by developing and compiling the initial template file is sent to a server;
after the target template file obtained by developing and compiling the initial template file is sent to the server, the method further comprises the following steps:
Acquiring the target template file from a server through the main engineering project so as to enable a user to carry out code auditing on the target template file;
Transmitting the target template file which passes the code verification and the corresponding template identification information to a server; if the code audit of the target template file is not passed, returning a prompt message that the code audit is not passed to the sub-engineering project;
after the target template file and the corresponding template identification information which pass the code audit are sent to the server, the method further comprises the following steps:
Acquiring the code-audited target template file from a server through the main engineering project so as to test the code-audited target template file by a user;
transmitting the target template file passing the test and the corresponding template identification information to a server;
acquiring the target template file passing the test from a server through the main engineering project;
When an online instruction is detected, sending the online instruction to a server, so that the server performs online operation on the target template file passing the test; judging the authority of a login user through a main engineering project, if the login user has the template use authority, acquiring at least one target template file after online from a server, and building and previewing a visual page according to the at least one target template file.
2. The method according to claim 1, wherein the obtaining template identification information to be created and the development scaffold of the main engineering project through the created sub engineering project comprises:
acquiring an input template name to be created and a template thumbnail through the created sub engineering project;
The template name and the template thumbnail are sent to a main engineering project, and a template ID corresponding to the template name returned by the main engineering project is received;
And obtaining a development scaffold of the main engineering project.
3. The method according to claim 1, wherein initializing the sub-engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information comprises:
And executing the input initialization command statement through the sub engineering project, and writing the template identification information into the configuration file of the development scaffold to obtain an initial template file corresponding to the template identification information.
4. The method of claim 1, wherein the sending the target template file obtained by developing and compiling the initial template file to the server side includes:
Acquiring a target template source file obtained by developing the initial template file;
Compiling the target template source file to obtain a target template compiling file;
Encoding and compressing the target template source file and the target template compiling file to obtain a target template compression package;
and sending the target template compression packet to a server.
5. The method of any one of claims 1-4, further comprising:
acquiring the use frequency of the target template file through the main engineering project;
If the using frequency is lower than the preset frequency, sending an offline instruction containing template identification information to a server, so that the server performs offline operation on a target template file corresponding to the template identification information.
6. A visual template generating apparatus, comprising:
the first acquisition module is used for acquiring template identification information to be created and a development scaffold of the main engineering project through the created auxiliary engineering project;
The initialization module is used for initializing the auxiliary engineering project according to the template identification information and the development scaffold to obtain an initial template file corresponding to the template identification information;
The development and compiling module is used for sending the target template file obtained by developing and compiling the initial template file to a server;
The apparatus further comprises:
The auditing module is used for acquiring the target template file from the server through the main engineering project after the target template file obtained by developing and compiling the initial template file is sent to the server, so that a user can audit the code of the target template file;
the first sending module is used for sending the target template file which is checked by the codes and the corresponding template identification information to the server;
if the code audit of the target template file is not passed, returning a prompt message that the code audit is not passed to the sub-engineering project;
The testing module is used for acquiring the code-audited target template file from the server through the main engineering project after the code-audited target template file and the corresponding template identification information are sent to the server, so that a user can test the code-audited target template file;
the second sending module is used for sending the target template file passing the test and the corresponding template identification information to the server;
the second acquisition module is used for acquiring the target template file passing the test from the server through the main engineering project;
The online module is used for sending an online instruction to a server when the online instruction is detected, so that the server performs online operation on the target template file passing the test;
The third acquisition module is used for judging the authority of the login user through the main engineering project, and if the login user has the template use authority, acquiring at least one target template file after online from the server;
and the page building module is used for building and previewing the visual page according to the at least one target template file.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating a visualization template according to any of claims 1-5 when the program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of generating a visualization template according to any of claims 1-5.
CN202011613782.8A 2020-12-30 2020-12-30 Method, device, equipment and storage medium for generating visual template Active CN112685029B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011613782.8A CN112685029B (en) 2020-12-30 2020-12-30 Method, device, equipment and storage medium for generating visual template
PCT/CN2021/133085 WO2022142896A1 (en) 2020-12-30 2021-11-25 Generation method and apparatus for visualizable template, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011613782.8A CN112685029B (en) 2020-12-30 2020-12-30 Method, device, equipment and storage medium for generating visual template

Publications (2)

Publication Number Publication Date
CN112685029A CN112685029A (en) 2021-04-20
CN112685029B true CN112685029B (en) 2024-07-16

Family

ID=75455415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011613782.8A Active CN112685029B (en) 2020-12-30 2020-12-30 Method, device, equipment and storage medium for generating visual template

Country Status (2)

Country Link
CN (1) CN112685029B (en)
WO (1) WO2022142896A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685029B (en) * 2020-12-30 2024-07-16 京东科技控股股份有限公司 Method, device, equipment and storage medium for generating visual template
CN113157274B (en) * 2021-05-20 2023-11-24 抖音视界有限公司 Software development method and device based on micro front end, electronic equipment and storage medium
CN113378091B (en) * 2021-06-08 2024-05-14 北京百度网讯科技有限公司 Visualized item generation method and device, electronic equipment and storage medium
CN113535182B (en) * 2021-06-30 2023-02-17 上海浦东发展银行股份有限公司 Project engineering construction method and device, computer equipment and storage medium
CN113467772B (en) * 2021-07-12 2022-06-14 工银科技有限公司 Project template generation method and device, electronic equipment and storage medium
CN114461195A (en) * 2022-02-16 2022-05-10 上海哔哩哔哩科技有限公司 Project generation method and device
CN115017434A (en) * 2022-06-16 2022-09-06 特赞(上海)信息科技有限公司 Dynamic template loading rendering method and system based on access path
CN115623046B (en) * 2022-12-19 2023-03-10 思创数码科技股份有限公司 Sensing equipment monitoring method and system
CN116107559A (en) * 2023-01-30 2023-05-12 飞算数智科技(深圳)有限公司 Data development method and device, storage medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795088A (en) * 2019-10-29 2020-02-14 京东数字科技控股有限公司 Front-end engineering project construction method and tool, and computer-readable storage medium

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6968541B1 (en) * 2000-10-04 2005-11-22 International Business Machines Corporation Apparatus and method for template instantiation with a cross compiler
US20080189679A1 (en) * 2007-02-05 2008-08-07 Jared Rodriguez Method and system for creating, deploying, and utilizing a service
US9772862B2 (en) * 2013-02-07 2017-09-26 Oracle International Corporation Integration project center
US20170090890A1 (en) * 2015-09-30 2017-03-30 Semmle Limited Virtual compositions
EP3299955B1 (en) * 2016-09-23 2022-10-26 Siemens Aktiengesellschaft System, method and computer program product for creating an engineering project in an industrial automation environment
CN106569869B (en) * 2016-11-14 2019-04-19 平安科技(深圳)有限公司 Plug-in unit packaging method and device
US10095489B1 (en) * 2016-12-22 2018-10-09 EMC IP Holding Company LLC GUI-based application template for containerized application software development
CN106843869B (en) * 2017-01-16 2020-04-14 百融云创科技股份有限公司 Front-end development engineering system and method
CN106897072B (en) * 2017-02-28 2022-01-07 北京三快在线科技有限公司 Service engineering calling method and device and electronic equipment
US10466981B1 (en) * 2017-06-06 2019-11-05 Prattle Analytics, LLC System and method for generative programming in an integrated development environment (IDE)
CN109885311B (en) * 2019-01-28 2023-09-29 平安科技(深圳)有限公司 Application program generation method and device
CN111290753B (en) * 2020-01-20 2023-05-30 远光软件股份有限公司 Method, device, equipment and storage medium for building front-end development environment
CN111124376B (en) * 2020-01-20 2023-08-11 众能联合数字技术有限公司 construction project system of codeCli scaffold
CN111367510B (en) * 2020-02-24 2024-03-19 腾讯音乐娱乐科技(深圳)有限公司 Android function module development method and device
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects
CN111488286B (en) * 2020-04-15 2024-02-09 腾讯音乐娱乐科技(深圳)有限公司 Method and device for independently developing Android modules
CN111680253B (en) * 2020-06-08 2022-06-28 南京领行科技股份有限公司 Page application data packet generation method and device, computer equipment and storage medium
CN111796860B (en) * 2020-06-28 2024-01-30 中国工商银行股份有限公司 Micro front end scheme implementation method and device
CN111596965B (en) * 2020-07-22 2020-11-03 太平金融科技服务(上海)有限公司 Project engineering initialization method, device, computer equipment and storage medium
CN111897553B (en) * 2020-08-28 2024-02-27 杭州安恒信息技术股份有限公司 Project system building method, device, equipment and readable storage medium
CN112685029B (en) * 2020-12-30 2024-07-16 京东科技控股股份有限公司 Method, device, equipment and storage medium for generating visual template

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795088A (en) * 2019-10-29 2020-02-14 京东数字科技控股有限公司 Front-end engineering project construction method and tool, and computer-readable storage medium

Also Published As

Publication number Publication date
WO2022142896A1 (en) 2022-07-07
CN112685029A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN112685029B (en) Method, device, equipment and storage medium for generating visual template
CN111625473B (en) Interface test case generation method and device, storage medium and electronic equipment
US20210049137A1 (en) Building and managing data-processign attributes for modeled data sources
US9804862B2 (en) Translatable texts identification in in-context localization utilizing pseudo-language and an external server
US8949378B2 (en) Method and system for providing a state model of an application program
CN110825431B (en) Interface document processing method, device, system, storage medium and electronic equipment
CN111736840A (en) Compiling method and running method of applet, storage medium and electronic equipment
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN108984202B (en) Electronic resource sharing method and device and storage medium
CN110807056A (en) Excel-based report processing method, Excel-based report processing device, Excel-based report processing medium and electronic equipment
CN115357319A (en) User interface rendering method and device
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN113419711A (en) Page guiding method and device, electronic equipment and storage medium
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN110795137B (en) Authority configuration method, device, system, electronic equipment and readable medium
CN111581098A (en) Interface data transfer storage method, device, server and storage medium
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment
CN113282285B (en) Code writing method, device, electronic equipment and storage medium
CN114237576A (en) Code generation method, device, equipment and storage medium based on planar design
CN108170557B (en) Method and apparatus for outputting information
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN113360417B (en) Test method, session modifier, electronic device and medium
WO2024000917A1 (en) Non-intrusive, pluggable front-end build transfer acceleration method and apparatus
CN113760706B (en) Webpage debugging method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

GR01 Patent grant
GR01 Patent grant