CN109753622A - static resource management method, device, storage medium and electronic equipment - Google Patents

static resource management method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109753622A
CN109753622A CN201910099087.5A CN201910099087A CN109753622A CN 109753622 A CN109753622 A CN 109753622A CN 201910099087 A CN201910099087 A CN 201910099087A CN 109753622 A CN109753622 A CN 109753622A
Authority
CN
China
Prior art keywords
static resource
target
replaced
type
alternative
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.)
Granted
Application number
CN201910099087.5A
Other languages
Chinese (zh)
Other versions
CN109753622B (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.)
Shanghai Suixun Electronic Technology Co ltd
Original Assignee
Tianjin ByteDance 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 Tianjin ByteDance Technology Co Ltd filed Critical Tianjin ByteDance Technology Co Ltd
Priority to CN201910099087.5A priority Critical patent/CN109753622B/en
Publication of CN109753622A publication Critical patent/CN109753622A/en
Application granted granted Critical
Publication of CN109753622B publication Critical patent/CN109753622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The disclosure proposes that a kind of static resource management method, device, storage medium and electronic equipment, this method include the type of determining static resource;Determine alternative corresponding with type;Using corresponding alternative, target resource in static resource is replaced with into target character;Target webpage template is generated according to replaced static resource.It can be convenient for the publication and management of web page template by the disclosure, effectively promote packing effect when web front-end exploitation compiling.

Description

Static resource management method, device, storage medium and electronic equipment
Technical field
This disclosure relates to field of computer technology more particularly to a kind of static resource management method, device, storage medium and Electronic equipment.
Background technique
Single page Web applies (single page web application, SPA), that is, there was only answering for a Web page With, be single HyperText Markup Language (HyperText Markup Language, the HTML) page of load and user with answer The web application of the page is updated with dynamic when program interaction.Main usage scenario: in web front-end exploitation, HTML's Access request may include that the html page accessed required for this access request corresponds to all static moneys required for subpage frame Source, without to server update html document, jumping for subpage frame itself is also to be controlled by JavaScript again.
For the application of above-mentioned scene, the corresponding webpage mould of several sets is packaged out for different static resources in the related technology Plate, then, server end return to different web page templates according to different areas.
It under this mode, is packaged out the corresponding web page template of several sets and more expends time cost, and need to safeguard more set nets The packing of page template, is easy error, and packing effect when web front-end exploitation compiles is bad.
Summary of the invention
The disclosure is intended to solve at least some of the technical problems in related technologies.
For this purpose, the purpose of the disclosure is to propose that a kind of static resource management method, device, storage medium and electronics are set It is standby, the publication and management of web page template can be convenient for, effectively promote packing effect when web front-end exploitation compiling.
In order to achieve the above objectives, the static resource management method that disclosure first aspect embodiment proposes, comprising: determine quiet The type of state resource;Determine alternative corresponding with the type;Using the corresponding alternative, by the static money Target resource replaces with target character in source;Target webpage template is generated according to replaced static resource.
The static resource management method that disclosure first aspect embodiment proposes is adopted by determining the type of static resource With alternative corresponding with type, target resource in static resource is replaced with into target character, according to replaced static money Source generates target webpage template, due to only generating a web page template when web front-end is developed and compiled, convenient for the hair of web page template Cloth and management effectively promote packing effect when web front-end exploitation compiling.
In order to achieve the above objectives, the static resource managing device that disclosure second aspect embodiment proposes, comprising: first really Cover half block, for determining the type of static resource;Second determining module, for determining alternative corresponding with the type; Target resource in the static resource is replaced with target character for using the corresponding alternative by replacement module;It is raw At module, for generating target webpage template according to replaced static resource.
The static resource managing device that disclosure second aspect embodiment proposes is adopted by determining the type of static resource With alternative corresponding with type, target resource in static resource is replaced with into target character, according to replaced static money Source generates target webpage template, due to only generating a web page template when web front-end is developed and compiled, convenient for the hair of web page template Cloth and management effectively promote packing effect when web front-end exploitation compiling.
In order to achieve the above objectives, the non-transitorycomputer readable storage medium that disclosure third aspect embodiment proposes, When the instruction in the storage medium is performed by the processor of mobile terminal, so that mobile terminal is able to carry out a kind of static state Method for managing resource, which comprises the static resource management method that disclosure first aspect embodiment proposes.
The non-transitorycomputer readable storage medium that disclosure third aspect embodiment proposes, by determining static resource Type target resource in static resource is replaced with, after replacement by target character using alternative corresponding with type Static resource generate target webpage template, due to web front-end develop compile when only generate a web page template, be convenient for webpage The publication and management of template effectively promote packing effect when web front-end exploitation compiling.
In order to achieve the above objectives, the computer program product that disclosure fourth aspect embodiment proposes, when the computer When instruction in program product is executed by processor, a kind of static resource management method is executed, which comprises determine static The type of resource;Determine alternative corresponding with the type;Using the corresponding alternative, by the static resource Middle target resource replaces with target character;Target webpage template is generated according to replaced static resource.
The computer program product that disclosure fourth aspect embodiment proposes is used by determining the type of static resource Target resource in static resource is replaced with target character, according to replaced static resource by alternative corresponding with type Target webpage template is generated, due to only generating a web page template when web front-end is developed and compiled, convenient for the publication of web page template And management, effectively promote packing effect when web front-end exploitation compiling.
The 5th aspect embodiment of the disclosure also proposes a kind of electronic equipment, which includes at least one processor; And the memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory The instruction that a processor executes, described instruction are arranged to be used for executing the static resource that disclosure first aspect embodiment proposes Management method.
The computer equipment that the 5th aspect embodiment of the disclosure proposes, by determining the type of static resource, use and class Target resource in static resource is replaced with target character by the corresponding alternative of type, is generated according to replaced static resource Target webpage template, due to only generating a web page template when web front-end is developed and compiled, the publication and pipe convenient for web page template Reason effectively promotes packing effect when web front-end exploitation compiling.
The additional aspect of the disclosure and advantage will be set forth in part in the description, and will partially become from the following description It obtains obviously, or recognized by the practice of the disclosure.
Detailed description of the invention
The disclosure is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow diagram for the static resource management method that one embodiment of the disclosure proposes;
Fig. 2 is the flow diagram for the static resource management method that another embodiment of the disclosure proposes;
Fig. 3 is the flow diagram for the static resource management method that another embodiment of the disclosure proposes;
Fig. 4 is the structural schematic diagram for the static resource managing device that one embodiment of the disclosure proposes;
Fig. 5 is the structural schematic diagram for the static resource managing device that another embodiment of the disclosure proposes;
Fig. 6 is the structural schematic diagram for the electronic equipment that an embodiment of the present disclosure proposes.
Specific embodiment
Embodiment of the disclosure is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the disclosure, and should not be understood as the limitation to the disclosure.On the contrary, this Disclosed embodiment includes all changes fallen within the scope of the spiritual and intension of attached claims, modification and is equal Object.
Fig. 1 is the flow diagram for the static resource management method that one embodiment of the disclosure proposes.
Single page Web applies (single page web application, SPA), that is, there was only answering for a Web page With, be single HyperText Markup Language (HyperText Markup Language, the HTML) page of load and user with answer The web application of the page is updated with dynamic when program interaction.Main usage scenario: in web front-end exploitation, HTML's Access request may include that the html page accessed required for this access request corresponds to all static moneys required for subpage frame Source, without to server update html document, jumping for subpage frame itself is also to be controlled by JavaScript again.
For the application of above-mentioned scene, the corresponding webpage mould of several sets is packaged out for different static resources in the related technology Plate, then, server end return to different web page templates according to different areas.
It under this mode, is packaged out the corresponding web page template of several sets and more expends time cost, and need to safeguard more set nets The packing of page template, is easy error, and packing effect when web front-end exploitation compiles is bad.
In order to solve the above-mentioned technical problem, a kind of static resource management method is provided in the embodiment of the present disclosure, passes through determination Target resource in static resource is replaced with target character, root using alternative corresponding with type by the type of static resource Target webpage template is generated according to replaced static resource, due to only generating a web page template when web front-end is developed and compiled, Convenient for the publication and management of web page template, packing effect when web front-end exploitation compiling is effectively promoted.
Referring to Fig. 1, this method comprises:
S101: the type of static resource is determined.
Specifically, static resource refers to static file, such as the picture in web, pattern text (* .css), and audio file, depending on Frequency file and js file etc..
In the embodiment of the present disclosure, type includes the first kind, and the first kind indicates the data in the first script language files Type, the first scripting language are, for example, JavaScript scripting language, and the first script language files are JavaScript script language It says file (JavaScript file can be referred to as), the first kind is specifically used for indicating the data in JavaScript file Type is JS type, and type can also include Second Type, and Second Type indicates the data type in the second script language files, Second scripting language is cascading style sheets (Cascading Style Sheets, CSS), and the second script language files are CSS text Part, Second Type indicate that the data type in CSS file is CSS type.
In the related technology, for above-mentioned different types of static resource, it can be packaged out the corresponding web page template of more sets, it is unfavorable It is safeguarded in the final-period management of template, and in the embodiment of the present disclosure, it compiles when being packaged, can be determined first in web front-end exploitation The type of static resource is then packaged again after being performed corresponding processing according to the type to static resource and generates a target network Page template while so that being convenient for the publication and management of web page template, remains the diversity of static resource, realizes for multiplicity Static resource be standardized packing management.
S102: alternative corresponding with type is determined.
S103: corresponding alternative is used, target resource in static resource is replaced with into target character.
Target resource therein can be the placeholder in static resource.
The embodiment of the present disclosure is during specific execute, when type is the above-mentioned first kind, determining and type pair The alternative answered, comprising: determine the first alternative corresponding with the first kind, the first alternative are as follows: with the side of reference Formula is replaced;Using corresponding alternative, target resource in static resource is replaced with into target character, comprising: use and draw Mode is replaced the placeholder in static resource.
Optionally, by the way of reference, the placeholder in static resource is replaced, comprising: according to the first kind Determine the file type of the first script language files;By the way of reference, in conjunction with file type to the occupy-place in static resource Symbol is replaced.
File type therein can be, for example, the JavaScript file of worker type, or be non-worker class The JavaScript file of type.
Optionally, by the way of reference, the placeholder in static resource is replaced in conjunction with file type, comprising: When file type is target file type, the placeholder in static resource is replaced using the way of reference of the first object It changes;When file type is not target file type, directly adopt the mode routinely quoted to the placeholder in static resource into Row replacement.
First object therein is Navigator object.
Target file type therein is worker type.
In the present embodiment, by file type be worker type when, using the way of reference pair of Navigator object Placeholder in static resource is replaced;When file type is not worker type, the mode routinely quoted is directlyed adopt Placeholder in static resource is replaced, a kind of alternative more refined is provided, so that according to replaced The generated target webpage template of static resource can be suitable for a variety of different static resources, farthest ensure preceding end page The presentation effect in face.
The embodiment of the present disclosure is during specific execute, when type is above-mentioned Second Type, determining and type pair The alternative answered, comprising: determine the second alternative corresponding with Second Type, the second alternative are as follows: using in target Content distributing network address is replaced;Using corresponding alternative, target resource in static resource is replaced with into target character, It include: that target resource in static resource is directly replaced with into object content distribution network address.
S104: target webpage template is generated according to replaced static resource.
For the embodiment of the present disclosure during specific execute, web page template when can be compiled using web front-end exploitation is raw At technology, target webpage template is generated according to replaced static resource.
Wherein, target webpage template can be referred to as according to the web page template that replaced static resource generates.
The target webpage template can be used for single page Web and apply during subsequent page access, and referring to fig. 2, Fig. 2 is The flow diagram for the static resource management method that another embodiment of the disclosure proposes, generates according to replaced static resource After target webpage template, this method further include:
S201: the access request of receiving front-end equipment.
Wherein, which is used for the webpage of requirements for access.
S202: the target access address accessed required for access request is determined.
It target access address therein can be true for content distributing network (Content Delivery Network, CDN) The fixed address CDN corresponding with access request.
S203: invocation target web page template, and the target character in target webpage template is directly replaced with into target access Address.
S204: replaced target webpage template is fed back into headend equipment, to respond access request.
Through the above steps, via the address CDN of access required for access request, then, invocation target web page template, and The target character in target webpage template is directly replaced with into the address CDN, and replaced target webpage template is fed back to Headend equipment allows the access request of front end to go to index correspondence in a manner of quoting the address CDN to respond access request JavaScript/CSS static resource, to respond access request, the front end of receipt of subsequent access request can parse and incite somebody to action Static resource rendering display has ensured the presentation effect of front end page while being convenient for the publication and management of web page template.
In the present embodiment, by determining the type of static resource, using alternative corresponding with type, by static resource Middle target resource replaces with target character, target webpage template is generated according to replaced static resource, due to opening in web front-end A web page template is only generated when hair compiling, convenient for the publication and management of web page template, when effectively promoting web front-end exploitation compiling Packing effect.
It as an example, is the stream for the static resource management method that another embodiment of the disclosure proposes referring to Fig. 3, Fig. 3 Journey schematic diagram, process description are as follows:
S301: it in web front-end exploitation compiling, generates static resource and stores static resource to the memory of electronic equipment In.
S302: judge the type of static resource in memory.
S303: if the type of static resource is designated as JS type.
S304: by the way of reference, the placeholder in static resource is replaced.
S305: if the JavaScript file of non-worker type, then the mode routinely quoted is directlyed adopt occupy-place Symbol is substituted into corresponding static resource address.
For example, the JavaScript file directly quoted inside HTML, in order to which back-end services are directly in access process, The replacement of placeholder is carried out, the template of replaced static resource is: < script src={ { cdn_host } }/img/ test.js>。
S306: if the JavaScript file of worker type, then static state is provided using the way of reference of the first object Placeholder in source is replaced.
For example, specifically such as, the address of corresponding static resource is replaced using the way of reference of navigator object The template of static resource is: navigator.cdn_host+'/img/test.js'.
S307: if the type of static resource is designated as CSS type.
S308: if the link of the static resource of the CSS type in HTML, then the template of replaced static resource is: < Link src={ { cdn_host } }/img/test.css >.
S309: if requesting in the static resource of CSS type with picture, picture request directlys adopt object content distribution Network address is replaced.
Wherein, which requests requested picture in the corresponding path in object content distribution network address.
S310: target webpage template is generated according to replaced static resource.
S311: the access request of receiving front-end equipment.
S312: service call target webpage template, with replacing with target access the target character in target webpage template Location, to replace specified target character { { cdn_host } }.
S313: different contents is generated for different regions according to replaced target webpage template and target access address The document of distribution network.
S314: the document of the content distributing network of different regions is fed back into user.
Service can accomplish the same target webpage template, and different content distributing networks is generated for different regions Document.
Through the above steps, resource compiling and packing time, than at least 1 times fastly of packaging method in the related technology, and It does not need to safeguard more set web page templates, reduces the probability to go wrong.
Fig. 4 is the structural schematic diagram for the static resource managing device that one embodiment of the disclosure proposes.
Referring to fig. 4, which includes:
First determining module 401, for determining the type of static resource;
Second determining module 402, for determining alternative corresponding with type;
Target resource in static resource is replaced with target word for using corresponding alternative by replacement module 403 Symbol;
Generation module 404, for generating target webpage template according to replaced static resource.
Optionally, in some embodiments, referring to Fig. 5, further includes:
Receiving module 405, the access request for receiving front-end equipment;
Third determining module 406, for determining the target access address of access required for access request;
Calling module 407 is used for invocation target web page template, and directly replaces the target character in target webpage template For target access address;
Respond module 408, for replaced target webpage template to be fed back to headend equipment, to respond access request.
Optionally, in some embodiments, type includes the first kind, and the first kind indicates in the first script language files Data type, the second determining module 402, is specifically used for:
Determine the first alternative corresponding with the first kind, the first alternative are as follows: be replaced by reference;
Replacement module 403, is specifically used for:
By the way of reference, the placeholder in static resource is replaced.
Optionally, in some embodiments, replacement module 403 is specifically used for:
The file type of the first script language files is determined according to the first kind;
By the way of reference, the placeholder in static resource is replaced in conjunction with file type.
Optionally, in some embodiments, replacement module 403 is specifically used for:
When file type is target file type, using the way of reference of the first object to the placeholder in static resource It is replaced;
When file type is not target file type, the mode routinely quoted is directlyed adopt to the occupy-place in static resource Symbol is replaced.
Optionally, in some embodiments, type includes Second Type, and Second Type indicates in the second script language files Data type, the second determining module 402, is specifically used for:
Determine the second alternative corresponding with Second Type, the second alternative are as follows: use object content distribution network Address is replaced;
Replacement module 403, is specifically used for:
Target resource in static resource is directly replaced with into object content distribution network address.
It should be noted that the explanation in earlier figures 1- Fig. 3 embodiment to static resource management method embodiment Suitable for the static resource managing device 400 of the embodiment, realization principle is similar, and details are not described herein again.
In the present embodiment, by determining the type of static resource, using alternative corresponding with type, by static resource Middle target resource replaces with target character, target webpage template is generated according to replaced static resource, due to opening in web front-end A web page template is only generated when hair compiling, convenient for the publication and management of web page template, when effectively promoting web front-end exploitation compiling Packing effect.
It is the structural schematic diagram for the electronic equipment that an embodiment of the present disclosure proposes below with reference to Fig. 6, Fig. 6.It illustrates Suitable for being used to realize the structural schematic diagram of the electronic equipment 600 of the embodiment of the present disclosure.Terminal device in the embodiment of the present disclosure can It is (flat to include but is not limited to such as mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD Plate computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance terminal) etc. mobile terminal and Such as fixed terminal of number TV, desktop computer etc..
Electronic equipment shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present disclosure Carry out any restrictions.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM 603 pass through the phase each other of bus 604 Even.Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device 609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for static resource management method shown in execution flow chart. In such embodiments, which can be downloaded and installed from network by communication device 609, or from depositing Storage device 608 is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, sheet is executed The above-mentioned function of being limited in open embodiment static resource management method.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment: determining the type of static resource;Determine alternative corresponding with type;Using Target resource in static resource is replaced with target character by corresponding alternative;Mesh is generated according to replaced static resource Mark web page template.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in module involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.Wherein, the title of module does not constitute the restriction to the module itself under certain conditions, for example, the One determining module is also described as " for determining the module of the type of static resource ".
It should be noted that term " first ", " second " etc. are used for description purposes only in the description of the disclosure, without It can be interpreted as indication or suggestion relative importance.In addition, in the description of the disclosure, unless otherwise indicated, the meaning of " multiple " It is two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the disclosure includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be by the disclosure Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the disclosure can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, can integrate in a processing module in each functional unit in each embodiment of the disclosure It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the disclosure.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
Although embodiment of the disclosure has been shown and described above, it is to be understood that above-described embodiment is example Property, it should not be understood as the limitation to the disclosure, those skilled in the art within the scope of this disclosure can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (10)

1. a kind of static resource management method, which comprises the following steps:
Determine the type of static resource;
Determine alternative corresponding with the type;
Using the corresponding alternative, target resource in the static resource is replaced with into target character;
Target webpage template is generated according to replaced static resource.
2. static resource management method as described in claim 1, which is characterized in that further include:
The access request of receiving front-end equipment;
Determine the target access address accessed required for the access request;
The target webpage template is called, and the target character in the target webpage template is directly replaced with into the target and is visited Ask address;
Replaced target webpage template is fed back into the headend equipment, to respond the access request.
3. static resource management method as described in claim 1, which is characterized in that the type includes the first kind, described The first kind indicates the data type in the first script language files, determination alternative corresponding with the type, packet It includes:
Determine the first alternative corresponding with the first kind, first alternative are as follows: carry out by reference Replacement;
It is described to use the corresponding alternative, target resource in the static resource is replaced with into target character, comprising:
By the way of reference, the placeholder in the static resource is replaced.
4. static resource management method as claimed in claim 3, which is characterized in that it is described by the way of reference, to described Placeholder in static resource is replaced, comprising:
The file type of first script language files is determined according to the first kind;
By the way of reference, the placeholder in the static resource is replaced in conjunction with the file type.
5. static resource management method as claimed in claim 3, which is characterized in that it is described by the way of reference, in conjunction with institute File type is stated to be replaced the placeholder in the static resource, comprising:
When the file type is target file type, using the way of reference of the first object to accounting in the static resource Position symbol is replaced;
When the file type is not the target file type, the mode routinely quoted is directlyed adopt to the static resource In placeholder be replaced.
6. static resource management method as described in claim 1, which is characterized in that the type includes Second Type, described Second Type indicates the data type in the second script language files, determination alternative corresponding with the type, packet It includes:
Determine the second alternative corresponding with the Second Type, second alternative are as follows: distribute using object content Network address is replaced;
It is described to use the corresponding alternative, target resource in the static resource is replaced with into target character, comprising:
Target resource in the static resource is directly replaced with into object content distribution network address.
7. a kind of static resource managing device characterized by comprising
First determining module, for determining the type of static resource;
Second determining module, for determining alternative corresponding with the type;
Target resource in the static resource is replaced with target word for using the corresponding alternative by replacement module Symbol;
Generation module, for generating target webpage template according to replaced static resource.
8. static resource managing device as claimed in claim 7, which is characterized in that further include:
Receiving module, the access request for receiving front-end equipment;
Third determining module, for determining the target access address of access required for the access request;
Calling module replaces the target character in the target webpage template for calling the target webpage template, and directly It is changed to the target access address;
Respond module, for replaced target webpage template to be fed back to the headend equipment, to respond the access request.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor Such as static resource management method of any of claims 1-6 is realized when row.
10. a kind of electronic equipment characterized by comprising at least one processor;And at least one described processor The memory of communication connection;Wherein, the memory is stored with the instruction that can be executed by least one described processor, the finger Order is arranged to be used for executing the described in any item static resource management methods of the claims 1-6.
CN201910099087.5A 2019-01-31 2019-01-31 Static resource management method and device, storage medium and electronic equipment Active CN109753622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910099087.5A CN109753622B (en) 2019-01-31 2019-01-31 Static resource management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910099087.5A CN109753622B (en) 2019-01-31 2019-01-31 Static resource management method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109753622A true CN109753622A (en) 2019-05-14
CN109753622B CN109753622B (en) 2021-06-18

Family

ID=66407284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910099087.5A Active CN109753622B (en) 2019-01-31 2019-01-31 Static resource management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109753622B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471709A (en) * 2019-07-15 2019-11-19 北京字节跳动网络技术有限公司 A kind of method, apparatus, medium and electronic equipment accelerating webpage opening speed
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN111273910A (en) * 2020-01-14 2020-06-12 北京小米移动软件有限公司 Method, device and storage medium for acquiring resource number identifier
CN112015485A (en) * 2020-08-14 2020-12-01 北京达佳互联信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN112149035A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Website static resource processing method and device
CN113934469A (en) * 2021-10-13 2022-01-14 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955367A (en) * 2014-04-28 2014-07-30 华为技术有限公司 Method and device for generating pages
US20160373545A1 (en) * 2015-06-16 2016-12-22 Guangzhou Ucweb Computer Technology Co., Ltd Method and apparatus for webpage resource acquisition
CN106489145A (en) * 2015-12-28 2017-03-08 华为技术有限公司 The access method of web site, device and Web site system
CN107229633A (en) * 2016-03-24 2017-10-03 北京神州泰岳软件股份有限公司 Static page generation method, Web access method and device
CN107992557A (en) * 2017-11-28 2018-05-04 平安养老保险股份有限公司 Static resource update method, device, storage medium and computer equipment
CN108132954A (en) * 2016-11-30 2018-06-08 深圳联友科技有限公司 The localization loading method and device of a kind of html page
CN108279903A (en) * 2018-02-24 2018-07-13 北京车和家信息技术有限公司 The method and device of page presentation
CN109284472A (en) * 2018-11-15 2019-01-29 福建省华渔教育科技有限公司 Front end webpage loading method, storage medium based on webpack

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955367A (en) * 2014-04-28 2014-07-30 华为技术有限公司 Method and device for generating pages
US20160373545A1 (en) * 2015-06-16 2016-12-22 Guangzhou Ucweb Computer Technology Co., Ltd Method and apparatus for webpage resource acquisition
CN106489145A (en) * 2015-12-28 2017-03-08 华为技术有限公司 The access method of web site, device and Web site system
CN107229633A (en) * 2016-03-24 2017-10-03 北京神州泰岳软件股份有限公司 Static page generation method, Web access method and device
CN108132954A (en) * 2016-11-30 2018-06-08 深圳联友科技有限公司 The localization loading method and device of a kind of html page
CN107992557A (en) * 2017-11-28 2018-05-04 平安养老保险股份有限公司 Static resource update method, device, storage medium and computer equipment
CN108279903A (en) * 2018-02-24 2018-07-13 北京车和家信息技术有限公司 The method and device of page presentation
CN109284472A (en) * 2018-11-15 2019-01-29 福建省华渔教育科技有限公司 Front end webpage loading method, storage medium based on webpack

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471709A (en) * 2019-07-15 2019-11-19 北京字节跳动网络技术有限公司 A kind of method, apparatus, medium and electronic equipment accelerating webpage opening speed
CN110471709B (en) * 2019-07-15 2022-12-06 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for accelerating webpage opening speed
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN111273910A (en) * 2020-01-14 2020-06-12 北京小米移动软件有限公司 Method, device and storage medium for acquiring resource number identifier
CN111273910B (en) * 2020-01-14 2023-09-05 北京小米移动软件有限公司 Method, device and storage medium for acquiring resource number identifier
CN112015485A (en) * 2020-08-14 2020-12-01 北京达佳互联信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN112149035A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Website static resource processing method and device
CN113934469A (en) * 2021-10-13 2022-01-14 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium
CN113934469B (en) * 2021-10-13 2023-11-24 北京有竹居网络技术有限公司 Template loading method, control method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109753622B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN109753622A (en) static resource management method, device, storage medium and electronic equipment
CN109375918A (en) Interface rendering method, device, electronic equipment and the storage medium of small routine
CN109710870A (en) Loading method, device, electronic equipment and the readable storage medium storing program for executing of the H5 page
CN108509526A (en) The method and apparatus of interface element for Dynamic Distribution&#39;s mobile application
CN109871388A (en) Data cache method, device, whole electronic equipment and storage medium
WO2021223752A1 (en) Display method and apparatus, and electronic device
CN110069308A (en) The page starts method, apparatus, electronic equipment and storage medium
CN110209315A (en) The display methods of character, device, electronic equipment and storage medium in user interface
CN109062563A (en) Method and apparatus for generating the page
CN110046310A (en) The method and apparatus for analyzing the redirected link in the page
CN110245030A (en) A kind of data service providing method, device, medium and electronic equipment
CN109525855A (en) Method and apparatus for handling information
CN110097397A (en) Information-pushing method, device and electronic equipment based on feedback
CN110427304A (en) O&amp;M method, apparatus, electronic equipment and medium for banking system
CN109753332A (en) Method and apparatus for showing information
CN110135168A (en) Detection method, device, system, terminal device and the storage medium of application program
CN110489165A (en) Obtain method, apparatus, medium and the equipment of call stack stack frame command offsets
CN110008050A (en) Method and apparatus for handling information
CN111770128B (en) Message management method and device
CN109471976A (en) Processing method, device, electronic equipment and the storage medium of web page operation data
CN110149545A (en) Processing method, device, electronic equipment and the readable storage medium storing program for executing of user information
CN109462648A (en) A kind of user behavior tracking, device, equipment and storage medium
CN109740313A (en) Computer program guard method, device, electronic equipment and computer readable storage medium
CN109697034A (en) A kind of method for writing data, device, electronic equipment and storage medium
CN110060099B (en) Information pushing method and device based on historical records and electronic equipment

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210715

Address after: 200433 no.465 Guohe Road, Yangpu District, Shanghai

Patentee after: Shanghai suixun Electronic Technology Co.,Ltd.

Address before: 300000 Tianjin Binhai High-tech Zone Binhai Science Park, No. 39, No. 6 High-tech Road, 9-3-401

Patentee before: TIANJIN BYTEDANCE TECHNOLOGY Co.,Ltd.