CN110187913B - Method and device for issuing and running applet - Google Patents

Method and device for issuing and running applet Download PDF

Info

Publication number
CN110187913B
CN110187913B CN201910410366.9A CN201910410366A CN110187913B CN 110187913 B CN110187913 B CN 110187913B CN 201910410366 A CN201910410366 A CN 201910410366A CN 110187913 B CN110187913 B CN 110187913B
Authority
CN
China
Prior art keywords
applet
file
skeleton screen
page
business logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910410366.9A
Other languages
Chinese (zh)
Other versions
CN110187913A (en
Inventor
陈都
刘超凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910410366.9A priority Critical patent/CN110187913B/en
Publication of CN110187913A publication Critical patent/CN110187913A/en
Application granted granted Critical
Publication of CN110187913B publication Critical patent/CN110187913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for issuing and running an applet, wherein the method comprises the following steps: the method comprises the steps of obtaining business logic of an applet to be published, operating the business logic to obtain an applet page, generating a file of a skeleton screen according to the applet page, packaging the business logic of the applet and the file of the skeleton screen for publishing, operating the business logic to obtain a preview interface by obtaining the business logic of the applet to be published, automatically generating the file of the skeleton screen according to the preview page, and not needing manual writing, thereby improving the publishing efficiency, reducing the cost, and solving the technical problems that the skeleton screen file is manually written, the applet code is required to be invaded, the writing efficiency is lower and the cost is higher in the prior art.

Description

Method and device for issuing and running applet
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for distributing and operating an applet.
Background
With the development of mobile network technology, the experience requirements of users in browsing the applet are higher and higher. And when the applet page is opened and jumped, the problems that the page loading time is too long, the white screen waits and the like seriously influence the user experience may exist.
In the prior art, because the skeleton screen is required to be written manually, the writing and publishing efficiency of the applet is lower, and the cost is higher.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent.
Therefore, a first object of the present invention is to provide a method for distributing an applet, which obtains service logic of the applet to be distributed, runs the service logic to obtain a preview interface, automatically generates a corresponding skeleton screen file according to a preview page, and does not need to write manually, thereby improving distribution efficiency and reducing cost.
A second object of the invention is to propose a method of operating an applet.
A third object of the present invention is to provide an applet issuing apparatus.
A fourth object of the invention is to propose an apparatus for running an applet.
A fifth object of the present invention is to propose an electronic device.
A sixth object of the present invention is to propose a computer readable storage medium.
To achieve the above object, an embodiment of a first aspect of the present invention provides a method for distributing an applet, including:
acquiring business logic of an applet to be issued;
operating the business logic to obtain an applet page;
generating a file of a skeleton screen according to the applet page;
and packaging and publishing the business logic of the applet and the file of the skeleton screen.
To achieve the above object, an embodiment of a second aspect of the present invention provides a method for operating an applet, including:
acquiring a package file of an applet;
installing the packaged file to obtain the business logic of the applet and the file of the skeleton screen;
executing the business logic to obtain static resources of the applet page, and requesting a server to obtain dynamic resources of the applet page according to the business logic;
displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for acquiring the dynamic resource;
after the dynamic resource is acquired, generating the applet page according to the static resource and the dynamic resource;
and switching and displaying the display content of the skeleton screen as the applet page.
To achieve the above object, an embodiment of a third aspect of the present invention provides an applet issuing apparatus, including:
the acquisition module is used for acquiring the business logic of the applet to be issued;
the operation module is used for operating the business logic to obtain an applet page;
the generation module is used for generating a file of the skeleton screen according to the applet page;
and the publishing module is used for packaging and publishing the business logic of the applet and the file of the skeleton screen.
To achieve the above object, a fourth aspect of the present invention provides an apparatus for operating an applet, the apparatus comprising:
the obtaining module is used for obtaining the packaged file of the applet;
the installation module is used for installing the packaged file to obtain the business logic of the applet and the file of the skeleton screen;
the execution module is used for executing the service logic to obtain static resources of the applet page, and requesting the server to obtain dynamic resources of the applet page according to the service logic;
the display module is used for displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for acquiring the dynamic resource;
the processing module is used for generating the applet page according to the static resource and the dynamic resource after the dynamic resource is acquired;
and the switching module is used for switching and displaying the display content of the skeleton screen into the applet page.
In order to achieve the above object, an embodiment of a fifth aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the method for distributing the applet as described in the first aspect, or implement the method for running the applet as described in the second aspect.
In order to achieve the above object, an embodiment of a sixth aspect of the present invention proposes a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements the method of distributing an applet as described in the first aspect, or implements the method of running an applet as described in the second aspect.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects:
the method comprises the steps of obtaining business logic of an applet to be published, operating the business logic to obtain an applet page, generating a file of a skeleton screen according to the applet page, packaging the business logic of the applet and the file of the skeleton screen for publishing, operating the business logic to obtain a preview interface by obtaining the business logic of the applet to be published, automatically generating the corresponding file of the skeleton screen according to the preview page, and improving the publishing efficiency without manual writing.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of an applet publishing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an operation method of an applet according to an embodiment of the invention;
FIG. 3 is a flowchart of another method for executing an applet page according to an embodiment of the invention;
fig. 4 is a schematic structural diagram of an applet issuing device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for running an applet according to an embodiment of the present invention; and
fig. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
The method and device for publishing and running the applet in the embodiment of the invention are described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for distributing an applet according to an embodiment of the present invention.
As shown in fig. 1, the method comprises the steps of:
step 101, acquiring service logic of an applet to be published.
The business logic is logic for processing data in a small program, for example, the small program is to buy the lady blessing shoes, and the business logic of the small program is as follows: search "girl happy shoes" -find the desired shoes-order-must log in account-settle-pay-receive. Whereas the business logic of the applet has corresponding pages, i.e. the business logic of the applet is implemented by presenting different pages.
Specifically, the applets are different, and the corresponding business logic may be different, so that the business logic of the applet to be issued needs to be acquired first, and then the corresponding applet page is acquired according to the business logic.
Step 102, running business logic to obtain applet pages.
Specifically, a developer tool is adopted to run service logic, and in the process of running to a preview link or a Web publishing link, an applet page is previewed according to a hypertext markup language (HTML) file and a Cascading Style Sheet (CSS) file in the service logic.
And step 103, generating a file of the skeleton screen according to the applet page.
In this embodiment, the skeleton screen file includes an HTML file of the skeleton screen and a CSS file of the skeleton screen, which are used to generate the presentation content of the skeleton screen.
The skeleton screen can be understood as a blank template which only contains a display frame and corresponds to the loaded page before the applet page is loaded, before the applet page is completely rendered, a user can see a skeleton screen page which is a rough frame of the current applet page, smooth switching to the applet page rendered by the real data is realized through the display content of the skeleton screen, and the experience of the user is improved. Among other things, skeleton screens may be suitable for use in a variety of scenarios, such as: the home page of the e-commerce applet, the item detail page, etc., as well as, for example: the bar home page and the article detail page of the bar applet are displayed firstly, for example, in the process of loading the home page content, the display content of the skeleton screen, namely a blank frame corresponding to the home page is displayed firstly, so that waiting fidget emotion generated by a user is avoided.
Specifically, in the process of running to the preview link or the Web publishing link, a small program page can be obtained through previewing, texts, pictures and custom labels in the small program page are automatically replaced by corresponding placeholders, display contents of a corresponding skeleton screen of a rough frame of the current small program page are obtained, an HTML file of the skeleton screen and a CSS file of the skeleton screen are generated according to the display contents of the skeleton screen, and automatic generation of the file of the skeleton screen corresponding to the page is realized. Because the skeleton screen is prepared to be released after the small program business logic is finished, the preview page is obtained in a preview link or a web release link, and the preview page is automatically generated into the corresponding skeleton screen file, unlike the scheme of customizing a set of skeleton screen for each page in a completely handwriting mode in the prior art, or generating the skeleton screen through pre-rendering by constructing a pre-rendering development environment, the skeleton screen in the embodiment does not invade an original business code during generation, and is released from the development of loading logic functions of the small program page, the development access cost is lower, the development efficiency is higher, and meanwhile, the degree of fit between the corresponding skeleton screen and a real page is higher according to the skeleton screen file generated by the preview page to be finally released.
And 104, packaging and publishing the business logic of the applet and the file of the skeleton screen.
Specifically, after the file of the skeleton screen corresponding to the applet page is generated, the file is packed and compressed together with the service logic of the applet and then issued, and because the service logic of the program and the file of the skeleton screen corresponding to the applet page are stored separately, when issuing and issuing, the corresponding relationship between the service logic of the applet and the file of the skeleton screen corresponding to the applet page needs to be established, as a possible implementation manner, mapping relationship information is generated according to the page identification of the applet page and the identification of the file corresponding to the skeleton screen, and the generated mapping relationship information, the file of the skeleton screen and the service logic of the applet are packed and issued, so that the issuing efficiency of the applet comprising the skeleton screen is improved and the cost is reduced.
In the method for publishing the applet, which is disclosed by the embodiment of the invention, the business logic of the applet to be published is acquired, the business logic is operated to preview to obtain the applet page, the corresponding skeleton screen file is generated according to the applet page, the business logic of the applet and the corresponding skeleton screen file of the applet page are packaged and published, the business logic of the applet to be published is acquired, the business logic is previewed to obtain the preview interface, and the corresponding skeleton screen file is automatically generated according to the preview page without manual writing, so that the publishing efficiency is improved and the cost is reduced.
Based on the above embodiment, the present embodiment provides a method for operating an applet, and fig. 2 is a flow chart of the method for operating an applet provided in the embodiment of the present invention.
As shown in fig. 2, the method may include the steps of:
step 201, a packaged file of the applet is obtained.
Step 202, installing the packaged file to obtain the business logic of the applet and the file of the skeleton screen.
And 203, executing the business logic to obtain the static resources of the applet page, and requesting the server to obtain the dynamic resources of the applet page according to the business logic.
Step 204, displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for obtaining the dynamic resource.
Step 205, when the dynamic resource is obtained, the applet page is generated according to the static resource and the dynamic resource.
And 206, switching and displaying the display content of the skeleton screen as an applet page.
Specifically, in the above embodiment, the service logic of the applet and the file of the skeleton screen corresponding to the applet page are packaged and released, the packaged file of the applet is generated after the release, the packaged file of the applet is obtained, the packaged file of the applet is installed, the service logic of the applet is executed by running the applet to obtain the corresponding service logic of the applet and the file of the skeleton screen, the service logic of the applet is implemented, the Loading of the page in the service logic is implemented, and the static resource of the applet page is obtained, wherein the static resource refers to the data which does not need to be obtained from the server, such as the text, the picture, the CSS file and the like, of the page to be displayed by a local cache, and the dynamic resource of the applet page which is requested to be obtained according to the service logic, such as the picture, the video and the like, is required to be obtained from the server, and when the dynamic resource to be loaded is waited, in order to avoid using the Loading icon, and reduce the situation that the user runs off because of the waiting time is unpredictable, the HTML file of the applet and the CSS file of the skeleton screen, the static resource of the skeleton screen is generated, the static resource of the applet page is displayed, for example, the page content of the skeleton page is displayed, the static resource is displayed, and the length of the application of the skeleton page is not predicted, and the dynamic resource is not required to be displayed, and the dynamic resource is displayed, and the user is required to be loaded, and the dynamic resource is waiting for the application of the program.
According to the method for operating the applet, the package file of the applet is obtained, the applet is installed and operated, the service logic of the applet and the file of the skeleton screen are obtained, the skeleton screen corresponding to the applet page is displayed in the page loading process of the applet according to the service logic of the applet and the file of the skeleton screen until the page loading is completed, the applet page is generated according to the obtained dynamic resources and static resources, the display content of the currently displayed skeleton screen is switched to the applet page for display, and the technical problems that a user loses and the user satisfaction degree is poor due to the fact that the user leaves the page due to overlong page loading time in the process of loading the applet page are solved.
Based on the above embodiment, the embodiment of the present invention further provides a possible implementation manner of the applet page running method, and fig. 3 is a schematic flow chart of another applet page running method provided by the embodiment of the present invention, as shown in fig. 3, before step 204, further includes step 301:
step 301, determining a file of the skeleton screen corresponding to the applet page according to the mapping relation information in the packaged file.
Specifically, when the business logic of the applet and the corresponding skeleton screen files are packaged, because the skeleton screen files of the applet are stored independently, when the package release is performed, a mapping relation is generated in advance according to the page identification of the applet page and the identification of the corresponding skeleton screen files, therefore, when the applet operates, the identification of the page is determined according to the page loaded by the business logic, the identification of the skeleton screen file corresponding to the page identification in the packaged file can be searched according to the mapping relation information, and further, the skeleton screen files to be displayed, namely the HTML files of the skeleton screen and the CSS files of the skeleton screen, are determined according to the skeleton screen file identification.
In the method for running the applet page, before the framework screen of the applet is acquired and displayed in the process of loading the applet page, the applet page and the corresponding framework screen files are stored independently, so that the corresponding framework screen files of the currently loaded page are searched according to the mapping relation information of the pre-stored applet page and the corresponding framework screen files, and the framework screen files are displayed, thereby realizing the natural and smooth transition to the truly loaded display page through the framework screen, avoiding the generation of fidgetiness of a user and improving the satisfaction degree of the user.
In order to realize the embodiment, the invention also provides a device for issuing the applet.
Fig. 4 is a schematic structural diagram of an applet issuing apparatus according to an embodiment of the present invention.
As shown, the apparatus includes: an acquisition module 41, a running module 42, a generation module 43 and a publication module 44.
And the acquiring module 41 is used for acquiring the business logic of the applet to be published.
An operation module 42 for operating the business logic to obtain the applet page.
And the generating module 43 is used for generating a file of the skeleton screen according to the applet page.
And the publishing module 44 is used for publishing the business logic of the applet and the file package of the skeleton screen.
Further, in one possible implementation manner of the embodiment of the present invention, the operation module 42 is specifically configured to:
and running business logic by adopting a developer tool, and previewing to obtain an applet page according to the business logic in a step of running to a preview or a Web publishing step. As a possible implementation manner, the generating module 43 is specifically configured to:
and in the preview link or in the Web publishing link, generating a file of the skeleton screen according to the applet page.
As one possible implementation, the document of the skeleton screen includes: the generating module 43 is specifically further configured to:
and replacing texts, pictures and custom labels in the applet page with corresponding placeholders to obtain the display content of the skeleton screen, and generating an HTML file of the skeleton screen and a CSS file of the skeleton screen according to the display content of the skeleton screen.
As a possible implementation manner, the publishing module 44 is specifically configured to:
and generating mapping relation information according to the page identification of the applet page and the identification of the corresponding skeleton screen, and packaging and publishing the mapping relation information, the file of the skeleton screen and the business logic of the applet.
It should be noted that the foregoing explanation of the embodiment of the method for issuing the applet is also applicable to the issuing device of this embodiment, and the principle is the same, and will not be repeated here.
In the device for publishing the applet, which is disclosed by the embodiment of the invention, the business logic of the applet to be published is acquired, the business logic is operated to obtain the applet page, the file of the skeleton screen is generated according to the applet page, the business logic of the applet and the file of the skeleton screen are packaged and published, the business logic of the applet to be published is acquired, the business logic is previewed to obtain a preview interface, and the corresponding file of the skeleton screen is automatically generated according to the preview page, so that manual writing is not needed, the publishing efficiency is improved, and the cost is reduced.
Based on the above embodiment, the embodiment of the invention also provides an operation device of the applet.
Fig. 5 is a schematic structural diagram of an apparatus for operating an applet according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes: the system comprises an acquisition module 51, an installation module 52, an execution module 53, a display module 54, a processing module 55 and a switching module 56.
An obtaining module 51 is configured to obtain a packaged file of the applet.
And the installation module 52 is used for installing the packaged file to obtain the business logic of the small program and the file of the skeleton screen.
The execution module 53 is configured to execute the service logic to obtain the static resource of the applet page, and request the server to obtain the dynamic resource of the applet page according to the service logic.
And the display module 54 is used for displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for acquiring the dynamic resource.
And the processing module 55 is used for generating an applet page according to the static resource and the dynamic resource after the dynamic resource is acquired.
And the switching module 56 is used for switching and displaying the display content of the skeleton screen as the applet page.
As a possible implementation manner, the apparatus further includes: and a determining module.
And the determining module is used for determining the file of the skeleton screen corresponding to the applet page according to the mapping relation information in the packaged file.
It should be noted that the foregoing explanation of the embodiment of the operation method of the applet is also applicable to the operation device of this embodiment, and the principle is the same, which is not repeated here.
According to the applet operation device, the package file of the applet is obtained, the applet is installed and operated, the service logic of the applet and the file of the skeleton screen are obtained, the skeleton screen corresponding to the applet page is displayed in the page loading process of the applet according to the service logic of the applet and the file of the skeleton screen until the page loading is completed, the applet page is generated according to the obtained dynamic resources and static resources, the display content of the currently displayed skeleton screen is switched to the applet page for display, and the technical problems that a user loses and the user satisfaction degree is poor due to the fact that the user leaves the page due to overlong page loading time in the applet page loading process are solved.
In order to achieve the foregoing embodiments, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the issuing method described in the foregoing applet issuing method embodiment, or implements the running method described in the foregoing applet running method embodiment when executing the program.
Fig. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application. The electronic device 12 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the present application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 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. Program modules 42 generally perform the functions and/or methods in the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other electronic devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks, such as a local area network (Local Area Network; hereinafter: LAN), a wide area network (Wide Area Network; hereinafter: WAN) and/or a public network, such as the Internet, via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the methods mentioned in the foregoing embodiments.
In order to achieve the above-described embodiments, the embodiments of the present invention also provide a non-transitory computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the distribution method described in the above-described distribution method embodiment of the applet, or implements the operation method described in the operation method embodiment of the applet.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (14)

1. A method of distributing applets, the method comprising the steps of:
acquiring business logic of an applet to be issued;
operating the business logic to obtain an applet page;
generating a file of a skeleton screen according to the applet page;
packaging and publishing the business logic of the applet and the file of the skeleton screen;
generating a file of a skeleton screen according to the applet page, wherein the file comprises the following steps: in the process of running to a preview link or a Web publishing link, replacing texts, pictures and custom tags in the applet page with corresponding placeholders to obtain the display content of the skeleton screen; and generating an HTML file of the skeleton screen and a CSS file of the skeleton screen according to the display content of the skeleton screen.
2. The publishing method of claim 1, wherein said running the business logic to obtain an applet page comprises:
operating the business logic by adopting a developer tool;
and in the step of running to the preview step or the Web publishing step, previewing to obtain an applet page according to the service logic.
3. The publishing method of claim 1, wherein the document of the skeletal screen comprises: and the HTML file of the skeleton screen and the CSS file of the skeleton screen.
4. A method of publishing according to any of claims 1-3, wherein said publishing the business logic of the applet with the document package of the skeletal screen comprises:
generating mapping relation information according to the page identification of the applet page and the identification of the corresponding skeleton screen;
and packaging and publishing the mapping relation information, the file of the skeleton screen and the business logic of the applet.
5. A method of operating an applet, the method comprising the steps of:
acquiring a packaged file of an applet, wherein the applet is obtained by adopting the applet publishing method as set forth in claim 1;
installing the packaged file to obtain the business logic of the applet and the file of the skeleton screen;
executing the business logic to obtain static resources of the applet page, and requesting a server to obtain dynamic resources of the applet page according to the business logic;
displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for acquiring the dynamic resource;
after the dynamic resource is acquired, generating the applet page according to the static resource and the dynamic resource;
and switching and displaying the display content of the skeleton screen as the applet page.
6. The method according to claim 5, wherein before displaying the presentation content of the skeleton screen according to the file of the skeleton screen, further comprising:
and determining the file of the skeleton screen corresponding to the applet page according to the mapping relation information in the packaged file.
7. An applet issuing apparatus, said apparatus comprising:
the acquisition module is used for acquiring the business logic of the applet to be issued;
the operation module is used for operating the business logic to obtain an applet page;
the generation module is used for generating a file of the skeleton screen according to the applet page;
the publishing module is used for packaging and publishing the business logic of the applet and the file of the skeleton screen;
the generating module is specifically configured to: generating a file of a skeleton screen according to the applet page in a preview link or a Web publishing link; replacing texts, pictures and custom labels in the applet page with corresponding placeholders to obtain display contents of the skeleton screen;
and generating an HTML file of the skeleton screen and a CSS file of the skeleton screen according to the display content of the skeleton screen.
8. The publishing device of claim 7, wherein the execution module is specifically configured to:
operating the business logic by adopting a developer tool;
and in the step of running to the preview step or the Web publishing step, previewing to obtain an applet page according to the service logic.
9. The publishing device of claim 7, wherein the document of the skeletal screen comprises: and the HTML file of the skeleton screen and the CSS file of the skeleton screen.
10. The publication device of any one of claims 7 to 9, wherein the publication module is specifically configured to:
generating mapping relation information according to the page identification of the applet page and the identification of the corresponding skeleton screen;
and packaging and publishing the mapping relation information, the file of the skeleton screen and the business logic of the applet.
11. An applet operating apparatus, said apparatus comprising:
the acquisition module is used for acquiring a packaged file of the applet, wherein the applet is obtained by adopting the applet issuing method as set forth in claim 1;
the installation module is used for installing the packaged file to obtain the business logic of the applet and the file of the skeleton screen;
the execution module is used for executing the service logic to obtain static resources of the applet page, and requesting the server to obtain dynamic resources of the applet page according to the service logic;
the display module is used for displaying the display content of the skeleton screen according to the file of the skeleton screen in the process of waiting for acquiring the dynamic resource;
the processing module is used for generating the applet page according to the static resource and the dynamic resource after the dynamic resource is acquired;
and the switching module is used for switching and displaying the display content of the skeleton screen into the applet page.
12. The operation device according to claim 11, characterized in that the device further comprises:
and the determining module is used for determining the skeleton screen corresponding to the applet page according to the mapping relation information in the packaging file.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of distributing the applet according to any one of claims 1-4 or the method of running the applet according to claim 5 or 6 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of distributing the applet according to one of claims 1-4 or the method of running the applet according to claim 5 or 6.
CN201910410366.9A 2019-05-17 2019-05-17 Method and device for issuing and running applet Active CN110187913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910410366.9A CN110187913B (en) 2019-05-17 2019-05-17 Method and device for issuing and running applet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910410366.9A CN110187913B (en) 2019-05-17 2019-05-17 Method and device for issuing and running applet

Publications (2)

Publication Number Publication Date
CN110187913A CN110187913A (en) 2019-08-30
CN110187913B true CN110187913B (en) 2023-06-09

Family

ID=67716533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910410366.9A Active CN110187913B (en) 2019-05-17 2019-05-17 Method and device for issuing and running applet

Country Status (1)

Country Link
CN (1) CN110187913B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569108B (en) * 2019-09-04 2021-04-30 腾讯科技(深圳)有限公司 Method for creating execution environment of mini-game virtual machine and related product
CN114706621B (en) * 2019-09-26 2023-03-24 华为技术有限公司 Method for starting fast application and related device
CN112786034B (en) * 2019-11-08 2023-04-07 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium
CN111008019B (en) * 2019-12-06 2021-07-02 北京百度网讯科技有限公司 Web running method, device, equipment and medium of small program
CN111222062B (en) * 2020-01-09 2021-06-01 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
CN111352627B (en) * 2020-02-27 2023-04-07 政采云有限公司 Page skeleton screen generation method, device, equipment and readable storage medium
CN111506387B (en) 2020-03-02 2023-09-22 百度在线网络技术(北京)有限公司 Page prerendering method and device, electronic equipment and storage medium
CN111522599B (en) * 2020-04-13 2023-06-30 百度在线网络技术(北京)有限公司 Method and device for transmitting information
CN111506300A (en) * 2020-04-22 2020-08-07 上海极链网络科技有限公司 Applet generation method, device, equipment and storage medium
CN111552473B (en) * 2020-04-27 2024-02-09 腾讯科技(深圳)有限公司 Application processing method, device and equipment
CN112131535B (en) * 2020-09-21 2022-07-15 厦门南讯股份有限公司 Integrated small program authorization method for multi-deployment environment
CN112307385A (en) * 2020-10-22 2021-02-02 北京达佳互联信息技术有限公司 Webpage data loading and processing method and device, electronic equipment and storage medium
CN112579092B (en) * 2020-12-07 2022-04-08 广东亿润网络技术有限公司 Multifunctional small program multi-end updating and publishing system
CN114691236B (en) * 2022-03-24 2024-04-19 中国银联股份有限公司 Method, device, equipment and medium for integrating native program and applet

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254773A (en) * 2018-09-19 2019-01-22 广州视源电子科技股份有限公司 Skeleton page generation method, device, equipment and storage medium
CN109298864A (en) * 2018-08-23 2019-02-01 深圳点猫科技有限公司 The method and electronic equipment of automation generation project skeleton screen under teaching platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177175A1 (en) * 2001-04-26 2003-09-18 Worley Dale R. Method and system for display of web pages

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298864A (en) * 2018-08-23 2019-02-01 深圳点猫科技有限公司 The method and electronic equipment of automation generation project skeleton screen under teaching platform
CN109254773A (en) * 2018-09-19 2019-01-22 广州视源电子科技股份有限公司 Skeleton page generation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110187913A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN110187913B (en) Method and device for issuing and running applet
US7930343B2 (en) Scalable user interface system
US20120297324A1 (en) Navigation Control Availability
US11062081B2 (en) Creating accessible, translatable multimedia presentations
JP5550636B2 (en) Techniques for editing documents using latent transfer indication
US9158750B2 (en) Method and system to process an electronic form
US10008009B1 (en) Method for generating dynamic vector graphics
US20090172559A1 (en) Creating and editing dynamic graphics via a web interface
US7783967B1 (en) Packaging web content for reuse
CN106933887B (en) Data visualization method and device
CN110516186A (en) Page skeleton automatic generating method, equipment, storage medium and device
CN107179920B (en) Network engine starting method and device
CN111459501A (en) SVG-based Web configuration picture storage and display system, method and medium
WO2023103430A1 (en) Data visualization display method and apparatus, medium and electronic device
CN112306594A (en) Rendering method and device based on mobile terminal and storage medium
CN117093316B (en) Cross-platform page rendering system, electronic equipment and storage medium
US7646935B2 (en) Method and computer program product for automatic image mirroring
KR101709186B1 (en) Interactive multimedia E-book authoring apparatus and method
CN115618144B (en) Dynamic layout method, system, equipment and medium based on webpage
JP2011511991A (en) Apparatus and method for animation of graphic digital document
CN117055987A (en) Webpage display method and device, electronic equipment and computer readable storage medium
US20070206022A1 (en) Method and apparatus for associating text with animated graphics
US10915599B2 (en) System and method for producing transferable, modular web pages
CN112632436A (en) Webpage display method and device, electronic equipment and storage medium
CN113760738A (en) Skeleton screen generation method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant