CN112596729A - Target application interface generation method and device, readable medium and electronic equipment - Google Patents

Target application interface generation method and device, readable medium and electronic equipment Download PDF

Info

Publication number
CN112596729A
CN112596729A CN202011580217.6A CN202011580217A CN112596729A CN 112596729 A CN112596729 A CN 112596729A CN 202011580217 A CN202011580217 A CN 202011580217A CN 112596729 A CN112596729 A CN 112596729A
Authority
CN
China
Prior art keywords
interface
historical
cross
target application
server
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
CN202011580217.6A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai 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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011580217.6A priority Critical patent/CN112596729A/en
Publication of CN112596729A publication Critical patent/CN112596729A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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

Abstract

The disclosure provides a target application interface generation method and device, a readable medium and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: responding to an instruction for starting a cross-platform application program, and sending a query request to a server; if the server is detected to store historical interface creating data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creating data from the server; and generating a target application interface corresponding to the cross-platform application program according to the historical interface creating data. The method and the device can improve the loading efficiency of the target application interface corresponding to the cross-platform application program.

Description

Target application interface generation method and device, readable medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a target application interface generation method, a target application interface generation apparatus, a computer-readable medium, and an electronic device.
Background
With the rapid development of science and technology, fast application, small programs, and lightweight application programs such as Week are becoming more popular.
At present, in the technical scheme of generating the application interface by using a fast application, an applet, a Week or the like, a Java layer only depends on an interface creation instruction generated after the JS framework is completely run when the application interface is created, so that the creation of the application interface can be started only after the JS framework is completely run and a corresponding JS file of a page is analyzed. However, in this technical scheme, because the operation time of the JsFramework and JS file on the page is long, the Java layer needs to wait for a long time to start creating the application interface, and thus when the application interface is loaded by a fast application, an applet, a Week, or the like, the waiting time is long, and the loading efficiency is low.
Disclosure of Invention
The present disclosure aims to provide a target application interface generation method, a target application interface generation apparatus, a computer readable medium, and an electronic device, so as to avoid, at least to a certain extent, the problem of low target application interface loading efficiency corresponding to a cross-platform application program in a related technical solution.
According to a first aspect of the present disclosure, there is provided a target application interface generating method, including:
responding to an instruction for starting a cross-platform application program, and sending a query request to a server;
if the server is detected to store historical interface creating data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creating data from the server;
and generating a target application interface corresponding to the cross-platform application program according to the historical interface creating data.
According to a second aspect of the present disclosure, there is provided a target application interface generating apparatus, including:
the query request sending module is used for responding to an instruction for starting the cross-platform application program and sending a query request to the server;
a historical interface creation data acquisition module, configured to acquire historical interface creation data from the server if it is detected that the server stores the historical interface creation data corresponding to the cross-platform application program according to the query request;
and the target application interface generating module is used for generating a target application interface corresponding to the cross-platform application program according to the historical interface creating data.
According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the above-mentioned method.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, comprising:
a processor; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the above-described method.
In the target application interface generation method provided by the embodiment of the disclosure, a query request is sent to a server in response to an instruction for starting a cross-platform application program; if the server is detected to store historical interface creating data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creating data from the server; and generating a target application interface corresponding to the cross-platform application program according to the historical interface creation data. On one hand, historical interface creating data for creating a target application interface corresponding to the cross-platform application program is directly obtained from the server, and then the target application interface is created according to the generated historical interface creating data without waiting for generation of latest interface creating data, so that the creating efficiency and the loading efficiency of the target application interface corresponding to the cross-platform application program are effectively improved; on the other hand, historical interface creating data stored by the server is generated by taking other clients as production environments, and has higher compatibility compared with interface creating data generated by the server, so that the stability of a created target application interface is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
FIG. 2 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied;
FIG. 3 schematically illustrates a flow chart of a target application interface generation method in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of dynamically updating a target application interface in an exemplary embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart for generating a target application interface when the historical interface creation data is not stored by the server in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates a flow chart for generating up-to-date interface creation data in an exemplary embodiment of the disclosure;
FIG. 7 is a flow diagram illustrating the generation of a target application interface in a related art in an exemplary embodiment of the disclosure;
FIG. 8 is a schematic diagram illustrating an application scenario for generating a target application interface in an exemplary embodiment of the present disclosure;
fig. 9 schematically illustrates a composition diagram of a target application interface generation apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a target application interface generation method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having an image processing function, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The target application interface generation method provided by the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the target application interface generation apparatus is generally disposed in the terminal devices 101, 102, and 103. However, it is easily understood by those skilled in the art that the target application interface generating method provided in the present disclosure may also be executed by the server 105, and accordingly, the target application interface generating apparatus may also be disposed in the server 105, which is not particularly limited in the present exemplary embodiment.
The exemplary embodiments of the present disclosure also provide an electronic device for implementing the target application interface generating method, which may be the terminal device 101, 102, 103 or the server 105 in fig. 1. The electronic device includes at least a processor and a memory for storing executable instructions of the processor, the processor configured to perform the target application interface generation method via execution of the executable instructions.
The following takes the electronic device 200 in fig. 2 as an example, and exemplifies the configuration of the electronic device. It should be noted that the electronic device 200 shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the embodiments of the present disclosure.
As shown in fig. 2, the electronic apparatus 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the method hereinafter described. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product including program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device, for example, any one or more of the steps in fig. 3 to 8 may be performed.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In the related technology, currently, when a lightweight cross-platform application program compatible with a front end and a client represented by a fast application, Weex, an applet and the like loads and displays a corresponding application interface, an interface creation instruction sent by a front end framework JsFramework needs to be received, then after the interface creation instruction is received, a Java layer analyzes and executes the interface creation instruction, and then an application interface is created and displayed according to the interface creation instruction. However, in the technical scheme, the Java layer must rely on an interface creation instruction sent by the JsFramework when creating the application interface, so that in a scheme for creating the application interface by using a cross-platform application program such as a fast application, the JsFramework must wait until the JsFramework is completely run, and the Java layer can start creating the application interface after the JS file of the corresponding page is analyzed. Due to the fact that the JsFramework and the JS file of the page have long running time, the Java layer also needs to wait for the long running time to start to create the application interface, and the problem that the loading efficiency of the application page in the cross-platform technical scheme of fast application and the like is low is caused.
Based on one or more problems in the related art, the present exemplary embodiment first provides a target application interface generation method, and the following takes the terminal device executing the method as an example to specifically describe the target application interface generation method according to the exemplary embodiment of the present disclosure.
Fig. 3 shows a flow of a target application interface generation method in the present exemplary embodiment, including the following steps S310 to S330:
in step S310, in response to the instruction to start the cross-platform application, a query request is sent to the server.
In an exemplary embodiment, the cross-platform application may refer to a lightweight application based on a cross-platform technology compatible with a front end and a client, for example, the cross-platform application may be an applet in the client, or a fast application, or of course, may also be a Week, and the like, which is not limited in this exemplary embodiment.
The query request may be an instruction for requesting the server for historical interface creation data when the cross-platform application program is started, and the query request may include identification data corresponding to the cross-platform application program, so that the server may query whether the historical interface creation data corresponding to the cross-platform application program is stored based on the identification data corresponding to the cross-platform application program included in the query request.
In step S320, if it is detected that the server stores historical interface creation data corresponding to the cross-platform application program according to the query request, the historical interface creation data is acquired from the server.
In an exemplary embodiment, the historical interface creation data may refer to interface creation data generated when other clients create an application interface of a cross-platform application program, and when the application interface of the cross-platform application program is generated for the first time, the other clients may send interface creation data generated in the process of generating the application interface of the cross-platform application program to a server for storage, so as to create the historical interface creation data corresponding to the cross-platform application program in the server. Specifically, the historical interface creation data may be stored according to the identification data corresponding to the cross-platform application program, so that other clients starting the cross-platform application program can quickly detect the historical interface creation data corresponding to the cross-platform application program stored in the server according to the identification data included in the query request.
Specifically, when the server detects that historical interface creation data corresponding to the cross-platform application program is stored according to the identification data corresponding to the cross-platform application program included in the query request, it may be considered that other clients have already created a target application interface corresponding to the cross-platform application program at this time, and the historical interface creation data generated in the process of creating the target application interface is stored in the server. Therefore, when the target application interface corresponding to the cross-platform application program is generated, the historical interface creating data corresponding to the cross-platform application program can be directly obtained from the server and sent to the corresponding rendering layer, the interface creating data for creating the target application interface is not required to be re-generated from beginning to end by the target front-end framework, the running process of the target front-end framework is skipped, and the efficiency of rendering and loading the target application interface is effectively improved.
In step S330, a target application interface corresponding to the cross-platform application program is generated according to the historical interface creation data.
In an exemplary embodiment, the target application interface may be an application interface displayed to a user and generated after the cross-platform application program is started, and when it is detected that the server stores history interface creation data corresponding to the cross-platform application program, the history interface creation data may be directly sent to the rendering layer to perform rendering to generate the target application interface, and rendering does not need to be started until the target front-end framework creates the interface creation data, so that the rendering loading efficiency of the target application interface is improved.
To sum up, in the exemplary embodiment, in response to the instruction to start the cross-platform application, a query request is sent to the server; if the server is detected to store historical interface creating data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creating data from the server; and generating a target application interface corresponding to the cross-platform application program according to the historical interface creation data. On one hand, historical interface creating data for creating a target application interface corresponding to the cross-platform application program is directly obtained from the server, and then the target application interface is created according to the generated historical interface creating data without waiting for generation of latest interface creating data, so that the creating efficiency and the loading efficiency of the target application interface corresponding to the cross-platform application program are effectively improved; on the other hand, historical interface creating data stored by the server is generated by taking other clients as production environments, and has higher compatibility compared with interface creating data generated by the server, so that the stability of a created target application interface is improved.
The following describes steps S310 to S330 in fig. 3 in detail.
In an exemplary embodiment, the history interface creation data may include a history component creation instruction, for example, the history component creation instruction may be an instruction createBody for creating an application interface skeleton, or an instruction addElement for adding an application interface element, and of course, the history component creation instruction may also be an instruction for creating a component in an application interface, which is not limited in this example.
Specifically, after the history component creating instruction is acquired from the server, the history component creating instruction may be directly sent to the rendering layer, where the rendering layer may be a logic layer for creating an application interface according to the history component creating instruction, and for example, the rendering layer may include, but is not limited to, a Java layer. The history component creating instruction is sent to the rendering layer, and the rendering layer may generate the history component creating instruction from beginning to end without waiting for the target front-end framework JsFramework, and may directly execute the received history component creating instruction, so as to generate the target application interface corresponding to the cross-platform application program.
In an exemplary embodiment, if it is detected that the server stores historical interface creation data corresponding to the cross-platform application program according to the query request, the historical interface creation data is acquired from the server, and interface creation resources for constructing the target application interface are also acquired from the server while the historical interface creation data is acquired. The interface creation resource may refer to all preset resource data for generating the target application interface, for example, the interface creation resource may be picture information to be realized by the target application interface, may also be a button style of the target application interface, and of course, may also be other data required for creating the target application interface, which is not particularly limited in this example embodiment.
The acquired interface creating resources can be analyzed through the target front-end framework JsFramework, and then the latest interface creating data of the target application interface is determined to be generated. Because the historical interface creating data stored by the server may be an old-version cross-platform application program, the historical interface creating data is sent to the rendering layer to create the target application interface, the interface creating resources acquired from the server can be analyzed through the target front-end framework JsFramework to generate the latest interface creating data for creating the target application interface, and the target application interface created through the historical interface creating data is updated through the latest interface creating data. Meanwhile, when historical interface creation data is obtained, interface creation resources used for constructing the target application interface are obtained at the same time, the data obtaining efficiency can be guaranteed, and the creation efficiency of the target application interface is further guaranteed.
Specifically, the dynamic update of the target application interface generated based on the historical interface creation data may be implemented through the steps in fig. 4, and as shown in fig. 4, the dynamic update may specifically include:
step S410, based on the target front-end framework, generating the latest interface creation data for constructing the target application interface according to the interface creation resources;
step S420, comparing the latest interface creation data with the historical interface creation data to obtain updated interface creation data;
step S430, dynamically updating the generated target application interface through the update interface creation data.
The latest interface creation data may be interface creation data corresponding to a target application interface of a latest version, and interface creation data corresponding to a cross-platform application program may be requested from a server, and based on a target front-end framework jsfrawork, interface creation data generated according to the interface creation data is the latest interface creation data.
The updated interface creating data can be different interface creating data corresponding to the latest interface creating data and the historical interface creating data obtained by carrying out delta comparison on the latest interface creating data and the historical interface creating data, after the rendering layer generates the target application interface corresponding to the version of the historical interface creating data according to the historical interface creating data, the creating instruction of the component to be updated in the target application interface corresponding to the version of the historical interface creating data is generated according to the updated interface creating data on the basis of the target front end frame JsFramework, and then the target application interface corresponding to the version of the historical interface creating data is dynamically updated according to the generated creating instruction of the component to be updated, so that the timeliness of information in the target application interface is guaranteed, and the accuracy of the target application interface is guaranteed.
In an exemplary embodiment, when the server does not store history interface creation data corresponding to the cross-platform application, the target application interface may be generated through the steps in fig. 5, and as shown in fig. 5, the method specifically may include:
step S310, responding to an instruction for starting a cross-platform application program, and sending a query request to a server;
step S520, if it is detected that the server does not store historical interface creating data corresponding to the cross-platform application program according to the query request, generating latest interface creating data for constructing the target application interface based on a target front-end framework;
step S530, generating a target application interface corresponding to the cross-platform application program according to the latest interface creation data.
If the server is detected not to store historical interface creating data corresponding to the cross-platform application program according to the query request, the cross-platform application program can be considered to be started for the first time, interface creating resources corresponding to the cross-platform application program are obtained from the server, the interface creating resources are sent to the target front-end framework JsFramework, then latest interface creating data for constructing the target application interface are generated directly based on the target front-end framework JsFramework, and when the target front-end framework JsFramework is operated completely and the page JS file is operated completely, the generated latest interface creating data are sent to a rendering layer (Java layer) to be executed, so that the target application interface corresponding to the cross-platform application program is generated.
Specifically, the generation of the latest interface creation data may be realized through the steps in fig. 6, and as shown in fig. 6, the generation of the latest interface creation data may specifically include:
step S610, obtaining interface creating resources for constructing the target application interface from the server;
step S620, based on the target front-end framework, generating the latest interface creation data for constructing the target application interface according to the interface creation resources.
Further, if the server is detected not to store the historical interface creation data corresponding to the cross-platform application program according to the query request, the cross-platform application is said to be launched for the first time, at which point the latest interface creation data for building the target application interface can be generated based on the target front-end framework, while creating and generating a target application interface corresponding to the cross-platform application program through the latest interface creation data, the generated latest interface creation data may be stored in the server as historical interface creation data corresponding to the cross-platform application, and at this time, if there are other clients to start the cross-platform application, other clients can acquire the uploaded latest interface creation data from the server, so that a target application interface corresponding to the cross-platform application program can be generated quickly, and the loading rendering efficiency of the target application interface is improved.
FIG. 7 schematically illustrates a flow chart of generating a target application interface in a related art in an exemplary embodiment of the disclosure.
Referring to fig. 7, in step S710, an interface creation resource for creating a target application interface corresponding to a cross-platform application program is obtained from a server, and the interface creation resource is sent to a target front-end framework js framework, where the target front-end framework js framework generates interface creation data, such as a first instruction, a second instruction, and the like, according to the received interface creation resource, and sends the generated interface creation data to a rendering layer (Java layer);
step S720, executing the received interface creation data based on the rendering layer (Java layer), for example, the rendering layer (Java layer) may execute a first instruction to create an application interface skeleton corresponding to the target application interface, and may execute a second instruction to add an application interface element corresponding to the target application interface, which is not limited in this example embodiment;
step S730, creating a target application interface corresponding to the cross-platform application according to the components generated by the rendering layer (Java layer) execution interface creation data, such as the application interface framework, the application interface elements, and the like.
Therefore, the rendering layer (Java layer) can render and load the target application interface according to the interface creation data only after the interface creation data generated by the target front-end framework JsFramework, and the rendering and loading efficiency of the target application interface is low due to the long running time of the target front-end framework JsFramework.
Fig. 8 schematically illustrates an application scenario diagram for generating a target application interface in an exemplary embodiment of the present disclosure.
Referring to fig. 8, in step S810, before the first client 801 generates the target application interface corresponding to the cross-platform application program, first, a query request is sent to the background server 802 according to the identification data corresponding to the cross-platform application program, so that the background server 802 detects whether history interface creation data corresponding to the cross-platform application program is stored according to the query request, and if it is detected that the history interface creation data corresponding to the cross-platform application program is not stored in the background server 802, an interface creation resource corresponding to the cross-platform application program is obtained from the background server 802, and the interface creation resource is sent to the target front-end frame JsFramework to generate latest interface creation data;
step S820, the latest interface creation data is sent to a rendering layer (Java layer) for execution, and each component is generated;
step S830, constructing a target application interface corresponding to the cross-platform application program according to each component generated after the latest interface creation data is executed by the rendering layer (Java layer);
step 840, based on the identification data corresponding to the cross-platform application program, uploading the latest interface creation data to the background server 802 for storage, as the historical interface creation data corresponding to the cross-platform application program;
step S850, before the second client 803 generates the target application interface corresponding to the cross-platform application program, first sending a query request to the background server 802 according to the identification data corresponding to the cross-platform application program, so that the background server 802 detects whether the historical interface creation data corresponding to the cross-platform application program is stored according to the query request, and if it is detected that the historical interface creation data corresponding to the cross-platform application program uploaded by the first client 801 is stored in the background server 802, obtaining the historical interface creation data corresponding to the cross-platform application program and the corresponding interface creation resource from the background server 802, sending the historical interface creation data to the rendering layer (Java layer) corresponding to the second client 803, and sending the interface creation resource to the target front-end frame jssframework corresponding to the second client 803;
step S860, construct a target application interface according to the component generated after the rendering layer (Java layer) corresponding to the second client 803 executes the historical interface creation data;
in step S870, based on the target front-end frame JsFramework corresponding to the second client 803, generating latest interface creation data according to the interface creation resource, performing delta comparison on the latest interface creation data and historical interface creation data acquired from the server to obtain updated interface creation data (for example, the historical interface creation data may include a first instruction and a second instruction, the latest interface creation data may include a first instruction, a second instruction and a third instruction, and performing delta comparison on the latest interface creation data and the historical interface creation data acquired from the server to obtain a third instruction, that is, the third instruction may be the updated interface creation data), and sends the update interface creation data to the rendering layer (Java layer) corresponding to the second client 803 for execution, the generated target application interface is dynamically updated, and timeliness of the target application interface is guaranteed.
It is noted that the above-mentioned figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Further, as shown in fig. 9, the target application interface generating apparatus 900 provided in this example embodiment may further include a query request sending module 910, a history interface creation data obtaining module 920, and a target application interface generating module 930. Wherein:
the query request sending module 910 is configured to send a query request to the server in response to an instruction to start the cross-platform application;
the historical interface creation data obtaining module 920 is configured to obtain historical interface creation data from the server if it is detected that the server stores the historical interface creation data corresponding to the cross-platform application according to the query request;
the target application interface generating module 930 is configured to generate a target application interface corresponding to the cross-platform application program according to the historical interface creation data.
In an exemplary embodiment, the target application interface generation module 930 may be configured to:
and sending the historical component creating instruction to a rendering layer, so that the rendering layer executes the historical component creating instruction to generate a target application interface corresponding to the cross-platform application program.
In an exemplary embodiment, the history interface creation data obtaining module 920 further includes an interface creation resource obtaining unit, and the interface creation resource obtaining unit may be configured to:
and acquiring interface creation resources for constructing the target application interface from the server.
In an exemplary embodiment, the target application interface generation module 930 further includes an interface creation data comparison unit, which may be configured to:
generating latest interface creation data for constructing the target application interface according to the interface creation resources on the basis of the target front-end framework;
comparing the latest interface creation data with the historical interface creation data to obtain updated interface creation data;
and dynamically updating the generated target application interface through the updating interface creation data.
In an exemplary embodiment, the historical interface creation data obtaining module 920 further includes a latest interface creation data generating unit, and the latest interface creation data generating unit may be configured to:
if the server is detected not to store historical interface creating data corresponding to the cross-platform application program according to the query request, generating latest interface creating data for constructing the target application interface based on a target front-end framework;
and generating a target application interface corresponding to the cross-platform application program according to the latest interface creation data.
In an exemplary embodiment, the latest interface creation data generation unit may be further configured to:
acquiring interface creating resources for constructing the target application interface from the server;
and generating the latest interface creation data for constructing the target application interface according to the interface creation resources based on the target front-end framework.
In an exemplary embodiment, the latest interface creation data generation unit may be further configured to:
and storing the generated latest interface creation data to the server as the historical interface creation data corresponding to the cross-platform application program.
The specific details of each module in the above apparatus have been described in detail in the method section, and details that are not disclosed may refer to the method section, and thus are not described again.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (10)

1. A target application interface generation method is characterized by comprising the following steps:
responding to an instruction for starting a cross-platform application program, and sending a query request to a server;
if the server is detected to store historical interface creating data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creating data from the server;
and generating a target application interface corresponding to the cross-platform application program according to the historical interface creating data.
2. The method of claim 1, wherein the historical interface creation data includes historical component creation instructions, and wherein generating the target application interface corresponding to the cross-platform application program according to the historical interface creation data includes:
and sending the historical component creating instruction to a rendering layer, so that the rendering layer executes the historical component creating instruction to generate a target application interface corresponding to the cross-platform application program.
3. The method of claim 1, wherein obtaining the historical interface creation data from the server further comprises:
and acquiring interface creation resources for constructing the target application interface from the server.
4. The method of claim 3, wherein generating the target application interface corresponding to the cross-platform application according to the historical interface creation data further comprises:
generating latest interface creation data for constructing the target application interface according to the interface creation resources on the basis of the target front-end framework;
comparing the latest interface creation data with the historical interface creation data to obtain updated interface creation data;
and dynamically updating the generated target application interface through the updating interface creation data.
5. The method according to claim 1, wherein if it is detected that the server stores historical interface creation data corresponding to the cross-platform application program according to the query request, acquiring the historical interface creation data from the server, further comprising:
if the server is detected not to store historical interface creating data corresponding to the cross-platform application program according to the query request, generating latest interface creating data for constructing the target application interface based on a target front-end framework;
and generating a target application interface corresponding to the cross-platform application program according to the latest interface creation data.
6. The method of claim 5, wherein generating up-to-date interface creation data for building the target application interface based on a target front-end framework comprises:
acquiring interface creating resources for constructing the target application interface from the server;
and generating the latest interface creation data for constructing the target application interface according to the interface creation resources based on the target front-end framework.
7. The method of claim 5, wherein if it is detected from the query request that the server does not store historical interface creation data corresponding to the cross-platform application program, generating latest interface creation data for constructing the target application interface based on a target front-end framework, further comprising:
and storing the generated latest interface creation data to the server as the historical interface creation data corresponding to the cross-platform application program.
8. A target application interface generating apparatus, comprising:
the query request sending module is used for responding to an instruction for starting the cross-platform application program and sending a query request to the server;
a historical interface creation data acquisition module, configured to acquire historical interface creation data from the server if it is detected that the server stores the historical interface creation data corresponding to the cross-platform application program according to the query request;
and the target application interface generating module is used for generating a target application interface corresponding to the cross-platform application program according to the historical interface creating data.
9. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1 to 7 via execution of the executable instructions.
CN202011580217.6A 2020-12-28 2020-12-28 Target application interface generation method and device, readable medium and electronic equipment Pending CN112596729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011580217.6A CN112596729A (en) 2020-12-28 2020-12-28 Target application interface generation method and device, readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011580217.6A CN112596729A (en) 2020-12-28 2020-12-28 Target application interface generation method and device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112596729A true CN112596729A (en) 2021-04-02

Family

ID=75202708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011580217.6A Pending CN112596729A (en) 2020-12-28 2020-12-28 Target application interface generation method and device, readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112596729A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090118A (en) * 2021-11-11 2022-02-25 北京百度网讯科技有限公司 Method, device and equipment for starting small program and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2343199A1 (en) * 2000-09-07 2002-03-07 Techfirm Inc. Information distribution server system, information distribution method, and recording medium
CN109375918A (en) * 2018-11-23 2019-02-22 天津字节跳动科技有限公司 Interface rendering method, device, electronic equipment and the storage medium of small routine
CN109976823A (en) * 2017-12-27 2019-07-05 Tcl集团股份有限公司 A kind of application program launching method, device and terminal device
CN112114913A (en) * 2020-07-27 2020-12-22 广东太平洋互联网信息服务有限公司 Application program interface updating method and device, computer equipment and storage medium
CN112114808A (en) * 2020-09-29 2020-12-22 深圳市欢太科技有限公司 Page rendering method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2343199A1 (en) * 2000-09-07 2002-03-07 Techfirm Inc. Information distribution server system, information distribution method, and recording medium
CN109976823A (en) * 2017-12-27 2019-07-05 Tcl集团股份有限公司 A kind of application program launching method, device and terminal device
CN109375918A (en) * 2018-11-23 2019-02-22 天津字节跳动科技有限公司 Interface rendering method, device, electronic equipment and the storage medium of small routine
CN112114913A (en) * 2020-07-27 2020-12-22 广东太平洋互联网信息服务有限公司 Application program interface updating method and device, computer equipment and storage medium
CN112114808A (en) * 2020-09-29 2020-12-22 深圳市欢太科技有限公司 Page rendering method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090118A (en) * 2021-11-11 2022-02-25 北京百度网讯科技有限公司 Method, device and equipment for starting small program and storage medium
CN114090118B (en) * 2021-11-11 2023-09-15 北京百度网讯科技有限公司 Method, device, equipment and storage medium for starting applet

Similar Documents

Publication Publication Date Title
CN109062563B (en) Method and device for generating page
CN110263277B (en) Page data display method, page data updating device, page data equipment and storage medium
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN110098998B (en) Method and apparatus for processing information
CN111443909B (en) Method and device for generating page
WO2018177032A1 (en) Method and device for processing response data, client device and electronic device
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111694629A (en) Information display method and device and electronic equipment
US11095957B2 (en) Method and apparatus for publishing information, and method and apparatus for processing information
CN113760438A (en) Page display method and device for webpage application
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
CN110618768A (en) Information presentation method and device
CN112596729A (en) Target application interface generation method and device, readable medium and electronic equipment
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN113220374A (en) Software processing method and device
CN111124523A (en) Method and apparatus for initializing applications
CN110806967A (en) Unit testing method and device
CN115292635A (en) Page floor data display method, device, equipment and computer readable medium
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN113791777A (en) Picture display method and device, computer readable storage medium and electronic equipment
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN112860447A (en) Interaction method and system between different applications
CN114253520B (en) Interface code generation method and device
CN115827415B (en) System process performance test method, device, equipment and computer 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