WO2021174538A1 - 应用处理方法及相关装置 - Google Patents

应用处理方法及相关装置 Download PDF

Info

Publication number
WO2021174538A1
WO2021174538A1 PCT/CN2020/078244 CN2020078244W WO2021174538A1 WO 2021174538 A1 WO2021174538 A1 WO 2021174538A1 CN 2020078244 W CN2020078244 W CN 2020078244W WO 2021174538 A1 WO2021174538 A1 WO 2021174538A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
application
binary code
platform
installation
Prior art date
Application number
PCT/CN2020/078244
Other languages
English (en)
French (fr)
Inventor
黄哲东
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2020/078244 priority Critical patent/WO2021174538A1/zh
Priority to CN202080095481.2A priority patent/CN115039069A/zh
Publication of WO2021174538A1 publication Critical patent/WO2021174538A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • 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

Definitions

  • This application relates to the technical field of mobile terminals, and in particular to an application processing method and related devices.
  • UI design refers to the overall design of human-computer interaction, operation logic, and beautiful interface of application software. Good UI design can not only make application software have personality and taste, but also make application software The operation becomes simple and comfortable, reflecting the characteristics of the application software, so more and more UI design applications have emerged.
  • the existing UI design application requires the electronic device to download the UI design application locally, and then run the UI design application for design editing. It cannot realize the characteristics of online installation-free, instant design, and multi-person collaborative use.
  • the existing web version of the UI design Although the application can be used online without installation, the picture editor for high-frequency processing pixel data calculation has poor support performance, prone to stalls, frame drops, etc., which greatly affects the user's real-time editing sense and user experience.
  • the embodiments of the present application provide an application processing method and related devices to realize online real-time collaborative UI design by multiple people.
  • an embodiment of the present application provides an application processing method, which is characterized in that it is applied to an electronic device, and the method includes:
  • an installation-free package of a user interface UI design application through an installation-free platform, the installation-free package including glue code and binary code generated according to the UI design application code;
  • the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code and calling the installation-free platform after the loading is completed Compile the binary code and cache the compiled binary code;
  • an embodiment of the present application provides an application processing device, which is applied to an electronic device, the electronic device includes an eye tracking component; the application processing device includes a processing unit and a communication unit, wherein,
  • the processing unit is configured to obtain an installation-free package of a user interface UI design application through the communication unit, the installation-free package includes glue code and binary code generated according to the UI design application code;
  • the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the platform interface of the installation-free platform after the loading is completed Compiling the binary code, and caching the compiled binary code; and for running the pre-processed binary code, and displaying the application interface of the UI design application on the installation-free platform.
  • an embodiment of the present application provides an electronic device, including a controller, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be controlled by the above
  • the above program includes instructions for executing the steps in any method in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute On the one hand, part or all of the steps described in any method.
  • the embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in this application.
  • the computer program product may be a software installation package.
  • the electronic device first obtains the installation-free package of the user interface UI design application through the installation-free platform, the installation-free package includes glue code and binary code generated according to the UI design application code, and secondly ,
  • the installation-free package is running, the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the installation-free package after the loading is completed
  • the platform interface of the platform compiles the binary code, caches the compiled binary code, and finally runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the installation-free platform can realize the online real-time collaboration of multiple people to complete the UI design, which is beneficial to help Users get a better sense of real-time editing experience.
  • FIG. 1A is a schematic flowchart of an application processing method provided by an embodiment of the present application.
  • FIG. 1B is a schematic diagram of the workflow of a glue code provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another application processing method provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a block diagram of the functional unit composition of an application processing device provided by an embodiment of the present application.
  • Electronic devices may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices, or other processing accuracy connected to a wireless modem.
  • User equipment User Equipment, UE
  • mobile station Mobile Station, MS
  • terminal device terminal device
  • the devices mentioned above are collectively referred to as electronic devices.
  • UI design tools require electronic devices to be downloaded locally before they can be used. After downloading the installation package of the UI design application, the UI design application needs to be installed first. UI design applications such as Photoshop and Sketch need to be installed before they can be used. Unable to provide online installation-free, instant design, multi-person collaboration and other functions, and the existing web-version UI design applications written in JavaScript language have poor support for image editors that require high-frequency processing of pixel data and data calculations. , The performance is poor, so it is easy to appear stuck and dropped frames, which affects the user's real-time editing perception and user experience. Therefore, this application proposes an application processing method in which C++ language is used to develop and write UI design applications for designers to perform UI design.
  • the UI design application code is separated into intensive calculation code and non-intensive calculation code, and the intensive calculation code is converted into binary code and glue code through tools, and the non-intensive calculation code is re-developed through JavaScript language, and then the binary code, Glue code, re-developed non-intensive calculation code, and UI design application materials are packaged to obtain an installation-free package for UI design applications.
  • the installation-free package can save the application installation process and directly use the UI design application based on the installation-free platform.
  • glue code is also called glue code. Its purpose is to glue code that may not be compatible. Glue code does not implement any function required by the program. It usually appears in the code, making it out of existing libraries or programs. Interoperability in the external function interface, and the glue code is very efficient in the rapid prototyping environment, allowing several components to be quickly integrated into a single language or framework.
  • Binary code is a code composed of two basic characters "0" and "1". In this application, the intensive calculation part of the UI design application code written in C++ will be converted into binary code, and the corresponding glue will be generated at the same time Code and glue code are mainly responsible for two things.
  • the code size will be reduced.
  • the binary code will be cached after the binary code is compiled, so as to achieve no installation and speed up the startup speed. Users can quickly experience the ability of online UI design.
  • the execution efficiency is close to that of the native code, and the efficiency of each frame is higher, which helps to reduce the occurrence of jams and frame drops, helps users better realize real-time editing UI design, and improves user experience.
  • FIG. 1A is a schematic flowchart of an application processing method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, this application processing method includes:
  • the electronic device obtains an installation-free package of a user interface UI design application through an installation-free platform, where the installation-free package includes glue code and binary code generated according to the UI design application code.
  • the installation-free platform can include various application platforms or web platforms.
  • the installation-free platform does not need to install the installation-free package of the UI design application to realize the use of the UI design application.
  • the UI design application is similar to a plug-in or a small program, based on Free to install the platform to achieve operation.
  • the installation-free platform only needs to obtain the installation-free package of the UI design application, which includes the glue code and binary code generated according to the application code of the UI design application.
  • the electronic device needs to run the UI design application based on the installation-free platform.
  • the installation-free platform runs the installation-free package for the first time, it needs to preprocess the binary code through the glue code in the installation-free package.
  • the preprocessing includes the use of glue.
  • the installation-free platform directly takes out the compiled binary code from the cache, directly runs and displays it, and realizes the functions of efficient operation, click-to-open, and real-time online UI design.
  • S103 The electronic device runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the UI design application when running the free installation package, after the binary code is preprocessed by the glue code in the free installation package, the UI design application can be started through the free installation platform, and the application page of the UI design application can be displayed.
  • the electronic device first obtains the installation-free package of the user interface UI design application through the installation-free platform, the installation-free package includes glue code and binary code generated according to the UI design application code, and secondly ,
  • the installation-free package is running, the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the installation-free package after the loading is completed
  • the platform interface of the platform compiles the binary code, caches the compiled binary code, and finally runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the installation-free platform can realize the online real-time collaboration of multiple people to complete the UI design, which is beneficial to help Users get a better sense of real-time editing experience.
  • the running the preprocessed binary code includes: detecting whether there is a compiled binary code cache; if so, running the compiled binary code in the cache; if not, loading The binary code, and after the loading is completed, the platform interface is called to compile the loaded binary code, and the compiled binary code is run.
  • the cache when running the pre-processed binary code, it is necessary to check whether there is a compiled binary code cache. If the binary code has been compiled, there will be a compiled binary code cache, which eliminates the need to install the platform and use the UI for the first time In the case of designing an application, the cache will not exist, if it is not used for the first time, the cache will exist. Before running the binary code, you need to check whether there is a compiled binary code cache. If it exists, you can directly run the compiled binary code in the cache. If it does not exist, it means that the binary code has not been compiled. At this time, you need to load the binary code. After the loading is completed, the platform interface is called to compile the loaded binary code, and the UI design application can be started by running the compiled binary code.
  • the glue code needs to be called to load the binary code, and after the binary code is loaded, the platform interface is called to compile the loaded binary code, and the compiled binary code is run.
  • the UI design application can be launched.
  • the binary code needs to be loaded, compiled and cached after the loading is completed, if it is not the first time the UI design application is used. Then, the compiled binary code can be run directly through the cache to start the UI design application and realize the out-of-the-box use of the UI design application. Therefore, it is necessary to check whether there is a compiled binary code cache when running binary code.
  • the running the compiled binary code in the cache includes: detecting whether the cache is updated; if so, loading the binary code, and calling the platform interface to pair the loaded binary code The code is compiled, and the binary code is run after the compilation is completed.
  • the initial code of the UI design application is written in the first preset programming language.
  • the initial code can be separated into intensive calculation code and non-intensive calculation code through the extraction algorithm, and then the intensive calculation code is converted into binary code.
  • glue code at the same time use the second preset programming language to rewrite the non-intensive calculation code, and package the binary code, glue code, rewritten non-intensive calculation code and UI design materials to get a free installation package for UI design applications , Packing through the packaging tool provided by the installation-free platform, you can generate an installation package that can run on the installation-free platform.
  • UI design materials include icons, pictures, etc. The installation-free package does not need to be installed with the application installation process, and the code in the installation package can be run directly to start the UI design application.
  • the first preset programming language is C++ programming language
  • the second preset programming language is JavaScript programming language.
  • the UI design application developed using the C++ programming language has lower cost.
  • the drawing of the drawing board involved in the UI design application includes the provision of drawing-related components, such as rectangles and other graphics, text, pictures, zoom and translation, and other transformations, which require real-time
  • the underlying code corresponding to these operations is intensive calculation code.
  • This part of the C++ code needs to be extracted. When extracting, you can quickly extract the intensive calculation by calculating vertex data, calculating coordinates, and calculating texture data. Code.
  • For non-intensive computing code use javascript to rewrite it to make it run on an installation-free platform.
  • the intensive calculation code can be converted into binary code and glue code, and the non-intensive calculation code can be rebuilt using the second programming language.
  • an installation-free package consisting of binary code, glue code, rewritten non-intensive calculation code, and UI design materials can be obtained, and the UI design application can be started without installation through the installation-free package.
  • the intensive calculation code is the code corresponding to the page drawing operation function in the UI design application initial code
  • the page drawing operation includes at least one of the following: graphics drawing operation, picture drawing Operation, line drawing operation, text drawing operation.
  • the page drawing operations in UI design applications include graphic drawing operations, such as drawing rectangles, circles and other graphics, picture drawing operations, line drawing operations, text drawing operations and other drawing operations.
  • the codes for implementing these drawing operations on the page are: Intensive calculation code, after extracting the intensive calculation code from the initial code of the UI design application, the intensive calculation code can be converted into binary code and glue code.
  • the intensive calculation code is extracted from the initial code of the UI design application.
  • the intensive calculation code can be converted into binary code and glue code. Since the intensive calculation code occupies the main part of the initial code of the UI design application, after this part of the code is compiled into binary code and glue code, the overall code volume is smaller, which is realized Code slimming function.
  • the glue code is used to obtain the memory mapping address of the platform capability of the installation-free platform, and after the binary code is loaded, the binary code and the memory mapping address are bound So that the installation-free platform invokes the platform capabilities when compiling the binary code.
  • the code written in C++ and related to page drawing is converted into binary code, and the corresponding glue code is generated.
  • the glue code is mainly responsible for two things. One is to give the binary code the memory address that is called by the installation-free platform. The code calls the platform capabilities, and the other is responsible for loading the binary code and calling the installation-free platform to compile the binary code.
  • the glue code corresponds to the glue file
  • the binary code corresponds to the binary code file.
  • the glue file After the glue file reads the content of the binary code file, the binary code is loaded to obtain the binary data.
  • the glue file collects the platform capacity and obtains the memory of the platform capacity. Mapping addresses, after binding the binary data and memory mapping addresses, the binary code content and platform capabilities can be called mutually when compiled through the installation-free platform interface.
  • the binary code is bound to the memory mapping address of the platform capability.
  • the platform capability can be invoked to successfully complete the binary code compilation.
  • the installation-free platform includes an application platform and a web platform
  • the application platform includes any one of a game application platform, a social application platform, a shopping application platform, a camera application platform, and an office application platform.
  • the installation-free platform includes an application platform and a web platform.
  • the UI design application is run based on the installation-free platform. You only need to obtain the installation-free package of the UI design application to use the UI design application, eliminating the need for UI design applications.
  • multiple users can use the UI design application through the installation-free platform, realizing the online collaboration of multiple people to use the UI design application.
  • the method further includes: when it is detected that multiple users are performing drawing operations on the application interface, respectively acquiring The page drawing operation records of the multiple users; establishing a mapping relationship between the user identification and the page drawing record, and saving the mapping relationship.
  • FIG. 2 is a schematic flowchart of an application processing method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, this application processing method includes:
  • the electronic device obtains an installation-free package of a user interface UI design application through an installation-free platform, where the installation-free package includes glue code and binary code generated according to the UI design application code.
  • S203 The electronic device runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • S204 The electronic device separately obtains page drawing operation records of the multiple users when it detects that multiple users use the UI design application cooperatively and perform page drawing operations on the application interface.
  • S205 The electronic device establishes a mapping relationship between the user identifier and the page drawing operation record, and saves the mapping relationship.
  • the electronic device first obtains the installation-free package of the user interface UI design application through the installation-free platform, the installation-free package includes glue code and binary code generated according to the UI design application code, and secondly ,
  • the installation-free package is running, the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the installation-free package after the loading is completed
  • the platform interface of the platform compiles the binary code, caches the compiled binary code, and finally runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the installation-free platform can realize the online real-time collaboration of multiple people to complete the UI design, which is beneficial to help Users get a better sense of real-time editing experience.
  • multiple users can use the installation-free platform to collaborate online and use UI design applications. Therefore, when multiple users are detected to perform page drawing operations on the application interface, the page drawing operation records of multiple users can be obtained separately, and the user can be established The mapping relationship between the identifier and the page drawing operation record, so that after the multi-person collaborative drawing is completed, each user can find his own page drawing operation record according to his own user ID.
  • FIG. 3 is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present application.
  • the electronic device 300 runs one or more applications Programs and operating systems, as shown in the figure, the electronic device 300 includes a processor 310, a memory 320, a communication interface 330, and one or more programs 321, wherein the one or more programs 321 are stored in the memory 320 And is configured to be executed by the processor 310, and the one or more programs 321 include instructions for executing the following steps;
  • an installation-free package of a user interface UI design application through an installation-free platform, the installation-free package including glue code and binary code generated according to the UI design application code;
  • the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code and calling the installation-free platform after the loading is completed Compile the binary code and cache the compiled binary code;
  • the electronic device first obtains the installation-free package of the user interface UI design application through the installation-free platform, the installation-free package includes glue code and binary code generated according to the UI design application code, and secondly ,
  • the installation-free package is running, the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the installation-free package after the loading is completed
  • the platform interface of the platform compiles the binary code, caches the compiled binary code, and finally runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the installation-free platform can realize the online real-time collaboration of multiple people to complete the UI design, which is beneficial to help Users get a better sense of real-time editing experience.
  • the instructions in the program are specifically used to perform the following operations: detecting whether there is a compiled binary code cache; if so, running the The compiled binary code in the cache; if not, the binary code is loaded, and the platform interface is called to compile the loaded binary code after the loading is completed, and the compiled binary code is run.
  • the instructions in the program are specifically used to perform the following operations: detecting whether the cache is updated; if so, loading the binary Code, and call the platform interface to compile the loaded binary code, and run the binary code after the compilation is completed.
  • the instructions in the program are specifically used to perform the following operations: extract the initial code of the UI design application written in the first preset programming language into intensive calculation code and non-intensive calculation code;
  • the intensive calculation code is converted into binary code and glue code, and the non-intensive calculation code is rewritten using a second preset programming language; the binary code, the glue code, the rewritten non-intensive calculation code and the UI design application
  • the materials are packaged to obtain the installation-free package of the UI design application.
  • the intensive calculation code is the code corresponding to the page drawing operation function in the UI design application initial code
  • the page drawing operation includes at least one of the following: graphics drawing operation, picture drawing Operation, line drawing operation, text drawing operation.
  • the glue code is used to obtain the memory mapping address of the platform capability of the installation-free platform, and after the binary code is loaded, the binary code and the memory mapping address are bound So that the installation-free platform invokes the platform capabilities when compiling the binary code.
  • the first preset programming language is C++ programming language
  • the second preset programming language is JavaScript programming language
  • the installation-free platform includes an application platform and a web platform
  • the application platform includes any one of a game application platform, a social application platform, a shopping application platform, a camera application platform, and an office application platform.
  • the instructions in the program are specifically used to perform the following operations: Users collaborate to use the UI design application, and when the application interface performs page drawing operations, obtain page drawing operation records of the multiple users respectively; establish a mapping relationship between user identification and page drawing operation records, and save all The mapping relationship.
  • an electronic device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one control unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 4 is a block diagram of the functional unit composition of a device 400 involved in an embodiment of the present application.
  • the application processing device 400 is applied to electronic equipment.
  • the application processing device 400 includes a processing unit 401 and a communication unit 402, wherein:
  • the processing unit 401 is configured to obtain an installation-free package of a user interface UI design application through the communication unit 402, the installation-free package including glue code and binary code generated according to the UI design application code; and When running the free installation package, the binary code is preprocessed by the glue code in the free installation package.
  • the preprocessing includes loading the binary code and calling the free installation platform after the loading is completed.
  • the platform interface compiles the binary code and caches the compiled binary code; and is used to run the pre-processed binary code and display the application interface of the UI design application on the installation-free platform.
  • the electronic device first obtains the installation-free package of the user interface UI design application through the installation-free platform, the installation-free package includes glue code and binary code generated according to the UI design application code, and secondly ,
  • the installation-free package is running, the binary code is preprocessed by the glue code in the installation-free package, and the preprocessing includes loading the binary code, and calling the installation-free package after the loading is completed
  • the platform interface of the platform compiles the binary code, caches the compiled binary code, and finally runs the preprocessed binary code, and displays the application interface of the UI design application on the installation-free platform.
  • the installation-free platform can realize the online real-time collaboration of multiple people to complete the UI design, which is beneficial to help Users get a better sense of real-time editing experience.
  • the processing unit 401 is specifically configured to: detect whether there is a compiled binary code cache; and if so, run the cache And if not, load the binary code, and call the platform interface to compile the loaded binary code after the loading is completed, and run the compiled binary code.
  • the processing unit 401 is specifically configured to: detect whether the cache is updated; and if so, load the binary code , And call the platform interface to compile the loaded binary code, and run the binary code after the compilation is completed.
  • the processing unit 401 is further configured to: extract the initial code of the UI design application written in the first preset programming language into intensive calculation code and non-intensive calculation code;
  • the intensive calculation code is converted into binary code and glue code, and the non-intensive calculation code is rewritten using a second preset programming language; and used to rewrite the binary code, the glue code, the rewritten non-intensive calculation code, and the UI
  • the design application materials are packaged, and the installation-free package of the UI design application is obtained.
  • the intensive calculation code is the code corresponding to the page drawing operation function in the UI design application initial code
  • the page drawing operation includes at least one of the following: graphics drawing operation, picture drawing Operation, line drawing operation, text drawing operation.
  • the glue code is used to obtain the memory mapping address of the platform capability of the installation-free platform, and after the binary code is loaded, the binary code and the memory mapping address are bound So that the installation-free platform invokes the platform capabilities when compiling the binary code.
  • the first preset programming language is C++ programming language
  • the second preset programming language is JavaScript programming language
  • the installation-free platform includes an application platform and a web platform
  • the application platform includes any one of a game application platform, a social application platform, a shopping application platform, a camera application platform, and an office application platform.
  • the processing unit 401 is specifically configured to: after detecting that multiple users use the UI design application collaboratively, and When the application interface performs a page drawing operation, the page drawing operation records of the multiple users are respectively obtained; and used to establish a mapping relationship between the user identification and the page drawing operation record, and save the mapping relationship.
  • the electronic device may further include a storage unit 403, the processing unit 401 and the communication unit 402 may be a controller or a processor, and the storage unit 403 may be a memory.
  • An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment ,
  • the above-mentioned computer includes a mobile terminal.
  • the embodiments of the present application also provide a computer program product.
  • the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program. Part or all of the steps of the method.
  • the computer program product may be a software installation package, and the above-mentioned computer includes a mobile terminal.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one control unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
  • a number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
  • the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

一种应用处理方法及相关装置,应用于电子设备,包括:所述电子设备通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码(S101);所述电子设备在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码(S102);所述电子设备运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面(S103)。有利于实现多人在线实时协作UI设计,提高UI设计处理效率。

Description

应用处理方法及相关装置 技术领域
本申请涉及移动终端技术领域,具体涉及一种应用处理方法及相关装置。
背景技术
用户界面(User Interface,UI)设计是指对应用软件的人机交互、操作逻辑、界面美观的整体设计,好的UI设计不仅可以让应用软件变得有个性,有品味,还可以让应用软件的操作变得简单舒适,体现应用软件的特色,因此越来越多的UI设计应用应运而生。现有的UI设计应用需要电子设备在本地下载该UI设计应用,再运行UI设计应用进行设计编辑,不能实现在线免安装、即开即设计、多人协作使用等特色,现存的网页版UI设计应用虽然可以在线免安装使用,但是针对高频率处理像素数据计算的图片编辑器的支持差性能差,容易出现卡顿、掉帧等情况,极大地影响用户实时编辑感和用户使用体验。
发明内容
本申请实施例提供了一种应用处理方法及相关装置,以实现多人在线实时协作UI设计。
第一方面,本申请实施例提供一种应用处理方法,其特征在于,应用于电子设备,所述方法包括:
通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;
在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;
运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
第二方面,本申请实施例提供一种应用处理装置,应用于电子设备,所述电子设备包括眼球追踪组件;所述应用处理装置包括处理单元和通信单元,其中,
所述处理单元,用于通过所述通信单元获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;以及用于在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理 包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;以及用于运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
第三方面,本申请实施例提供一种电子设备,包括控制器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述控制器执行,上述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。
可以看出,本申请实施例中,电子设备首先通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码,其次,在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码,最后,运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。由于UI设计应用基于免安装平台运行,并且通过免安装包可以直接启动UI设计应用,省去了应用安装的过程,同时,通过免安装平台可以实现多人在线实时协作完成UI设计,有利于帮助用户获取更好的实时编辑体验感。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A是本申请实施例提供的一种应用处理方法的流程示意图;
图1B是本申请实施例提供的一种胶水代码的工作流程示意图
图2是本申请实施例提供的另一种应用处理方法的流程示意图;
图3是本申请实施例提供的一种电子设备的结构示意图;
图4是本申请实施例提供的一种应用处理装置的功能单元组成框图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备(例如智能手表、智能手环、计步器等)、计算设备或连接到无线调制解调器的其他处理的精度。用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为电子设备。
下面对本申请实施例进行详细介绍。
现有的UI设计工具需要电子设备在本地下载后才能使用,在下载UI设计应用的安装包之后,需要先安装UI设计应用,如Photoshop、Sketch等UI设计应用都是需要安装后才能进行使用,无法提供在线免安装、即开即设计、进行多人协作等功能,而现有的用JavaScript语言编写的网页版的UI设计应用,对需要高频率处理像素数据,数据计算的图片编辑器支持差、性能差,从而很容易出现卡顿掉帧等情况,影响用户实时编辑感知和用户体验。因此,本申请提出一种应用处理方法,该应用处理方法中使用C++语言开发编写UI设计应用,用于设计师进行UI设计。其中,将UI设计应用代码抽离为密集计算代码和非密集计算代码,并将密集计算代码通过工具转换为二进制代码和胶水代码,将非密集计算代码通过JavaScript语言重开发,然后将二进制代码、胶水代码、重开发后的非密集计算 代码、以及UI设计应用素材进行打包得到UI设计应用的免安装包,通过该免安装包可省去应用安装过程,基于免安装平台直接使用UI设计应用。
在计算机编程领域中,胶水代码也叫粘合代码,用途是粘合那些可能不兼容的代码,胶水代码不实现程序要求的任何功能,它通常出现在代码中,使现有的库或者程序外在外部函数接口中进行互操作,并且胶水代码在快速原型开发环境中非常高效,可以让几个组件被快速集成到单个语言或框架中。二进制代码是由两个基本字符“0”、“1”组成的代码,本申请中,会将用C++加编写的UI设计应用代码中的密集计算部分代码转换成二进制代码,同时生成对应的胶水代码,胶水代码主要负责两个事情,一是将免安装平台能力调用的内存地址给到二进制代码,供二进制代码进行能力的调用,另一个是负责加载二进制代码,并调用免安装平台提供的方法对二进制代码进行编译和运行。本申请中通过将密集计算代码编译成二进制代码,使代码体积会变小,同时在编译二进制代码后会进行缓存,实现免安装且加快启动速度,用户可以快速地体验在线进行UI设计的能力,同时由于是二进制代码,执行效率接近原生代码,每一帧的效率更高,有利于减少卡顿、掉帧等情况的出现,帮助用户更好地实现实时编辑UI设计,提高用户使用体验。
请参阅图1A,图1A是本申请实施例提供了一种应用处理方法的流程示意图,应用于电子设备。如图所示,本应用处理方法包括:
S101,所述电子设备通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码。
其中,免安装平台可以包括各种应用平台或者网页平台,免安装平台不需要安装UI设计应用的免安装包,便可实现使用UI设计应用,UI设计应用类似于一个插件或一个小程序,基于免安装平台实现运行。免安装平台只需要获取UI设计应用的免安装包,该免安装包包括根据UI设计应用的应用代码生成的胶水代码和二进制代码。
S102,所述电子设备在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码。
其中,电子设备需要基于免安装平台来运行UI设计应用,免安装平台在第一次运行免安装包时,需要通过免安装包中的胶水代码对二进制代码进行预处理,该预处理包括通过胶水代码来加载二进制代码,以及在二进制代码加载完成后,调用免安装平台的平台接口,对二进制代码进行编译,并缓存编译后的二进制代码,如此,在第二次运行UI设计应用时,可以通过免安装平台直接从缓存中拿出编译后的二进制代码,直接运行显示,实现高效运 行、即点即开、实时在线于UI设计的功能。
S103,所述电子设备运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
其中,在运行免安装包时,通过免安装包中的胶水代码对二进制代码进行预处理后,便可通过免安装平台启动UI设计应用,显示UI设计应用的应用页面。
可以看出,本申请实施例中,电子设备首先通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码,其次,在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码,最后,运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。由于UI设计应用基于免安装平台运行,并且通过免安装包可以直接启动UI设计应用,省去了应用安装的过程,同时,通过免安装平台可以实现多人在线实时协作完成UI设计,有利于帮助用户获取更好的实时编辑体验感。
在一个可能的示例中,所述运行所述预处理后的二进制代码,包括:检测是否存在编译后的二进制代码缓存;若是,则运行所述缓存中编译后的二进制代码;若否,则加载所述二进制代码,以及在加载完成后调用所述平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码。
其中,在运行预处理后的二进制代码时,需要检测是否存在编译后的二进制代码缓存,如果已经对二进制代码进行过编译,则会有编译后的二进制代码缓存,免安装平台第一次使用UI设计应用的情况下,则不会存在该缓存,如果不是第一次使用,则会存在该缓存。在运行二进制代码之前,需要检测是否存在编译后的二进制代码缓存,如果存在便可以直接运行缓存中编译后的二进制代码,如果不存在,则表明没有对二进制代码进行过编译,此时需要加载二进制代码,并且在加载完成后调用平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码即可启动UI设计应用。
其中,如果检测到不存在编译后的二进制代码缓存,则需要调用胶水代码加载二进制代码,并且在二进制代码加载完成后,调用平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码即可启动UI设计应用。
可见,本示例中,在第一次使用UI设计应用时,需要对二进制代码进行加载,并在加载完成后编译以及缓存,如果不是第一次使用UI设计应用。则可以直接通过缓存运行编译后的二进制代码,以启动UI设计应用,实现UI设计应用的即开即用。因此,在运行二进 制代码时需要检测是否存在编译后的二进制代码缓存。
在一个可能的示例中,所述运行所述缓存中编译后的二进制代码,包括:检测所述缓存是否存在更新;若是,则加载所述二进制代码,并调用所述平台接口对加载后的二进制代码进行编译,在编译完成后运行所述二进制代码。
其中,在运行缓存中编译后的二进制代码时,还需要检测缓存是否存在更新,如果存在更新,则表明缓存发生了变化,这种变化可能是因为运行出错或者是免安装包发生更新带来的,因此,在这种情况下需要重新加载二进制代码,并调用免安装平台平台接口对加载后的二进制代码进行编译,在编译完成后运行二进制代码,即可启动UI设计应用。,
可见,本示例中,在检测到编译后的二进制代码缓存时,还会检测缓存是否存在更新,从而,确定是否需要重新加载和编译二进制代码,如此,可避免错过UI设计应用的更新,保证UI设计应用运行的稳定性和可靠性。
在一个可能的示例中,将使用第一预设程序语言编写的UI设计应用的初始代码抽离为密集计算代码和非密集计算代码;将所述密集计算代码转换为二进制代码和胶水代码,以及使用第二预设程序语言重新编写所述非密集计算代码;对所述二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计应用素材进行打包,得到所述UI设计应用的免安装包。
其中,UI设计应用的初始代码是使用第一预设程序语言进行编写的,可将初始代码通过抽离算法抽离为密集计算代码和非密集计算代码,然后再将密集计算代码转换为二进制代码和胶水代码,同时使用第二预设编程序语言重新编写非密集计算代码,将二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计素材进行打包便得到UI设计应用的免安装包,通过免安装平台提供的打包工具进行打包,便可以生成可以在免安装平台跑起来的安装包。UI设计素材包括图标、图片等,该免安装包不需要安装有应用安装这个过程,可直接运行安装包装中的代码,实现启动UI设计应用。
其中,所述第一预设程序语言为C++编程语言,所述第二预设程序语言为JavaScript编程语言。使用C++编程语言开发的UI设计应用,成本更低,UI设计应用中涉及到的画板的绘制,例如,包括提供绘制相关的组件,如矩形等图形、文字、图片、缩放平移等变换,需要实时的进行密集计算的操作,这些操作对应的底层代码为密集计算代码,需要对这部分C++代码进行抽离,抽离时可以通过计算顶点数据、计算坐标、计算纹理数据后快速抽离出密集计算代码。针对非密集计算代码,使用javascript重新进行编写,便可使其能够在免安装平台上运行。
可见,本示例中,将UI设计应用的代码分为密集计算代码和非密集计算代码后,可以 将密集计算代码转换为二进制代码和胶水代码,并且使用第二程序语言对非密集计算代码进行重新编写,从而可以得到包括二进制代码、胶水代码、重新编写后的非密集计算代码、以及UI设计素材组成的免安装包,通过该免安装包即可免安装启动UI设计应用。
在一个可能的示例中,所述密集计算代码为所述UI设计应用初始代码中,用于实现页面绘制操作功能对应的代码,所述页面绘制操作包括以下至少一种:图形绘制操作、图片绘制操作、线条绘制操作、文字绘制操作。
其中,UI设计应用中的页面绘制操作包括图形绘制操作,如绘制矩形,圆形等图形,图片绘制操作、线条绘制操作、文字绘制操作等绘制操作,在页面上实现这些绘制操作对应的代码为密集计算代码,在从UI设计应用的初始代码中抽离出密集计算代码后,便可将密集计算代码转换为二进制代码和胶水代码。
可见,本示例中,从UI设计应用的初始代码中抽离出密集计算代码之后。可以将密集计算代码转换成二进制代码和胶水代码,由于密集计算代码占UI设计应用初始代码的主要部分,因此在将这部分代码编译成二进制代码和胶水代码之后,整体代码体积更小,实现了代码瘦身功能。
在一个可能的示例中,所述胶水代码用于获取所述免安装平台的平台能力的内存映射地址,以及在加载完所述二进制代码后,将所述二进制代码和所述内存映射地址进行绑定,以使所述免安装平台在编译所述二进制代码时调用所述平台能力。
其中,将C++编写的和页面绘制相关的代码转换成二进制代码,并生成对应的胶水代码,胶水代码主要负责两个事情,一个是将免安装平台能力调用的内存地址给到二进制代码,供二进制代码进行平台能力的调用,另一个是负责加载二进制代码,并调用免安装平台对二进制代码进行编译。如图1B所示,胶水代码对应胶水文件,二进制代码对应二进制代码文件,胶水文件读取到二进制代码文件的内容后,加载二进制代码得到二进制数据,同时胶水文件收集平台能力后得到平台能力的内存映射地址,将二进制数据和内存映射地址进行绑定之后,通过免安装平台接口编译时可以实现二进制代码内容和平台能力的互相调用。
可见,本示例中,在加载完二进制代码后,将二进制代码和平台能力的内存映射地址进行绑定,如此,在免安装平台编译二进制代码时,便可以调用平台能力顺利完成二进制代码的编译。
在一个可能的示例中,所述免安装平台包括应用平台和网页平台,所述应用平台包括游戏应用平台、社交应用平台、购物应用平台、拍照应用平台、办公应用平台中的任意一种应用平台。
可见,本示例中,免安装平台包括应用平台和网页平台,基于免安装平台来运行UI设计应用,只需要获取UI设计应用的免安装包便可使用UI设计应用,省去了UI设计应用的安装过程,同时,多个用户都可以通过免安装平台来使用UI设计应用,实现了多人在线协作使用UI设计应用。
在一个可能的示例中,所述在所述免安装平台显示所述UI设计应用的应用界面之后,所述方法还包括:在检测到多个用户在所述应用界面进行绘制操作时,分别获取所述多个用户的页面绘制操作记录;建立用户标识和页面绘制记录的映射关系,并保存所述映射关系。
可见,本示例中,多个用户可以使用免安装平台来在线协作使用UI设计应用,因此,在检测到多个用户在应用界面进行页面绘制操作时,可以分别获取多个用户的页面绘制操作记录,并建立用户标识和页面绘制操作记录的映射关系,从而,在多人协作绘制完成之后,每个用户都可以根据自己的用户标识去查找自己的页面绘制操作记录。
与所述图1A所示的实施例一致的,请参阅图2,图2是本申请实施例提供的一种应用处理方法的流程示意图,应用于电子设备。如图所示,本应用处理方法包括:
S201,所述电子设备通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码。
S202,所述电子设备在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码。
S203,所述电子设备运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
S204,所述电子设备在检测到多个用户协作使用所述UI设计应用,并在所述应用界面进行页面绘制操作时,分别获取所述多个用户的页面绘制操作记录。
S205,所述电子设备建立用户标识和页面绘制操作记录的映射关系,并保存所述映射关系。
可以看出,本申请实施例中,电子设备首先通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码,其次,在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码,最后,运行所述预处理 后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。由于UI设计应用基于免安装平台运行,并且通过免安装包可以直接启动UI设计应用,省去了应用安装的过程,同时,通过免安装平台可以实现多人在线实时协作完成UI设计,有利于帮助用户获取更好的实时编辑体验感。
此外,多个用户可以使用免安装平台来在线协作使用UI设计应用,因此,在检测到多个用户在应用界面进行页面绘制操作时,可以分别获取多个用户的页面绘制操作记录,并建立用户标识和页面绘制操作记录的映射关系,从而,在多人协作绘制完成之后,每个用户都可以根据自己的用户标识去查找自己的页面绘制操作记录。
与所述图1A、图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种电子设备300的结构示意图,该电子设备300运行有一个或多个应用程序和操作系统,如图所示,该电子设备300包括处理器310、存储器320、通信接口330以及一个或多个程序321,其中,所述一个或多个程序321被存储在所述存储器320中,并且被配置由所述处理器310执行,所述一个或多个程序321包括用于执行以下步骤的指令;
通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;
在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;
运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
可以看出,本申请实施例中,电子设备首先通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码,其次,在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码,最后,运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。由于UI设计应用基于免安装平台运行,并且通过免安装包可以直接启动UI设计应用,省去了应用安装的过程,同时,通过免安装平台可以实现多人在线实时协作完成UI设计,有利于帮助用户获取更好的实时编辑体验感。
在一个可能的示例中,在所述运行所述预处理后的二进制代码方面,所述程序中的指 令具体用于执行以下操作:检测是否存在编译后的二进制代码缓存;若是,则运行所述缓存中编译后的二进制代码;若否,则加载所述二进制代码,以及在加载完成后调用所述平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码。
在一个可能的示例中,在所述运行所述缓存中编译后的二进制代码方面,所述程序中的指令具体用于执行以下操作:检测所述缓存是否存在更新;若是,则加载所述二进制代码,并调用所述平台接口对加载后的二进制代码进行编译,在编译完成后运行所述二进制代码。
在一个可能的示例中,所述程序中的指令具体用于执行以下操作:将使用第一预设程序语言编写的UI设计应用的初始代码抽离为密集计算代码和非密集计算代码;将所述密集计算代码转换为二进制代码和胶水代码,以及使用第二预设程序语言重新编写所述非密集计算代码;对所述二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计应用素材进行打包,得到所述UI设计应用的免安装包。
在一个可能的示例中,所述密集计算代码为所述UI设计应用初始代码中,用于实现页面绘制操作功能对应的代码,所述页面绘制操作包括以下至少一种:图形绘制操作、图片绘制操作、线条绘制操作、文字绘制操作。
在一个可能的示例中,所述胶水代码用于获取所述免安装平台的平台能力的内存映射地址,以及在加载完所述二进制代码后,将所述二进制代码和所述内存映射地址进行绑定,以使所述免安装平台在编译所述二进制代码时调用所述平台能力。
在一个可能的示例中,所述第一预设程序语言为C++编程语言,所述第二预设程序语言为JavaScript编程语言。
在一个可能的示例中,所述免安装平台包括应用平台和网页平台,所述应用平台包括游戏应用平台、社交应用平台、购物应用平台、拍照应用平台、办公应用平台中的任意一种应用平台。
在一个可能的示例中,在所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框方面,所述程序中的指令具体用于执行以下操作:在检测到多个用户协作使用所述UI设计应用,并在所述应用界面进行页面绘制操作时,分别获取所述多个用户的页面绘制操作记录;建立用户标识和页面绘制操作记录的映射关系,并保存所述映射关系。
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是 计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个控制单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图4是本申请实施例中所涉及的装置400的功能单元组成框图。该应用处理装置400应用于电子设备,应用处理装置400包括处理单元401和通信单元402,其中:
所述处理单元401,用于通过所述通信单元402获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;以及用于在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;以及用于运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
可以看出,本申请实施例中,电子设备首先通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码,其次,在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码,最后,运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。由于UI设计应用基于免安装平台运行,并且通过免安装包可以直接启动UI设计应用,省去了应用安装的过程,同时,通过免安装平台可以实现多人在线实时协作完成UI设计,有利于帮助用户获取更好的实时编辑体验感。
在一个可能的示例中,在所述运行所述预处理后的二进制代码方面,所述处理单元401具体用于:检测是否存在编译后的二进制代码缓存;以及用于若是,则运行所述缓存中编译后的二进制代码;以及用于若否,则加载所述二进制代码,以及在加载完成后调用所述平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码。
在一个可能的示例中,在所述运行所述缓存中编译后的二进制代码方面,所述处理单元401具体用于:检测所述缓存是否存在更新;以及用于若是,则加载所述二进制代码, 并调用所述平台接口对加载后的二进制代码进行编译,在编译完成后运行所述二进制代码。
在一个可能的示例中,所述处理单元401还用于:将使用第一预设程序语言编写的UI设计应用的初始代码抽离为密集计算代码和非密集计算代码;以及用于将所述密集计算代码转换为二进制代码和胶水代码,以及使用第二预设程序语言重新编写所述非密集计算代码;以及用于对所述二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计应用素材进行打包,得到所述UI设计应用的免安装包。
在一个可能的示例中,所述密集计算代码为所述UI设计应用初始代码中,用于实现页面绘制操作功能对应的代码,所述页面绘制操作包括以下至少一种:图形绘制操作、图片绘制操作、线条绘制操作、文字绘制操作。
在一个可能的示例中,所述胶水代码用于获取所述免安装平台的平台能力的内存映射地址,以及在加载完所述二进制代码后,将所述二进制代码和所述内存映射地址进行绑定,以使所述免安装平台在编译所述二进制代码时调用所述平台能力。
在一个可能的示例中,所述第一预设程序语言为C++编程语言,所述第二预设程序语言为JavaScript编程语言。
在一个可能的示例中,所述免安装平台包括应用平台和网页平台,所述应用平台包括游戏应用平台、社交应用平台、购物应用平台、拍照应用平台、办公应用平台中的任意一种应用平台。
在一个可能的示例中,所述在所述免安装平台显示所述UI设计应用的应用界面之后,所述处理单元401具体用于:在检测到多个用户协作使用所述UI设计应用,并在所述应用界面进行页面绘制操作时,分别获取所述多个用户的页面绘制操作记录;以及用于建立用户标识和页面绘制操作记录的映射关系,并保存所述映射关系。
其中,所述电子设备还可包括存储单元403,处理单元401和通信单元402可以是控制器或处理器,存储单元403可以是存储器。
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个控制单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种应用处理方法,其特征在于,应用于电子设备,所述方法包括:
    通过免安装平台获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;
    在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;
    运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
  2. 根据权利要求1所述的方法,其特征在于,所述运行所述预处理后的二进制代码,包括:
    检测是否存在编译后的二进制代码缓存;
    若是,则运行所述缓存中编译后的二进制代码;
    若否,则加载所述二进制代码,以及在加载完成后调用所述平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码。
  3. 根据权利要求2所述的方法,其特征在于,所述运行所述缓存中编译后的二进制代码,包括:
    检测所述缓存是否存在更新;
    若是,则加载所述二进制代码,并调用所述平台接口对加载后的二进制代码进行编译,在编译完成后运行所述二进制代码。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将使用第一预设程序语言编写的UI设计应用的初始代码抽离为密集计算代码和非密集计算代码;
    将所述密集计算代码转换为二进制代码和胶水代码,以及使用第二预设程序语言重新编写所述非密集计算代码;
    对所述二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计应用素材进行打包,得到所述UI设计应用的免安装包。
  5. 根据权利要求1所述的方法,其特征在于,所述密集计算代码为所述UI设计应用初始代码中,用于实现页面绘制操作功能对应的代码,所述页面绘制操作包括以下至少一种:图形绘制操作、图片绘制操作、线条绘制操作、文字绘制操作。
  6. 根据权利要求1所述的方法,其特征在于,所述胶水代码用于获取所述免安装平台 的平台能力的内存映射地址,以及在加载完所述二进制代码后,将所述二进制代码和所述内存映射地址进行绑定,以使所述免安装平台在编译所述二进制代码时调用所述平台能力。
  7. 根据权利要求1所述的方法,其特征在于,所述第一预设程序语言为C++编程语言,所述第二预设程序语言为JavaScript编程语言。
  8. 根据权利要求1所述的方法,其特征在于,所述免安装平台包括应用平台和网页平台,所述应用平台包括游戏应用平台、社交应用平台、购物应用平台、拍照应用平台、办公应用平台中的任意一种应用平台。
  9. 根据权利要求1所述的方法,其特征在于,所述在所述免安装平台显示所述UI设计应用的应用界面之后,所述方法还包括:
    在检测到多个用户协作使用所述UI设计应用,并在所述应用界面进行页面绘制操作时,分别获取所述多个用户的页面绘制操作记录;
    建立用户标识和页面绘制操作记录的映射关系,并保存所述映射关系。
  10. 一种应用处理装置,其特征在于,应用于电子设备,所述应用处理装置包括处理单元和通信单元,其中,
    所述处理单元,用于通过所述通信单元获取用户界面UI设计应用的免安装包,所述免安装包包括根据所述UI设计应用代码生成的胶水代码和二进制代码;以及用于在运行所述免安装包时,通过所述免安装包中的胶水代码对所述二进制代码进行预处理,所述预处理包括加载所述二进制代码,以及在加载完成后调用所述免安装平台的平台接口对所述二进制代码进行编译,并缓存编译后的二进制代码;以及用于运行所述预处理后的二进制代码,并在所述免安装平台显示所述UI设计应用的应用界面。
  11. 根据权利要求10所述的应用处理装置,其特征在于,在所述运行所述预处理后的二进制代码方面,所述处理单元具体用于:检测是否存在编译后的二进制代码缓存;以及用于若是,则运行所述缓存中编译后的二进制代码;以及用于若否,则加载所述二进制代码,以及在加载完成后调用所述平台接口对加载后的二进制代码进行编译,运行编译后的二进制代码。
  12. 根据权利要求11所述的应用处理装置,其特征在于,在所述运行所述缓存中编译后的二进制代码方面,所述处理单元具体用于:检测所述缓存是否存在更新;以及用于若是,则加载所述二进制代码,并调用所述平台接口对加载后的二进制代码进行编译,在编译完成后运行所述二进制代码。
  13. 根据权利要求10所述的应用处理装置,其特征在于,所述处理单元还用于:将使 用第一预设程序语言编写的UI设计应用的初始代码抽离为密集计算代码和非密集计算代码;以及用于将所述密集计算代码转换为二进制代码和胶水代码,以及使用第二预设程序语言重新编写所述非密集计算代码;以及用于对所述二进制代码、胶水代码、重新编写后的非密集计算代码以及UI设计应用素材进行打包,得到所述UI设计应用的免安装包。
  14. 根据权利要求10所述的应用处理装置,其特征在于,所述密集计算代码为所述UI设计应用初始代码中,用于实现页面绘制操作功能对应的代码,所述页面绘制操作包括以下至少一种:图形绘制操作、图片绘制操作、线条绘制操作、文字绘制操作。
  15. 根据权利要求10所述的应用处理装置,其特征在于,所述胶水代码用于获取所述免安装平台的平台能力的内存映射地址,以及在加载完所述二进制代码后,将所述二进制代码和所述内存映射地址进行绑定,以使所述免安装平台在编译所述二进制代码时调用所述平台能力。
  16. 根据权利要求10所述的应用处理装置,其特征在于,所述第一预设程序语言为C++编程语言,所述第二预设程序语言为JavaScript编程语言。
  17. 根据权利要求10所述的应用处理装置,其特征在于,所述免安装平台包括应用平台和网页平台,所述应用平台包括游戏应用平台、社交应用平台、购物应用平台、拍照应用平台、办公应用平台中的任意一种应用平台。
  18. 根据权利要求10所述的应用处理装置,其特征在于,所述在所述免安装平台显示所述UI设计应用的应用界面之后,所述处理单元具体用于:在检测到多个用户协作使用所述UI设计应用,并在所述应用界面进行页面绘制操作时,分别获取所述多个用户的页面绘制操作记录;以及用于建立用户标识和页面绘制操作记录的映射关系,并保存所述映射关系。
  19. 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的应用处理方法中的步骤的指令。
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的应用处理方法。
PCT/CN2020/078244 2020-03-06 2020-03-06 应用处理方法及相关装置 WO2021174538A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/078244 WO2021174538A1 (zh) 2020-03-06 2020-03-06 应用处理方法及相关装置
CN202080095481.2A CN115039069A (zh) 2020-03-06 2020-03-06 应用处理方法及相关装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/078244 WO2021174538A1 (zh) 2020-03-06 2020-03-06 应用处理方法及相关装置

Publications (1)

Publication Number Publication Date
WO2021174538A1 true WO2021174538A1 (zh) 2021-09-10

Family

ID=77613813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078244 WO2021174538A1 (zh) 2020-03-06 2020-03-06 应用处理方法及相关装置

Country Status (2)

Country Link
CN (1) CN115039069A (zh)
WO (1) WO2021174538A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141443A1 (en) * 2011-12-01 2013-06-06 Michael L. Schmit Software libraries for heterogeneous parallel processing platforms
CN107710150A (zh) * 2015-06-15 2018-02-16 高通股份有限公司 从包含层次子例程信息的中间代码产生目标代码
CN109445773A (zh) * 2018-09-27 2019-03-08 深圳点猫科技有限公司 一种基于编程语言提升浏览器性能的方法以及电子设备
CN109918073A (zh) * 2019-01-29 2019-06-21 维沃移动通信有限公司 一种源码文件的生成方法、装置以及终端
CN110187931A (zh) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 小程序的运行方法及装置
CN110569050A (zh) * 2019-08-01 2019-12-13 阿里巴巴集团控股有限公司 一种小程序更新方法和装置
CN110795353A (zh) * 2019-10-29 2020-02-14 北京小米移动软件有限公司 快应用的调试方法、装置、设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141443A1 (en) * 2011-12-01 2013-06-06 Michael L. Schmit Software libraries for heterogeneous parallel processing platforms
CN107710150A (zh) * 2015-06-15 2018-02-16 高通股份有限公司 从包含层次子例程信息的中间代码产生目标代码
CN109445773A (zh) * 2018-09-27 2019-03-08 深圳点猫科技有限公司 一种基于编程语言提升浏览器性能的方法以及电子设备
CN109918073A (zh) * 2019-01-29 2019-06-21 维沃移动通信有限公司 一种源码文件的生成方法、装置以及终端
CN110187931A (zh) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 小程序的运行方法及装置
CN110569050A (zh) * 2019-08-01 2019-12-13 阿里巴巴集团控股有限公司 一种小程序更新方法和装置
CN110795353A (zh) * 2019-10-29 2020-02-14 北京小米移动软件有限公司 快应用的调试方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN115039069A (zh) 2022-09-09

Similar Documents

Publication Publication Date Title
TWI808393B (zh) 頁面處理方法、裝置、設備及儲存媒體
EP4198909A1 (en) Image rendering method and apparatus, and computer device and storage medium
CN108010112B (zh) 动画处理方法、装置及存储介质
CN109358936B (zh) 信息处理方法、装置、存储介质、电子设备及系统
CN110069257B (zh) 一种界面处理方法、装置及终端
WO2020156264A1 (zh) 渲染方法及装置
EP3657327A1 (en) Method for rendering game, and method, apparatus and device for generating game resource file
WO2018050003A1 (zh) 3D canvas网页元素的渲染方法、装置及电子设备
CN111488149B (zh) 基于canvas元素的表格渲染方法、装置及计算机设备
US10207190B2 (en) Technologies for native game experience in web rendering engine
CN104704468A (zh) Web应用程序的跨系统安装
CN111966354A (zh) 一种页面显示方法、装置及计算机可读存储介质
CN111158866A (zh) 一种引擎系统及其渲染方法
CN109672902A (zh) 一种视频抽帧方法、装置、电子设备和存储介质
TW202004674A (zh) 在3d模型上展示豐富文字的方法、裝置及設備
CN111951356B (zh) 基于json数据格式的动画渲染方法
CN110750664A (zh) 图片的显示方法及装置
CN107729049A (zh) 指令转换方法、设备及计算机可读存储介质
CN112423111A (zh) 图形引擎和适用于播放器的图形处理方法
CN115510347A (zh) 演示文稿的转换方法、装置、电子设备及存储介质
CN112132599A (zh) 图像处理方法及装置、计算机可读存储介质、电子设备
WO2021174538A1 (zh) 应用处理方法及相关装置
CN112463250A (zh) 一种视频处理方法和计算设备
WO2020057265A1 (en) Method and system for chat function development, terminal and computer readable storage medium
CN113744377A (zh) 一种动画处理系统、方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20922647

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.02.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20922647

Country of ref document: EP

Kind code of ref document: A1