CN112882764B - Component loading method and device, computer equipment and storage medium - Google Patents

Component loading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112882764B
CN112882764B CN202110075405.1A CN202110075405A CN112882764B CN 112882764 B CN112882764 B CN 112882764B CN 202110075405 A CN202110075405 A CN 202110075405A CN 112882764 B CN112882764 B CN 112882764B
Authority
CN
China
Prior art keywords
component
components
downloaded
function
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110075405.1A
Other languages
Chinese (zh)
Other versions
CN112882764A (en
Inventor
郑旭泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110075405.1A priority Critical patent/CN112882764B/en
Publication of CN112882764A publication Critical patent/CN112882764A/en
Application granted granted Critical
Publication of CN112882764B publication Critical patent/CN112882764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Abstract

The embodiment of the invention discloses a component loading method, a component loading device, computer equipment and a storage medium, wherein a component loader is arranged, the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function; acquiring component names and component version numbers corresponding to components which are not downloaded in the component set to form component addresses; downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names of the downloaded components in the component set and the component function; and calling the components to be quoted according to the mapping relation, so that the components to be quoted can be directly called in the stored components without independently configuring the component loading function of each different software project, and when the components are updated, the component configuration does not need to be modified in each software project, thereby reducing the time and the energy spent by developers and improving the operating efficiency of the software projects.

Description

Component loading method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a component loading method and device, computer equipment and a storage medium.
Background
With the development of network technology, front-end development becomes increasingly important and complex, and developers usually use JavaScript scripting language to perform front-end development. In the process of front-end development, a plurality of modules and components are involved, and because the front-end development script language cannot be independently operated and needs to be loaded asynchronously by depending on a webpage, the loading mode of the modules and the components based on the front end is different from that of other script languages. The loading mode of the front-end module is to set the module name as a globally accessible variable, and call the module by referring to the module name, so that the module is loaded along with other files of the front-end browser page. The loading modes of the front-end component are generally divided into two types: one is to directly refer to the network file address of the component to be used, so that the component to be used is loaded along with the page; the other is to configure the components to be used, and load the corresponding components from the network by using a component loader in an AMD (Asynchronous Module Definition) mode and/or a CMD (Common Module Definition) mode.
When the version of the component needs to be updated, in the first mode, the network file address corresponding to the component to be used needs to be modified, if a plurality of items refer to the same component at the same time, the component file addresses related to the plurality of items need to be modified at the same time, and in the second mode, the configuration of all the components in each item needs to be updated, so that in any component loading mode, developers need to spend much time and effort, errors are easy to occur, and the items cannot run.
Disclosure of Invention
The embodiment of the invention provides a component loading method and device, computer equipment and a storage medium, which unify the loading mode of components, and when the components are updated, the components can be updated in real time by referring to the items of the components, so that the configuration of the components in each item is prevented from being modified one by one.
The embodiment of the invention provides a component loading method, which comprises the following steps:
setting a component loader, wherein the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
acquiring a component name and a component version number corresponding to an un-downloaded component in the component set to form a component address;
downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names and the component function functions of the downloaded components in the component set;
and calling the components to be referenced according to the mapping relation.
Correspondingly, an embodiment of the present invention further provides a device for loading a component, including:
the device comprises a setting unit, a component loader and a component function execution unit, wherein the setting unit is used for setting the component loader, the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
an obtaining unit, configured to obtain a component name and a component version number corresponding to an un-downloaded component in the component set, and form a component address;
the downloading unit is used for downloading the un-downloaded components in the component set according to the component addresses and storing the component names of the downloaded components in the component set and the mapping relation of the component function;
and the calling unit is used for calling the components to be quoted according to the mapping relation.
Optionally, the obtaining unit is further configured to determine an un-downloaded component in the component set according to the definition function;
acquiring a component name and a component version number corresponding to the un-downloaded component according to the component loader;
sorting the component names corresponding to the un-downloaded components according to a preset rule to obtain a component name sequence;
adding the component version numbers corresponding to the un-downloaded components to obtain a combined version number;
and splicing the component name sequence and the combined version number to form the component address.
Optionally, the component function includes a component that refers to the component set, and the obtaining unit is further configured to obtain a character string form of the defined function;
searching the module and the component which are referenced by the definition function in the character string form by utilizing a regular expression;
saving the modules and/or components referenced by the definition function to a reference array;
determining the un-downloaded components in the component set according to the reference array.
Optionally, the naming specifications of the modules and components referred by the definition function are different, and the obtaining unit is further configured to determine, if the length of the reference array is zero, whether the component corresponding to the definition function is an un-downloaded component in the component set;
if the length of the reference array is not zero, traversing the reference array, identifying a module referenced by the definition function in the reference array according to the naming specification, identifying a downloaded module in the reference array in a stored module, removing the module, the downloaded module and repeated modules in the reference array to form an updated reference array, and determining the modules in the updated reference array as the un-downloaded modules in the component set.
Optionally, the downloading unit is further configured to divide an un-downloaded component in the component set into a first component if the un-downloaded component in the component set is downloaded according to the component address, where the first component includes a downloaded component in the component set;
acquiring a component name and a component function corresponding to the first component;
and storing the mapping relation between the component name and the component function corresponding to the first component by using a global hash variable.
Optionally, the invoking unit is further configured to search for a second component from the first component according to the global hash variable, where the second component includes the component to be referenced;
acquiring a component name of the second component;
acquiring a component function corresponding to the component name of the second component according to the mapping relation;
and calling the component needing to be referenced by calling the component function of the second component.
Optionally, the apparatus is further configured to update a component address including the first component version number to form a first component address if the component version number corresponding to the component in the component set is updated to form a first component version number;
and downloading the updated component corresponding to the first component version number according to the first component address, and storing the mapping relation between the component name of the updated component corresponding to the first component version number and the component function.
Optionally, the downloading unit is further configured to set a component downloading tracking function;
and if the downloading of the components which are not downloaded in the component set is completed, calling the component downloading tracking function to send out a notice.
Similarly, an embodiment of the present invention further provides a computer device, including:
a memory for storing a computer program;
a processor for performing the steps of any of the component loading methods.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any one of the component loading methods.
The embodiment of the invention provides a component loading method, a component loading device, computer equipment and a storage medium, wherein a component loader is arranged, each time the component loader is used for downloading the undelivered components in a component set, each component in the component set is only downloaded once, and the mapping relation between the component names and the component function functions of the downloaded components in the component set is stored. The different software projects do not need to be configured with the component loading function independently, the components to be referenced can be directly called in the stored components, and the method for calling the components by all the software projects is unified. When the component is updated, the version number of the component is updated only in the set component loader, so that the component loader can acquire the updated component again, all software projects can acquire the updated component in real time, the configuration of the component does not need to be modified in each software project, the time and the energy spent by developers are reduced, and the operating efficiency of the software projects is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a system diagram of a component loading apparatus provided in an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a component loading method according to an embodiment of the present invention;
FIG. 3 is another schematic flow chart diagram of a component loading method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a component loading apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It should be apparent that the described embodiments are only some embodiments of the present invention, and 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 invention.
The embodiment of the invention provides a component loading method and device, computer equipment and a storage medium. Specifically, the component loading method according to the embodiment of the present invention may be executed by a computer device, where the computer device may be a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content distribution network service, big data and an artificial intelligence platform.
Referring to fig. 1, fig. 1 is a system schematic diagram of a device loading apparatus according to an embodiment of the present invention. The system may include at least one terminal and at least one server. The terminal held by the user may be connected to the server through different networks, for example, the network may be a wireless network or a wired network, the wireless network may be a Wireless Local Area Network (WLAN), a Local Area Network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, or the like, the terminal is configured to set a component loader, the component loader includes a definition function and a component version number of each component in the component set, and the definition function includes a component name and a component function; then, acquiring component names and component version numbers corresponding to the components which are not downloaded in the component set to form component addresses; then, downloading the un-downloaded components in the component assembly from the server according to the component addresses, and storing the mapping relation between the component names and the component function functions of the downloaded components in the component assembly; and finally, calling the components needing to be referenced in different items according to the mapping relation. The server is used for storing relevant files of all the components.
The following are detailed descriptions. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a component loading apparatus, which may be specifically integrated in a terminal, where the terminal may include a smart phone, a notebook computer, a tablet computer, a personal computer, and other devices.
The method for loading a component provided in the embodiment of the present invention may be executed by a processor of a terminal, and as shown in fig. 2, a specific flow of the method for loading a component may be as follows:
step 201, setting a component loader, wherein the component loader includes a definition function and a component version number of each component in a component set, and the definition function includes a component name and a component function.
In the embodiment of the application, the component loader is used for downloading the components required in the front-end page loading process from the server, so that the method for calling the components by all software items is unified, namely the software items can directly call the components required to be quoted in the components downloaded by the component loader, and each different software item does not need to separately configure the component loading function. The CMD mode can be referred to, the definition functions and the component version numbers of a plurality of components are configured in a component loader, and the component loader comprises two kernel functionsNumber, respectively, for the defining function and the loading function of the component, the defining function of the component usually uses nie1,P2,…,Pn) Name, wherein P1,P2,…,PnFor arguments, the component load function typically uses nie1,Q2,…,Qn) Name wherein Q1,Q2,…,QnAre parameters.
The definition function of the component can name each component, and the component names of the components in the component set are different from each other, so that a developer can distinguish different components according to the component names of the components in the component set, and when a required component is called in different software projects, the component name corresponding to the required component can be referred to call the required component, thereby avoiding the problem of calling errors. The definition function of the component can also comprise a component function, the component function can comprise a component loading function, the component function references the component in the component set by using the component loading function, and the referenced component assists in referencing the component to realize the corresponding function, so that the plurality of components are combined with each other to jointly generate the action. Component function is typically referred to as function (T)1,T 2,…,Tn) Wherein, T1,T 2,…,TnAre parameters.
In the embodiments of the present application, the front-end page loading may be loading of a module and/or a component, where a module generally refers to a code segment and/or a function in front-end development that can implement a basic function or logic. A Component (Component) is a simple package of data and methods, is a specific object, is generally implemented based on multiple modules, and is matched with a complex and complete functional implementation of CSS (Cascading Style Sheets) and HTML (hypertext Markup Language) in a front-end development computer Language. In the front-end development process, the function with high reuse rate can be packaged into one component, so that the component can be directly used for a software project, developers only need to quote related components as required during software project development, do not need to pay attention to the implementation process inside the quoted components, use of the components can be completed by calling according to component descriptions, and the functions of the quoted components are realized in the software project, so that the development efficiency is greatly improved, and unnecessary repeated development and testing of the components in the software project are reduced.
In some embodiments, the component is usually written in a JavaScript scripting language, so that the component finally exists in the server in the form of a JavaScript file, and when the front-end page is loaded, the referenced component is loaded by using the component loader, that is, the JavaScript file of the component is downloaded in the server by using the component loader and cached in the front-end browser for the software project to call.
In one embodiment, the collection of components includes all components used for front-end page loading, such as user interface components, chart components, and/or extension components, among others.
In one embodiment, the component version number is an identification number of each version of the component, when the component is updated, for example, the function and/or structure of the component changes, the version number of the component also changes according to a preset update rule, the setting format and the update rule of the component version number are not limited, and the component version number can be flexibly set according to actual situations, for example, the component version number can be a natural number of 0, 1, …, n, the update rule of the component version number can be gradually increased, for example, the initial version number of the component is set to 0, and when the component is updated, the version number of the component is increased by 1 on the original basis.
Step 202, obtaining the component name and the component version number corresponding to the un-downloaded component in the component set, and forming a component address.
In one embodiment, the component generally exists in the server in the form of a JavaScript file, and when the JavaScript file of the component is downloaded in the server by using the component loader, the component address of the undelivered component, that is, the network address of the JavaScript file of the undelivered component, needs to be obtained, and each component has a unique network address for identifying the location of the component in the network.
In one or more embodiments of the present application, in the step 202, "obtaining a component name and a component version number corresponding to an un-downloaded component in a component set, and forming a component address" may be implemented by the following steps S2021 to S2025:
step S2021: and determining the un-downloaded components in the component set according to the definition function.
In this embodiment of the present application, a component loader sets a definition function and a component version number of each component in a component set, where the definition function of each component may include other referenced components, and in order to ensure that all components in the component set are downloaded only once and no download request is repeatedly sent to a server, thereby improving the download efficiency of the component, it is sequentially determined whether a component corresponding to each definition function and other components referenced in each definition function belong to undelivered components according to the definition function of each component as a search unit until no undelivered component exists in the component set included in the component loader.
In an embodiment, if there are multiple defined functions in the component loader, the search order for the multiple defined functions is not limited, and may be flexibly set according to the actual situation, for example, the search may be performed according to the writing order of the multiple defined functions in the component loader, or according to the size order of the number of other components referred by each defined function.
Step S2022: and acquiring the component name and the component version number corresponding to the un-downloaded component according to the component loader.
In the embodiment of the application, after the un-downloaded component in the component set is determined, the component name corresponding to the un-downloaded component is obtained according to the definition function, and then the component version number corresponding to each component name is obtained.
Step S2023: and sequencing the component names corresponding to the un-downloaded components according to a preset rule to obtain a component name sequence.
In the embodiment of the application, if a plurality of un-downloaded components exist in the component set, the obtained component names of the plurality of un-downloaded components are sequenced according to a preset rule to obtain a component name sequence, so that the condition that the same content is requested to a server by using a generated component address is avoided. The preset rule is not limited, and can be flexibly set according to actual conditions, for example, the initials of the component names of the un-downloaded components can be sorted in an ascending order. It should be noted that, the name sequences formed by using different preset rules constitute different component addresses, and thus the components downloaded from the server according to different component addresses are also different.
Step S2024: and adding the component version numbers corresponding to the un-downloaded components to obtain a combined version number.
For example, if the component version number of the undeleted component a is 1, the component version number of the undeleted component b is 3, and the component version number of the undeleted component c is 4, the combination version number is 8.
Step S2025: the sequence of concatenated component names and combined version numbers form the component address.
In this embodiment, the obtained component name sequence and the combined version number are connected by a splice symbol, where the splice symbol may be a symbol such as an equal sign, a question mark, and/or an exclamation mark.
In some embodiments, the component address may further include a domain name, and the domain name to which the terminal belongs may be acquired, and the domain name and the component name sequence and the combined version number are concatenated to form the component address. The splicing sequence of the domain name, the component name sequence and the combined version number is not limited and can be flexibly set according to the actual situation.
In this embodiment of the application, the "determining the undelivered component in the component set according to the defined function" in the step S2021 can be implemented by the following steps S20211 to S20214:
step S20211: a string form defining a function is obtained.
In the embodiment of the present application, in order to determine whether a component corresponding to a defined function in a component loader is an un-downloaded component and whether a component referred to by a component function of each defined function is an un-downloaded component, it is necessary to acquire the content of each defined function, and a character string form of each defined function may be acquired by a character string acquisition method, so that the character string form of each defined function may be acquiredThe method realizes that the content of each defined function is simply and effectively acquired without executing each defined function, and improves the operating efficiency of the component loader. Wherein, the commonly used character string obtaining method can be ToString (R)1,R 2,…,R n),R1,R 2,…,R nAre parameters.
Step S20212: modules and components defining function references are looked up in string form using regular expressions.
In the embodiment of the application, the regular expression is a logic formula for operating character strings and special characters, namely, a 'regular character string' is formed by using a plurality of specific characters defined in advance and a combination of the specific characters, and the 'regular character string' expression is used for filtering and searching texts in the form of the character strings according to the preset filtering logic, so that the filtering and searching result is obtained. For example, after the string form of the defined function is obtained, the string text of the defined function can be searched by using the regular expression (/ nie \ requirey \ ([ ^ \) ] + \)/g), so as to obtain the component and/or module specifically referenced by the defined function.
Step S20213: the modules and/or components defining the function references are saved to the reference array.
In the embodiment of the present application, names of the components and/or modules may be saved in the reference array, and functional functions of the components and/or modules may also be saved in the reference array.
Step S20214: determining the un-downloaded component in the component set according to the reference array.
In one embodiment, after the components corresponding to the defined functions and the components and/or modules referenced by the defined functions are saved to the reference array, the reference array is traversed, and the components not downloaded in the component set are searched in the reference array.
In an embodiment of the present application, the "determining the undeleted component in the component set according to the reference array" in the step S20214 may be implemented by the following steps S202141 to S202142:
step S202141: if the length of the reference array is zero, whether the component corresponding to the definition function is an un-downloaded component in the component set is judged.
In the embodiment of the application, when the length of the reference array is zero, it indicates that the component corresponding to the definition function does not reference other components, and whether the component corresponding to the definition function is an un-downloaded component is determined according to the stored downloaded component.
Step S202142: if the length of the reference array is not zero, traversing the reference array, identifying a module defining function reference in the reference array according to a naming specification, identifying a downloaded component in the reference array in a stored component, removing the module, the downloaded component and a repeated component in the reference array to form an updated reference array, and determining the component in the updated reference array as an un-downloaded component in the component set.
In the embodiment of the present application, if the length of the reference array is not zero, it indicates that the component corresponding to the definition function references other components or modules. Because the module does not need to be downloaded from the server, in order to avoid the component loader from initiating a module downloading request to the server and from initiating a repeated component downloading request to the server, the reference array needs to be traversed, the module defining function reference in the reference array is identified according to the difference of the naming specifications of the front-end module and the front-end component, and the module in the reference array, the downloaded component and the repeated component are removed to form an updated reference array.
In one embodiment, firstly, judging whether the length of the updated reference array is zero, and if the length of the updated reference array is zero, determining that the component corresponding to the definition function and the referenced component are not un-downloaded components; if the length of the updated reference array is not zero, the component in the updated reference array can be determined to be an un-downloaded component in the component set.
And step 203, downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names and the component function functions of the downloaded components in the component set.
In the embodiment of the application, after the component address is obtained, the script tag in the HTML can be used to set the src attribute as the component address, and send a download request link including the component address to the server, where the server storing the JavaScript file of the component has an online file merging function, that is, the server supports multiple dynamic file names to appear in the same link, and when the server receives the download request link with multiple file names, the server can return a structure obtained by merging the JavaScript files corresponding to the multiple file names. For example, if the server receives a download request link of http:// a.com/a.js, b.js and c.js, the server returns the content of the merged three JavaScript files of a, b and c.
In one or more embodiments of the present application, in step 203, "downloading an un-downloaded component from the component address in the component set, storing a mapping relationship between component names and component function functions of the downloaded component in the component set" may be implemented by steps S2031 to S2033 as follows:
step S2031: if the un-downloaded components in the component set are downloaded according to the component addresses, the un-downloaded components in the component set are divided into first components, and the first components comprise the downloaded components in the component set.
Step S2032: and acquiring the component name and the component function corresponding to the first component.
Step S2033: and storing the mapping relation between the component name corresponding to the first component and the component function by using a global hash variable.
In the embodiment of the application, in order to enable a software project to better search a component to be referred to and call a component function corresponding to the component to be referred to, the component name, the component function and the mapping relation of the component to be downloaded in a component set are stored, so that the software project can obtain the corresponding component function according to the component name.
In an embodiment of the present application, the global hash variable is usually an associative array, and the element structure in the array is a Key-Value pair, i.e., a corresponding Value (Value) is accessed through a unique Key (Key), and the Key (Key) and the accessed Value (Value) are in a one-to-one mapping relationship. For example, the component name may be stored as a key (key), and the component function corresponding to the component name may be stored as a value (value).
In some embodiments, before "storing the mapping relationship between the component name and the component function of the downloaded component in the component set" in step 203, a reminder or a notification that the un-downloaded component has completed downloading needs to be issued, so that the process of storing the mapping relationship included in the component can obtain and execute the instruction to start storing, the mapping relationship between the component name and the component function of the downloaded component in the component set is stored, and the notification function can be implemented through the following steps S2034 to S2035:
step S2034: the setup component downloads the tracking function.
Step S2035: and if the downloading of the components which are not downloaded in the component set is completed, calling a component downloading tracking function to send a notice.
In an embodiment of the present application, the component download tracking function may be an onload function. After the downloaded component is downloaded, the front-end browser can spontaneously call the onload function to inform the JavaScript file of the component of the completion of downloading.
And step 204, calling the components to be referenced according to the mapping relation.
In one or more embodiments of the present application, the "call the component to be referenced according to the mapping relationship" in step 204 may be implemented by the following steps 2041 to 2044:
step 2041: and searching a second component from the first component according to the global hash variable, wherein the second component comprises the component needing to be referenced.
Step 2042: a component name of the second component is obtained.
Step 2043: and acquiring a component function corresponding to the component name of the second component according to the mapping relation.
Step 2044: and calling the component of the required reference by calling the component function of the second component.
In the embodiment of the application, when a software project executes and calls a related code of a component to be quoted, the component name in the code setting parameter is obtained, a component function corresponding to the component name is searched from a stored downloaded component, the component function of the component to be quoted is executed by using the calling function, and the execution structure is returned, so that the calling of the component to be quoted is realized. The calling function can be an eval function, and the eval function is used for regarding character strings in parentheses as sentences and running the sentences.
All the above technical solutions may be combined arbitrarily to form an optional embodiment of the present application, and are not described in detail herein.
The component loading method provided by the embodiment of the invention is characterized in that the component loader is arranged, each time the component loader is used for downloading the un-downloaded component in the included component set, each component in the component set is only downloaded once, and the mapping relation between the component name of the downloaded component in the component set and the component function is stored. The different projects do not need to be configured with the component loading function independently, the components to be referenced can be called directly in the stored components, and the method for calling the components by all the projects is unified. When the component is updated, the version number of the component is updated only in the set component loader, so that the component loader can acquire the updated component again, all projects can acquire the updated component in real time, the configuration of the component does not need to be modified in each project, the time and the energy spent by developers are reduced, and the operating efficiency of the projects is improved.
Referring to fig. 3, fig. 3 is another flow chart illustrating a component loading method according to an embodiment of the invention. The specific process of the method can be as follows:
step 301, setting a component loader, wherein the component loader comprises a definition function of each component in the component set.
For example, a component loader in which a definition function nie1,P2,…,Pn) And sets the component version number using a natural number. The defining function of the component may include a component function (T)1,T 2,…,Tn) A component load function nie1,Q2,…,Qn) Component function can reference a component in a set of components using a component load function。
Step 302, obtaining the character string form of each definition function, and searching the modules and/or components referenced by the definition functions in the character string form.
For example, using ToString (R)1,R 2,…,R n) The method obtains the character string form of each defined function in the component loader and utilizes the regular expression (/ nie \ require \ [ ^ \)]+ \)/g) find the string text defining the function, thereby obtaining the components and/or modules that define the function's specific references.
Step 303, saving the modules and/or components defining the function reference to the reference array.
In the embodiment of the application, the module name corresponding to the module referred by the definition function and/or the component name corresponding to the referred component are/is saved in the reference array.
And step 304, judging whether the length of the reference array is zero or not.
If yes, step 313 is executed, otherwise step 306 is executed.
And step 306, traversing the reference array, removing the modules, the downloaded components and the repeated components in the reference array, and forming an updated reference array.
In the embodiment of the present application, if the length of the reference array is zero, it indicates that the component corresponding to the definition function does not reference other components and/or modules, and the component corresponding to the definition function can be called without downloading other components. If the length of the reference array is not zero, the component corresponding to the definition function is indicated to have a referenced module and/or component, the reference array is traversed, the module in the reference array is identified according to the difference of naming specifications of the module and the component, the downloaded component and the repeated component in the reference array are searched out at the same time, the module, the downloaded component and the repeated component in the reference array are removed, an updated reference array is formed, and the component in the updated reference array is determined to be an un-downloaded component.
And 307, judging whether the length of the updated reference array is zero or not.
Step 308, if yes, execute step 313, otherwise execute step 309.
In the embodiment of the present application, if the length of the updated reference array is zero, it indicates that all other components referenced by the component corresponding to the definition function have been downloaded, and the component corresponding to the definition function can be directly called without repeated downloading. If the length of the updated reference array is not zero, indicating that other components referenced by the components corresponding to the definition function are not downloaded, and determining the components in the updated reference array to be the un-downloaded components.
Step 309, obtaining the component name and the component version number corresponding to the un-downloaded component, and forming a component address.
In the embodiment of the application, the component names of the un-downloaded components are obtained, the component names of all the un-downloaded components are sorted in an ascending order according to initials to form a component name sequence, the component version numbers of the un-downloaded components are obtained, the component version numbers of all the un-downloaded components are added to obtain a combined version number, a domain name to which a terminal belongs is obtained, and then the domain name, the component name sequence of the un-downloaded components and the component version number are connected through splicing symbols according to the sequence to form a component address.
And 310, downloading the un-downloaded component according to the component address, and calling a component downloading tracking function to send a notice if the downloading is finished, and storing the mapping relation between the component name of the downloaded component and the component function in the component set.
In the embodiment of the application, the script tag in the HTML is used, the src attribute is set as the component address, the download request link including the component address is sent to the server, and when the server receives the download request link with a plurality of file names, the merged structure of the JavaScript files corresponding to the plurality of file names is returned. And setting an onload function as a component download tracking function, and calling the onload function to send a download completion notification if the terminal receives a JavaScript merge file sent by the server, so that the terminal stores the mapping relation between the component name of the downloaded component and the component function by using a global hash variable.
Step 312, obtain the component name of the required reference from the stored downloaded component.
And step 313, calling the components to be referenced according to the mapping relation.
In the embodiment of the application, different software projects search respective cited component names in stored downloaded components, obtain component function functions corresponding to the component names according to the mapping relation between the component names and the component function functions, call the component function functions of the components to be cited by utilizing the eval function, return to the execution structure, and realize the calling of the components to be cited.
All the above technical solutions may be combined arbitrarily to form an optional embodiment of the present application, and are not described in detail herein.
The component loading method provided by the embodiment of the invention is characterized in that the component loader is arranged, each time the component loader is used for downloading the un-downloaded component in the included component set, each component in the component set is only downloaded once, and the mapping relation between the component name of the downloaded component in the component set and the component function is stored. The different projects do not need to be configured with the component loading function independently, the components to be referenced can be called directly in the stored components, and the method for calling the components by all the projects is unified. When the component is updated, the version number of the component is updated only in the set component loader, so that the component loader can acquire the updated component again, all projects can acquire the updated component in real time, the configuration of the component does not need to be modified in each project, the time and the energy spent by developers are reduced, and the operating efficiency of the projects is improved.
In order to better implement the component loading method according to the embodiment of the present invention, a component loading apparatus is further provided in the embodiment of the present invention. Referring to fig. 4, fig. 4 is a schematic structural diagram of a device loading apparatus according to an embodiment of the present invention. The component loading apparatus may include a setting unit 401, an obtaining unit 402, a downloading unit 403, and a calling unit 404.
The setting unit 401 is configured to set a component loader, where the component loader includes a definition function and a component version number of each component in a component set, and the definition function includes a component name and a component function;
an obtaining unit 402, configured to obtain a component name and a component version number corresponding to an un-downloaded component in the component set, and form a component address;
a downloading unit 403, configured to download an un-downloaded component in the component set according to the component address, and store a mapping relationship between a component name of the downloaded component in the component set and a component function;
and the calling unit 404 is configured to call the component to be referenced according to the mapping relationship.
Optionally, the obtaining unit 402 is further configured to determine an un-downloaded component in the component set according to the definition function;
acquiring a component name and a component version number corresponding to the un-downloaded component according to the component loader;
sorting the component names corresponding to the un-downloaded components according to a preset rule to obtain a component name sequence;
adding the component version numbers corresponding to the un-downloaded components to obtain a combined version number;
and splicing the component name sequence and the combined version number to form the component address.
Optionally, the component function includes referencing a component in the component set, and the obtaining unit 402 is further configured to obtain a character string form of the defined function;
searching the modules and components referenced by the definition functions in the character string form by using a regular expression;
saving the modules and/or components referenced by the definition function to a reference array;
determining the un-downloaded components in the component set according to the reference array.
Optionally, naming specifications of modules and components that are referenced by the definition function are different, and the obtaining unit 402 is further configured to determine whether a component corresponding to the definition function is an un-downloaded component in the component set if the length of the reference array is zero;
if the length of the reference array is not zero, traversing the reference array, identifying a module referenced by the definition function in the reference array according to the naming specification, identifying a downloaded module in the reference array in a stored module, removing the module, the downloaded module and repeated modules in the reference array to form an updated reference array, and determining the modules in the updated reference array as the un-downloaded modules in the component set.
Optionally, the downloading unit 403 is further configured to, if an un-downloaded component in the component set is downloaded according to the component address, divide the un-downloaded component in the component set into a first component, where the first component includes the downloaded component in the component set;
acquiring a component name and a component function corresponding to the first component;
and storing the mapping relation between the component name and the component function corresponding to the first component by using a global hash variable.
Optionally, the invoking unit 404 is further configured to search for a second component from the first component according to the global hash variable, where the second component includes the component to be referenced;
acquiring a component name of the second component;
acquiring a component function corresponding to the component name of the second component according to the mapping relation;
and calling the component needing to be referenced by calling the component function of the second component.
Optionally, the apparatus is further configured to update a component address including the first component version number to form a first component address if the component version number corresponding to the component in the component set is updated to form the first component version number;
and downloading the updated component corresponding to the first component version number according to the first component address, and storing the mapping relation between the component name of the updated component corresponding to the first component version number and the component function.
Optionally, the downloading unit 403 is further configured to set a component downloading tracking function;
and if the downloading of the components which are not downloaded in the component set is completed, calling the component downloading tracking function to send out a notice.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
In the component loading apparatus provided in the embodiment of the present invention, the setting unit 401 sets the component loader, the obtaining unit 402 is then used to obtain the component that is not downloaded in the component set and is included in the component loader, and the downloading unit 403 is used to download the component that is not downloaded in the component set, so that each component in the component set is downloaded only once, and the mapping relationship between the component name and the component function of the downloaded component in the component set is stored. The different items do not need to be configured with the component loading function independently, and the calling unit 404 can be used directly to call the components to be referenced in the stored components, thereby unifying the methods of all item calling components. When the component is updated, the version number of the component is updated only in the set component loader, so that the component loader can acquire the updated component again, all projects can acquire the updated component in real time, the configuration of the component does not need to be modified in each project, the time and the energy spent by developers are reduced, and the operating efficiency of the projects is improved.
Correspondingly, the embodiment of the invention also provides computer equipment, which can be a terminal, and the terminal can be terminal equipment such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game machine, a personal computer, a personal digital assistant and the like. As shown in fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention. The computer apparatus 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored on the memory 502 and operable on the processor. The processor 501 is electrically connected to the memory 502. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 501 is a control center of the computer device 500, connects various parts of the entire computer device 500 using various interfaces and lines, performs various functions of the computer device 500 and processes data by running or loading software programs and/or modules stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the computer device 500 as a whole.
In the embodiment of the present invention, the processor 501 in the computer device 500 loads instructions corresponding to processes of one or more application programs into the memory 502, and the processor 501 runs the application programs stored in the memory 502, so as to implement various functions as follows:
setting a component loader, wherein the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
acquiring a component name and a component version number corresponding to an un-downloaded component in the component set to form a component address;
downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names of the downloaded components in the component set and the component function;
and calling the components to be referenced according to the mapping relation.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 5, the computer device 500 further includes: touch-sensitive display screen 503, radio frequency circuit 504, audio circuit 505, input unit 506 and power 507. The processor 501 is electrically connected to the touch display screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507, respectively. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 5 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The touch display screen 503 can be used for displaying a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among other things, the display panel may be used to display information input by or provided to a user as well as various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 501, and can receive and execute commands sent by the processor 501. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel may be transmitted to the processor 501 to determine the type of the touch event, and then the processor 501 may provide a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present invention, the touch panel and the display panel may be integrated into the touch display screen 503 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display 503 can also be used as a part of the input unit 506 to implement an input function.
In the embodiment of the present invention, the processor 501 executes the component loader, the download component loader includes files of each component in the component set in the network, and the processor 501 stores the component names and the mapping relationships of the component function functions of the downloaded components in the component set. When the component calling function is configured in different projects, the processor 501 is used for executing the component calling function in different projects, and the components required to be referenced by different projects are called according to the stored mapping relation.
The rf circuit 504 may be used for transceiving rf signals to establish wireless communication with a network device or other computer device via wireless communication, and for transceiving signals with the network device or other computer device.
Audio circuitry 505 may be used to provide an audio interface between a user and a computer device through speakers and microphones. The audio circuit 505 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data, which is then processed by the audio data output processor 501, and then transmitted to, for example, another computer device via the rf circuit 504, or output to the memory 502 for further processing. The audio circuitry 505 may also include an earbud jack to provide communication of a peripheral headset with the computer device.
The input unit 506 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 507 is used to power the various components of the computer device 1000. Optionally, the power supply 507 may be logically connected to the processor 501 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 507 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 5, the computer device 500 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
As can be seen from the above, the computer device provided in this embodiment may be provided with a component loader having a component downloading function, where the component loader determines an un-downloaded component in a component set included in the component loader based on a defined function of each included component, downloads a file corresponding to a version number of the un-downloaded component configured in the component loader, and stores a mapping relationship between a component name of the downloaded component and a component function by using a global hash variable, so that different software items may directly call the component downloaded by the component loader, and no component loading function is configured in each software item, so that each software item downloads a component to be referred.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any component loading method provided by the embodiment of the present invention. For example, the computer program may perform the steps of:
setting a component loader, wherein the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
acquiring a component name and a component version number corresponding to an un-downloaded component in the component set to form a component address;
downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names of the downloaded components in the component set and the component function;
and calling the components needing to be referenced according to the mapping relation.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any component loading method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any component loading method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
The above details are provided for the component loading method, apparatus, computer device and storage medium provided in the embodiments of the present invention, and a specific example is applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the technical solution and the core idea of the present invention; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method of component loading, comprising:
setting a component loader, wherein the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
acquiring a component name and a component version number corresponding to an un-downloaded component in the component set to form a component address;
downloading the un-downloaded components in the component set according to the component addresses, and storing the mapping relation between the component names and the component function functions of the downloaded components in the component set;
and calling the components needing to be referenced according to the mapping relation.
2. The method according to claim 1, wherein the obtaining component names and component version numbers corresponding to components not downloaded in the component set and forming component addresses comprises:
determining the undelivered components in the component set according to the definition function;
acquiring a component name and a component version number corresponding to the un-downloaded component according to the component loader;
sorting the component names corresponding to the un-downloaded components according to a preset rule to obtain a component name sequence;
adding the component version numbers corresponding to the un-downloaded components to obtain a combined version number;
and splicing the component name sequence and the combined version number to form the component address.
3. The method of claim 2, wherein the component function includes referencing a component in the set of components, and wherein determining the component not downloaded in the set of components according to the defined function includes:
acquiring a character string form of the definition function;
searching the module and the component which are referenced by the definition function in the character string form by utilizing a regular expression;
saving the modules and/or components referenced by the definition function to a reference array;
determining the un-downloaded components in the component set according to the reference array.
4. The method of claim 3, wherein the naming specifications of the modules and components that define function references are different, and wherein the determining the undeleted components in the set of components from the array of references comprises:
if the length of the reference array is zero, judging whether the component corresponding to the definition function is an un-downloaded component in the component set;
if the length of the reference array is not zero, traversing the reference array, identifying a module which is referenced by the definition function in the reference array according to the naming specification, identifying a downloaded module in the reference array in a stored module, removing the module, the downloaded module and a repeated module in the reference array to form an updated reference array, and determining the module in the updated reference array as an un-downloaded module in the component set.
5. The method according to claim 1, wherein said downloading the un-downloaded component in the component set according to the component address, and storing the mapping relationship between the component name and the component function of the downloaded component in the component set comprises:
if the un-downloaded components in the component set are downloaded according to the component addresses, dividing the un-downloaded components in the component set into first components, wherein the first components comprise the downloaded components in the component set;
acquiring a component name and a component function corresponding to the first component;
and storing the mapping relation between the component name and the component function corresponding to the first component by using a global hash variable.
6. The method of claim 5, wherein the invoking the referenced component according to the mapping relationship comprises:
according to the global hash variable, searching a second component from the first component, wherein the second component comprises the component needing to be referenced;
acquiring a component name of the second component;
acquiring a component function corresponding to the component name of the second component according to the mapping relation;
and executing the component calling the required reference by calling the component function of the second component.
7. The method of claim 1, further comprising:
if the component version number corresponding to the component in the component set is updated to form a first component version number, updating a component address comprising the first component version number to form a first component address;
and downloading the updated component corresponding to the first component version number according to the first component address, and storing the mapping relation between the component name of the updated component corresponding to the first component version number and the component function.
8. The method according to claim 1, wherein before storing the mapping relationship between the component names and the component function functions of the downloaded components in the component set, the method comprises:
setting a component download tracking function;
and if the downloading of the components which are not downloaded in the component set is completed, calling the component downloading tracking function to send out a notice.
9. A component loading apparatus, comprising:
the device comprises a setting unit, a component loader and a component processing unit, wherein the setting unit is used for setting the component loader, the component loader comprises a definition function and a component version number of each component in a component set, and the definition function comprises a component name and a component function;
the acquisition unit is used for acquiring the component name and the component version number corresponding to the un-downloaded component in the component set to form a component address;
the downloading unit is used for downloading the un-downloaded components in the component set according to the component addresses and storing the component names of the downloaded components in the component set and the mapping relation of the component function;
and the calling unit is used for calling the components to be quoted according to the mapping relation.
10. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps in the component loading method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the component loading method according to any one of claims 1 to 8.
CN202110075405.1A 2021-01-20 2021-01-20 Component loading method and device, computer equipment and storage medium Active CN112882764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110075405.1A CN112882764B (en) 2021-01-20 2021-01-20 Component loading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110075405.1A CN112882764B (en) 2021-01-20 2021-01-20 Component loading method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112882764A CN112882764A (en) 2021-06-01
CN112882764B true CN112882764B (en) 2022-07-22

Family

ID=76050851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110075405.1A Active CN112882764B (en) 2021-01-20 2021-01-20 Component loading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112882764B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448558A (en) * 2021-07-07 2021-09-28 医声医事(北京)科技有限公司 Method for component generation
CN113886267A (en) * 2021-10-25 2022-01-04 锐凌无线通讯科技(深圳)有限公司 Software system detection method and device, electronic equipment and storage medium
CN116149689B (en) * 2023-04-24 2023-07-04 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528601A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for dynamically configuring module
CN108804159A (en) * 2018-06-14 2018-11-13 腾讯科技(深圳)有限公司 Javascript module loadings method and its preprocess method, device and computer equipment
CN108984160A (en) * 2018-06-21 2018-12-11 中国石油集团安全环保技术研究院有限公司 Information-based Quick Development Framework and method based on modularization
CN110321503A (en) * 2019-06-13 2019-10-11 北京奇艺世纪科技有限公司 A kind of web component caching method, device and electronic equipment
CN111240767A (en) * 2020-02-04 2020-06-05 北京字节跳动网络技术有限公司 Component and page loading method and device, electronic equipment and storage medium
US10719332B1 (en) * 2019-04-29 2020-07-21 Splunk Inc. Provisioning a client device with a multi-component application
CN111949296A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Data updating method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9785452B2 (en) * 2013-10-09 2017-10-10 Cisco Technology, Inc. Framework for dependency management and automatic file load in a network environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528601A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for dynamically configuring module
CN108804159A (en) * 2018-06-14 2018-11-13 腾讯科技(深圳)有限公司 Javascript module loadings method and its preprocess method, device and computer equipment
CN108984160A (en) * 2018-06-21 2018-12-11 中国石油集团安全环保技术研究院有限公司 Information-based Quick Development Framework and method based on modularization
US10719332B1 (en) * 2019-04-29 2020-07-21 Splunk Inc. Provisioning a client device with a multi-component application
CN110321503A (en) * 2019-06-13 2019-10-11 北京奇艺世纪科技有限公司 A kind of web component caching method, device and electronic equipment
CN111240767A (en) * 2020-02-04 2020-06-05 北京字节跳动网络技术有限公司 Component and page loading method and device, electronic equipment and storage medium
CN111949296A (en) * 2020-08-07 2020-11-17 北京字节跳动网络技术有限公司 Data updating method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张巨俭等.基于Require JS数字资源管理系统UI设计与实现.《北京服装学院学报(自然科学版)》.2014,(第04期), *

Also Published As

Publication number Publication date
CN112882764A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN112882764B (en) Component loading method and device, computer equipment and storage medium
US9483240B1 (en) Data binding dependency analysis
WO2020119800A1 (en) List display method, apparatus and device, and storage medium
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
CN112527281B (en) Operator upgrading method and device based on artificial intelligence, electronic equipment and medium
CN112860343B (en) Configuration changing method, system, device, electronic equipment and storage medium
CN112181386B (en) Code construction method, device and terminal based on software continuous integration
CN114237743B (en) Interface loading method and device, electronic equipment and storage medium
CN111427577A (en) Code processing method and device and server
CN113408260A (en) Project engineering generation method and device, computer equipment and storage medium
CN114490116A (en) Data processing method and device, electronic equipment and storage medium
US20190196794A1 (en) Visual programming method, system and terminal device
CN112835582A (en) Container engine-based rendering method, device, equipment and storage medium
CN114546113A (en) Menu operation method and device, storage medium and electronic equipment
CN115686506A (en) Data display method and device, electronic equipment and storage medium
CN112306493A (en) Hot repair patch generation method and device, storage medium and computer equipment
CN109561146A (en) Document down loading method, device, terminal device
CN113934453B (en) Risk detection method, risk detection device and storage medium
CN113342429B (en) Intelligent contract data processing method, intelligent contract data processing device, computer equipment and storage medium
CN113760356B (en) Differential configuration method, device, equipment and medium of program product
CN113625968B (en) File authority management method and device, computer equipment and storage medium
CN113961585A (en) Data processing method and device, electronic equipment and storage medium
CN111376248B (en) Robot, robot decision method and terminal equipment
CN116382800A (en) Data processing method, device, electronic equipment and storage medium
CN114691145A (en) Code processing method and device, computer equipment 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
GR01 Patent grant
GR01 Patent grant