CN116257707A - Application release method and device, electronic equipment and storage medium - Google Patents

Application release method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116257707A
CN116257707A CN202310008384.0A CN202310008384A CN116257707A CN 116257707 A CN116257707 A CN 116257707A CN 202310008384 A CN202310008384 A CN 202310008384A CN 116257707 A CN116257707 A CN 116257707A
Authority
CN
China
Prior art keywords
picture
presented
application
application data
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310008384.0A
Other languages
Chinese (zh)
Inventor
王洪琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310008384.0A priority Critical patent/CN116257707A/en
Publication of CN116257707A publication Critical patent/CN116257707A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application relates to the technical field of computers and the field of artificial intelligence, in particular to an application publishing method, an application publishing device, an electronic device and a storage medium, wherein the method comprises the following steps: and determining the picture to be preloaded and the picture to be zero-waiting to be presented according to whether the picture to be presented is included in a target page or not according to each picture to be presented, wherein the picture size exceeds a set threshold value, the picture to be presented is required to be displayed immediately, the pictures are represented in different forms in a data packet generated by packaging, and each picture to be presented, which is identified in the preloaded array, is started to be loaded when the terminal starts to run the application data by means of the maintained preloaded array. Therefore, excessive loading time is not required to be consumed, the loading of the picture can be carried out when the application starts to run, the presentation delay of the large picture in the non-target page is greatly reduced, the large picture in the target page can be presented in a zero waiting mode, and the release efficiency is improved.

Description

Application release method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an application publishing method, an application publishing device, an electronic device, and a storage medium.
Background
In the related art, when an application is published in a scenario where there is a limit to the size of a data packet, application data containing more large graphs may not be uploaded and published, for example, when an applet application is published, the main packet volume uploaded is limited.
In order to solve the problem of uploading application data, it is generally adopted to compress the pictures, or uniformly upload the large pictures to a content delivery network (Content Delivery Network, CDN) device, so that the large pictures are obtained from the CDN device when the application is started.
However, when the size of the picture is reduced by compressing the picture during release, the presentation quality of the picture is greatly affected, and the content presentation effect in the application is reduced; when the CDN equipment is used for releasing, all large graphs need to wait for being acquired from the CDN equipment when the application is accessed, which not only causes delay of content display, but also reduces smoothness of content presentation and viewing experience of the application, and when the pictures in the application data are replaced, in order to avoid error display of the content caused by cache problem of the application, a developer needs to manually adjust the replacement of the picture address on the code layer of the application and re-release new version of the application, thereby greatly increasing maintenance difficulty and release cost of the application.
Disclosure of Invention
The embodiment of the application provides an application release method, an application release device, electronic equipment and a storage medium, which are used for solving the problems that in the prior art, the application release cost is high, and a larger picture has display delay when the application content is presented after release.
In a first aspect, an application publishing method is provided, including:
acquiring application data to be published;
aiming at each picture to be presented, which is required to be displayed in real time and has the picture size exceeding a set threshold, in the application data, the following operations are respectively executed:
when the display page to which the picture to be presented belongs is determined not to be contained in the target page set, configuring the picture to be presented in a data packet generated based on the application data package, representing the picture in a target storage address form, and configuring a preloading label for the picture to be presented;
when the display page to which the picture to be presented belongs is determined to be contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on the application data package in a picture data form;
traversing to obtain each picture to be presented configured with a target storage position, adding a picture name generated based on the picture content of the obtained picture to be presented into a pre-loading array reserved in a packaged data packet when the obtained picture to be presented is determined to be configured with a pre-loading label, and storing each obtained picture to be presented into a corresponding target storage position, wherein each picture to be presented, which is identified in the pre-loading array, starts to be loaded when a terminal starts to run the application data.
In a second aspect, an application publishing device is provided, including:
the acquisition unit is used for acquiring the application data to be published;
the execution unit is used for respectively executing the following operations aiming at each picture to be presented, which is required to be displayed in real time and the picture size exceeds a set threshold value, in the application data:
when the display page to which the picture to be presented belongs is determined not to be contained in the target page set, configuring the picture to be presented in a data packet generated based on the application data package, representing the picture in a target storage address form, and configuring a preloading label for the picture to be presented;
when the display page to which the picture to be presented belongs is determined to be contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on the application data package in a picture data form;
the storage unit is used for traversing and acquiring each picture to be presented configured with a target storage position, adding a picture name generated based on the picture content of the acquired picture to be presented into a pre-loading array reserved in a packaged data packet when the acquired picture to be presented is determined to be configured with a pre-loading label, and storing the acquired picture to be presented into the corresponding target storage position, wherein each picture to be presented, which is identified in the pre-loading array, starts loading when the terminal starts running the application data.
Optionally, after the obtaining the application data to be published, before the obtaining unit is further configured to, for each picture to be presented configured with the target storage location, store the picture according to the corresponding target storage location, respectively:
and aiming at each picture to be presented, which is in the application data, the size of the picture exceeds a set threshold value and is not required to be displayed in real time, configuring the picture to be presented, representing the picture in a data packet generated based on the application data package in a target storage address mode, and storing the picture to be presented in a designated transfer area.
Optionally, when determining that the size of the picture exceeds a set threshold in the application data and the picture to be presented needs to be displayed immediately, the storage unit is configured to:
setting a threshold value for the picture size configuration, and deploying an address loader plug-in under the limiting condition of the set threshold value in an application release environment matched with the application data;
and classifying and determining the pictures to be presented, the size of which exceeds a set threshold value, in the application data by adopting the address loader plug-in, and determining the pictures to be presented, which need to be displayed immediately, in the pictures to be presented, the size of which exceeds the set threshold value based on presentation indication information associated with the pictures to be presented.
Optionally, when the configuring the picture to be presented is represented in a form of a target storage address in a data packet generated based on the application data package, the obtaining unit is configured to:
and converting the current storage address of the picture to be presented into a target storage address on content distribution network equipment by adopting a configured address loader plug-in, and configuring the picture to be presented to be represented in a data packet generated based on the application data package in the form of the target storage address.
Optionally, when configuring the pre-loading tag for the picture to be presented, the executing unit is configured to:
and generating picture information based on a preset hash function and the acquired picture content of the picture to be presented by adopting a configured address loader plug-in, combining a preloading label and the picture information to generate a picture name, and storing the picture to be presented named by the picture name in a designated transfer area, wherein the picture stored in the transfer area is triggered to be subjected to primary content emptying when a data packet is generated by starting packaging.
Optionally, traversing to obtain each picture to be presented configured with a target storage location, and when determining that the obtained picture to be presented is configured with a preloading label, adding a picture name generated based on the picture content of the obtained picture to be presented in a preloading array reserved in a packaged data packet, wherein the storage unit is used for:
And traversing and reading each picture name in the transfer area, determining a target picture name containing a preloading label in the read picture names, and adding the target picture name into a preloading array reserved in the packed data packet.
Optionally, when the obtained each picture to be presented is stored in the corresponding target storage location, the storage unit is configured to:
and determining the picture to be presented corresponding to each picture name acquired from the transit area, and saving each determined picture to be presented to a corresponding configured target storage address by the transit area.
Optionally, corresponding storage areas are respectively pre-configured for the pictures to be presented, which are required to be preloaded and the pictures to be presented, of which the image size exceeds a set threshold value, in the target page; the data packet generated based on the application data comprises: and indicating logic codes of pictures to be presented in the preloading array to be loaded when the application data is run.
Optionally, in response to a replacement instruction for a target picture to be presented, re-executing a release process including application data of the target picture to be presented after replacement, and in an execution process of the release process, re-generating a corresponding picture name based on picture content of the target picture to be presented.
In a third aspect, an electronic device is presented comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims when executing the program.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, implements the method of any of the above.
In a fifth aspect, a computer program product is proposed, comprising a computer program which, when executed by a processor, implements the method of any of the preceding claims.
The beneficial effects of the application are as follows:
in the embodiment of the application, in the application publishing process, aiming at the picture to be rendered which is required to be rendered instantly and is larger in application data to be published, classifying whether the picture to be rendered exists in a target page or not, and configuring a large picture in the target page to directly exist in a data packet generated based on application data packaging in a picture data form, so that the large picture in the target page can be directly rendered when the application is running without loading from other positions, thereby fundamentally solving the problem of loading delay of the large picture in the target page; the large map in the non-target page is configured to be in the form of a corresponding configured target storage address, exists in a data packet generated based on application data packaging, and is added into a preloading array after packaging is completed by being configured with a preloading label, so that the large map in the non-target page is loaded in a preloading mode, zero waiting presentation can be realized when the large map in the non-target page is presented later, loading of pictures can be performed when an application starts to run, and presentation delay of the large map in the non-target page is greatly reduced; in addition, the larger pictures to be presented in different pages are subjected to differentiation processing in the packaging and publishing process, which is equivalent to setting different importance degrees of presentation for the larger pictures to be presented in different pages, so that the large pictures in the target page can be presented in a zero waiting mode; moreover, because the picture names added in the preloaded array are generated according to the image content, the corresponding picture names can be automatically changed when the image content is changed, so that the adjustment difficulty of application data can be greatly reduced, the maintenance and development cost is reduced, and the development efficiency is improved; meanwhile, the frequency of the occurrence of the condition that the content of the data packet exceeds the size limit can be greatly reduced by reducing the influence of the picture size on the volume of the data packet.
Drawings
Fig. 1A is a schematic diagram of an optimization method based on CDN loading in the related art in an embodiment of the present application;
FIG. 1B is a diagram illustrating an address of a modified picture according to an embodiment of the present application;
fig. 2 is a schematic diagram of a possible application scenario in the embodiment of the present application;
FIG. 3A is a schematic flow chart of application publishing in an embodiment of the present application;
FIG. 3B is a schematic diagram of a storage area maintained in an embodiment of the present application;
FIG. 3C is a schematic diagram of configuration content before applet release is implemented in an embodiment of the present application;
FIG. 3D is a schematic diagram of a process for identifying preloaded pictures according to an embodiment of the present application;
FIG. 3E is a schematic diagram of a process of writing a picture name of a preloaded picture to be presented into a preloaded array in an embodiment of the present application;
fig. 3F is an updated schematic diagram of storage locations before and after a picture to be presented is replaced in an embodiment of the present application;
FIG. 4A is a flow chart illustrating the classification of applet pictures according to an embodiment of the present application;
fig. 4B is a flowchart illustrating automatic uploading of applet pictures to CDN devices in the embodiment of the present application;
fig. 4C is a schematic diagram of a process of picture preloading in the embodiment of the present application;
FIG. 4D is a schematic diagram of processing logic when the development device executes applet application release in an embodiment of the present application;
FIG. 5 is a schematic diagram of a pre-load execution flow after an application is started in an embodiment of the present application;
FIG. 6 is a schematic diagram of a logic structure of an application publishing device according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computing device in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, which can be made by a person of ordinary skill in the art without any inventive effort, based on the embodiments described in the present application are intended to be within the scope of the technical solutions of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be capable of operation in sequences other than those illustrated or otherwise described.
Some of the terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
Small procedure: the application program is called as an applet application program which can be used without downloading and installing, takes a main program as a carrier, and parasitizes an operating environment of the main program to provide services for various users; typically downloaded by a client (e.g., any client of a browser or embedded browser core) via a network (e.g., the internet) and interpreted and executed in the client's browser environment, saving steps installed in the client. For example, an applet for implementing various services such as express mail may be downloaded and run in a social networking client.
Content delivery network (Content Delivery Network, CDN): the intelligent virtual network is built on the basis of the existing network, and by means of the edge servers deployed in various places, a user can obtain required content nearby through load balancing, content distribution, scheduling and other functional modules of the center platform, network congestion is reduced, and user access response speed and hit rate are improved.
Content delivery network device: or referred to as CDN devices, refers to devices deployed with CDN network functions.
The packaging tool (weback) is a static module packaging tool for modern JavaScript applications. In the development framework of multiple applets, the development of the applets can be made more engineering by introducing weback.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions. According to the technical scheme, intelligent release of application data can be achieved by means of an artificial intelligence technology.
The following briefly describes the design concept of the embodiment of the present application:
under the related art, when uploading and publishing application data, in some possible scenarios, there is a limit to the size of the uploaded data packet, so that the application data including more large graphs may not be uploaded and published under the condition that the content range included in the data packet is unchanged, and therefore, in order to ensure smooth publishing of the application data, the volume of the data packet needs to be reduced.
For example, in the process of issuing the applet application, if the size of the main package is limited to 2M, some applet applications containing more large figures cannot issue, so that the process is required to reduce the size of the main package (or reduce the volume of the main package).
When processing the pictures in the application data, a mode of compressing the large pictures (pictures with larger picture sizes) or a mode of optimizing CDN loading can be adopted to store the large pictures.
Referring to fig. 1A, which is a schematic diagram of an optimization mode based on CDN loading in the related art in the embodiment of the present application, according to the content illustrated in fig. 1A, when the loading optimization of the picture is performed in the CDN loading mode, the picture may be loaded in a mode of fuzzy loading or lazy loading from the picture loading angle; or, the network transmission pressure can be reduced by adopting a mode of reducing the network transmission pressure, and by adopting modes of picture degradation, picture scaling, picture compression and the like; or, the optimization request number can be realized by constructing a split map and constructing an image in a graphic file format (Scalable Vector Graphics, svg); alternatively, other strategies are employed for optimization.
However, when the picture is compressed, the picture quality is damaged, and the problem that the picture occupies a large space in the data packet is not fundamentally solved; if the CDN loading mode is adopted, although the picture loading optimization is carried out through various means, the picture loading delay still exists basically, and the zero waiting effect cannot be achieved, so that some important pictures cannot be displayed in time, and the viewing experience of application contents is greatly influenced in applications containing a plurality of large pictures; moreover, for which pictures need to be loaded by adopting the CDN, which do not need to be loaded by adopting the CDN and have no unified standard, only manual operation processing can be widely performed from the angle of the size of the pictures, and the maintenance cost is greatly increased.
In addition, when the pictures in the application are replaced, in order to avoid the problem that the pictures in the cache are displayed by mistake because the replaced pictures cannot be replaced to the client side running the application in time, a developer is required to manually replace and adjust the picture addresses on the code layer of the application, and the new version of the application is reissued, so that the maintenance difficulty and the release cost of the application are greatly increased.
Referring to fig. 1B, which is a schematic diagram of modifying a picture address in the embodiment of the present application, it can be known from the content illustrated in fig. 1B that after replacing the picture 1 in the applet application with the picture 2, the modification needs to be performed at the code layer of the applet application, and the address information "xxx.cdn.com & v1= 20230810" of the picture 1 is first searched in the code, and then the address information is manually replaced with the address information "xxx.cdn.com & v1= 20230814" of the picture 2.
In view of this, in the embodiment of the present application, an application publishing method, apparatus, electronic device, and storage medium are provided, in the application publishing process, aiming at a picture to be rendered that needs to be rendered in real time and is larger in application data to be published, classifying whether the picture to be rendered exists in a target page or not is performed, and configuring that a large picture in the target page directly exists in a data packet generated based on application data packaging in a form of picture data, so that the large picture in the target page can be directly rendered when an application runs, and loading from other positions is not needed, thereby fundamentally solving the problem of loading delay of the large picture in the target page; the large map in the non-target page is configured to be in the form of a corresponding configured target storage address, exists in a data packet generated based on application data packaging, and is added into a preloading array after packaging is completed by being configured with a preloading label, so that the large map in the non-target page is loaded in a preloading mode, zero waiting presentation can be realized when the large map in the non-target page is presented later, loading of pictures can be performed when an application starts to run, and presentation delay of the large map in the non-target page is greatly reduced; in addition, the larger pictures to be presented in different pages are subjected to differentiation processing in the packaging and publishing process, which is equivalent to setting different importance degrees of presentation for the larger pictures to be presented in different pages, so that the large pictures in the target page can be presented in a zero waiting mode; furthermore, because the picture names added in the preloaded array are generated according to the image content, the corresponding picture names can be automatically changed when the image content is changed, so that the adjustment difficulty of application data can be greatly reduced, the maintenance and development cost is reduced, and the development efficiency is improved; meanwhile, the frequency of the occurrence of the condition that the content of the data packet exceeds the size limit can be greatly reduced by reducing the influence of the picture size on the volume of the data packet.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and are not intended to limit the present application, and the embodiments of the present application and the features of the embodiments may be combined with each other without conflict.
Fig. 2 is a schematic diagram of a possible application scenario in the embodiment of the present application. The application scenario schematic diagram includes a development device 210, a server device 220, a picture storage device 230, and a client device 240.
In this embodiment of the present application, after the developer completes the development of the application data on the development device 210, in the framework of application publishing, the developer publishes the application data to the server device 220, and sends the picture to be presented, which needs to be preloaded and has a size exceeding the set threshold, and the picture to be presented, which does not need to be preloaded and has a size exceeding the set threshold, to the picture storage device 230; further, when the client device 240 requests the application service, the packaged application data may be obtained from the server device 220, and when the application data starts to run, the picture to be presented that needs to be preloaded is obtained from the picture storage device 230, and the application data is run.
The development device 210 is a device used by a developer in application development, and specifically may be a computer device with a certain computing capability, such as a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, a smart home, and a vehicle-mounted terminal.
The server device 220 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 cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), basic cloud computing services such as big data and an artificial intelligence platform.
The image storage device 230 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, a cloud server that provides cloud services, a cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a CDN (Content Delivery Network ), and basic cloud computing services such as big data and an artificial intelligence platform, or may be a computer device capable of realizing a storage function.
It should be noted that, in a possible embodiment, the server device 220 and the picture storage device 230 may refer to the same device, or refer to different devices, or the picture storage device 230 may be a device specified by the server device 220, which is not specifically limited in this application.
The client device 240 is a device used by a user when requesting a service provided by an application, and may specifically be a computer device having a certain computing capability, such as a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, a smart home, and a vehicle-mounted terminal.
It should be noted that, in a possible embodiment, the development device 210 and the client device 240 may refer to the same device, or refer to different devices, which is not specifically limited in this application.
The technical scheme provided by the application can be used for publishing various applications in various application scenes, and the following description is given to the application publishing process by taking several possible application scenes as examples:
scene one, apply to the release process of the applet application.
After the developer completes the application data development of the applet application on the development device 210 to obtain the application data to be published, the application data of the applet can be published under the weback architecture, and the applet application data needs to be packaged in a specific publishing process; in the packaging process, firstly determining a picture configured to be zero-waiting to be presented, determining a page configured with the picture to be zero-waiting to be presented as a target page, further obtaining a target page set, and determining a picture to be displayed immediately; and further, determining the picture to be preloaded and the picture to be presented with zero delay according to the size of the picture, the instant display condition and the inclusion condition in the target page aiming at each picture to be presented included in the applet application data.
Furthermore, the to-be-presented picture to be preloaded and the to-be-presented picture to be displayed with zero delay are respectively processed, so that different types of to-be-presented pictures have different representation forms in the data packet generated by packaging, after packaging of application data is completed, the to-be-presented picture with the size exceeding a set threshold value is sent to a picture storage device 230 (such as CDN device), and the packaged data packet is released to a server device 220.
Scene two, apply to the release process of the client application.
After the developer completes the application data development of the terminal application on the development device 210 to obtain the application data of the release generation, the release of the terminal application can be performed under the release framework of the terminal application, and the terminal application data needs to be packaged in a specific release process; in the packaging process, firstly determining a picture configured to be zero-waiting to be presented, determining a page configured with the picture to be zero-waiting to be presented as a target page, further obtaining a target page set, and determining a picture to be displayed immediately; and further, determining the picture to be preloaded and the picture to be presented with zero delay according to the size of the picture, the instant display condition and the inclusion condition in the target page aiming at each picture to be presented included in the terminal application data.
Furthermore, the to-be-presented picture to be preloaded and the to-be-presented picture to be zero-delay displayed are respectively processed, so that different types of to-be-presented pictures have different representation forms in corresponding data packets, after the packed data packets are obtained, the to-be-presented picture with the size exceeding a set threshold is sent to a picture storage device 230 (such as a CDN device), and the packed data packets are then released to a server device 220.
Scene three, apply to the release process of the webpage application.
After the developer completes the application data development of the web application on the development device 210 to obtain the application data to be published, the developer can publish the web application under the publication architecture of the web application, and the web application data needs to be packaged in a specific publication process; in the packaging process, firstly determining a picture configured to be zero-waiting to be presented, determining a page configured with the picture to be zero-waiting to be presented as a target page, obtaining a target page set, and determining a picture to be displayed immediately; and further, aiming at each picture to be presented in the webpage application data, determining the picture to be presented which needs to be preloaded and the picture to be presented which needs zero delay presentation according to the size of the picture, the instant display condition and the inclusion condition in the target page.
Furthermore, the to-be-presented picture to be preloaded and the to-be-presented picture to be zero-delay displayed are respectively processed, so that different types of to-be-presented pictures have different presentation forms in corresponding data packets, after the packaged data packets are obtained, the to-be-presented picture with the size exceeding a set threshold is sent to a picture storage device 230 (such as a CDN device), and the packaged data packets are released to a server device 220.
Based on the above-mentioned scene, the application release mode provided by the application can be applied to the scene with limitation on the size of the data packet, and the content size of the data packet can be greatly reduced, the release efficiency is improved, the release cost is reduced, the volume of the data packet obtained based on terminal application data and the release time of the application can be reduced under the scene without special limitation on the size of the data packet, and the application release efficiency is improved by carrying out differential configuration on pictures to be presented with different importance degrees.
The following describes in detail, from the perspective of developing devices, an application publishing process related to an embodiment of the present application with reference to the accompanying drawings:
referring to fig. 3A, which is a schematic flow chart of application publishing in the embodiment of the present application, the following describes in detail a flow publishing process in the embodiment of the present application with reference to fig. 3A:
Step 301: the development equipment acquires application data to be published;
in the embodiment of the present application, when publishing an application, a development device needs to obtain application data of the application to be published after development (abbreviated as application data to be published), where the application data includes a picture to be presented and content of a related code layer to be presented when implementing an application function.
Step 302: the development device obtains a picture to be presented in the application data.
Specifically, in order to implement the differential processing of each picture to be presented in the application data, the development device needs to sequentially acquire the pictures to be presented from the application data, and perform targeted determination and processing.
Step 303: the development device determines whether the picture size of the picture to be presented exceeds a set threshold, if so, performs step 305, otherwise, performs step 304.
Specifically, in an application release environment matched with an application to be released, the development equipment classifies the picture to be released based on the relation between the picture size of the picture to be released in the application data and a set threshold value; and then different pictures to be presented can be processed differently, so that the volume of data packets generated based on application data packaging can be reduced, wherein in different application release scenes, the number of the data packets generated based on different application data packaging can be different, the number of the data packets generated by packaging is not limited, and the pictures to be presented refer to pictures displayed in the application.
For example, the picture to be presented may be a picture in a different page in the application, such as a top page picture, a sharing page picture, etc.; assuming that the preset threshold configured for the pictures to be presented is 100KB, for each picture to be presented in the application data, the pictures to be presented with a picture size exceeding 100KB need to be processed to reduce the volume of the data packet generated by packaging.
It should be noted that, for the picture to be presented mentioned in the embodiment of the present application, the picture may be a still picture, for example, a high-definition picture; or may be a drawing or the like, to which the present application does not particularly limit.
When the development equipment determines that the size of a picture exceeds a set threshold value in application data and the picture to be presented needs to be displayed immediately, the set threshold value can be configured according to the size of the picture, and an address Loader (URL-Loader) plug-in unit taking the set threshold value as a limiting condition is deployed in an application release environment matched with the application data; and then, a URL-Loader plug-in is adopted, the pictures to be presented, the size of which exceeds a set threshold value, in the application data are determined in a classified mode, and the pictures to be presented, which need to be displayed immediately, are determined in the pictures to be presented, the size of which exceeds the set threshold value, based on presentation indication information associated with the pictures to be presented.
Specifically, the development device may configure a URL-Loader plug-in according to an actual processing requirement, and use a set threshold value for limiting the size of the picture as a limit condition (limit) of the plug-in, so that classification of the picture to be presented can be achieved by means of the URL-Loader plug-in; and then, configuring a newly added URL-Loader plug-in an application release environment matched with the application data so as to realize specific classification processing, and determining the picture to be presented, the size of which exceeds a set threshold value.
Therefore, the URL-Loader plug-in is introduced, classification management can be conducted on the pictures to be displayed in the application data, the pictures to be displayed, which have larger influence on the volume of the package generated data package, are determined in a classified mode, the pictures can be very conveniently subjected to grouping processing through setting the Limit of the pictures, manual classification is not needed, and a processing basis is provided for the subsequent targeted processing of the determined large pictures.
Step 304: the development equipment configures the pictures to be presented to exist in the packed data packets in a small picture packing mode.
Specifically, after the development device obtains the application data to be published, for each picture to be presented in which the size of the picture does not exceed the set threshold value in the application data, the picture to be presented can be processed according to the actual processing requirement and according to a packaging mode of the picture to be presented (abbreviated as a small picture) with a smaller size under the related technology.
It should be noted that, for each picture to be presented in the application data, the size of the picture does not exceed the set threshold, it is understood that the size of the picture to be presented does not greatly affect the volume of the data packet after being packaged, and long delay time is not required during loading, so that the existence form of the picture to be presented in the generated data packet can be configured according to actual processing requirements.
In a possible implementation manner, the development device may be configured to store the picture to be presented in a URL manner into the packaged code after performing the picture to be presented in a preset encoding manner.
For example, after base64 encoding the picture to be presented, the encoding result is stored in the URL field.
Alternatively, the development device may directly exist in the form of picture data according to actual processing requirements, or the configuration may exist in the form of a target storage address on the CDN device, which is not particularly limited in the present application.
Therefore, for the pictures to be presented, the size of which does not exceed the set threshold value, the existence form in the data packet can be flexibly determined according to the actual processing requirement, so that the display effect in the subsequent application display process can be ensured.
Step 305: the development device determines whether the picture to be presented is a picture that needs to be displayed immediately, if so, step 307 is executed, otherwise, step 306 is executed.
Specifically, the development device may determine whether to instantly display the picture to be presented based on presentation indication information associated with the picture to be presented.
In the embodiment of the present application, for a picture to be presented that needs to be displayed in real time, in some possible embodiments, the difference may be made by storing a project path of the picture to be presented in the application data, which is equivalent to taking a storage location of the picture to be presented as presentation indication information, so that whether the picture needs to be displayed in real time can be determined based on the storage location.
For example, a prefix may be added to the generated picture information to identify whether immediate presentation is required.
In other possible embodiments, for whether the picture to be presented needs to be presented instantly, presentation indication information associated with the picture to be presented may be configured to explicitly indicate whether the picture to be presented needs to be presented instantly.
It should be noted that, when the development device stores the pictures to be presented in the application data, the pictures to be presented in the same page can be stored in different sub-path directories according to whether the pictures are instantly displayed or not when the pictures to be presented in different pages are stored; and the pictures to be presented in different pages can be classified and summarized, so that different sub-path catalogues can be obtained through summarization, and therefore, the summarized pictures of different types can be stored in the different sub-path catalogues under the project path.
For example, assuming that one web page C in the application includes pictures 1-3 to be presented, and the pictures 1 to be presented are pictures that need to be presented immediately, when the pictures 1-3 to be presented included in the web page C are stored locally, the pictures to be presented may be configured to be stored under the parent path directory 1 for each picture to be presented in the web page C, and the pictures 1 to be presented may be stored in the child path directory belonging to the parent path directory 1: in "instant show", pictures 2-3 to be presented are stored in the child path directory belonging to the parent path directory 1: in "non-instant show".
Step 306: the development equipment configures the picture to be presented in a data packet generated based on application data packaging, the picture to be presented is expressed in the form of a target storage address, and the picture to be presented is stored in a designated transfer area.
In the embodiment of the application, after the development device obtains the application data to be published, for each picture to be presented in which the size of the picture exceeds a set threshold value and is not required to be displayed immediately, the picture to be presented is configured to be represented in a data packet generated based on application data packaging in a form of a target storage address.
Specifically, the development device may determine, by using a configured URL-Loader plug-in, each picture to be presented in the application data, where the size of the picture exceeds a set threshold and is not required to be displayed immediately, then use a preset hash function, generate picture information based on the picture content of the picture to be presented, generate a picture name based on the picture information, and store the picture to be presented named by the picture name in the transfer area.
It should be noted that the target storage address may be address information on the designated device.
In this way, for the picture to be presented, the size of which exceeds the set threshold and does not need to be displayed immediately, the picture to be presented can be configured to load presentation in a manner that no preloading is needed, and the picture to be presented is stored to the target storage address of the designated device, so that the loading of the picture to be presented can be realized from the target storage address later.
Step 307: the development device determines whether the presentation page to which the picture to be presented belongs is included in the target page set, if so, step 308 is executed, otherwise step 309 is executed.
According to the method and the device, according to actual processing requirements, pictures to be presented in the application to be published can be configured to have different importance degrees, the pictures to be presented with the highest importance degrees need to be presented in a zero-waiting mode, based on the fact, pages of the pictures to be presented in the application to be published, including the pictures to be presented in the zero-waiting mode, are determined to be target pages, and then a target page set is built based on the target pages.
For example, a top page and a shared page in the application may be respectively used as target pages.
Based on this, in the embodiment of the present application, for the type of the picture to be presented included in the application data, the picture to be presented may be subjected to differential processing by further determining whether the display page to which the picture to be presented belongs is included in the target page set.
Step 308: the development device configures the picture to be presented to be represented in the form of picture data in a data packet generated based on application data packaging.
In the embodiment of the application, when the development equipment determines that the display page to which the picture to be presented belongs is contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on application data packaging, wherein the picture size of the picture to be presented exceeds a set threshold value and needs to be displayed in time; for the picture to be presented referred to in step 308, the following is simply indicated by a large picture immediately shown in the target page.
Specifically, for a large image displayed in real time in a target page, the image can be regarded as an image with the highest importance degree displayed in an application, and although the size of the image reaches a set threshold, the image can exist in a data packet obtained by packaging in a form of image data, so that the image to be displayed can be stored along with the installation of the data packet on a terminal.
Therefore, for the large graph displayed in time in the target page, no picture is needed to be loaded from other equipment when the corresponding target page is displayed later, zero-delay display can be realized, and zero-waiting display of the key view is realized.
Step 309: the development equipment configures the picture to be presented in a data packet generated based on application data packaging, the picture to be presented is expressed in the form of a target storage address, and a pre-loading label is configured for the picture to be presented.
In the embodiment of the application, when the development device determines that the display page to which the picture to be presented belongs is not included in the target page set, the picture to be presented is configured to be represented in a data packet generated based on application data packaging in a form of a target storage address.
Specifically, the development device is configured in a data packet generated based on application data packaging in a form of a target storage address aiming at a picture to be presented, which is in a non-target page and has a picture size exceeding a set threshold, and needs to be displayed immediately (hereinafter referred to as an instant display large picture in the non-target page), wherein the target storage address is an address when the target storage address is stored on a designated device according to actual processing requirements.
In a possible implementation manner, the picture to be presented may be stored on the CDN device, and at this time, the development device may use a configured URL-Loader plug-in to convert a current storage address of the picture to be presented into a target storage address on the CDN device, and configure the picture to be presented to be represented in a data packet generated based on application data packaging in a form of the target storage address.
It should be noted that, for a specific implementation manner of converting a current storage address of a picture to be presented into a target storage address on a CDN device by using a URL-Loader plug-in, specifically, after determining a large picture instantly displayed in a non-target page, invoking a file-Loader of an internal package of the URL-Loader plug-in, and modifying a reference path of the large picture instantly displayed in the non-target page into a CDN path when packaging application data, that is, modifying a local storage address of the large picture instantly displayed in the non-target page into a corresponding target storage address on the CDN, and configuring the target storage address in a data packet generated by packaging, where the corresponding target storage address on the CDN device may be determined according to an address conversion manner agreed with the CDN device in advance by a development device, and a related implementation process is a conventional technology in the art, which is not specifically described in the present application.
Therefore, by means of the URL-Loader plug-in, the uniform resource location (uniform resource locator, URL) information of the picture can be converted into the URL on the CDN, so that a large picture displayed in a non-target page in real time can be configured, the large picture exists in a data packet obtained based on application data packaging in a target storage address mode, the subsequent picture loading process can be realized by means of CDN loading, the problem of picture quality degradation caused by compression and storage can be avoided, and the definition of the picture is guaranteed.
At the same time, the development device may configure the preloaded tag for the picture to be presented.
Specifically, the development device may use a configured URL-Loader plug-in, generate picture information based on a preset hash function and acquired picture content of a picture to be presented, combine a preloaded tag and the picture information to generate a picture name, and store the picture to be presented named by the picture name in a designated transfer area, where the picture stored in the transfer area is triggered to perform content emptying once when the picture starts to be packaged to generate a data packet.
In the embodiment of the present invention, a development device configures a large image in a non-target page to be preloaded, and is configured with a preloading label in a targeted manner, and when generating a picture name including picture information, the development device obtains a hash result based on the picture content of a picture to be presented and a preset hash function, determines the hash result as the picture information, and generates the picture name based on the picture information and the preloading label, wherein the picture content of the picture to be presented specifically refers to the picture to be presented represented in a specified data format, the preset hash function is set according to actual processing requirements, the application is not specifically limited, and the preloading label is used for identifying whether preloading is performed.
It should be noted that, in the embodiment of the present application, the adding of the preloaded tag may refer to a physical tag specifically configured for a picture to be presented; or, the adding of the preloading label can be realized by saving the picture to be presented, for example, the picture to be presented is added under a storage directory configured for the picture to be preloaded (or added into a storage area configured for the picture to be preloaded), so that the picture to be presented can be configured with the preloading label according to the storage position of the picture to be presented; the development device may use a name function to set the name format of the picture packaging generation.
For example, for a zhengshu. Png picture under a certain path (or called a local storage location), after application data is packed, in a generated data packet, a picture name corresponding to the zhengshu. Png picture is: preloadimages_zhengshu.2387cc423423ddfdaf.png, wherein the content "preloadimages" in the picture name identifies that preloading is required.
For another example, the picture content of the picture to be presented is represented in the form of binary data, and the development device implements hash processing by means of a hash function capable of generating a hash result based on the binary data, to obtain the picture information.
Then, since the URL-Loader plug-in itself does not have the capability of directly transferring the picture to be presented to the designated device (such as CDN device), a transfer area needs to be introduced, so that the URL-Loader plug-in is adopted to temporarily store the picture to be presented, which needs to be stored on the designated device, in the transfer area, and then the development device stores the picture to be presented in the transfer area in a target storage address on the designated device.
Furthermore, the development device saves the picture to be presented named by the picture name to the designated transfer area, and for the transfer area, the development device is configured to trigger the execution of the picture clearing script each time the packaging process for the application data is started, so that the content stored in the transfer area can be cleared, and thus, the picture stored in the last packaging process can be cleared.
After the development of the picture clearing script for realizing the picture clearing function is finished in advance, the development device registers the picture clearing script in the engineering command, so that when the packaging of the application data is started, the content clearing in the transfer area can be realized by executing the picture clearing script.
In this way, when application data packaging is executed, the content in the transfer area is emptied, so that the interference of the picture in the last packaging process on the data packaging can be avoided; moreover, when the picture name is generated, by performing hash (hash) processing on the picture content, different picture names can be automatically generated when the picture content is changed, so that the problem of abnormal presentation caused by the fact that the terminal running the application caches the pictures is avoided.
Step 310: the development device determines whether all the pictures to be presented in the application data are acquired, if yes, step 311 is executed, and if not, step 302 is executed again.
After finishing processing one picture to be presented, the development device judges whether all pictures to be presented in the application data are completely acquired, if yes, the development device executes the operation after the application data are packaged in step 311, otherwise, the development device returns to execute step 302 to continue processing the picture to be processed.
It should be noted that, in the embodiment of the present application, based on the determination process involved in steps 303 to 309, it is known that, from the perspective of display conditions, the pictures to be displayed included in the application data may be divided into pictures that need to be displayed immediately and do not need to be displayed immediately, where each picture to be displayed is associated with display indication information for indicating whether the picture to be displayed needs to be displayed immediately, the picture to be displayed immediately refers to the picture that needs to be displayed immediately when the page to which the picture belongs is displayed, and for the picture that does not need to be displayed immediately, the picture that does not need to be displayed immediately when the corresponding page is displayed; according to the picture size, each picture to be presented can be divided into a large picture with the picture size exceeding a set threshold value and a small picture with the picture size not exceeding the set threshold value.
As such, for the type of picture to be presented included in the application data, the type of picture to be presented may include at least one or a combination of the following: the size of the picture exceeds a set threshold value and needs to be displayed immediately; the size of the picture exceeds a set threshold value and is not required to be displayed in real time; the picture size does not exceed a set threshold.
In addition, it should be clear that, in the embodiment of the present application, the packaging of code layers or other content related to application presentation may be further involved in the packaging process of application data, but since the present application is intended to emphasize processing of a large image in application data so as to reduce the volume of a data packet, in the scheme proposed in the present application, specific limitation is not made on content related to image processing in the packaging process.
According to the embodiment of the application, according to actual processing requirements, the development equipment can respectively pre-configure corresponding storage areas for pictures to be presented which participate in realizing the same service, each picture to be presented which needs to be preloaded, and pictures to be presented of which the image size in the target page exceeds a set threshold value; the data packet generated based on the application data comprises: and indicating that logic codes of pictures to be presented in the preloading array are loaded when the application data are run.
Specifically, the development device may adopt different path directories to characterize different storage areas, so that the pictures to be presented in different pages, the pictures to be presented to be preloaded, and the pictures to be presented with the image size exceeding a set threshold in the target webpage can be stored in different path directories respectively, wherein the pictures to be presented participating in realizing the same service may refer to the pictures to be presented in at least one page.
For example, pictures to be presented that need to be preloaded are maintained under a specified path, such as preloadimages/.
For example, referring to fig. 3B, which is a schematic diagram of a storage area maintained in an embodiment of the present application, as shown in fig. 3B, assuming that there are a service 1 and a service 2 that can be processed in an application, according to actual processing needs, each picture to be presented in a page related to the service 1 may be summarized and stored, and each picture to be presented in a page related to the service 2 may be summarized and stored, and a storage area, that is, a preloading directory, is maintained for the pictures to be presented that need to be preloaded, so that the pictures to be presented that need to be preloaded, which are determined in the packaging process, may be stored in the storage area; meanwhile, aiming at the pictures to be presented which need zero waiting for presentation, namely the pictures to be presented with the image size exceeding a set threshold value in the target webpage, the pictures to be presented are configured and stored under the corresponding packing exclusion catalogue, so that the pictures to be presented which need zero waiting and are determined in the packing process can be stored in the storage area corresponding to the catalogue.
For example, referring to fig. 3C, which is a schematic diagram of configuration content before implementing applet delivery in the embodiment of the present application, according to the content illustrated in fig. 3C, in order to implement development of plug-ins by a package delivery development device for application data, a CDN uploading script for implementing a CDN uploading function and a picture cleaning script for implementing a picture cleaning function are obtained, where by executing the CDN uploading script, a picture of a specified directory can be uploaded to a corresponding target storage location on the CDN, and uploading of a picture to be presented is completed; after development and construction of the agent layer are completed, plug-in registration is performed, specifically, a CDN uploading script can be registered in a weback flow, and a picture cleaning script can be registered in an engineering command; further, when the development equipment determines to start the packaging process of the application data, triggering and executing a picture cleaning script so that the picture under the last packaging path can be cleaned, namely the picture of the transfer area is cleaned; and after the completion of the packaging of the application data is determined, uploading the picture to be presented by means of the CDN uploading script.
Therefore, the pictures to be presented can be stored in different storage positions, so that the pictures to be presented can be managed in application data, the pictures to be presented can be more visual when being referenced, and the pictures to be presented can be maintained and managed conveniently. In addition, by means of the configured logic code for realizing the preloading function, the data to be presented in the preloading array can be ensured, and the loading can be started when the terminal starts to run the application data, so that the effective progress of the loading processing process is indicated.
Step 311: the development equipment traverses and acquires each picture to be presented configured with a target storage position, adds a picture name generated based on the picture content of the acquired picture to be presented into a pre-loading array reserved in a packed data packet when the acquired picture to be presented is determined to be configured with a pre-loading label, and stores the acquired picture to be presented into the corresponding target storage position.
In this embodiment, for each picture to be presented configured with a target storage location, a picture to be presented whose picture size exceeds a set threshold is configured with the target storage location. The development equipment adopts the configured URL-Loader to classify and determine the pictures to be presented, the sizes of which exceed a set threshold value, the pictures to be presented are configured to be represented in the form of target storage addresses in the corresponding generated data packets, and under the condition that the pictures to be presented are restored to a transfer area, after determining that an event of finishing application data packaging is detected, each picture name in the transfer area is traversed and read; and determining a target picture name containing a preloading label from the read picture names, and adding the target picture name into a preloading array reserved in the packed data packet.
In the embodiment of the application, in order to process each picture to be presented, which is required to be displayed in real time and has a picture size exceeding a set threshold value, in a non-target page, a pre-loading array is maintained in the process of packaging application data, and the finally obtained pre-loading array is contained in a data packet obtained after packaging, so that the pre-loading array is released along with the data packet. Based on the method, after the terminal downloads the published data packet, when the running application data is started, each picture to be presented, which is identified in the pre-addition array, is started to be loaded, so that each picture to be presented, which is identified in the pre-loading array, can be downloaded when the running application data is started.
It should be noted that, in the embodiment of the present application, when the development device constructs a preloaded array, the preloaded array whose content is empty may be constructed in the source code, where the content of the array in the initialized preloaded array includes a placeholder; after packaging of application data is completed, when a script is executed to traverse each picture to be presented in a transfer area, determining the picture to be presented, which contains a preloading label in a picture name in the transfer area, as the picture to be presented, which needs to be loaded (or called preloading) preferentially; and then, by traversing the packed code file, the placeholder is found and the picture name is written.
In addition, for the placeholders in the preloaded array, the types of the placeholders may be configured according to actual processing requirements, which is not particularly limited in the present application.
For example, the configured placeholders may be "/%" and "%/", and when the picture name is written, the picture name is written between "/%" and "%/", so that the content after the picture name is added is as follows: "/% picture name"/%.
For another example, referring to fig. 3D, which is a schematic diagram of a process of identifying a preloaded picture in the embodiment of the present application, as shown in fig. 3D, it can be known from what is illustrated in fig. 3D that, when judging whether a picture to be presented needs to be preloaded, a development device maintains the preloaded picture in a designated transfer area (or designated path), and if a prefix is used to identify that the picture needs to be preloaded, as illustrated in fig. 3D, a prefix name in each picture name in the identified transfer area is traversed to determine the picture to be presented that needs to be preloaded, where "preloadimages" indicates that the preloading is needed, "_" is used to isolate the prefix name, "a.1343 sfaffd3" indicates a hash result of the picture content, and png indicates a picture type.
For another example, referring to fig. 3E, which is a schematic diagram illustrating a process of writing a picture name of a preloaded picture to be presented into a preloaded array in the embodiment of the present application, as can be seen from fig. 3E, an empty array is constructed in a source code, wherein the content of the array is located by using a placeholder configured according to actual processing requirements; after packaging of application data is completed, determining a picture name in a character string form based on the picture name of the picture to be presented, which is identified in the traversal process and needs to be preloaded, when traversing each picture to be presented, which is configured with a target storage position; further, the packed code file (or packed data packet) is traversed, and the corresponding placeholder is found and written in the picture name.
According to the content illustrated in fig. 3E, a.js and b.js represent module packages respectively, preloadcfd.js are tool files, which are uniformly packaged into common.js when application data is packaged, and in the process of packaging an applet application, it can be understood that the tool files are uniformly packaged into common.js by using weback, and when packaging is performed based on a.js to obtain a.adfae12a.js, the tool files are processed by using weback+babel, and similarly, when packaging is performed based on b.js to obtain b.e5213sa.js, the tool files are processed by using weback+babel.
In this way, the picture names of the pictures to be presented, which need to be preloaded, are written into the preloading array, so that the pictures to be presented, which need to be preloaded when the terminal runs the application, in other words, the loading time of the pictures to be presented is advanced to the time when the application data starts to run, but not in the presentation process of the pages to which the pictures belong, the loading delay of the large pictures in the non-target pages can be reduced to a certain extent, and the presentation effect of the large pictures in the non-target pages can be guaranteed.
Further, when the development equipment stores the acquired pictures to be presented according to the corresponding target storage positions, the pictures to be presented corresponding to the names of the pictures acquired from the transfer areas are determined, and each determined picture to be presented is stored to the corresponding configured target storage address from the transfer areas.
Therefore, the pictures to be presented, which are stored in the transfer area, can be stored to the target storage address on the appointed equipment by traversing the pictures to be presented and transferring the pictures to be presented.
Further, in the technical scheme provided by the application, the development device may re-execute the release process of the application data including the replaced target picture to be presented in response to the replacement instruction for the target picture to be presented, and re-generate the corresponding picture name based on the picture content of the target picture to be presented in the execution process of the release process.
Specifically, when the target picture to be presented in the application data needs to be replaced, the development device re-acquires the application data to be published in response to the replacement instruction for the target picture to be presented, and re-executes the publishing process of the application data according to the processing procedure illustrated in fig. 3A, and in the process, the corresponding picture name can be automatically generated according to the picture content of the extracted picture to be presented without manual searching and replacement.
It should be noted that, by means of the CDN uploading script constructed by the method, file names (or called picture names) in a Hash form can be automatically set according to picture contents, files (or called pictures to be presented) named by the file names are automatically uploaded to CDN equipment, and the problem that maintenance is difficult when the pictures are manually uploaded and the picture link parameters are manually modified after the pictures are changed is solved.
For example, referring to fig. 3F, which is a schematic diagram illustrating updating of storage addresses before and after a picture to be presented is replaced in the embodiment of the present application, according to the content illustrated in fig. 3F, by means of the method for generating a picture name based on picture content set forth in the present application, a development device may implement automatic updating of information content when changing the content in fig. 1.Jpg to obtain fig. 1×jpg, and URL on CDN is automatically updated from/xxxxx.com/fig. 1.Abdfae12.Jpg to/xxxxx.com/fig. 1.Sfa2113.Jpg. This makes it possible to solve the problem of buffering when the terminal runs application data by a hash packing process based on the picture content.
Therefore, when the problem of replacement of the picture to be presented is faced, the generation of the picture name can be directly realized based on the picture content when the release process of the application data is re-executed, manual adjustment is not needed, development and release costs are saved greatly, the release efficiency of the application is improved, and automatic release of the application is realized.
The following describes an application publishing process of an applet application as an example, and a processing procedure involved in the application publishing process.
Based on the technical scheme, when the application of the applet application is released, the method can be divided into three parts of automatic grouping and optimizing management of the pictures, automatic uploading of the pictures and preloading of the pictures according to the processing process.
Referring to fig. 4A, which is a schematic flow chart for implementing classification of applet pictures in the embodiment of the present application, the following is a schematic description of a process of classifying applet pictures into multiple cases by an development device with reference to fig. 4A:
step 401: a applet picture is obtained.
Step 402: and judging whether the picture size of the obtained applet picture exceeds a set threshold, if so, executing step 404, otherwise, executing step 403.
Specifically, in order to realize release of the applet application, the method needs to be performed under the weback architecture, and when the weback configuration is initialized, the applet pictures in the engineering are classified according to the picture size by adding a URL-Loader plug-in.
Step 403: and determining the applet as a small image, and converting the small image into data uniform resource location information.
Specifically, the development equipment adopts a URL-Loader plug-in, when the size of the picture is determined not to exceed a set threshold, the picture can be considered to be not big, at this time, the uniform resource location information (marked as DataURL) of the data can be directly generated in a base64 coding mode, and the applet picture is stored in a packaged code in the form of DataURL, so that the number of requests for the picture in running is saved.
Step 404: the applet picture is determined as a large picture.
Specifically, the development device adopts an address Loader (URL-Loader) plug-in, and when determining that the size of the picture exceeds the set threshold, the development device considers that the picture is larger, and needs to continue the classification processing.
Step 405: whether the applet picture needs to be displayed in real time is determined, if yes, step 406 is executed, otherwise step 410 is executed.
Considering that since some large files are large, loading takes a long time, which affects the user experience, it can be determined whether there is a picture that is desired to be quickly shown while all large files are uploaded to the CDN.
Step 406: whether the applet picture belongs to the home page or the share page is determined, if yes, step 407 is executed, otherwise step 409 is executed.
For pictures with immediate loading requirements, it may be further classified as whether they are in the first page header or share the first page header (i.e., whether they are contained in the target page).
Step 407: the applet pictures are put into a preloaded exclusion path.
For pictures with immediate loading requirements, if the pictures are positioned on the first page or the shared page, the pictures can be put into a preloading exclusion path of the packaging process, wherein the pictures which do not perform preloading under the condition that the preloading condition is met are stored in the preloading exclusion path.
Step 408: and introducing the original picture into the data packet generated by packaging.
Specifically, the applet pictures are entered into the code package so that the corresponding pictures can be presented with zero wait after entering the applet.
Step 409: and adding the applet pictures into a picture preloading queue.
For pictures in business which are expected to have quick display requirements, the pictures can be added into a pre-loading queue, so that when the applet is started, the pictures are in a loading state; and other pictures are loaded from the CDN when the page is displayed.
Therefore, the picture in the non-target page can be loaded in a zero-waiting mode by preloading the picture.
Step 410: and converting the uniform resource positioning information of the picture into a path on the appointed equipment by adopting an address loader plug-in, saving the path in the appointed path, and obtaining a file name by adopting hash coding.
Specifically, the URL-Loader may be used to convert the URL of the picture into the CDN path, and save the picture onto the transit path, and hash the picture to obtain the picture name based on the picture content, where a picture may be referred to as a file.
Step 411: and judging whether all the applet pictures are read completely, if yes, executing step 412, otherwise, returning to executing step 401.
Step 412: and uploading the applet picture to the designated equipment when the end of the packing of the application data is detected.
Specifically, when the end of the packaging of the application data is detected, the applet picture may be uploaded to the CDN device.
Further, referring to fig. 4B, a flow chart of automatically uploading an applet picture to a CDN device in the embodiment of the present application is shown, and in the content shown in fig. 4B, a development device cooperates with url-loader setting to automatically upload a file to be uploaded CDN after hash encoding of a file name. The specific flow is as follows:
Step 41: a applet picture is obtained.
Step 42: whether the picture size exceeds the set threshold is determined, if yes, step 44 is performed, otherwise step 43 is performed.
Step 43: converting applet pictures into inline uniform resource location information encoded in a specified encoding format
Specifically, the applet pictures are converted into an inline base-64URL.
Step 44: judging whether the applet picture is included in the preloading exclusion path, if yes, executing step 45, otherwise, executing step 46.
Specifically, it is determined whether the applet picture is included in the target page.
Step 45: the applet pictures are introduced in the original path.
Step 46: the reference path of the applet picture is replaced with the content distribution network path.
Step 47: and encoding the picture names according to rules.
Specifically, a name function may be used to set a name format generated by packing pictures.
Step 48: the applet pictures under the picture name are moved into a designated upload path.
Specifically, storing the applet image in the transfer area is equivalent.
Step 49: and when determining that the event of packing completion is detected, uploading the picture of the uploading path to the content distribution network equipment.
Further, referring to fig. 4C, which is a schematic diagram of a process of preloading a picture in the embodiment of the present application, with reference to fig. 4C, an implementation process of reducing a waiting time of a user by an developing device through a preloading manner is described below:
Step 4-1: and after detecting the packing completion event, determining that the packing is finished.
Specifically, after the "build finish" event is detected, the package complete event may be considered to be detected.
Step 4-2: traversing to obtain an applet picture in the upload path.
Step 4-3: and judging whether the picture file name is matched with the preloading path, if so, executing the step 4-4, otherwise, executing the step 4-5.
Specifically, whether the picture file name includes a preload tag identifying the preload path may be determined by determining whether the picture file name matches the preload path.
Step 4-4: and writing the matched file name into the placeholder in the packaged file.
Specifically, writing the picture name into the preloaded array is equivalent.
Step 4-5: and uploading the picture files named by the file names to the content distribution network equipment.
In this way, the pictures with the sizes reaching the set threshold can be uploaded to the CDN device.
Step 4-6: and judging whether all the pictures in the uploading path are traversed, if so, ending the operation, otherwise, returning to the step 4-1.
Specifically, whether all the pictures in the transfer area are acquired is judged, if yes, the processing is ended, and if not, the pictures are continuously acquired.
Further, referring to fig. 4D, which is a schematic diagram of processing logic when the development device executes the release of the applet application in the embodiment of the present application, as shown in fig. 4D, the development device obtains application data including each picture to be presented, where the pictures to be presented in the application data can be categorized according to the service to which the piece belongs, and are divided into a picture to be presented under service 1 and a picture to be presented under service 2, and since the application focuses on the influence of the size of the picture on the size of the data packet obtained by packaging, the packaging of the code content in the applet application data is not specifically described; further, when specific processing is carried out in the development equipment, determining an applet picture with the image size exceeding a set threshold value by adopting a configured URL-Loader under a weback frame; when the small program picture is determined to be a picture in a home page or a shared page, the small program picture is determined to be preloaded, and the small program picture is added into a preloading catalogue, which is equivalent to adding the small program picture into a preloading queue; otherwise, when the applet picture is determined not to be the picture in the home page or the shared page, the applet picture is placed in a package exclusion directory, so that the original applet picture is directly introduced into a data packet generated by packaging.
Further, aiming at the applet image with the picture size exceeding the set threshold, the development equipment adopts the configured URL-Loader to determine the picture name generated based on the picture content of the applet picture and the target storage address of the applet picture on the CDN; storing the small program picture named by the picture name to the middle area under the appointed target, wherein the small program picture needing to be uploaded is equivalent to being stored in the middle area; after packaging is completed, aiming at each picture name in the middle area, when the development equipment determines that the applet picture corresponding to the picture name needs to be preloaded, the picture name of the applet picture is written into a pre-loaded array reserved after packaging, and the applet picture is stored in a corresponding target storage address, so that uploading of the applet picture is realized.
The following briefly describes a pre-load execution process from the point of view of running an application by a terminal, referring to fig. 5, which is a schematic pre-load execution flow chart after starting the application in the embodiment of the present application, and in conjunction with fig. 5, the pre-load execution process after starting an applet is described below:
step 501: the terminal reads the preloaded array in the configuration.
Step 502: the terminal builds a common component based on the applet pictures.
In particular, when the terminal runs the applet, in order to realize content presentation of the applet, a common component needs to be constructed, and related processes of constructing the component are conventional in the art, which applicant does not specifically limit.
Step 503: and the terminal loads the pictures in sequence, triggers callback after one picture is loaded, and re-reads the next picture by adopting a common component.
Specifically, after the terminal determines that loading of one picture is completed, an onload callback is triggered, and the component re-reads the loading of the next picture and re-reads the loading of the next picture by adopting a common component.
It should be noted that, in the embodiment of the present application, the order of reading the pictures and the order of uploading the pictures may be flexibly set according to actual processing requirements, which is not specifically limited in the present application; when the terminal displays the preloaded picture content in the applet, the terminal can acquire the picture content from the position where the preloaded picture is stored, and then the terminal directly performs zero-waiting presentation, and under a very special scene, when the preloading of the corresponding applet picture is not completed, the corresponding applet picture can be loaded by means of the target address information of the applet picture on the CDN.
Comprehensively, the technical scheme provided by the application can optimize the release process of the applet application when applied to the scene of releasing the applet application, and solves the problems of overlarge main package volume and cdn cache by introducing url-loader plug-ins into a weback architecture; by registering the uploading script, the problem of automation of large-scale image classification processing is solved; furthermore, by carrying out picture grouping processing and picture preloading, the problem that the loading time of a large picture is required to be longer is solved, and zero waiting of pictures is realized.
By means of the technical scheme, the problem of overlarge volume caused by larger pictures in the data packet can be effectively solved, and the occurrence frequency of the condition that the small program is overrun can be reduced by 80% after the test; moreover, the development efficiency can be greatly improved, and the times of bug situations caused by the problems of picture cache and the like are reduced by 90% after the test; in addition, zero-waiting presentation of key business pictures in the page (large pictures in the target page) is realized.
Based on the same inventive concept, referring to fig. 6, which is a schematic logic structure diagram of an application publishing device in an embodiment of the present application, an application publishing device 600 includes an obtaining unit 601, an executing unit 602, and a storing unit 603, where,
An acquiring unit 601, configured to acquire application data to be published;
the execution unit 602 is configured to, for each picture to be presented in the application data, which is to be displayed in real time and whose picture size exceeds a set threshold, perform the following operations:
when the display page to which the picture to be presented belongs is determined not to be contained in the target page set, configuring the picture to be presented in a data packet generated based on application data packaging, representing the picture in a target storage address form, and configuring a preloading label for the picture to be presented;
when the display page to which the picture to be presented belongs is determined to be contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on application data packaging in a picture data mode;
the storage unit 603 is configured to traverse and acquire each picture to be presented configured with a target storage location, and when it is determined that the acquired picture to be presented is configured with a preloading label, add a picture name generated based on a picture content of the acquired picture to be presented in a preloading array reserved in a packaged data packet, and store each acquired picture to be presented to a corresponding target storage location, where each picture to be presented identified in the preloading array starts loading when the terminal starts running application data.
Optionally, after acquiring the application data to be published, before each picture to be presented configured with the target storage location is stored according to the corresponding target storage location, the acquiring unit 601 is further configured to:
aiming at each picture to be presented, which is in the application data and has the size exceeding a set threshold value and does not need to be displayed in real time, the picture to be presented is configured to be represented in a data packet generated based on application data packaging in a form of a target storage address, and the picture to be presented is stored in a designated transfer area.
Optionally, when determining that the size of the picture exceeds the set threshold in the application data and the picture to be presented needs to be displayed immediately, the storage unit 603 is configured to:
setting a threshold value for the picture size configuration, and deploying an address loader plug-in taking the set threshold value as a limiting condition in an application release environment matched with application data;
and classifying and determining the pictures to be presented, the size of which exceeds a set threshold value, in the application data by adopting an address loader plug-in, and determining the pictures to be presented, which need to be displayed immediately, in the pictures to be presented, the size of which exceeds the set threshold value based on presentation indication information associated with the pictures to be presented.
Optionally, when the picture to be presented is configured to be represented in the form of the target storage address in the data packet generated based on application data packaging, the obtaining unit 601 is configured to:
And converting the current storage address of the picture to be presented into a target storage address on the content distribution network equipment by adopting the configured address loader plug-in, and configuring the picture to be presented to be represented in a data packet generated based on application data packaging in the form of the target storage address.
Optionally, when configuring the preloaded tag for the picture to be presented, the execution unit 602 is configured to:
and generating picture information based on a preset hash function and the acquired picture content of the picture to be presented by adopting a configured address loader plug-in, combining a preloading label and the picture information to generate a picture name, and storing the picture to be presented named by the picture name in a designated transfer area, wherein the picture stored in the transfer area is triggered to perform content emptying once when the picture starts to be packed to generate a data packet.
Optionally, each picture to be presented configured with the target storage location is obtained through traversal, and when determining that the obtained picture to be presented is configured with the preloading label, in a preloading array reserved in the packaged data packet, when adding a picture name generated based on the picture content of the obtained picture to be presented, the storage unit 602 is configured to:
Traversing and reading each picture name in the transit area, determining a target picture name containing a preloading label in the read picture names, and adding the target picture name into a preloading array reserved in the packed data packet.
Optionally, when each acquired picture to be presented is stored in a corresponding target storage location, the storage unit 602 is configured to:
and determining the picture to be presented corresponding to each picture name acquired from the transfer area, and saving each determined picture to be presented to a corresponding configured target storage address from the transfer area.
Optionally, corresponding storage areas are respectively pre-configured for the pictures to be presented, which are required to be preloaded and the pictures to be presented, of which the image size exceeds a set threshold value, in the target page; the data packet generated based on the application data comprises: and indicating that logic codes of pictures to be presented in the preloading array are loaded when the application data are run.
Optionally, in response to the replacement instruction for the target to-be-presented picture, re-executing the release process of the application data including the replaced target to-be-presented picture, and in the execution process of the release process, re-generating the corresponding picture name based on the picture content of the target to-be-presented picture.
Having described the application publishing method and apparatus of an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Based on the same inventive concept as the above-mentioned method embodiment, an electronic device is further provided in the present application, and referring to fig. 7, which is a schematic structural diagram of a hardware component of an electronic device to which the embodiment of the present application is applied, and the electronic device 700 may at least include a processor 701 and a memory 702. The memory 702 stores program code that, when executed by the processor 701, causes the processor 701 to perform the steps of any of the application releases described above.
In some possible implementations, a computing device according to the present application may include at least one processor, and at least one memory. The memory stores therein program code that, when executed by the processor, causes the processor to perform the steps of application publishing according to various exemplary embodiments of the present application as described hereinabove. For example, the processor may perform the steps as shown in fig. 3A.
A computing device 800 according to such an embodiment of the present application is described below with reference to fig. 8. As shown in fig. 8, computing device 800 is in the form of a general purpose computing device. Components of computing device 800 may include, but are not limited to: the at least one processing unit 801, the at least one memory unit 802, and a bus 803 connecting the different system components (including the memory unit 802 and the processing unit 801).
Bus 803 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, and a local bus using any of a variety of bus architectures.
The storage unit 802 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 8021 and/or cache storage unit 8022, and may further include Read Only Memory (ROM) 8023.
The storage unit 802 may also include a program/utility 8025 having a set (at least one) of program modules 8024, such program modules 8024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The computing device 800 may also communicate with one or more external devices 804 (e.g., keyboard, pointing device, etc.), one or more devices that enable objects to interact with the computing device 800, and/or any devices (e.g., routers, modems, etc.) that enable the computing device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 805. Moreover, computing device 800 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 806. As shown, network adapter 806 communicates with other modules for computing device 800 over bus 803. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computing device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
Various aspects of the application publishing provided herein may also be implemented in the form of a program product comprising program code for causing an electronic device to perform the steps of the application publishing method according to the various exemplary embodiments of the application described herein above, e.g. the electronic device may perform the steps as shown in fig. 3A, when the program product is run on the electronic device, based on the same inventive concept as the above-described method embodiments.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (15)

1. An application publishing method, comprising:
acquiring application data to be published;
aiming at each picture to be presented, which is required to be displayed in real time and has the picture size exceeding a set threshold, in the application data, the following operations are respectively executed:
when the display page to which the picture to be presented belongs is determined not to be contained in the target page set, configuring the picture to be presented in a data packet generated based on the application data package, representing the picture in a target storage address form, and configuring a preloading label for the picture to be presented;
when the display page to which the picture to be presented belongs is determined to be contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on the application data package in a picture data form;
traversing to obtain each picture to be presented configured with a target storage position, adding a picture name generated based on the picture content of the obtained picture to be presented into a pre-loading array reserved in a packaged data packet when the obtained picture to be presented is determined to be configured with a pre-loading label, and storing each obtained picture to be presented into a corresponding target storage position, wherein each picture to be presented, which is identified in the pre-loading array, starts to be loaded when a terminal starts to run the application data.
2. The method of claim 1, wherein after the obtaining the application data to be published, before the storing, for each picture to be presented configured with the target storage location, the picture to be presented respectively according to the corresponding target storage location, the method further comprises:
and aiming at each picture to be presented, which is in the application data, the size of the picture exceeds a set threshold value and is not required to be displayed in real time, configuring the picture to be presented, representing the picture in a data packet generated based on the application data package in a target storage address mode, and storing the picture to be presented in a designated transfer area.
3. The method of claim 1, wherein determining that the picture size in the application data exceeds a set threshold and that a picture to be presented needs immediate presentation comprises:
setting a threshold value for the picture size configuration, and deploying an address loader plug-in under the limiting condition of the set threshold value in an application release environment matched with the application data;
and classifying and determining the pictures to be presented, the size of which exceeds a set threshold value, in the application data by adopting the address loader plug-in, and determining the pictures to be presented, which need to be displayed immediately, in the pictures to be presented, the size of which exceeds the set threshold value based on presentation indication information associated with the pictures to be presented.
4. The method of claim 1, wherein the configuring the picture to be presented in the form of a target storage address in a data packet generated based on the application data packaging comprises:
and converting the current storage address of the picture to be presented into a target storage address on content distribution network equipment by adopting a configured address loader plug-in, and configuring the picture to be presented to be represented in a data packet generated based on the application data package in the form of the target storage address.
5. The method of any of claims 1-4, wherein configuring a preloaded tag for the picture to be presented comprises:
and generating picture information based on a preset hash function and the acquired picture content of the picture to be presented by adopting a configured address loader plug-in, combining a preloading label and the picture information to generate a picture name, and storing the picture to be presented named by the picture name in a designated transfer area, wherein the picture stored in the transfer area is triggered to be subjected to primary content emptying when a data packet is generated by starting packaging.
6. The method of claim 5, wherein the traversing obtains each picture to be presented configured with a target storage location, and upon determining that the obtained picture to be presented is configured with a preload tag, adding a picture name generated based on picture content of the obtained picture to be presented in a preload array reserved in a packaged data packet, comprises:
And traversing and reading each picture name in the transfer area, determining a target picture name containing a preloading label in the read picture names, and adding the target picture name into a preloading array reserved in the packed data packet.
7. The method of claim 5, wherein storing each acquired picture to be presented to a corresponding target storage location comprises:
and determining the picture to be presented corresponding to each picture name acquired from the transit area, and saving each determined picture to be presented to a corresponding configured target storage address by the transit area.
8. The method according to any one of claims 1 to 4, wherein corresponding storage areas are respectively preconfigured for pictures to be presented, each picture to be presented, which are to be preloaded, belonging to the same page, and pictures to be presented, which are in the target page and have an image size exceeding a set threshold value; the data packet generated based on the application data comprises: and indicating logic codes of pictures to be presented in the preloading array to be loaded when the application data is run.
9. The method according to any one of claims 1-4, wherein in response to a replacement indication for a target picture to be presented, a publishing process including application data of the replaced target picture to be presented is re-executed, and during execution of the publishing process, a corresponding picture name is re-generated based on picture content of the target picture to be presented.
10. An application publishing device, comprising:
the acquisition unit is used for acquiring the application data to be published;
the execution unit is used for respectively executing the following operations aiming at each picture to be presented, which is required to be displayed in real time and the picture size exceeds a set threshold value, in the application data:
when the display page to which the picture to be presented belongs is determined not to be contained in the target page set, configuring the picture to be presented in a data packet generated based on the application data package, representing the picture in a target storage address form, and configuring a preloading label for the picture to be presented;
when the display page to which the picture to be presented belongs is determined to be contained in a preset target page set, configuring the picture to be presented to be represented in a data packet generated based on the application data package in a picture data form;
the storage unit is used for traversing and acquiring each picture to be presented configured with a target storage position, adding a picture name generated based on the picture content of the acquired picture to be presented into a pre-loading array reserved in a packaged data packet when the acquired picture to be presented is determined to be configured with a pre-loading label, and storing the acquired picture to be presented into the corresponding target storage position, wherein each picture to be presented, which is identified in the pre-loading array, starts loading when the terminal starts running the application data.
11. The apparatus of claim 10, wherein after the acquiring the application data to be published, the acquiring unit is further configured to, before storing, for each picture to be presented configured with the target storage location, the respective picture to be presented according to the corresponding target storage location:
and aiming at each picture to be presented, which is in the application data, the size of the picture exceeds a set threshold value and is not required to be displayed in real time, configuring the picture to be presented, representing the picture in a data packet generated based on the application data package in a target storage address mode, and storing the picture to be presented in a designated transfer area.
12. The apparatus of claim 10, wherein the execution unit is configured to, when determining that a picture size in the application data exceeds a set threshold and a picture to be presented needs to be presented immediately:
setting a threshold value for the picture size configuration, and deploying an address loader plug-in under the limiting condition of the set threshold value in an application release environment matched with the application data;
and classifying and determining the pictures to be presented, the size of which exceeds a set threshold value, in the application data by adopting the address loader plug-in, and determining the pictures to be presented, which need to be displayed immediately, in the pictures to be presented, the size of which exceeds the set threshold value based on presentation indication information associated with the pictures to be presented.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-9 when the program is executed by the processor.
14. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program implementing the method according to any of claims 1-9 when executed by a processor.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
CN202310008384.0A 2023-01-04 2023-01-04 Application release method and device, electronic equipment and storage medium Pending CN116257707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310008384.0A CN116257707A (en) 2023-01-04 2023-01-04 Application release method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310008384.0A CN116257707A (en) 2023-01-04 2023-01-04 Application release method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116257707A true CN116257707A (en) 2023-06-13

Family

ID=86683567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310008384.0A Pending CN116257707A (en) 2023-01-04 2023-01-04 Application release method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116257707A (en)

Similar Documents

Publication Publication Date Title
JP6621543B2 (en) Automatic update of hybrid applications
US11194882B1 (en) Behavior based optimization for content presentation
CN109388766B (en) Page loading method and device
US9747124B2 (en) Distributed virtual machine image management for cloud computing
US10284671B2 (en) Dynamic bundling of web components for asynchronous delivery
WO2020199751A1 (en) Method and apparatus for loading page picture, and electronic device
US20120084346A1 (en) Page Loading Optimization Using Page-Maintained Cache
KR101768181B1 (en) Optimized browser rendering process
KR20170038793A (en) Fast rendering of websites containing dynamic content and stale content
KR101991537B1 (en) Autonomous network streaming
CN105144121A (en) Caching content addressable data chunks for storage virtualization
US9648124B2 (en) Processing hybrid data using a single web client
WO2022144016A1 (en) Application program control method and apparatus, electronic device, and storage medium
US9787783B2 (en) Providing supplemental content in relation to embedded media
JP6794345B2 (en) A system, method, and computer program product for directly entering commands and / or content created by a local desktop application on a computer device into a web browser and vice versa.
US11023558B1 (en) Executing functions on-demand on a server utilizing web browsers
CN102624910B (en) Method, the Apparatus and system of the web page contents that process user chooses
US8738742B2 (en) Tiered XML services in a content management system
US10165036B1 (en) Network resource remote process execution
KR102519049B1 (en) Efficient rendering of video with dynamic components
US20120310893A1 (en) Systems and methods for manipulating and archiving web content
CN109284428A (en) Data processing method, device and storage medium
CN115982491A (en) Page updating method and device, electronic equipment and computer readable storage medium
Li et al. Design of the mass multimedia files storage architecture based on Hadoop
CN116257707A (en) Application release method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40088384

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination