CN114489681A - Mobile terminal cross-platform development system and method based on browser kernel - Google Patents
Mobile terminal cross-platform development system and method based on browser kernel Download PDFInfo
- Publication number
- CN114489681A CN114489681A CN202210359007.7A CN202210359007A CN114489681A CN 114489681 A CN114489681 A CN 114489681A CN 202210359007 A CN202210359007 A CN 202210359007A CN 114489681 A CN114489681 A CN 114489681A
- Authority
- CN
- China
- Prior art keywords
- page
- application
- browser kernel
- file
- starting time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a mobile end cross-platform development system and method based on a browser kernel, and belongs to the technical field of computer software development. The system comprises a source code compiling module, a packaging and packaging module, an application manager, a page manager, a loader, a browser kernel selecting module and a communication bridge; according to the method, abstract program source codes can be defined, the source codes are compiled through a compiler, the compiled files are packaged, the iOS and the Android application manager are unpacked and analyzed, the files are loaded, resources are distributed, the page manager creates a program running environment and renders interfaces through a browser kernel. By the method, the code can be compiled once, and the application program capable of running on a plurality of platforms can be obtained, so that the development efficiency is improved, the development experience is improved, and the development cost is saved.
Description
Technical Field
The invention relates to the technical field of computer software development, in particular to a mobile end cross-platform development system and a mobile end cross-platform development method based on a browser kernel.
Background
The development of the application software is highly related to the running environment of the application software, the currently mainstream mobile terminal operating systems are iOS and Android, the running environments of the two operating systems are greatly different, and the development languages are greatly different. Therefore, the mainstream development mode in the industry at present is to respectively develop software for two operating systems, namely to develop an iOS application program by using Objective-C or swift language; android applications are developed using JAVA or Kotlin language. The development mode requires developers to master multiple programming languages or developers who master different development languages respectively complete different application developments. For the same software requirement, multiple manpower resources and time are used, multiple codes are compiled, multiple application programs are generated, manpower resource waste is caused, development efficiency is reduced, and maintenance cost is improved.
Currently, the cross-platform scheme in the industry is mainly divided into three technical schemes: web technology, runtime bridging, native rendering, self-rendering engine; the Web technology inherits the development mode of the traditional Web application, but all the capabilities are processed by the browser, most of the Web technology depends on the network environment, the offline operation cannot be performed, a certain performance bottleneck exists, and finally the user experience of the software is poor; when the system runs, bridging is performed, and the performance of the native rendering is improved to a certain extent compared with the Web technology, but development difference caused by difference of operating systems still exists, so that a developer needs to process the native rendering by himself, and development experience is poor; the self-rendering engine is excellent in performance, but because the self-rendering engine adopts a special rendering engine and uses a unique grammar and development framework, a developer cannot develop the self-rendering engine by using a known programming language, and the development cost is still high.
Disclosure of Invention
The present invention is directed to a system and a method for mobile cross-platform development based on a browser kernel, so as to solve the problems in the background art.
In order to solve the technical problems, the invention provides the following technical scheme:
a mobile terminal cross-platform development method based on a browser kernel comprises the following steps:
s1, defining abstract application program source codes, and compiling the source codes through a compiler;
s2, packaging and packaging the compiled file, entering a packager, sending a complete code packet to an application manager by the packager, and unpacking and analyzing by the application manager;
s3, the page manager allocates resources, creates a program runtime environment, and renders the interface through the browser kernel;
and S4, the communication bridge is used for being responsible for communication between the runtime environment and the native application bottom layer, the developer code transmits the signaling to the communication bridge through an interface provided by the communication bridge, and the communication bridge forwards the signaling to the bottom layer operating system and calls the bottom layer function of the operating system.
According to the above technical solution, the source code of the application program defining the abstraction includes:
making abstract definition for application software, wherein the application software is composed of a plurality of pages, and the source code of the application program of each page comprises: html files, css files, js files, json files;
the html file is used for describing an interface view structure of a page and declaring a binding relationship with a style and logic;
the css file is used for describing the presentation style of the page, such as color, size and the like;
the js file is used for describing the logic of the page;
the json file is used for describing the relationship and the additional attribute between pages; the json file comprises
Json, which describes the page path, title, name of all pages under the application.
According to the technical scheme, the compiler is used for reading all source code files, analyzing contents and generating executable page files, and the compiler injects style, logic reference indexes, communication bridge calling methods and component library calling indexes into the executable page files in the compiling process;
the packaging device is used for gathering and arranging the executable page file generated by the compiler, collecting application dependence, and carrying out isolation processing on the component styles related to the page to finally form a code package;
the application manager is responsible for storing the code packet to a specified runtime program directory during the runtime of the application, and is responsible for starting, closing, updating and communication among applications of each application;
the application manager further comprises a packet parser;
the package parser is responsible for parsing the code package, parsing the configuration file into runtime data, and mapping the actual runtime path with the configuration path.
The packet parser extracts the code packet file in the sandbox directory, reads the configuration file therein, establishes a mapping relation table by traversing the page configuration in the configuration file and the path in the actual sandbox directory, and simultaneously establishes an actual directory path index table for each executable file in the code packet.
According to the technical scheme, the page manager is responsible for managing pages in a single application, controlling the rendering sequence of the pages, processing the jump relation among the pages, and creating and destroying a runtime environment according to configuration;
the page manager creates a runtime environment for each page;
the page manager stores page data by using a stack structure, when a new page is opened, a page file is pressed from the bottom of a page stack, and the pressed page file is rendered at the top of a view; when a page which already exists in the page stack is opened, the opened page file is adjusted to the bottom of the page stack so as to be rendered at the top of the view;
when the number of the pages reaches K, or a developer specifies to close the pages, the page manager removes the specified page file from the page stack according to the mapping relation, wherein K is a settable constant.
According to the technical scheme, the method further comprises a browser kernel selection method:
acquiring the starting time of a native application and the starting time of a multi-terminal application under any browser kernel;
the native application starting time refers to the starting time of native application software running under a native system;
the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals;
in the present application, the native application and the multi-end application represent applications in the same system, for example, in an IOS system, software a developed based on the IOS system cannot be adapted to an Android system, and at this time, if the Android system also needs to use software a, the Android system needs to be re-developed, but in the current technology, the software a is also the native application of the IOS system, and in the present application, based on the method of the present application, a code can be written only once during the development process, that is, a software B can be generated, which can be adapted to the IOS system and the Android system at the same time (substantially, software B and software a are the same application software, and here, only for the purpose of distinguishing), and software B is called as a multi-end application, and the application open time of software B in the IOS system is slightly different from the application open time of software a in the IOS system, because the native software is better adapted.
Constructing a set of startup time difference data, denoted asWhereinRespectively obtaining the time difference value of the native application starting time and the multi-terminal application starting time under any browser kernel;
constructing a browser kernel set, wherein the browser kernel set comprises all browser kernels adapted to interface rendering;
acquiring a starting time difference value data set of all browser kernels in a browser kernel set;
according to the starting time difference data set of any browser kernel, taking n groups of data as historical data, constructing a prediction model, and predicting to obtain the starting time difference data of the (n + 1) th time of the browser kernel:
constructing an original data structure column by using data in the starting time difference data set, and recording the original data structure column as(ii) a Wherein={X0(1),X0(2),X0(3),……,X0(n)};
Satisfies the following conditions:
wherein m =1, 2, … …, n;
to pairProcessing, calculating in a manner of being close to the mean value, and recording as Z1I.e. Z1={Z1(1),Z1(2),Z1(3),……,Z1(n)};
Satisfies the following conditions:
the calculation results are entered into a matrix B, Y;
wherein the content of the first and second substances,
wherein the content of the first and second substances,for the development coefficient, b is the ash contribution;
solving to obtain:
the predicted value can be measured:
according to the matrix and the least square method, the following calculation results:
setting m = n, and substituting into a prediction model to obtainIs marked as browser kernel numberSecondary startup time difference prediction data;
in the application, the difference value of the starting time belongs to a data type containing uncertain factors, so a grey prediction mode is adopted, the degree of dissimilarity of development trends among system factors is identified, namely, correlation analysis is carried out, the original data is generated and processed to find the law of system change, a data sequence with strong regularity is generated, and then a corresponding differential equation model is established, so that the condition of future development trends of objects is predicted. By using the method, the accuracy can be effectively improved, so that the gap between the native application and the multi-terminal application is further reduced in the future development, and the completely consistent ranks are achieved.
Through a prediction model, calculating to obtainIn the second case, the starting time difference prediction data of all the browser kernels are selected, and the browser kernel with the minimum data is selected as the firstAnd a browser kernel for secondary interface rendering.
A mobile end cross-platform development system based on a browser kernel comprises a source code compiling module, a packaging and packaging module, an application manager, a page manager, a loader, a browser kernel selecting module and a communication bridge;
the source code compiling module is used for defining abstract application program source codes; the packaging and packaging module is used for compiling the source code through the compiler, packaging and packaging the compiled file and entering the packager, and the packager sends a complete code packet to the application manager; the application manager is used for unpacking and analyzing the complete code packet sent by the packer; the page manager is used for allocating resources, creating a program runtime environment and rendering an interface through a browser kernel; the loader is used for loading the executable code according to the mapping path and providing the executable code for the page manager to inject the runtime environment; the browser kernel selection module is used for selecting the browser kernel with the lowest application starting time difference value according to the constructed prediction model; the communication bridge is used for communicating the runtime environment with the native application bottom layer, and two ends of the bridge are respectively arranged in the page runtime environment and the native runtime environment.
According to the technical scheme, the source code compiling module comprises a software definition sub-module, a page composition sub-module and a compiler;
the software definition submodule is used for making abstract definition on the application software; the page composition submodule is used for grouping application software into a plurality of pages, and the application program source code of each page comprises: html files, css files, js files, json files; the compiler is used for reading all source code files, analyzing contents and generating an executable page file, and the compiler injects style, logical reference indexes, communication bridge calling methods and component library calling indexes into the executable page file in the compiling process;
the html file is used for describing an interface view structure of a page and declaring a binding relationship with a style and logic;
the css file is used for describing the presentation style of the page, such as color, size and the like;
the js file is used for describing the logic of the page;
the json file is used for describing the relationship and the additional attribute between pages; the json file comprises
Json, which describes the page path, title, name of all pages under the application.
According to the technical scheme, the application manager is responsible for storing the code packages to the appointed runtime program directory during the runtime of the application, and is responsible for starting, closing, updating and communication among applications of each application;
the application manager further comprises a packet parser;
the package parser is responsible for parsing the code package, parsing the configuration file into runtime data, and mapping an actual runtime path and a configuration path.
According to the technical scheme, the page manager is responsible for managing pages in a single application, controlling the rendering sequence of the pages, processing the jump relation between the pages, and creating and destroying a runtime environment according to configuration;
the page manager creates a runtime environment for each page;
the page manager stores page data by using a stack structure, when a new page is opened, a page file is pressed from the bottom of a page stack, and the pressed page file is rendered at the top of a view; when a page which already exists in the page stack is opened, the opened page file is adjusted to the bottom of the page stack so as to be rendered at the top of the view;
when the number of the pages reaches K, or a developer specifies to close the pages, the page manager removes the specified page file from the page stack according to the mapping relation, wherein K is a settable constant.
According to the technical scheme, the browser kernel selection module comprises a data analysis submodule and a prediction selection submodule;
the data analysis submodule is used for acquiring historical data, acquiring a difference value between the starting time of a native application under any browser kernel and the starting time of a multi-terminal application, and analyzing the historical data; the native application starting time refers to the starting time of the running native application software under the native system; the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals; and the prediction selection submodule is used for constructing a prediction model, acquiring a starting time prediction difference value of the application software of each browser kernel according to the prediction model, and selecting the minimum value as the browser kernel of the interface rendering.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a method which can inherit Web development modes and languages and can ensure certain performance experience. The method can realize lower development cost, can obtain a plurality of application software capable of running on a plurality of platforms by developing once, and has good running performance and basically consistent multi-end user experience;
the invention provides a series of automatic flow tools and highly abstracts the bottom logic, and the final result can be generated without the developer paying attention to the bottom;
meanwhile, the invention is also accompanied with a browser kernel selection mode, so that the running performance gap can be further reduced, and the user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a mobile-end cross-platform development system and method based on a browser kernel according to the present invention;
FIG. 2 is a schematic diagram of a system product application structure of the mobile-end cross-platform development system and method based on a browser kernel according to the present invention;
FIG. 3 is a schematic diagram illustrating the working principle of a packet parser of the mobile-end cross-platform development system and method based on the browser kernel according to the present invention;
FIG. 4 is a schematic diagram illustrating the working principle of a page manager of the mobile-end cross-platform development system and method based on the browser kernel according to the present invention;
FIG. 5 is a schematic diagram illustrating the working principle of a communication bridge of the mobile-end cross-platform development system and method based on the browser kernel according to the present invention;
FIG. 6 is a schematic diagram of a part of iOS device preview of an embodiment of a system and method for mobile-end cross-platform development based on a browser kernel according to the present invention;
fig. 7 is a schematic diagram of previewing part of Android devices in the mobile-end cross-platform development system and method based on the browser kernel.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 to 7, in the present embodiment:
the main description is the development process and the operation result using the system. Taking a music player as an example, the basic using method and capability of the system can be represented to a certain extent:
defining an abstract application program source code, compiling the source code through a compiler to obtain executable files of two pages as shown in the following table 1, and automatically packaging the executable files by a system;
name of page Balance | Page content |
Play list Watch (A) | The page provides a music list, displays pictures and music titles |
Player | The music player comprises a plurality of pictures and is used for displaying buttons of the player, the playing button calls the communication bridge interface to send music playing signaling, the pause button calls the communication bridge interface to send pause broadcasting Play signaling |
TABLE 1
Packaging and packaging the compiled file and entering a packager, gathering and arranging executable page files generated by the compiler by the packager, collecting application dependence, carrying out isolation processing on component styles related to the page to finally form a code packet, sending the complete code packet to an application manager by the packager, and unpacking and analyzing by the application manager;
the package analyzer is responsible for disassembling the code package, analyzing the configuration file into runtime data, and mapping the actual runtime path and the configuration path;
the method comprises the steps that a packet parser extracts code packet files in a sandbox directory, reads configuration files in the code packet files, establishes a mapping relation table by traversing page configuration in the configuration files and paths in an actual sandbox directory, and simultaneously establishes an actual directory path index table for each executable file in the code packet;
the page manager allocates resources, creates a program runtime environment, and renders the interface through the browser kernel;
selecting a browser kernel:
acquiring the starting time of a native application and the starting time of a multi-terminal application under any browser kernel;
the native application starting time refers to the starting time of native application software running under a native system;
the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals;
constructing a set of startup time difference data, denoted asWhereinRespectively obtaining the time difference value of the native application starting time and the multi-terminal application starting time under any browser kernel;
constructing a browser kernel set, wherein the browser kernel set comprises all browser kernels adapted to interface rendering; comprises a Trident kernel, a Gecko kernel, a WebKit kernel and a Blink kernel;
acquiring a starting time difference value data set of all browser kernels in a browser kernel set;
according to the starting time difference data set of any browser kernel, taking n groups of data as historical data, constructing a prediction model, and predicting to obtain the starting time difference data of the (n + 1) th time of the browser kernel:
constructing an original data structure column by using data in the starting time difference data set, and recording the original data structure column as(ii) a Wherein={X0(1),X0(2),X0(3),……,X0(n)};
Satisfies the following conditions:
wherein m =1, 2, … …, n;
to pairProcessing, calculating in a manner of being close to the mean value, and recording as Z1I.e. Z1={Z1(1),Z1(2),Z1(3),……,Z1(n)};
Satisfies the following conditions:
the calculation results are entered into a matrix B, Y;
wherein, the first and the second end of the pipe are connected with each other,
wherein the content of the first and second substances,for the development coefficient, b is the ash contribution;
solving to obtain:
the predicted value can be measured:
according to the matrix and the least square method, the following calculation results:
setting m = n, and substituting into a prediction model to obtainIs marked as browser kernel numberSecondary startup time difference prediction data;
through a prediction model, calculating to obtainIn the next case, the starting time difference value prediction data of all browser kernels are selected, and the browser with the minimum data is selectedThe kernel is asAnd a browser kernel for secondary interface rendering.
The communication bridge is used for being responsible for communication between the runtime environment and the native application bottom layer, the developer codes transmit the signaling to the communication bridge through an interface provided by the communication bridge, and the communication bridge forwards the signaling to the bottom layer operating system to call the bottom layer functions of the operating system.
The player is processed on the iOS device and the Android device, respectively, and pages are generated as shown in fig. 6 and 7.
In this example 2:
the system comprises a source code compiling module, a packaging and packaging module, an application manager, a page manager, a loader, a browser kernel selecting module and a communication bridge;
the source code compiling module is used for defining abstract application program source codes; the packaging and packaging module is used for compiling the source code through the compiler, packaging and packaging the compiled file and entering the packager, and the packager sends a complete code packet to the application manager; the application manager is used for unpacking and analyzing the complete code packet sent by the packer; the page manager is used for allocating resources, creating a program runtime environment and rendering an interface through a browser kernel; the loader is used for loading the executable code according to the mapping path and providing the executable code for the page manager to inject the runtime environment; the browser kernel selection module is used for selecting the browser kernel with the lowest application starting time difference value according to the constructed prediction model; the communication bridge is used for communicating the runtime environment with the native application bottom layer, and two ends of the bridge are respectively arranged in the page runtime environment and the native runtime environment.
The source code compiling module comprises a software definition sub-module, a page composition sub-module and a compiler;
the software definition submodule is used for making abstract definition on the application software; the page composition submodule is used for grouping application software into a plurality of pages, and the application program source code of each page comprises: html files, css files, js files, json files; the compiler is used for reading all source code files, analyzing contents and generating an executable page file, and the compiler injects style, logical reference indexes, communication bridge calling methods and component library calling indexes into the executable page file in the compiling process;
the html file is used for describing an interface view structure of a page and declaring a binding relationship with a style and logic;
the css file is used for describing the presentation style of the page;
the js file is used for describing the logic of the page;
the json file is used for describing the relationship and the additional attribute between pages; the json file comprises
Json, which describes the page path, title, name of all pages under the application.
The application manager is responsible for storing the code packet to a specified runtime program directory during the runtime of the application, and is responsible for starting, closing, updating and communication among applications of each application;
the application manager further comprises a packet parser;
the package parser is responsible for parsing the code package, parsing the configuration file into runtime data, and mapping an actual runtime path and a configuration path.
The page manager is responsible for managing pages in a single application, controlling the rendering sequence of the pages, processing the jump relation among the pages, and creating and destroying a runtime environment according to configuration;
the page manager creates a runtime environment for each page;
the page manager stores page data by using a stack structure, when a new page is opened, a page file is pressed from the bottom of a page stack, and the pressed page file is rendered at the top of a view; when a page which already exists in the page stack is opened, the opened page file is adjusted to the bottom of the page stack so as to be rendered at the top of the view;
when the number of the pages reaches K, or a developer specifies to close the pages, the page manager removes the specified page file from the page stack according to the mapping relation, wherein K is a settable constant.
The browser kernel selection module comprises a data analysis submodule and a prediction selection submodule;
the data analysis submodule is used for acquiring historical data, acquiring a difference value between the starting time of a native application under any browser kernel and the starting time of a multi-terminal application, and analyzing the historical data; the native application starting time refers to the starting time of the running native application software under the native system; the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals; the prediction selection submodule is used for constructing a prediction model, obtaining a prediction difference value of the starting time of the application software of each browser kernel according to the prediction model, and selecting the minimum value as the browser kernel of the current interface rendering.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A mobile end cross-platform development method based on a browser kernel is characterized in that: the method comprises the following steps:
s1, defining abstract application program source codes, and compiling the source codes through a compiler;
s2, packaging and packaging the compiled file, entering a packager, sending a complete code packet to an application manager by the packager, and unpacking and analyzing by the application manager;
s3, the page manager allocates resources, creates a program runtime environment, and renders the interface through the browser kernel;
and S4, the communication bridge is used for being responsible for communication between the runtime environment and the native application bottom layer, the developer code transmits the signaling to the communication bridge through an interface provided by the communication bridge, and the communication bridge forwards the signaling to the bottom layer operating system and calls the bottom layer function of the operating system.
2. The mobile end cross-platform development method based on the browser kernel as claimed in claim 1, wherein:
the abstract defining application source code comprises:
making abstract definition for application software, wherein the application software is composed of a plurality of pages, and the source code of the application program of each page comprises: html files, css files, js files, json files;
the html file is used for describing an interface view structure of a page and declaring a binding relationship with a style and logic;
the css file is used for describing the presentation style of the page;
the js file is used for describing the logic of the page;
the json file is used for describing the relationship and the additional attribute between pages; the json file comprises
Json, which describes the page path, title, name of all pages under the application.
3. The mobile end cross-platform development method based on the browser kernel as claimed in claim 1, wherein:
the compiler is used for reading all source code files, analyzing contents and generating an executable page file, and the compiler injects style, logical reference indexes, communication bridge calling methods and component library calling indexes into the executable page file in the compiling process;
the packaging device is used for collecting and arranging the executable page file generated by the compiler, collecting application dependence, and carrying out isolation processing on the component style related to the page to finally form a code package;
the application manager is responsible for storing the code packet to a specified runtime program directory during the runtime of the application, and is responsible for starting, closing, updating and communication among applications of each application;
the application manager further comprises a packet parser;
the package parser is responsible for parsing the code package, parsing the configuration file into runtime data, and mapping an actual runtime path and a configuration path.
4. The mobile end cross-platform development method based on the browser kernel as claimed in claim 1, wherein:
the page manager is responsible for managing pages in a single application, controlling the rendering sequence of the pages, processing the jump relation among the pages, and creating and destroying a runtime environment according to configuration;
the page manager creates a runtime environment for each page;
the page manager stores page data by using a stack structure, when a new page is opened, a page file is pressed from the bottom of a page stack, and the pressed page file is rendered at the top of a view; when a page which already exists in the page stack is opened, the opened page file is adjusted to the bottom of the page stack so as to be rendered at the top of the view;
when the number of the pages reaches K, or a developer specifies to close the pages, the page manager removes the specified page file from the page stack according to the mapping relation, wherein K is a settable constant.
5. The mobile end cross-platform development method based on the browser kernel as claimed in claim 1, wherein: the method also comprises a browser kernel selection method:
acquiring the starting time of a native application and the starting time of a multi-terminal application under any browser kernel;
the native application starting time refers to the starting time of the running native application software under the native system;
the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals;
constructing a set of startup time difference data, denoted asWhereinRespectively obtaining the time difference value of the native application starting time and the multi-terminal application starting time under any browser kernel;
constructing a browser kernel set, wherein the browser kernel set comprises all browser kernels adapted to interface rendering;
acquiring a starting time difference value data set of all browser kernels in a browser kernel set;
according to the starting time difference data set of any browser kernel, taking n groups of data as historical data, constructing a prediction model, and predicting to obtain the starting time difference data of the (n + 1) th time of the browser kernel:
constructing an original data structure column by using data in the starting time difference data set, and recording the original data structure column as(ii) a Wherein={X0(1),X0(2),X0(3),……,X0(n)};
Satisfies the following conditions:
wherein m =1, 2, … …, n;
to pairProcessing, calculating in a manner of being close to the mean value, and recording as Z1I.e. Z1={Z1(1),Z1(2),Z1(3),……,Z1(n)};
Satisfies the following conditions:
the calculation results are entered into a matrix B, Y;
wherein the content of the first and second substances,
wherein the content of the first and second substances,for the development coefficient, b is the ash contribution;
solving can be carried out as follows:
the predicted value can be measured:
according to the matrix and the least square method, the following calculation results:
setting m = n, and substituting into a prediction model to obtainIs marked as browser kernel numberSecondary startup time difference prediction data;
6. A mobile end cross-platform development system based on a browser kernel is characterized in that: the system comprises a source code compiling module, a packaging and packaging module, an application manager, a page manager, a loader, a browser kernel selecting module and a communication bridge;
the source code compiling module is used for defining abstract application program source codes; the packaging and packaging module is used for compiling the source code through the compiler, packaging and packaging the compiled file and entering the packager, and the packager sends a complete code packet to the application manager; the application manager is used for unpacking and analyzing the complete code packet sent by the packer; the page manager is used for allocating resources, creating a program runtime environment and rendering an interface through a browser kernel; the loader is used for loading the executable code according to the mapping path and providing the executable code for the page manager to inject the runtime environment; the browser kernel selection module is used for selecting the browser kernel with the lowest application starting time difference value according to the constructed prediction model; the communication bridge is used for communicating the runtime environment with the native application bottom layer, and two ends of the bridge are respectively arranged in the page runtime environment and the native runtime environment.
7. The browser kernel-based mobile end cross-platform development system according to claim 6, wherein: the source code compiling module comprises a software definition sub-module, a page composition sub-module and a compiler;
the software definition submodule is used for making abstract definition on the application software; the page composition submodule is used for grouping application software into a plurality of pages, and the application program source code of each page comprises: html files, css files, js files, json files; the compiler is used for reading all source code files, analyzing contents and generating an executable page file, and the compiler injects style, logical reference indexes, communication bridge calling methods and component library calling indexes into the executable page file in the compiling process;
the html file is used for describing an interface view structure of a page and declaring a binding relationship with a style and logic;
the css file is used for describing the presentation style of the page;
the js file is used for describing the logic of the page;
the json file is used for describing the relationship and the additional attribute between pages; the json file comprises
Json, which describes the page path, title, name of all pages under the application.
8. The browser kernel-based mobile end cross-platform development system according to claim 6, wherein: the application manager is responsible for storing the code packet to a specified runtime program directory during the runtime of the application, and is responsible for starting, closing, updating and communication among applications of each application;
the application manager further comprises a packet parser;
the package parser is responsible for parsing the code package, parsing the configuration file into runtime data, and mapping an actual runtime path and a configuration path.
9. The browser kernel-based mobile end cross-platform development system according to claim 6, wherein: the page manager is responsible for managing pages in a single application, controlling the rendering sequence of the pages, processing the jump relation among the pages, and creating and destroying a runtime environment according to configuration;
the page manager creates a runtime environment for each page;
the page manager stores page data by using a stack structure, when a new page is opened, a page file is pressed from the bottom of a page stack, and the pressed page file is rendered at the top of a view; when a page which already exists in the page stack is opened, the opened page file is adjusted to the bottom of the page stack so as to be rendered at the top of the view;
when the number of the pages reaches K, or a developer specifies to close the pages, the page manager removes the specified page file from the page stack according to the mapping relation, wherein K is a settable constant.
10. The browser kernel-based mobile end cross-platform development system of claim 6, wherein: the browser kernel selection module comprises a data analysis submodule and a prediction selection submodule;
the data analysis submodule is used for acquiring historical data, acquiring a difference value between the starting time of a native application under any browser kernel and the starting time of a multi-terminal application, and analyzing the historical data; the native application starting time refers to the starting time of the running native application software under the native system; the multi-terminal application starting time refers to the starting time of application software which is run under a native system and used by multiple terminals; and the prediction selection submodule is used for constructing a prediction model, acquiring a starting time prediction difference value of the application software of each browser kernel according to the prediction model, and selecting the minimum value as the browser kernel of the interface rendering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210359007.7A CN114489681B (en) | 2022-04-07 | 2022-04-07 | Mobile terminal cross-platform development system and method based on browser kernel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210359007.7A CN114489681B (en) | 2022-04-07 | 2022-04-07 | Mobile terminal cross-platform development system and method based on browser kernel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114489681A true CN114489681A (en) | 2022-05-13 |
CN114489681B CN114489681B (en) | 2022-06-28 |
Family
ID=81489194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210359007.7A Active CN114489681B (en) | 2022-04-07 | 2022-04-07 | Mobile terminal cross-platform development system and method based on browser kernel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114489681B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116126647A (en) * | 2023-04-17 | 2023-05-16 | 南京飓风引擎信息技术有限公司 | Data linkage analysis system suitable for digital enterprises |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030226145A1 (en) * | 2002-05-31 | 2003-12-04 | Marsh David J. | Entering programming preferences while browsing an electronic programming guide |
CN102843393A (en) * | 2011-06-22 | 2012-12-26 | 腾讯科技(深圳)有限公司 | Running device and method of network application |
CN108563475A (en) * | 2018-04-16 | 2018-09-21 | 百度在线网络技术(北京)有限公司 | Operation method, device and the storage medium of application program |
-
2022
- 2022-04-07 CN CN202210359007.7A patent/CN114489681B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030226145A1 (en) * | 2002-05-31 | 2003-12-04 | Marsh David J. | Entering programming preferences while browsing an electronic programming guide |
CN102843393A (en) * | 2011-06-22 | 2012-12-26 | 腾讯科技(深圳)有限公司 | Running device and method of network application |
CN108563475A (en) * | 2018-04-16 | 2018-09-21 | 百度在线网络技术(北京)有限公司 | Operation method, device and the storage medium of application program |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116126647A (en) * | 2023-04-17 | 2023-05-16 | 南京飓风引擎信息技术有限公司 | Data linkage analysis system suitable for digital enterprises |
Also Published As
Publication number | Publication date |
---|---|
CN114489681B (en) | 2022-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Adler | R in a nutshell: A desktop quick reference | |
Seibel | Practical common lisp | |
US7827527B1 (en) | System and method of application development | |
Karrer et al. | Stacksplorer: Call graph navigation helps increasing code maintenance efficiency | |
CN102142016A (en) | Cross-browser interactivity recording, playback and editing | |
CN110286917A (en) | File packing method, device, equipment and storage medium | |
CN109976729B (en) | Storage and computing display globally configurable data analysis software architecture design method | |
CN113031932B (en) | Project development method, apparatus, electronic device and storage medium | |
US20110055744A1 (en) | Visual Linking of Elements to Model Attributes | |
CN114489681B (en) | Mobile terminal cross-platform development system and method based on browser kernel | |
Standridge et al. | TESS—the extended simulation support system | |
CN110083342A (en) | A kind of program creating method, device and computer readable storage medium | |
CN112818176B (en) | Data processing method, device, equipment and storage medium | |
CN107547944A (en) | Interface realizing method and device, set top box | |
EP2756396B1 (en) | Simulation of static members and parameterized constructors on an interface-based api | |
CN102006512B (en) | Digital television HSML (Hypertext Service Markup Language) analysis method and system applying SAX (The Simple API for XML) analysis engine | |
Flynn et al. | On Instruction Sets and Their Fornmts | |
CN116781965B (en) | Virtual article synthesis method, apparatus, electronic device, and computer-readable medium | |
Ward et al. | Structured Development for Real-Time Systems, Vol. III: Implementation Modeling Techniques | |
CN117348876B (en) | Application development method, system and medium based on freeRTOS embedded system | |
Ramgir et al. | Java 9 High Performance: Practical techniques and best practices for optimizing Java applications through concurrency, reactive programming, and more | |
US11847477B1 (en) | Techniques for natively interpreting logic across disparate platforms | |
Reiser | BAIL | |
Marum | Dependency-based Reactive Change Propagation Design Pattern Applied to Environments with High Unpredictability | |
Pålsson | Cross Platform Development tools for mobile applications, a performance and cost evaluation |
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 |