CN113946397A - Display package packaging method, device, system and storage medium - Google Patents
Display package packaging method, device, system and storage medium Download PDFInfo
- Publication number
- CN113946397A CN113946397A CN202111213876.0A CN202111213876A CN113946397A CN 113946397 A CN113946397 A CN 113946397A CN 202111213876 A CN202111213876 A CN 202111213876A CN 113946397 A CN113946397 A CN 113946397A
- Authority
- CN
- China
- Prior art keywords
- template
- packaging
- theme
- scaffold
- language
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/454—Multi-language systems; Localisation; Internationalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a display package packing method, which is applied to the technical field of financial science and technology and comprises the following steps: setting a required theme, a template and a language according to a preset scene, and constructing a universal webpage scaffold, wherein the universal webpage scaffold is used for packing according to an input variable and inputting a universal packing instruction into the universal webpage scaffold, the universal packing instruction comprises a preset variable, and the universal webpage scaffold is used for packing the theme, the template and the language respectively according to the preset variable to obtain a display package. The disclosure also provides a display package packaging device, a display package packaging system and a storage medium.
Description
Technical Field
The present disclosure relates to the field of financial technology, and more particularly, to a display package packing method, device, system, and storage medium.
Background
When a user accesses a website page, different themes are set in different time scenes, the page style and the template can change along with the scene requirements, and some companies with higher international requirements can switch different languages according to the language of the browser. Therefore, when a website is on-line, different templates and themes need to be set, the required templates and themes are displayed according to the setting, and different language versions are displayed according to the language scene of the current browser.
However, the prior art is limited by the size of the browser cache, and the browser capabilities of different manufacturers are different, so that the cache needs of large-scale and rich resource websites are difficult to meet.
Disclosure of Invention
In view of the above, the present disclosure provides a display package packaging method, device, system and storage medium.
One aspect of the present disclosure provides a display package packing method, including:
setting required themes, templates and languages according to a preset scene;
constructing a universal webpage scaffold, wherein the universal webpage scaffold is used for packaging according to input variables;
inputting a general packing instruction into the webpage general scaffold, wherein the general packing instruction comprises a preset variable;
and packaging the theme, the template and the language respectively by using the webpage universal scaffold according to the preset variable to obtain a display package.
In an embodiment of the present disclosure, the constructing a universal scaffold for web pages includes:
and adding a file routing access unified configuration to introduce different templates through mapping by inputting different instructions.
In an embodiment of the present disclosure, the adding of the file routing access unified configuration includes:
the file routing access unified configuration is increased by a first method comprising a method of introducing a Common directory address and/or by a second method comprising a method of introducing a current configuration file pointing to a route.
In an embodiment of the present disclosure, the method further includes:
packaging the first method and the second method as a new method;
when the file under the directory corresponding to the second method is found, returning to the second method;
and when the file under the directory corresponding to the second method is not found, returning to the first method.
In an embodiment of the present disclosure, when the preset scene does not need a general template, the second method is adopted.
In an embodiment of the present disclosure, the respectively packaging the theme and the template according to the preset variable by using the universal scaffold for web pages includes:
packaging the theme packs of all specific styles and the theme pack of the default style to obtain a theme pack set;
packaging all template packages with specific styles and template packages with default styles to obtain a template package set;
and merging the theme pack set and the template pack set to generate the display pack.
In an embodiment of the present disclosure, the packaging the theme packs in all the specific styles and the theme pack in the default style to obtain the theme pack set includes:
packaging the theme pack of the default style, and adding default attributes to a root element rendered by the browser;
packaging each theme pack of a specific style, wherein each theme pack wraps all styles by adopting a corresponding root element attribute;
and packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set.
In an embodiment of the present disclosure, the packaging all the template packets of the specific style and the template packets of the default style to obtain the template packet set includes:
and introducing the template packages of all the specific styles and the template packages of the default styles to be packaged through the first method or the second method to obtain a template package set.
In an embodiment of the present disclosure, packaging the language according to the preset variable by using the universal scaffold for web pages includes:
adding a configuration about language switching in the template;
and correspondingly placing all the documents needing to be switched in the template into the same data one by one according to the language versions.
In an embodiment of the present disclosure, the method further includes:
and sending the display package to a server.
In an embodiment of the present disclosure, the server is configured with two static files, one static file places a theme value of a current page, and the other theme file places a template value of the current page, and the method further includes:
when the user accesses the current page, reading the template address directory to be extracted according to the static file of the template in the server, and returning the corresponding template address directory so as to enable the user interface to display the template to be displayed.
In an embodiment of the present disclosure, the method further includes:
when a multi-language template exists, acquiring a language version of a current user according to a request of the current user;
if the current user language version exists in the template, returning the template address of the current user language version;
and if the current user language version does not exist in the template, returning to the default template address.
Another aspect of the present disclosure provides a display pack packing apparatus, including:
the setting module is used for setting required themes, templates and languages according to a preset scene;
the building module is used for building a webpage universal scaffold, and the webpage universal scaffold is used for packing according to the input variables;
the input module is used for inputting a general packing instruction into the webpage general scaffold, and the general packing instruction comprises a preset variable;
and the packaging module is used for packaging the theme, the template and the language respectively according to the preset variable by utilizing the webpage universal scaffold to obtain a display package.
In an embodiment of the present disclosure, the building module is specifically configured to add a uniform configuration for file routing access, so as to introduce different templates by inputting different instructions and mapping.
In an embodiment of the present disclosure, the adding of the file routing access unified configuration includes: the file routing access unified configuration is increased by a first method comprising a method of introducing a Common directory address and/or by a second method comprising a method of introducing a current configuration file pointing to a route.
In an embodiment of the present disclosure, the apparatus further includes:
an encapsulation module for encapsulating the first method and the second method as a new method;
the first returning module is used for returning the second method when finding the file under the directory corresponding to the second method;
and the second returning module is used for returning the first method when the file under the directory corresponding to the second method is not found.
In an embodiment of the present disclosure, when the preset scene does not need a general template, the second method is adopted.
In an embodiment of the present disclosure, in the packing module: utilizing the universal webpage scaffold, and respectively packaging the theme and the template according to the preset variable comprises the following steps:
packaging the theme packs of all specific styles and the theme pack of the default style to obtain a theme pack set;
packaging all template packages with specific styles and template packages with default styles to obtain a template package set;
and merging the theme pack set and the template pack set to generate the display pack.
In an embodiment of the present disclosure, the packaging the theme packs in all the specific styles and the theme pack in the default style to obtain the theme pack set includes:
packaging the theme pack of the default style, and adding default attributes to a root element rendered by the browser;
packaging each theme pack of a specific style, wherein each theme pack wraps all styles by adopting a corresponding root element attribute;
and packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set.
In an embodiment of the present disclosure, the packaging all the template packets of the specific style and the template packets of the default style to obtain the template packet set includes:
and introducing the template packages of all the specific styles and the template packages of the default styles to be packaged through the first method or the second method to obtain a template package set.
In an embodiment of the present disclosure, the packaging module, using the universal scaffold for web pages, according to the preset variable, includes:
adding a configuration about language switching in the template;
and correspondingly placing all the documents needing to be switched in the template into the same data one by one according to the language versions.
In an embodiment of the present disclosure, the apparatus further includes: and the sending module is used for sending the display package to a server.
In an embodiment of the present disclosure, the server is configured with two static files, one static file places a theme value of a current page, and the other theme file places a template value of the current page, and the apparatus further includes:
and the reading and returning module is used for reading the template address directory required to be extracted according to the static file of the template in the server and returning the corresponding template address directory when the user accesses the current page so as to enable the user interface to display the template required to be displayed.
In an embodiment of the present disclosure, the apparatus further includes:
the language version acquisition module is used for acquiring the language version of the current user according to the request of the current user when the multi-language template exists;
the first address returning module is used for returning the template address of the current user language version if the current user language version exists in the template;
and the second address returning module is used for returning the default template address if the current user language version does not exist in the template.
Another aspect of the present disclosure provides a computer system comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the presentation package packaging method and apparatus of the present disclosure may be applied;
FIG. 2 schematically illustrates a flow chart of a presentation package packing method according to an embodiment of the present disclosure;
fig. 3 schematically shows a flowchart of operation S204 according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a display package packing apparatus according to an embodiment of the present disclosure; and
FIG. 5 schematically shows a block diagram of a computer system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a display package packaging method. The method comprises the steps of setting a required theme, a template and a language according to a preset scene, and constructing a universal webpage scaffold, wherein the universal webpage scaffold is used for packing according to an input variable, inputting a universal packing instruction into the universal webpage scaffold, the universal packing instruction comprises a preset variable, and the theme, the template and the language are respectively packed according to the preset variable by utilizing the universal webpage scaffold to obtain a display package.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the presentation package packaging method may be applied, according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the display package packaging method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the display package packaging apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The display package packaging method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the display package packaging apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the display package packaging method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Correspondingly, the display package packaging device provided by the embodiment of the disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a presentation package packing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a desired theme, template, and language are set according to a preset scene.
In operation S202, a web-page universal scaffold for packing according to the input variables is constructed.
In operation S203, a universal packing command is input into the universal scaffold for web page, where the universal packing command includes a preset variable.
In operation S204, the subject, the template, and the language are respectively packaged by using the universal scaffold for web pages according to the preset variable, so as to obtain a display package.
In the disclosure, when a user accesses a website page, the website page may set different themes in different time scenes, the page style and the template may change according to the scene needs, when the website is online, different templates and themes may need to be set, and the required templates and themes may be displayed according to the scene settings. Furthermore, different language versions can be displayed according to the language scene of the current browser or the electronic equipment.
According to the method, a related operation command is executed through a webpage universal scaffold amount graph, all themes, templates and languages required by scenes are packaged, a display package accessible by a server is generated, the display package can be placed on a Nginx server, the Nginx server has corresponding configuration, a packaged file directory is configured, when a user accesses a website, a request is sent to the Nginx server, the packaged directory is accessed according to the configuration of the Nginx server, the packaged directory is returned to a browser, and therefore the user can normally access the website.
In some embodiments of the present disclosure, according to the preset scene needs, the required subject (the 1, the 2.), template (Data1, Data 2.), language (Lang1, Lang 2.). are set, and since the language is a switching of one language based on the same template, some languages need to be customized and not completely 1: 1 copied, the language is used as a special form of the template. All the templates are split into a Common template (Common) according to the directory as required, wherein the Common template is a template 1, and the Common template is a template 2.
In some embodiments of the present disclosure, a set of templates, a set of subjects, a set of language-simple universal frameworks (sims), are generated initially and are uniformly placed in a Common template (Common) directory, and customized and related framework templates different from the universal frameworks are placed in the corresponding directories of the remaining templates 1 and 2. The main board is set as a default (default) value by default, a default theme color library and theme pictures are configured, corresponding pictures and patterns (/ the 1/img/. or/the 2/img/. or/the) are placed under the rest corresponding directory structures according to a preset theme, the corresponding pictures and patterns are consistent with the template rule, and the patterns and pictures different from the default theme are placed under the theme directory.
In some embodiments of the disclosure, the general module of the whole page is detached and separated, the module is divided into small modules, the small templates are nested according to the requirements of the templates, each template is configured with the position and the size of the required small module, the whole template display of the page is realized through page nesting, and the general template is output. For example, the general template is < layout > < header > < home > </home > </layout >, each small module corresponds to a similar module if the small module can be split, and finally a final module version is generated through a nested tree layer structure of the modules, so that a final general module is generated.
In some embodiments of the present disclosure, when there is some customization, a new customization module is introduced under the same path as the generic template where the corresponding template is inconsistent, the module corresponding to the previous one, such as < home > </home > is common/home/index.html at the address of common module, data1/home/index.html is pointed to at the module corresponding to template 1, and so on.
In an embodiment of the present disclosure, operation S202: the method for building the webpage universal scaffold comprises the step of adding a file routing access unified configuration so as to map and introduce different templates by inputting different instructions.
In an embodiment of the present disclosure, the adding of the file routing access unified configuration comprises adding the file routing access unified configuration by a first method and/or a second method, the first method comprising a method of introducing a Common directory address, the second method comprising a method of introducing a current configuration file pointing to a route. For example, when the command input is data1, the first method returns the path common/xx/xx/. when the command input is data2, the 2 nd method returns the path data1/xx/xx/..
In an embodiment of the present disclosure, the first method and the second method are packaged as a new method; when the file under the directory corresponding to the second method is found, returning to the second method; and when the file under the directory corresponding to the second method is not found, returning to the first method.
In an embodiment of the present disclosure, when the template introduces the corresponding file, a merged scheme is adopted by default. Due to different customization requirements, the second method can be directly adopted when the default general template is not needed in the preset scene, so that flexible configuration is achieved.
Fig. 3 schematically shows a flowchart of operation S204 according to an embodiment of the present disclosure.
As shown in fig. 3, fig. 3 schematically shows a flow chart of the process of packaging the theme, the template and the language respectively according to the preset variable by using the universal scaffold on the web page shown in fig. 2 to obtain the display package. On the basis of the above embodiment, as shown in fig. 3 with continued reference, operation S204 in this embodiment includes operations S301 to S303.
In operation S301, theme packs of all specific styles and theme packs of default styles are packaged to obtain a theme pack set.
In operation S302, all the template packets of the specific style and the template packets of the default style are packaged to obtain a template packet set.
In operation S303, the theme pack set and the template pack set are merged to generate the presentation pack.
In an embodiment of the present disclosure, in operation S301, the step of packaging the theme packs in all the specific styles and the theme pack in the default style to obtain a theme pack set includes: packaging the theme pack of the default style, and adding default attributes to a root element rendered by the browser; packaging each theme pack of a specific style, wherein each theme pack wraps all styles by adopting a corresponding root element attribute; and packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set.
In the present disclosure, due to the default attribute of the browser webpage, a specific attribute is added to the root element rendered by the browser, and all the following elements can be matched with the corresponding style according to the attribute of the root element. And packing the theme packs with default styles, adding default attributes (default) to root elements by default to realize the display of all default styles, uniformly packing all theme packs with each theme, wrapping all styles on each theme pack by using the corresponding root element attributes, and displaying the styles of the corresponding themes when a browser webpage is introduced into the theme packs and the corresponding theme values are added to the root elements.
In an embodiment of the present disclosure, in operation S302, the packing the template packages of all the specific styles and the template package of the default style to obtain the template package set includes: and introducing the template packages of all the specific styles and the template package of the default style to be packaged by the first method or the second method to obtain a template package set.
In an embodiment of the present disclosure, packaging the language according to the preset variable by using the universal scaffold for web pages includes: adding a configuration related to language switching in the template; and correspondingly placing all the documents needing to be switched in the template into the same data one by one according to the language versions.
In the disclosure, when the template instruction is a language version, in addition to the configuration of the above template, a configuration related to language switching is added, a language version variable is saved, and a method of language identification is encapsulated.
In the present disclosure, a general packing command is input in the scaffold and a preset variable is injected in the packing command. Such as packing Data1, the scaffold packing method is executed and the injection variable method provided by the scaffold is added later, i.e. the input variable values can be accessed in all projects. In the packaging process, all theme packages are packaged firstly, including the theme packages in the default style and the theme packages in the specific style, all the theme packages are packaged and temporarily stored, and then the template packages are packaged.
In the disclosure, each template is introduced by default through a first method or a second method, different methods are configured according to different scene requirements, for example, the template 1 corresponds to the configuration of the template 1, and the template 2 corresponds to the configuration of the template 2, so that a universal template can be introduced in a packaging process, and a customized template can be introduced according to a customized requirement. And combining the packaged template with the theme package to generate a final package.
In the present disclosure, preset variables output corresponding packets according to themes, templates and languages set based on preset scenes, a packet of Data1 is generated when the input variable is Data1, a packet of Data2 is generated when the input variable is Data2, a packet of Lang1 is output when the input variable is language Lang1, and a packet of Lang2 is output when the input variable is language Lang2.
In an embodiment of the present disclosure, the display package packing method shown in fig. 2 further includes: and sending the display package to a server. The server may be a Nignx server.
In an embodiment of the present disclosure, the server is configured with two static files, one of the static files places a theme value of a current page, and the other of the theme files places a template value of the current page, and the method shown in fig. 2 further includes: when the user accesses the current page, the template address directory required to be extracted is read according to the static file of the template in the server, and the corresponding template address directory is returned so that the user interface displays the template required to be displayed.
In an embodiment of the present disclosure, the method shown in fig. 2 further includes: when a multi-language template exists, acquiring a language version of a current user according to a request of the current user; if the current user language version exists in the template, returning the template address of the current user language version; if the current user language version does not exist in the template, returning to the default template address.
In the disclosure, when a user accesses a page, the server is accessed, the server reads a template address directory to be extracted according to a static file of a template in the server, returns a corresponding template address directory, and the user interface displays the template to be displayed. And when the multi-language template exists, the browser acquires the language version of the current user according to the request of the current user, and if the template address of the language version returned by the corresponding language exists, the default template address is returned if the template address of the language version returned by the corresponding language does not exist. After the current webpage is rendered, the static file of the server is requested to obtain the theme static file, after the static file is returned by the server, the corresponding theme value is added to the root directory of the browser webpage, and the theme pack is displayed in a matching mode according to the attribute of the root element, so that the theme and the template corresponding to the webpage display are achieved.
Fig. 4 schematically illustrates a block diagram of a display package packing apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the display package packaging apparatus 400 includes a setup module 410, a build module 420, an input module 430, and a packaging module 440.
A setting module 410, configured to set a required theme, template and language according to a preset scene;
the building module 420 is used for building a webpage universal scaffold, and the webpage universal scaffold is used for packing according to the input variables;
an input module 430, configured to input a general packing instruction into the universal scaffold for web pages, where the general packing instruction includes a preset variable;
and the packing module 440 is configured to pack the theme, the template and the language respectively according to the preset variable by using the universal scaffold for the webpage to obtain a display package.
In an embodiment of the present disclosure, the building module 420 is specifically configured to add a file routing access unified configuration, so that different templates are introduced by inputting different instructions and mapping.
In an embodiment of the present disclosure, the adding of the file routing access unified configuration includes: the file routing access unification configuration is increased by a first method comprising a method of introducing a Common directory address and/or by a second method comprising a method of introducing a current configuration file pointing to a route.
In an embodiment of the present disclosure, the apparatus 400 further includes:
an encapsulation module for encapsulating the first method and the second method as a new method;
the first returning module is used for returning the second method when finding the file under the directory corresponding to the second method;
and the second returning module is used for returning the first method when the file under the directory corresponding to the second method is not found.
In an embodiment of the present disclosure, when the preset scene does not need the universal template, the second method is adopted.
In an embodiment of the present disclosure, in the packing module 440: utilizing this general scaffold of webpage, according to this preset variable, packing respectively including this theme and template: packaging the theme packs of all specific styles and the theme pack of the default style to obtain a theme pack set;
packaging all template packages with specific styles and template packages with default styles to obtain a template package set; and merging the theme pack set and the template pack set to generate the display pack.
In an embodiment of the present disclosure, the packaging the theme packs of all the specific styles and the theme pack of the default style to obtain the theme pack set includes: packaging the theme pack of the default style, and adding default attributes to a root element rendered by the browser; packaging each theme pack of a specific style, wherein each theme pack wraps all styles by adopting a corresponding root element attribute; and packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set.
In an embodiment of the present disclosure, the packaging all the template packets of the specific style and the template packets of the default style to obtain the template packet set includes: and introducing the template packages of all the specific styles and the template package of the default style to be packaged by the first method or the second method to obtain a template package set.
In an embodiment of the present disclosure, the packaging module 440, using the universal scaffold for web pages, according to the preset variable, packages the language including: adding a configuration related to language switching in the template; and correspondingly placing all the documents needing to be switched in the template into the same data one by one according to the language versions.
In an embodiment of the present disclosure, the apparatus 400 further includes: and the sending module is used for sending the display package to a server.
In an embodiment of the present disclosure, the server is configured with two static files, one of the static files places a theme value of a current page, and the other of the theme files places a template value of the current page, and the apparatus further includes: and the reading and returning module is used for reading the template address directory required to be extracted according to the static file of the template in the server and returning the corresponding template address directory when the user accesses the current page so as to enable the user interface to display the template required to be displayed.
In an embodiment of the present disclosure, the apparatus 400 further includes:
the language version acquisition module is used for acquiring the language version of the current user according to the request of the current user when the multi-language template exists;
the first address returning module is used for returning the template address of the current user language version if the current user language version exists in the template;
and the second address returning module is used for returning the default template address if the current user language version does not exist in the template.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the setup module 410, the construction module 420, the input module 430, and the packing module 440 may be combined into one module/unit/sub-unit to be implemented, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the setup module 410, the build module 420, the input module 430, and the packing module 440 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the setup module 410, the construction module 420, the input module 430 and the packaging module 440 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
It should be noted that, the display package packing apparatus portion in the embodiment of the present disclosure corresponds to the display package packing method portion in the embodiment of the present disclosure, and the description of the display package packing apparatus portion specifically refers to the display package packing method portion, which is not described herein again.
Fig. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 5 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 5, a computer system 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the system 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, system 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), 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 the present disclosure, 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.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (17)
1. A display package packaging method comprises the following steps:
setting required themes, templates and languages according to a preset scene;
constructing a universal webpage scaffold, wherein the universal webpage scaffold is used for packaging according to input variables;
inputting a general packing instruction into the webpage general scaffold, wherein the general packing instruction comprises a preset variable;
and packaging the theme, the template and the language respectively by using the webpage universal scaffold according to the preset variable to obtain a display package.
2. The method of claim 1, wherein the constructing a web-generic scaffold comprises:
and adding a file routing access unified configuration to introduce different templates through mapping by inputting different instructions.
3. The method of claim 2, wherein the adding a file routing access unification configuration comprises:
the file routing access unified configuration is increased by a first method comprising a method of introducing a Common directory address and/or by a second method comprising a method of introducing a current configuration file pointing to a route.
4. The method of claim 3, further comprising:
packaging the first method and the second method as a new method;
when the file under the directory corresponding to the second method is found, returning to the second method;
and when the file under the directory corresponding to the second method is not found, returning to the first method.
5. The method of claim 4, wherein,
and when the preset scene does not need a universal template, adopting the second method.
6. The method according to any one of claims 3 to 5, wherein the packaging the theme and the template according to the preset variable respectively by using the web-page universal scaffold comprises:
packaging the theme packs of all specific styles and the theme pack of the default style to obtain a theme pack set;
packaging all template packages with specific styles and template packages with default styles to obtain a template package set;
and merging the theme pack set and the template pack set to generate the display pack.
7. The method of claim 6, wherein the packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set comprises:
packaging the theme pack of the default style, and adding default attributes to a root element rendered by the browser;
packaging each theme pack of a specific style, wherein each theme pack wraps all styles by adopting a corresponding root element attribute;
and packaging the theme packs of all the specific styles and the theme pack of the default style to obtain a theme pack set.
8. The method of claim 6, wherein the packaging all the template packages of the specific styles and the template package of the default style to obtain the template package set comprises:
and introducing the template packages of all the specific styles and the template packages of the default styles to be packaged through the first method or the second method to obtain a template package set.
9. The method of claim 6, wherein packaging the language according to the preset variables using the web-page universal scaffold comprises:
adding a configuration about language switching in the template;
and correspondingly placing all the documents needing to be switched in the template into the same data one by one according to the language versions.
10. The method of claim 1, wherein the method further comprises:
and sending the display package to a server.
11. The method of claim 10, the server configured with two static files, one of the static files placing a subject value of a current page and the other of the subject files placing a template value of the current page, the method further comprising:
when the user accesses the current page, reading the template address directory to be extracted according to the static file of the template in the server, and returning the corresponding template address directory so as to enable the user interface to display the template to be displayed.
12. The method of claim 11, further comprising:
when a multi-language template exists, acquiring a language version of a current user according to a request of the current user;
if the current user language version exists in the template, returning the template address of the current user language version;
and if the current user language version does not exist in the template, returning to the default template address.
13. A display pack packaging apparatus comprising:
the setting module is used for setting required themes, templates and languages according to a preset scene;
the building module is used for building a webpage universal scaffold, and the webpage universal scaffold is used for packing according to the input variables;
the input module is used for inputting a general packing instruction into the webpage general scaffold, and the general packing instruction comprises a preset variable;
and the packaging module is used for packaging the theme, the template and the language respectively according to the preset variable by utilizing the webpage universal scaffold to obtain a display package.
14. The apparatus according to claim 13, wherein the building module is specifically configured to add a file routing access unification configuration to introduce different templates by inputting different instructions for mapping.
15. The apparatus of claim 14, wherein the adding a file routing access unification configuration comprises: the file routing access unified configuration is increased by a first method comprising a method of introducing a Common directory address and/or by a second method comprising a method of introducing a current configuration file pointing to a route.
16. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-12.
17. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111213876.0A CN113946397A (en) | 2021-10-18 | 2021-10-18 | Display package packaging method, device, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111213876.0A CN113946397A (en) | 2021-10-18 | 2021-10-18 | Display package packaging method, device, system and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113946397A true CN113946397A (en) | 2022-01-18 |
Family
ID=79331659
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111213876.0A Pending CN113946397A (en) | 2021-10-18 | 2021-10-18 | Display package packaging method, device, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113946397A (en) |
-
2021
- 2021-10-18 CN CN202111213876.0A patent/CN113946397A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110795195B (en) | Webpage rendering method and device, electronic equipment and storage medium | |
US11706331B2 (en) | Information processing method and apparatus, storage medium, and electronic device | |
US11016716B2 (en) | Picture interface display method and apparatus according to jump protocol | |
US20130132422A1 (en) | System and method for creating and controlling an application operating on a plurality of computer platform types | |
CN104704468A (en) | Cross system installation of WEB applications | |
CN110888696A (en) | Page display method and system, computer system and computer readable medium | |
CN113010827B (en) | Page rendering method and device, electronic equipment and storage medium | |
CN110895471A (en) | Installation package generation method, device, medium and electronic equipment | |
CN110795649A (en) | Target page display method, device and system and electronic equipment | |
WO2017107851A1 (en) | Method and device for releasing and updating desktop application component | |
CN113536185B (en) | Application page loading method, storage medium and related equipment | |
CN110807162A (en) | Method and device for loading occupation bitmap | |
CN112612982A (en) | Webpage preloading method and device and computer equipment | |
CN113127361A (en) | Application program development method and device, electronic equipment and storage medium | |
CN115982491A (en) | Page updating method and device, electronic equipment and computer readable storage medium | |
CN108021564A (en) | A kind of method and apparatus of page reorientation | |
CN113553123A (en) | Data processing method and device, electronic equipment and storage medium | |
CN113760283A (en) | Text rendering method and device | |
CN110618811B (en) | Information presentation method and device | |
CN113761871A (en) | Rich text rendering method and device, electronic equipment and storage medium | |
US11438403B2 (en) | Page presentation method and system, computer system, and computer readable medium | |
CN111767498A (en) | Method and device for realizing file information sharing | |
CN113315829B (en) | Client offline H5 page loading method and device, computer equipment and medium | |
CN113946397A (en) | Display package packaging method, device, system and storage medium | |
CN113377376A (en) | Data packet generation method, data packet generation device, electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |