CN114201719A - Webpage component loading method and device, storage medium and processor - Google Patents

Webpage component loading method and device, storage medium and processor Download PDF

Info

Publication number
CN114201719A
CN114201719A CN202111538977.5A CN202111538977A CN114201719A CN 114201719 A CN114201719 A CN 114201719A CN 202111538977 A CN202111538977 A CN 202111538977A CN 114201719 A CN114201719 A CN 114201719A
Authority
CN
China
Prior art keywords
component
information
loading
configuration file
webpage
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
Application number
CN202111538977.5A
Other languages
Chinese (zh)
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.)
Caxa Technology Co Ltd
Original Assignee
Caxa Technology 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 Caxa Technology Co Ltd filed Critical Caxa Technology Co Ltd
Priority to CN202111538977.5A priority Critical patent/CN114201719A/en
Publication of CN114201719A publication Critical patent/CN114201719A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The application discloses a webpage component loading method and device, a storage medium and a processor. The method comprises the following steps: acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information. By the aid of the method and the device, the problem that resolution loading efficiency corresponding to the front-end page component is low in the related art is solved.

Description

Webpage component loading method and device, storage medium and processor
Technical Field
The present application relates to the field of web interface processing technologies, and in particular, to a method and an apparatus for loading a web component, a storage medium, and a processor.
Background
With the continuous increase of enterprises applying industrial software, application scenes are gradually diversified, and the types, operating systems and resolutions of hardware configured by different requirements of an industrial production field are different. The existing static UI component is difficult to be compatible and adapted to different resolutions, and can only be adapted to the static UI component according to hardware resolutions in different scenes by developers at present, so that great obstacles are brought to popularization of industrial products.
Aiming at the problem of low resolution loading efficiency corresponding to a front-end page component in the related art, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for loading a web page component, a storage medium, and a processor, so as to solve the problem of low resolution loading efficiency corresponding to a front-end web page component in the related art.
In order to achieve the above object, according to one aspect of the present application, there is provided a method for loading a web page component. The method comprises the following steps: acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information.
Further, after the configuration information of the components in the web page is acquired according to the resolution information of the web page, the method further includes: comparing the configuration information of the current assembly in the webpage with the last loading information of the current assembly in the webpage to obtain a comparison result; and if the comparison result indicates that the configuration information of the current assembly changes, acquiring the configuration information of the current assembly.
Further, updating the preset configuration file through the configuration information to obtain the target configuration file includes: if the preset configuration file does not contain the configuration information of the current assembly, creating the configuration information of the current assembly to obtain the created configuration information; and updating the preset configuration file according to the created configuration information to obtain a target configuration file.
Further, before the preset configuration file is updated through the configuration information to obtain the target configuration file, the method further includes: and if the preset configuration file contains the configuration information of the current assembly, replacing the configuration information of the target assembly by the configuration information of the current assembly, wherein the target assembly is the assembly with the same name as the current assembly in the preset configuration file.
Further, the obtaining of the loading information corresponding to the component from the target configuration file includes: under the condition of starting the loading operation of the components in the webpage, judging whether the target configuration file contains loading information corresponding to the components; and if the target configuration file contains the loading information corresponding to the component, acquiring the loading information corresponding to the component from the target configuration file.
Further, before obtaining loading information corresponding to the component from the target configuration file, the method further includes: and if the target configuration file does not contain the loading information corresponding to the component, taking the preset configuration information as the loading information corresponding to the component.
Further, loading the component according to the loading information includes: receiving loading information corresponding to the component through a webpage; and loading the components in the webpage according to the loading information.
In order to achieve the above object, according to another aspect of the present application, there is provided a loading apparatus of a web page component. The device includes: the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring configuration information of components in a webpage according to resolution information of the webpage, and the configuration information at least comprises position information and size information of the components; the first updating unit is used for updating the preset configuration file through the configuration information to obtain a target configuration file; the second acquisition unit is used for acquiring loading information corresponding to the component from the target configuration file; and the first loading unit is used for loading the component through the loading information.
Further, the apparatus further comprises: the first comparison unit is used for comparing the configuration information of the current assembly in the webpage with the last loading information of the current assembly in the webpage after acquiring the configuration information of the assembly in the webpage according to the resolution information of the webpage to obtain a comparison result; and the third acquisition unit is used for acquiring the configuration information of the current component if the comparison result indicates that the configuration information of the current component changes.
Further, the first updating unit includes: the first creating module is used for creating the configuration information of the current component to obtain the created configuration information if the preset configuration file does not contain the configuration information of the current component; and the first updating module is used for updating the preset configuration file according to the created configuration information to obtain the target configuration file.
Further, the apparatus further comprises: the first replacing unit is used for replacing the configuration information of the target component by the configuration information of the current component if the preset configuration file contains the configuration information of the current component before the preset configuration file is updated by the configuration information to obtain the target configuration file, wherein the target component is a component with the same name as the current component in the preset configuration file.
Further, the second acquisition unit includes: the first judgment module is used for judging whether the target configuration file contains loading information corresponding to the component or not under the condition of starting the component loading operation in the webpage; the first obtaining module is used for obtaining the loading information corresponding to the component from the target configuration file if the target configuration file contains the loading information corresponding to the component.
Further, the apparatus further comprises: the first determining unit is configured to, before acquiring the loading information corresponding to the component from the target configuration file, if the target configuration file does not include the loading information corresponding to the component, use preset configuration information as the loading information corresponding to the component.
Further, the first loading unit includes: the first receiving module is used for receiving the loading information corresponding to the component through the webpage; and the first loading module is used for loading the components in the webpage according to the loading information.
According to another aspect of the embodiments of the present application, there is also provided a processor configured to execute a program, where the program executes to perform the method of any one of the above.
According to another aspect of embodiments of the present application, there is also provided a computer-readable storage medium having stored thereon a computer program/instructions which, when executed by a processor, perform the method of any one of the above.
Through the application, the following steps are adopted: acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information. The problem of the resolution ratio loading efficiency that front end page subassembly corresponds among the correlation technique is lower is solved. The target configuration file is obtained by updating the preset configuration file, and the loading information corresponding to the components is obtained from the target configuration file, so that the effect of improving the resolution loading efficiency corresponding to the front-end page components is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flowchart of a method for loading a web page component according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating storage of component configuration information in a loading method for a web page component according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating storage of component configuration information in a loading method for a web page component according to an embodiment of the present application;
fig. 4 is a schematic diagram of a loading apparatus for a web page component according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the application, a method for loading a webpage component is provided.
Fig. 1 is a flowchart of a method for loading a web page component according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring configuration information of the components in the webpage according to the resolution information of the webpage, wherein the configuration information at least comprises position information of the components and size information of the components.
Specifically, in the front-end page, the current position information and size information of the position of the target component are obtained according to different resolutions, for example, the layout information of the position and size of the toast prompt message frame component is obtained according to the resolution information in the front-end page.
Optionally, in the method for loading a web page component provided in the embodiment of the present application, after obtaining configuration information of a component in a web page according to resolution information of the web page, the method further includes: comparing the configuration information of the current assembly in the webpage with the last loading information of the current assembly in the webpage to obtain a comparison result; and if the comparison result indicates that the configuration information of the current assembly changes, acquiring the configuration information of the current assembly.
Specifically, the size and position displayed by each front-end component can be changed by dragging and zooming, when the position or size of the component is changed, the front-end transmits the current resolution information, the component position and the size coordinate information to the background, for example, before the toast component needs to be loaded in a webpage, the background compares the configuration information of the current toast component with the last loading information of the toast component in the webpage, and if the comparison result indicates that the position or size of the current toast component is changed, the configuration information of the current toast component is acquired.
And S102, updating the preset configuration file through the configuration information to obtain a target configuration file.
Specifically, after receiving the component of the front-end page sent by the front end, the background determines whether the preset configuration file at the resolution corresponding to the parameter stores the corresponding configuration information of the current component.
Optionally, in the method for loading a web page component provided in the embodiment of the present application, updating the preset configuration file through the configuration information to obtain the target configuration file includes: if the preset configuration file does not contain the configuration information of the current assembly, creating the configuration information of the current assembly to obtain the created configuration information; and updating the preset configuration file according to the created configuration information to obtain a target configuration file.
For example, fig. 2 is a schematic view of storing component configuration information of a loading method of a web page component according to an embodiment of the present application, and as shown in fig. 2, a background receives that a current component of a web page is a toast component, creates new configuration information of the toast component if a preset configuration file does not include the configuration information of the current toast component, and stores the created configuration into the preset configuration file to update the preset configuration file.
Optionally, in the method for loading a web page component provided in this embodiment of the present application, before the preset configuration file is updated by the configuration information to obtain the target configuration file, the method further includes: and if the preset configuration file contains the configuration information of the current assembly, replacing the configuration information of the target assembly by the configuration information of the current assembly, wherein the target assembly is the assembly with the same name as the current assembly in the preset configuration file.
For example, as shown in fig. 2, if the preset configuration file includes the configuration information of the current component, the location information and the size information of the new component are substituted for the old configuration information of the component, so as to further implement real-time update of the preset configuration file.
Step S103, acquiring loading information corresponding to the component from the target configuration file.
For example, when a toast component is loaded, information of the toast component to be loaded is obtained from a target configuration file, wherein the loading information includes position information and size information of the component.
Optionally, in the method for loading a web page component provided in the embodiment of the present application, acquiring loading information corresponding to the component from the target configuration file includes: under the condition of starting the loading operation of the components in the webpage, judging whether the target configuration file contains loading information corresponding to the components; and if the target configuration file contains the loading information corresponding to the component, acquiring the loading information corresponding to the component from the target configuration file.
For example, fig. 3 is a schematic view illustrating storage of component configuration information according to a loading method for a web component provided in an embodiment of the present application, as shown in fig. 3, after software is started, a front end obtains current resolution information and sends the current resolution information to a background, the background searches for loading information of a corresponding component from a target configuration file directory of a default resolution after receiving the loading information, if the loading information corresponding to the component is found in a target configuration file, the loading information is converted into a data stream and returned to the front end, and by adjusting adaptation resolutions of components in the software in real time, adaptation capabilities of industrial software at different resolutions are improved, and operation efficiency of a front end interface is further ensured.
And step S104, loading the component through the loading information.
Specifically, before loading the component by the loading information, the loading information of the component which is not found under the target configuration file directory needs to be analyzed.
Optionally, in the method for loading a web page component provided in the embodiment of the present application, before obtaining loading information corresponding to the component from the target configuration file, the method further includes: and if the target configuration file does not contain the loading information corresponding to the component, taking the preset configuration information as the loading information corresponding to the component.
For example, as shown in fig. 3, when the loading information of the corresponding component is not found in the target configuration file directory, the default general resolution component configuration information (corresponding to the preset configuration information in the present application) is used as the loading information corresponding to the component, so that the resolution loading efficiency corresponding to the front-end page component is improved.
Optionally, in the method for loading a web page component provided in the embodiment of the present application, loading the component according to the loading information includes: receiving loading information corresponding to the component through a webpage; and loading the components in the webpage according to the loading information.
Specifically, the front end receives loading information according to the components and loads and displays the position information and the size information of the components on the webpage, the application can adjust the adaptation resolution of each component in the software in real time according to the actual scene of an enterprise, the adaptation capability of the industrial software under different resolutions is improved, and the operation efficiency of the front end interface is further ensured.
In summary, according to the loading method of the web page component provided by the embodiment of the present application, the configuration information of the component in the web page is obtained according to the resolution information of the web page, wherein the configuration information at least includes the position information of the component and the size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information. The problem of the resolution ratio loading efficiency that front end page subassembly corresponds among the correlation technique is lower is solved. The target configuration file is obtained by updating the preset configuration file, and the loading information corresponding to the components is obtained from the target configuration file, so that the effect of improving the resolution loading efficiency corresponding to the front-end page components is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a loading device for a web component, and it should be noted that the loading device for a web component of the embodiment of the present application may be used to execute the loading method for a web component provided in the embodiment of the present application. The following describes a loading apparatus for a web page component according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a loading apparatus for web page components according to an embodiment of the present application. As shown in fig. 4, the apparatus includes: a first obtaining unit 401, a first updating unit 402, a second obtaining unit 403, and a first loading unit 404.
Specifically, the first obtaining unit 401 is configured to obtain configuration information of a component in a web page according to resolution information of the web page, where the configuration information at least includes location information of the component and size information of the component;
a first updating unit 402, configured to update a preset configuration file according to configuration information to obtain a target configuration file;
a second obtaining unit 403, configured to obtain loading information corresponding to the component from the target configuration file;
a first loading unit 404, configured to load the component through the loading information.
To sum up, the loading apparatus for a web page component provided in the embodiment of the present application obtains, by using the first obtaining unit 401, configuration information of a component in a web page according to resolution information of the web page, where the configuration information at least includes position information of the component and size information of the component; the first updating unit 402 updates the preset configuration file through the configuration information to obtain a target configuration file; the second obtaining unit 403 obtains loading information corresponding to the component from the target configuration file; the first loading unit 404 loads the component by loading information, which solves the problem of low resolution loading efficiency corresponding to the front-end page component in the related art. The target configuration file is obtained by updating the preset configuration file, and the loading information corresponding to the components is obtained from the target configuration file, so that the effect of improving the resolution loading efficiency corresponding to the front-end page components is achieved.
Optionally, in the device for loading a web page component provided in this embodiment of the present application, the device further includes: the first comparison unit is used for comparing the configuration information of the current assembly in the webpage with the last loading information of the current assembly in the webpage after acquiring the configuration information of the assembly in the webpage according to the resolution information of the webpage to obtain a comparison result; and the third acquisition unit is used for acquiring the configuration information of the current component if the comparison result indicates that the configuration information of the current component changes.
Optionally, in the loading apparatus for a web page component provided in the embodiment of the present application, the first updating unit 402 includes: the first creating module is used for creating the configuration information of the current component to obtain the created configuration information if the preset configuration file does not contain the configuration information of the current component; and the first updating module is used for updating the preset configuration file according to the created configuration information to obtain the target configuration file.
Optionally, in the device for loading a web page component provided in this embodiment of the present application, the device further includes: the first replacing unit is used for replacing the configuration information of the target component by the configuration information of the current component if the preset configuration file contains the configuration information of the current component before the preset configuration file is updated by the configuration information to obtain the target configuration file, wherein the target component is a component with the same name as the current component in the preset configuration file.
Optionally, in the apparatus for loading a web page component provided in this embodiment of the present application, the second obtaining unit 403 includes: the first judgment module is used for judging whether the target configuration file contains loading information corresponding to the component or not under the condition of starting the component loading operation in the webpage; the first obtaining module is used for obtaining the loading information corresponding to the component from the target configuration file if the target configuration file contains the loading information corresponding to the component.
Optionally, in the device for loading a web page component provided in this embodiment of the present application, the device further includes: the first determining unit is configured to, before acquiring the loading information corresponding to the component from the target configuration file, if the target configuration file does not include the loading information corresponding to the component, use preset configuration information as the loading information corresponding to the component.
Optionally, in the loading apparatus for a web page component provided in this embodiment of the present application, the first loading unit includes: the first receiving module is used for receiving the loading information corresponding to the component through the webpage; and the first loading module is used for loading the components in the webpage according to the loading information.
The loading device of the web page component includes a processor and a memory, the first obtaining unit 401, the first updating unit 402, the second obtaining unit 403, the first loading unit 404, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the loading of the webpage components is carried out by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, where the program implements a method for loading a web page component when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein a loading method of a webpage component is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information.
The processor executes the program and further realizes the following steps: after the configuration information of the components in the webpage is acquired according to the resolution information of the webpage, comparing the configuration information of the current components in the webpage with the last loading information of the current components in the webpage to obtain a comparison result; and if the comparison result indicates that the configuration information of the current assembly changes, acquiring the configuration information of the current assembly.
The processor executes the program and further realizes the following steps: if the preset configuration file does not contain the configuration information of the current assembly, creating the configuration information of the current assembly to obtain the created configuration information; and updating the preset configuration file according to the created configuration information to obtain a target configuration file.
The processor executes the program and further realizes the following steps: before the preset configuration file is updated through the configuration information to obtain the target configuration file, if the preset configuration file contains the configuration information of the current component, the configuration information of the target component is replaced through the configuration information of the current component, wherein the target component is a component with the same name as the current component in the preset configuration file.
The processor executes the program and further realizes the following steps: under the condition of starting the loading operation of the components in the webpage, judging whether the target configuration file contains loading information corresponding to the components; and if the target configuration file contains the loading information corresponding to the component, acquiring the loading information corresponding to the component from the target configuration file.
The processor executes the program and further realizes the following steps: before the loading information corresponding to the component is acquired from the target configuration file, if the loading information corresponding to the component is not contained in the target configuration file, the preset configuration information is used as the loading information corresponding to the component.
The processor executes the program and further realizes the following steps: receiving loading information corresponding to the component through a webpage; and loading the components in the webpage according to the loading information.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component; updating a preset configuration file through the configuration information to obtain a target configuration file; acquiring loading information corresponding to the component from the target configuration file; and loading the component through the loading information.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: after the configuration information of the components in the webpage is acquired according to the resolution information of the webpage, comparing the configuration information of the current components in the webpage with the last loading information of the current components in the webpage to obtain a comparison result; and if the comparison result indicates that the configuration information of the current assembly changes, acquiring the configuration information of the current assembly.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: if the preset configuration file does not contain the configuration information of the current assembly, creating the configuration information of the current assembly to obtain the created configuration information; and updating the preset configuration file according to the created configuration information to obtain a target configuration file.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: before the preset configuration file is updated through the configuration information to obtain the target configuration file, if the preset configuration file contains the configuration information of the current component, the configuration information of the target component is replaced through the configuration information of the current component, wherein the target component is a component with the same name as the current component in the preset configuration file.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: under the condition of starting the loading operation of the components in the webpage, judging whether the target configuration file contains loading information corresponding to the components; and if the target configuration file contains the loading information corresponding to the component, acquiring the loading information corresponding to the component from the target configuration file.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: before the loading information corresponding to the component is acquired from the target configuration file, if the loading information corresponding to the component is not contained in the target configuration file, the preset configuration information is used as the loading information corresponding to the component.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: receiving loading information corresponding to the component through a webpage; and loading the components in the webpage according to the loading information.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for loading a webpage component is characterized by comprising the following steps:
acquiring configuration information of a component in a webpage according to resolution information of the webpage, wherein the configuration information at least comprises position information of the component and size information of the component;
updating a preset configuration file through the configuration information to obtain a target configuration file;
acquiring loading information corresponding to the component from the target configuration file;
and loading the component through the loading information.
2. The method of claim 1, wherein after obtaining the configuration information of the components in the web page according to the resolution information of the web page, the method further comprises:
comparing the configuration information of the current assembly in the webpage with the last loading information of the current assembly in the webpage to obtain a comparison result;
and if the comparison result indicates that the configuration information of the current component changes, acquiring the configuration information of the current component.
3. The method of claim 2, wherein updating the preset configuration file through the configuration information to obtain the target configuration file comprises:
if the preset configuration file does not contain the configuration information of the current component, creating the configuration information of the current component to obtain the created configuration information;
and updating the preset configuration file according to the created configuration information to obtain the target configuration file.
4. The method according to claim 2, wherein before the preset configuration file is updated by the configuration information to obtain the target configuration file, the method further comprises:
and if the preset configuration file contains the configuration information of the current component, replacing the configuration information of a target component by the configuration information of the current component, wherein the target component is a component with the same name as the current component in the preset configuration file.
5. The method of claim 1, wherein obtaining loading information corresponding to the component from the target configuration file comprises:
under the condition of starting the loading operation of the components in the webpage, judging whether a target configuration file contains loading information corresponding to the components;
and if the target configuration file contains the loading information corresponding to the component, acquiring the loading information corresponding to the component from the target configuration file.
6. The method of claim 1, wherein prior to obtaining loading information corresponding to the component from the target configuration file, the method further comprises:
and if the target configuration file does not contain the loading information corresponding to the component, taking preset configuration information as the loading information corresponding to the component.
7. The method of claim 1, wherein loading the component according to the loading information comprises:
receiving loading information corresponding to the component through the webpage;
and loading the component in the webpage according to the loading information.
8. An apparatus for loading a web page component, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring configuration information of a component in a webpage according to resolution information of the webpage, and the configuration information at least comprises position information of the component and size information of the component;
the first updating unit is used for updating a preset configuration file through the configuration information to obtain a target configuration file;
the second obtaining unit is used for obtaining loading information corresponding to the component from the target configuration file;
and the first loading unit is used for loading the component through the loading information.
9. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 7.
CN202111538977.5A 2021-12-15 2021-12-15 Webpage component loading method and device, storage medium and processor Pending CN114201719A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111538977.5A CN114201719A (en) 2021-12-15 2021-12-15 Webpage component loading method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111538977.5A CN114201719A (en) 2021-12-15 2021-12-15 Webpage component loading method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN114201719A true CN114201719A (en) 2022-03-18

Family

ID=80654306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111538977.5A Pending CN114201719A (en) 2021-12-15 2021-12-15 Webpage component loading method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN114201719A (en)

Similar Documents

Publication Publication Date Title
US11150790B2 (en) Application interface management method and apparatus
CN111131352B (en) Theme switching method and device
CN104113576A (en) Method and device for updating client
CN106528578B (en) Information display method and device
CN105786519B (en) Android device program management method and android device
US20210105314A1 (en) Associating browser with application
CN109558143B (en) Method and device for deploying applications in cluster
CN110046100B (en) Packet testing method, electronic device and medium
CN107220260B (en) Page display method and device
CN112235132B (en) Method, device, medium and server for dynamically configuring service
CN108874379B (en) Page processing method and device
CN114756228A (en) Page processing method, device, equipment and storage medium
CN112560403A (en) Text processing method and device and electronic equipment
CN114201719A (en) Webpage component loading method and device, storage medium and processor
CN108769152B (en) Service refresh policy registration method, service refresh request method, device and equipment
CN111367577A (en) Method, device and terminal for loading plug-in of application
CN111209009A (en) Content distribution method and device, storage medium and electronic equipment
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
CN109656631B (en) Service deployment method and device
CN114675872A (en) Data processing method, device and equipment for application program and storage medium
CN115202673A (en) Application construction method and device based on cloud server and computer equipment
CN107784040B (en) File issuing method and device
CN110633181B (en) Visual display method and device
CN112394868A (en) Method and device for positioning target information in webpage popup frame
CN110968599B (en) Inquiry method and device based on Impala

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