WO2022199111A1 - Method and apparatus for implementing functions in application program, electronic device and storage medium - Google Patents
Method and apparatus for implementing functions in application program, electronic device and storage medium Download PDFInfo
- Publication number
- WO2022199111A1 WO2022199111A1 PCT/CN2021/135062 CN2021135062W WO2022199111A1 WO 2022199111 A1 WO2022199111 A1 WO 2022199111A1 CN 2021135062 W CN2021135062 W CN 2021135062W WO 2022199111 A1 WO2022199111 A1 WO 2022199111A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application program
- platform
- program interface
- event
- cross
- Prior art date
Links
- 230000006870 function Effects 0.000 title claims abstract description 174
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000012544 monitoring process Methods 0.000 claims abstract description 19
- 239000008186 active pharmaceutical agent Substances 0.000 claims description 141
- 238000004891 communication Methods 0.000 claims description 25
- 238000012545 processing Methods 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 4
- 238000004806 packaging method and process Methods 0.000 abstract description 2
- 238000011161 development Methods 0.000 description 35
- 230000002093 peripheral effect Effects 0.000 description 12
- 238000012986 modification Methods 0.000 description 10
- 230000004048 modification Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000001133 acceleration Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000009877 rendering Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000003245 working effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
- G06F9/4484—Executing subprograms
-
- 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
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/76—Adapting program code to run in a different environment; Porting
Definitions
- the embodiments of the present disclosure relate to the field of electronic technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for implementing functions in an application program.
- the present disclosure relates to a method, device, server and readable storage medium for implementing functions in an application program, which can safely implement a set of codes to support a development scheme of multiple different platforms without using a native platform.
- a method for implementing functions in an application program including: monitoring and acquiring a first event of an application program; determining a cross-platform application program interface corresponding to the first event; At least one platform application program interface of the function corresponding to the event is encapsulated, and each platform application program interface corresponds to one operating environment; the platform application program interface corresponding to the current operating environment is called through the cross-platform application program interface, so as to realize the first event corresponding function.
- calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to realize the function of the target event including: using the preset engine to call the platform application corresponding to the current operating environment through the cross-platform application program interface
- the program interface is used to realize the function corresponding to the first event.
- the method further includes: obtaining a software package corresponding to the application; compiling and parsing the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces, including multiple platform application programs.
- first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
- the method further includes: monitoring and acquiring a second event of the application; determining a plug-in corresponding to the second event; and running the plug-in to implement a function corresponding to the second event.
- calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to realize the function corresponding to the first event including: calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface , obtain the platform resources required for the first event; the platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to achieve The function corresponding to the first event.
- an apparatus for implementing functions in an application program including a monitoring module, a determination module and a processing module.
- the monitoring module is configured to monitor and obtain the first event of the application;
- the determining module is configured to determine the cross-platform application program interface corresponding to the first event obtained by the monitoring module;
- the function corresponding to an event is obtained by encapsulating at least one platform application program interface, and each platform application program interface corresponds to one operating environment;
- the processing module is configured to call the current operating environment through the cross-platform application program interface determined by the determination module.
- the platform application program interface is used to realize the function corresponding to the first event.
- the processing module is specifically configured to use the preset engine to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface determined by the determination module, so as to realize the function corresponding to the first event.
- the device further includes an acquisition module; the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating environment.
- the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating
- first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
- the monitoring module is also configured to monitor and acquire the second event of the application; the determination module is also configured to determine the plug-in corresponding to the second event acquired by the monitoring module; the processing module is also configured to run the event determined by the determination module.
- a plug-in to implement the function corresponding to the second event.
- the processing module is specifically configured to: call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to obtain the platform resources required by the first event;
- the platform resources include any one or more of the following: Network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to implement the function corresponding to the first event.
- the present disclosure provides an electronic device, the electronic device comprising a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions, so as to implement any of the methods provided in the first aspect and any thereof.
- the present disclosure provides a computer-readable storage medium on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is made to execute the In one aspect, a method for implementing functions in an application program of any possible implementation manner thereof is provided.
- an embodiment of the present application further provides a computer program product, including one or more instructions, and the one or more instructions can be executed on an electronic device, so that the electronic device executes the first aspect and any of its possibilities.
- the device for implementing the method for implementing the functions in the application will first determine the cross-platform application corresponding to the first time. program interface; because the cross-platform application program interface is encapsulated by at least one platform application program interface having the function corresponding to the first event, and each platform application program interface corresponds to one operating environment; The platform application program interface corresponding to the running environment of the platform where the application program is currently located is called through the cross-platform application program interface, thereby realizing the function corresponding to the first time.
- the application program can normally implement corresponding functions on various platforms or operating environments, thereby improving user experience.
- developers can develop corresponding applications for applications that need to be cross-platform without relying on multiple native platforms, which improves development efficiency.
- FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart 1 of a method for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 3 is a second schematic flowchart of a method for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 4 is a schematic flowchart three of a method for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 5 is a schematic flowchart 1 of an application development method provided by an embodiment of the present disclosure.
- FIG. 6 is a schematic structural diagram of a runtime container according to an embodiment of the present disclosure.
- FIG. 7 is a second schematic flowchart of an application development method provided by an embodiment of the present disclosure.
- FIG. 8 is a third schematic flowchart of an application development method provided by an embodiment of the present disclosure.
- FIG. 9 is a fourth schematic flowchart of a method for developing an application program provided by an embodiment of the present disclosure.
- FIG. 10 is a supplementary flowchart diagram 1 of a method for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 11 is a schematic flowchart five of a method for developing an application program provided by an embodiment of the present disclosure.
- FIG. 12 is a second supplementary flowchart of a method for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 13 is a schematic structural diagram of an apparatus for implementing functions in an application program provided by an embodiment of the present disclosure
- FIG. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
- FIG. 15 is a schematic structural diagram of another electronic device according to an embodiment of the present disclosure.
- the data involved in this disclosure may be data authorized by the user or fully authorized by all parties.
- Flutter It is Google's open source UI (user interface, user interface) toolkit, which helps developers efficiently build multi-platform beautiful applications through a set of code bases, supporting mobile, Web (world wide web, World Wide Web), desktop and embedded platforms.
- Flutter Engine is a portable runtime for running high-quality mobile applications. It implements Flutter's core libraries, animation and graphics, file and network I/O, supports accessibility, a plugin architecture, and the Dart runtime and development tools for developing, compiling, and running Flutter applications.
- API The full name is application programming interface, that is, application programming interface or application programming interface. It is some pre-defined interfaces (such as functions, HTTP interfaces), or refers to the conventions for the connection of different components of a software system, which are used to provide application programs and development. A set of routines that a person can access based on a piece of software or hardware without having access to the source code or understanding the details of the inner workings.
- Runtime container The runtime environment required by the software during the runtime, and the runtime environment contains various functions required for the software to run.
- SDK The full name is software development kit, that is, software development kit, which is a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
- Dart A computer programming language developed by Google. It is an object-oriented, class-defined, and single-inheritance language.
- FIG. 1 it is a schematic diagram of an implementation environment that the technical solutions provided by the embodiments of the present disclosure may involve.
- the implementation environment may include a client 01 and a server 02, and the client 01 communicates with the server 02 through wired communication or wireless communication.
- the client 01 in the embodiment of the present disclosure may be a mobile phone, a tablet computer, a desktop type, a laptop type, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and Cell phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR) ⁇ virtual reality (virtual reality, VR) devices and other devices that can be used for project development, the specific form of the client in the embodiments of the present application No special restrictions are imposed.
- the server 02 in the present disclosure may be a server, a server cluster composed of multiple servers, or a cloud computing service center, which is not limited in the present disclosure.
- the server 02 is mainly used to receive the content request of the application program sent by the client and return the corresponding content, as well as to receive the development request and code sent by the client, and use the framework set by itself to complete the construction of the application.
- the present disclosure provides a method for implementing functions in an application program, which can conveniently realize the normal use of an application program in different operating environments by using a cross-platform application program interface.
- the specific execution body of the method may be the above-mentioned client or the above-mentioned server, which is determined according to actual needs.
- client refers to a terminal used by developers
- server may be a terminal used by developers or communicate with developers through a terminal used by themselves, depending on the situation Interactive server.
- an embodiment of the present disclosure provides a schematic flowchart of a method for implementing functions in an application program.
- the method is executed by means for implementing functions in the application, and when the means for implementing functions in the application is a client or a part of the client, the method may include 201-203:
- the first event may be a click on a control (for example, "play”, “share”, “forward”, etc.) in the display interface of the application when the user is using a certain application; or the application Relevant events generated by the program after receiving the corresponding function triggered by the user; there is no specific limitation on this in this application, and it depends on the actual situation.
- a control for example, "play”, “share”, “forward”, etc.
- step 201 may also be to acquire the record information of the first event to represent the first event.
- the record information of the first event may be acquired from a database that records record information for storing various events.
- the record information of the first event may be description information of the first event.
- the recording information of the first event may include the recording time of the first event, the attribute of the first event, the content description of the first event, and the like.
- the cross-platform application program interface is encapsulated and obtained by at least one platform application program interface having a function corresponding to the first event, and each platform application program interface corresponds to a running surroundings.
- the fast platform application program interface corresponding to the first event may be a platform capable of rendering the target image in the Android platform, the ios platform and the Microsoft platform.
- Application program interface package is obtained.
- the specific packaging manner can be any feasible manner.
- the operating environment and the platform are in one-to-one correspondence, that is, each platform only corresponds to its own operating environment.
- the device for implementing the method for implementing the functions in the application will first determine the cross-platform application interface corresponding to the first time; because The cross-platform application program interface is encapsulated by at least one platform application program interface having a function corresponding to the first event, and each platform application program interface corresponds to one operating environment; therefore, the device can pass the cross-platform application program interface.
- the application program interface invokes the platform application program interface corresponding to the running environment of the platform where the application program is currently located, so as to realize the function corresponding to the first time.
- the application program can normally implement corresponding functions on various platforms or operating environments, thereby improving user experience.
- developers can develop corresponding applications for applications that need to be cross-platform without relying on multiple native platforms, which improves development efficiency.
- step 203 may specifically be:
- the preset engine may be a flutter engine.
- step 203 may specifically include steps 2031 and 2032:
- the platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources;
- the corresponding platform API can be obtained at the first time to obtain the corresponding platform resources to smoothly implement the corresponding functions.
- the platform API is not called directly, it needs to go through the flutter engine, and the flutter engine will pre-set the calling rules, which cannot be called arbitrarily, which ensures the security of the application during use.
- step 201 in order to enable the client to implement the technical solutions provided by the foregoing embodiments, with reference to FIG. 2 and as shown in FIG. 3 , before step 201 , 200A and 200B may also be included:
- the software packages here can be jar packages and so files.
- each cross-platform application program interface corresponds to an event
- each platform application program interface can implement a function corresponding to an event
- each event corresponds to a variety of target platform application program interfaces
- each target platform application program interface corresponds to a an operating environment.
- each platform application program interface in the platform application program interface layer can be lazily loaded, and subsequent application and occupation of related resources will be performed when they need to be used.
- the required cross-platform application program interface can be constructed when the application runs on the client or other electronic devices, so that the application can run smoothly and normally no matter what the current platform or operating environment is. Implement your own functionality.
- the following steps 301 and 302, and steps 301 and 302 need to be implemented before the implementation method of the functions in the application program provided by the present disclosure is implemented.
- the execution body of the corresponding technical solution may be the client or the server used by the developer.
- each platform API corresponds to an operating system/platform/running environment, and each platform API is used to implement a function corresponding to an event.
- each platform API may specifically be one of the following APIs with functions at the operating system level: picture decoding, video encoding and decoding, custom network communication protocol, and inter-process memory copy.
- development requirements it can be a specific function list, and the functions required in the function list can be various functions that need to be used in the development process, such as drawing windows, obtaining memory information, reading and writing data, etc. function
- platform APIs corresponding to development requirements from at least one operating system.
- each operating system has a description document corresponding to its platform API, so here you can select the corresponding one according to each function in the function list and the platform API description document of each operating system.
- Platform API Platform API.
- the platform API corresponding to each underlying function can be obtained according to the technical documents of the operating system, etc. After obtaining the platform API, a corresponding platform API list is formed according to the platform API, and then the All platform APIs are encapsulated according to different functions or categories.
- the platform API obtained in the present disclosure can be encapsulated to form the platform application program interface layer in the functional layering of the runtime container as shown in FIG. 6; The specifications that must be complied with when the runtime container shown in Figure 6 is running on different platforms to realize the capabilities corresponding to each API in the platform API layer.
- the platform API may be encapsulated according to its corresponding function, or may be any other feasible manner, which is not specifically limited in this application.
- the preset container may be a flutter runtime container
- the preset engine may be a flutter engine.
- the present disclosure rewrites the flutter engine, and changes the implementation of the original flutter dependency to a platform application that can be formed by using 301 steps Program interface layer, while adding, modifying, and deleting some APIs exposed to the framework framework layer to the flutter engine, so that in the runtime container for flutter, the flutter engine (in this disclosure, the flutter engine can be the flutter engine layer ) can encapsulate the platform API in the platform API layer to form some APIs in the flutter framework api (flutter framework application program interface, that is, the aforementioned cross-platform application program interface) in the uppermost layer (referred to as the cross-platform API layer in this disclosure).
- flutter technology will also provide a set of widget systems similar to web page widgets to build UI, and widgets can be freely expanded, so when this disclosure uses the flutter engine and the flutter runtime container, developers can also Build the UI more freely to ensure the rich display effect of the application to improve the user experience.
- exposure is a special vocabulary in software engineering, and specifically refers to an interface provided to developers that can be called. If the API is not exposed, developers will not be able to call corresponding functions during development.
- the platform APIs in this disclosure may only have APIs corresponding to those functions that affect the key performance of the operating system.
- the preset engine when it exposes the platform API, it will encapsulate and expose the platform API belonging to different operating systems according to the corresponding functions according to the difference of different operating platforms, so that developers can call the unified cross-platform API, that is, When a developer calls a cross-platform API, he actually calls multiple platform APIs belonging to different operating systems, thereby ensuring that the developed code can be applied to multiple different operating systems.
- the platform API is exposed through the preset engine in the preset container, the security of the platform API is guaranteed.
- the platform API in the above technical solution corresponds to multiple operating systems, the developer is required to pass
- the developed application code can call different APIs for different operating systems according to its own needs, so the final developed code can be applied to a variety of different operating systems. It is efficient and does not need to rely on the native platform for development, so it can achieve a set of code support for a variety of different platforms without using the native platform.
- the platform API at the operating system level can be called, and the platform API has the ability to directly exchange and communicate data between processes without serializing communication through communication, which improves development.
- the performance of the application after completion improves the user experience.
- the usage requirements of the engine itself can also include 303 after step 301:
- the core API is located in the second layer (referred to as the platform extension layer in this disclosure).
- this layer can encapsulate the core API contained in itself into a part of the application program interface of the flutter framework of the uppermost layer (cross-platform application program interface layer) for developers to use.
- step 302 can include 3021-3023:
- the modification instruction is used to instruct to modify the platform API.
- the modification instruction may also include an identifier of the platform API that needs to be modified. Specific modifications can add optional parameters to add new functions to the original platform API.
- the flutter engine exposes the platform API of the platform API layer, if it receives the If the modification instructions are modified, some of the platform APIs will be modified according to the modification instructions and encapsulated to form the customized framework API of the second layer (platform extension layer), and then combined with the unmodified platform APIs and core APIs.
- the API is encapsulated together as part of the application program interface of the flutter framework in the top layer (cross-platform API layer).
- the target platform API in the above step 3022 includes some modified platform APIs and unmodified platform APIs, and for the unmodified platform APIs, it can be considered that the modification instruction indicates that the modification is empty.
- the present disclosure there is a first platform application program interface in at least one platform application program interface; the first platform application program interface is a native application program interface. Based on the program interface, it is obtained by extending the corresponding functions.
- the inherent platform API of the platform can be expanded with more functions, which is convenient for users to use and improves user experience.
- the plug-in establishment instruction carries plug-in establishment information; the plug-in establishment instruction is used to instruct to establish a plug-in.
- the plug-in can be registered at the top layer (that is, the cross-platform API layer).
- the plug-in is completely written in dart code
- the plugin is not only implemented by dart code but also needs to encapsulate the functions of a certain kind of native platform, it can be called a flutter plugin.
- a plug-in here can be a brand-new function, or can be a comprehensive coverage of the platform API or core API (corresponding to the flutter engine) (that is, including the original function and the new function).
- the plug-in API can be a plug-in interface (pluin-insservice api), when the plug-in interface is used by developers , it can provide the plugin functions corresponding to its corresponding flutter module and flutter plugin.
- the X3 step is mainly implemented by the top cross-platform API layer.
- the developed applications also include plug-ins that can realize unique functions, which ensures the smooth progress of development and improves the experience of subsequent applications.
- the method for implementing functions in the application program provided by the present disclosure may further include S1-S3:
- the plug-in may be the plug-in in the technical solution corresponding to FIG. 9 .
- the software package obtained in step 200A should contain the code corresponding to the platform expansion layer as shown in FIG. 9
- the platform extension layer can be constructed to ensure that the second event generated when the subsequent application is used can be called by the corresponding plug-in.
- the plug-in uses its own function to realize the corresponding function or uses the platform API to realize the corresponding function, this disclosure does not specifically show it, and it depends on the actual demand.
- the third-party SDK software development kit (SDK, software development kit) is used for at least one or more of the following: calling preset APIs in all platform APIs, calling third-party APIs in third-party open source databases; preset APIs For an API whose stability parameter is greater than a preset value, the stability parameter is used to represent the stability and data security degree of the application corresponding to the API when the API is called.
- the third-party SDK that can implement the function of calling the preset API in all platform APIs can be located in the second Layer (Platform Expansion Layer), which can specifically be "Direct SDK", and a third-party SDK that can call third-party APIs in third-party open source databases can be "Plat specific implementation”.
- Platinum Expansion Layer a third-party SDK that can call third-party APIs in third-party open source databases
- the present disclosure designs the above-mentioned “Direct Tuning SDK” ”, which is convenient for developers to directly call the preset API in the platform API layer when using a certain third-party SDK, improving development efficiency.
- the platform APIs of multiple operating systems are first obtained, and then the platform APIs are exposed in the preset container through the preset engine. Because the platform API is exposed through the preset engine in the preset container, the security of the platform API is guaranteed.
- developers can When developing an application, the platform API can make the developed application code call different APIs for different operating systems according to its own needs, so the final developed code can be applied to a variety of different operating systems, and the development efficiency is high And it does not need to rely on the native platform for development, so it is possible to achieve a development scheme that supports a variety of different platforms with a set of code without the security of the native platform.
- the application package when the application package is compiled on any platform (operating system, such as ios system), it will be compiled into two parts according to the characteristics of the platform.
- the first part Including the flutter engine corresponding to the platform and the platform API corresponding to the platform, the second part includes AOT (aheadof) running in the runtime environment (flutter runtime container and dart virtual machine (generated by the flutter engine)) created in the first part time) compile the product snapshot.
- the flutter engine in the first part When the application is started, the flutter engine in the first part will be loaded and initialized immediately, forming the flutter engine layer and platform API layer in the flutter runtime container, and providing APIs that can be called by the platform extension layer (convenient for the platform extension layer to call ); the platform API in the platform API layer will apply for the underlying resources to the platform.
- the platform APIs in the platform API layer In order to ensure that the underlying resources (memory resources, CPU resources, etc.) are applied for too much by the application, some of the platform APIs in the platform API layer here will be lazy loaded. , that is, only some platform APIs will apply for underlying resources during initialization, and the other part will apply for underlying resources only when they need to be used.
- the second part of the AOT compilation product snapshot will complete the initialization of the cross-platform API layer and the platform extension layer in the running environment formed by the initialization of the flutter engine layer and the platform API layer. Then the application starts successfully.
- the flutter engine will control the rendering of the page UI and monitor the user's operation.
- the flutter engine will trigger the corresponding callback event and send it to the cross-platform
- the corresponding upper-layer API in the API layer (for example, the flutter framework api in the foregoing embodiment)
- the cross-platform API layer will use the ability to call different layers according to the upper-layer API that receives the event to call the resources of the platform (including network resources, GPU resources, CPU resources, file IO resources, memory resources, cross-process communication resources, etc.), and functions such as image editing and video transcoding corresponding to user operations have been completed.
- the application developed through the solution of the present application will produce the flutter runtime container in the foregoing embodiment in the platform, and the container takes over the tasks of the native process similar to the native application, and can transfer the platform to the platform through different layers in the container.
- the capabilities or resources are encapsulated layer by layer, and finally the easy-to-use upper-layer API is exposed through the cross-platform API layer for the application to use. Therefore, the technical solution provided in this application can ensure that the finally developed cross-platform application can be successfully implemented on different platforms. The corresponding palace.
- L1-L3 may also be included:
- the server can implement the above-mentioned functions respectively through means for implementing functions in the application program configured therein.
- the implementation device of the functions in the application program includes corresponding hardware structures and/or software modules for performing each function, and these corresponding hardware structures and/or software modules for performing each function can constitute a terminal.
- the present disclosure can be implemented in hardware or a combination of hardware and computer software in conjunction with the algorithm steps of the examples described in the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this disclosure.
- the server may be divided into functional modules according to the foregoing method examples.
- the server may include a device for implementing functions in an application program, and the device for implementing functions in an application program may divide each function module corresponding to each function, or may divide the two One or more functions are integrated in one processing module.
- the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present disclosure is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
- FIG. 13 shows a possible structural schematic diagram of the device 03 for implementing the functions in the application program in the client 01 shown in FIG. 1 .
- the functions in the application program The implementation device 03 includes: a monitoring module 31 , a determination module 32 and a processing module 33 .
- the monitoring module 31 is configured to monitor and obtain the first event of the application; the determining module 32 is configured to determine the cross-platform application program interface corresponding to the first event obtained by the monitoring module 31; the cross-platform application program interface It is encapsulated and obtained by at least one platform application program interface having the function corresponding to the first event, and each platform application program interface corresponds to one operating environment; the processing module 33 is configured as a cross-platform application program interface determined by the determining module 32.
- the platform application program interface corresponding to the current operating environment is called to realize the function corresponding to the first event.
- the processing module 33 is specifically configured to use the preset engine to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface determined by the determination module 32 to realize the function corresponding to the first event.
- the device further includes an acquisition module; the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating environment.
- the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating
- first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
- the monitoring module 31 is also configured to monitor and obtain the second event of the application; the determining module 32 is also configured to determine the plug-in corresponding to the second event obtained by the monitoring module 31; the processing module 33 is also configured to run The plug-in determined by the determining module 32 is to implement the function corresponding to the second event.
- the processing module 33 is specifically configured to: call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to obtain the platform resources required for the first event;
- the platform resources include any one or more of the following: : Network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to implement the function corresponding to the first event.
- FIG. 14 is a schematic diagram showing a possible structure of the electronic device shown according to an exemplary embodiment.
- the client or server that contains the device.
- the electronic device includes a processor 41 and a memory 42 .
- the memory 42 is used for storing the executable instructions of the processor 41, and the processor 41 can realize the functions of each module in the device 03 for realizing the functions in the application program in the above-mentioned embodiment.
- the processor 41 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 14 .
- the control device of the air conditioner may include a plurality of processors 41, such as the processor 41-1 and the processor 41-2 shown in FIG. 14 .
- Each of these processors 41 may be a single-core processor (Single-CPU) or a multi-core processor (Multi-CPU).
- Processor 41 herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- Memory 42 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of static storage devices that can store information and instructions.
- ROM read-only memory
- RAM random access memory
- dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), disk-readable storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and Any other medium that can be accessed by a computer, but is not limited to this.
- the memory 42 may exist independently, and is connected to the processor 41 through the bus 43 .
- the memory 42 may also be integrated with the processor 41 .
- the bus 43 can be an industry standard architecture (industry standard architecture, ISA) bus, a peripheral component interconnect (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus or the like.
- the bus 43 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
- the electronic device in order to facilitate information interaction between the electronic device and other devices (such as a server or a client), the electronic device includes a communication interface 44 .
- Communication interface 44 using any transceiver-like device, for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc. .
- the communication interface 44 may include a receiving unit to implement a receiving function, and a transmitting unit to implement a transmitting function.
- the electronic device may be a client, and in this case, the electronic device may further optionally include: a peripheral device interface 45 and at least one peripheral device.
- the processor 41, the memory 42 and the peripheral device interface 45 can be connected through a bus 43 or a signal line.
- Each peripheral device can be connected to the peripheral device interface 45 through a bus 43, a signal line or a circuit board.
- the peripheral devices include: at least one of a radio frequency circuit 46 , a display screen 47 , a camera 48 , an audio circuit 49 , a positioning component 50 and a power supply 51 .
- the peripheral device interface 45 may be used to connect at least one peripheral device related to I/O (input/output) to the processor 41 and the memory 42 .
- processor 41, memory 42, and peripherals interface 45 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 41, memory 42, and peripherals interface 45 or The two may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
- the radio frequency circuit 46 is used for receiving and transmitting RF (radio frequency, radio frequency) signals, also called electromagnetic signals.
- the radio frequency circuit 46 communicates with the communication network and other communication devices via electromagnetic signals.
- the radio frequency circuit 46 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
- the radio frequency circuit 404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
- Radio frequency circuitry 46 may communicate with other terminals via at least one wireless communication protocol.
- the wireless communication protocol includes but is not limited to: metropolitan area network, mobile communication networks of various generations (2G, 3G, 4G and 5G), wireless local area network and/or Wi-Fi (wireless fidelity, wireless fidelity) network.
- the radio frequency circuit 46 may further include a circuit related to NFC (near field communication, short-range wireless communication), which is not limited in the present disclosure.
- the display screen 47 is used to display UI (user interface, user interface).
- the UI can include graphics, text, icons, video, and any combination thereof.
- display screen 47 also has the ability to capture touch signals on or over the surface of display screen 47 .
- the touch signal can be input to the processor 41 as a control signal for processing.
- the display screen 47 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
- the display screen 47 may be one, and the front panel of the client is provided; the display screen 47 may be made of materials such as LCD (liquid crystal display, liquid crystal display), OLED (organic light-emitting diode, organic light-emitting diode) and the like .
- the camera assembly 48 is used to capture images or video.
- the camera assembly 48 includes a front camera and a rear camera.
- the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal.
- Audio circuitry 49 may include a microphone and speakers.
- the microphone is used to collect the sound waves of the user and the environment, convert the sound waves into electrical signals, and input them to the processor 41 for processing, or to the radio frequency circuit 46 to realize voice communication.
- the microphone may also be an array microphone or an omnidirectional collection microphone.
- the speaker is used to convert electrical signals from the processor 41 or the radio frequency circuit 46 into sound waves.
- the loudspeaker can be a traditional thin-film loudspeaker or a piezoelectric ceramic loudspeaker.
- the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves that cannot be heard by humans for distance measurement and other purposes.
- audio circuitry 49 may also include a headphone jack.
- the positioning component 50 is used to locate the current geographic location of the client to implement navigation or LBS (location based service).
- the positioning component 50 may be a positioning component based on the GPS (global positioning system, global positioning system) of the United States, the Beidou system of China, the Grenas system of Russia, or the Galileo system of the European Union.
- the power supply 51 is used to power various components in the client.
- the power source 51 may be alternating current, direct current, disposable batteries or rechargeable batteries.
- the rechargeable battery can support wired charging or wireless charging.
- the rechargeable battery can also be used to support fast charging technology.
- the electronic device also includes one or more sensors 410 .
- the one or more sensors 410 include, but are not limited to, acceleration sensors, gyroscope sensors, pressure sensors, fingerprint sensors, optical sensors, and proximity sensors.
- the acceleration sensor can detect the acceleration on the three coordinate axes of the coordinate system established by the client.
- the gyroscope sensor can detect the direction and rotation angle of the client's body, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the client.
- the pressure sensor may be disposed on the side frame of the client and/or the lower layer of the display screen 47 . When the pressure sensor is arranged on the side frame of the terminal 01, the user's holding signal on the client terminal can be detected.
- the fingerprint sensor is used to collect the user's fingerprint.
- Optical sensors are used to collect ambient light intensity.
- Proximity sensors also called distance sensors, are usually located on the front panel of the client. Proximity sensors are used to capture the distance between the user and the front of the client.
- FIG. 14 or FIG. 15 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or use different components layout.
- Embodiments of the present disclosure further provide a computer-readable storage medium, where instructions are stored on the computer-readable storage medium.
- the instructions on the readable storage medium are executed by a processor of an electronic device, the electronic device can perform the foregoing implementation.
- the example provides a method for implementing functions in an application program on an apparatus for implementing functions in an application program in an electronic device.
- Embodiments of the present disclosure also provide a computer program product containing instructions, which, when executed on an electronic device, enable the electronic device to execute the method for implementing the functions in the application program provided by the foregoing embodiments.
- the disclosed apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
- a readable storage medium including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
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
A method and apparatus for implementing functions in an application program, an electronic device and a storage medium, which relate to the technical field of electronics, and may conveniently implement the normal use of an application program in different running environment by utilizing a cross-platform application program interface. The method comprises: monitoring and acquiring a first event of an application program (201); determining a cross-platform application program interface corresponding to the first event, wherein the cross-platform application program interface is obtained by packaging at least one platform application program interface equipped with a function corresponding to the first event, and each platform application program interface corresponds to one running environment (202); and by means of the cross-platform application program interface, calling the platform application program interface which corresponds to the current running environment so as to implement a function corresponding to the first event (203).
Description
本申请要求在2021年3月23日提交中国专利局、申请号为202110310126.9、申请名称为“应用程序中功能的实现方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on March 23, 2021, with the application number of 202110310126.9, and the application name is "methods, devices, electronic devices and storage media for realizing functions in applications", all of which are The contents are incorporated herein by reference.
本公开实施例涉及电子技术领域,尤其涉及一种应用程序中功能的实现方法、装置、电子设备和存储介质。The embodiments of the present disclosure relate to the field of electronic technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for implementing functions in an application program.
随着移动互联网的蓬勃发展,目前存在终端设备可以使用的多种不同的操作系统(简称终端平台或平台),所以为了提升开发效率,降低开发成本,使得自身研发的软件应用可以在不同的平台运行使用,各个软件应用的厂商往往会采用跨平台的开发方案,实现一套软件应用的代码能运行在不同平台的技术方案。With the vigorous development of the mobile Internet, there are currently many different operating systems (terminal platforms or platforms) that can be used by terminal devices. Therefore, in order to improve development efficiency and reduce development costs, software applications developed by itself can be used on different platforms. For operation and use, manufacturers of various software applications often adopt a cross-platform development scheme to realize a technical scheme that the code of a set of software applications can run on different platforms.
但是目前的跨平台的开发方案,大多针对的场景有限,使得开发得出的跨平台软件应用的性能有限,不能很好的在不同平台的运行环境中正常使用。However, most of the current cross-platform development schemes are aimed at limited scenarios, so that the developed cross-platform software applications have limited performance and cannot be used normally in operating environments of different platforms.
发明内容SUMMARY OF THE INVENTION
本公开关于一种应用程序中功能的实现方法、装置、服务器和可读存储介质,能够不通过原生平台安全的实现一套代码支持多种不同平台的开发方案。The present disclosure relates to a method, device, server and readable storage medium for implementing functions in an application program, which can safely implement a set of codes to support a development scheme of multiple different platforms without using a native platform.
为达到上述目的,本公开实施例采用如下技术方案:In order to achieve the above purpose, the embodiments of the present disclosure adopt the following technical solutions:
第一方面,提供一种应用程序中功能的实现方法,包括:监听并获取应用程序的第一事件;确定与第一事件对应的跨平台应用程序接口;跨平台应用程序接口由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到,每种平台应用程序接口对应一种运行环境;通过跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。In a first aspect, a method for implementing functions in an application program is provided, including: monitoring and acquiring a first event of an application program; determining a cross-platform application program interface corresponding to the first event; At least one platform application program interface of the function corresponding to the event is encapsulated, and each platform application program interface corresponds to one operating environment; the platform application program interface corresponding to the current operating environment is called through the cross-platform application program interface, so as to realize the first event corresponding function.
可选的,通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现目标事件的功能,包括:利用预设引擎通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。Optionally, calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to realize the function of the target event, including: using the preset engine to call the platform application corresponding to the current operating environment through the cross-platform application program interface The program interface is used to realize the function corresponding to the first event.
可选的,该方法还包括:获取应用程序对应的软件包;对软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层;每种跨平台应用程序接口对应一种事件,每种平台应用程序接口能够实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Optionally, the method further includes: obtaining a software package corresponding to the application; compiling and parsing the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces, including multiple platform application programs. The platform application program interface layer of the interface and the engine layer including the preset engine; each cross-platform application program interface corresponds to an event, each platform application program interface can implement a function corresponding to an event, and each event corresponds to a variety of goals Platform application program interface, each target platform application program interface corresponds to a running environment.
可选的,至少一种平台应用程序接口中存在第一平台应用程序接口;第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。Optionally, there is a first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
可选的,该方法还包括:监听并获取应用程序的第二事件;确定与第二事件对应的插件;运行插件,以实现第二事件对应的功能。Optionally, the method further includes: monitoring and acquiring a second event of the application; determining a plug-in corresponding to the second event; and running the plug-in to implement a function corresponding to the second event.
可选的,通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能,包括:通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取第一事件所需的平台资源;平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;加载平台资源,以实现第一事件对应的功能。Optionally, calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to realize the function corresponding to the first event, including: calling the platform application program interface corresponding to the current operating environment through the cross-platform application program interface , obtain the platform resources required for the first event; the platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to achieve The function corresponding to the first event.
第二方面,提供一种应用程序中功能的实现装置,包括监听模块、确定模块和处理模块。其中,监听模块,被配置为监听并获取应用程序的第一事件;确定模块,被配置为确定与监听模块获取的第一事件对应的跨平台应用程序接口;跨平台应用程序接口由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到,每种平台应用程序接口对应一种运行环境;处理模块,被配置为通过确定模块确定的跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。In a second aspect, an apparatus for implementing functions in an application program is provided, including a monitoring module, a determination module and a processing module. The monitoring module is configured to monitor and obtain the first event of the application; the determining module is configured to determine the cross-platform application program interface corresponding to the first event obtained by the monitoring module; The function corresponding to an event is obtained by encapsulating at least one platform application program interface, and each platform application program interface corresponds to one operating environment; the processing module is configured to call the current operating environment through the cross-platform application program interface determined by the determination module. The platform application program interface is used to realize the function corresponding to the first event.
可选的,处理模块具体被配置为:利用预设引擎通过确定模块确定的跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。Optionally, the processing module is specifically configured to use the preset engine to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface determined by the determination module, so as to realize the function corresponding to the first event.
可选的,该装置还包括获取模块;获取模块被配置为:获取应用程序对应的软件包;对软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层;每种跨平台应用程序接口对应一种事件,每种平台应用程序接口能够实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Optionally, the device further includes an acquisition module; the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating environment.
可选的,至少一种平台应用程序接口中存在第一平台应用程序接口;第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。Optionally, there is a first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
可选的,监听模块还被配置为监听并获取应用程序的第二事件;确定模块还被配置为确定与监听模块获取的第二事件对应的插件;处理模块还被配置为运行确定模块确定的插件,以实现第二事件对应的功能。Optionally, the monitoring module is also configured to monitor and acquire the second event of the application; the determination module is also configured to determine the plug-in corresponding to the second event acquired by the monitoring module; the processing module is also configured to run the event determined by the determination module. A plug-in to implement the function corresponding to the second event.
可选的,处理模块具体被配置为:通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取第一事件所需的平台资源;平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;加载平台资源,以实现第一事件对应的功能。Optionally, the processing module is specifically configured to: call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to obtain the platform resources required by the first event; the platform resources include any one or more of the following: Network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to implement the function corresponding to the first event.
第三方面,本公开提供一种电子设备,该电子设备包括处理器和用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令,以实现如第一方面提供及其任一种可能的实施方式的应用程序中功能的实现方法。In a third aspect, the present disclosure provides an electronic device, the electronic device comprising a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions, so as to implement any of the methods provided in the first aspect and any thereof. A method for implementing functions in an application program of a possible implementation.
第四方面,本公开提供一种计算机可读存储介质,该计算机可读存储介质上存储有 指令,当计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备执行如第一方面提供及其任一种可能的实施方式的应用程序中功能的实现方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is made to execute the In one aspect, a method for implementing functions in an application program of any possible implementation manner thereof is provided.
第五方面,本申请实施例还提供一种计算机程序产品,包括一条或多条指令,该一条或多条指令可以在电子设备上运行,使得电子设备执行如第一方面及其任一种可能的实施方式的应用程序中功能的实现方法。In a fifth aspect, an embodiment of the present application further provides a computer program product, including one or more instructions, and the one or more instructions can be executed on an electronic device, so that the electronic device executes the first aspect and any of its possibilities. The implementation method of the function in the application program of the embodiment.
可以理解的,本公开提供的技术方案中,用于实现应用程序中功能的实现方法的设备在监听并获取到应用程序的第一时间后,会首先确定与该第一时间对应的跨平台应用程序接口;因为该跨平台应用程序接口是由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到的,而且每种平台应用程序接口对应一种运行环境;所以之后该设备可以通过该跨平台应用程序接口调用该应用程序当前所处的平台的运行环境对应的平台应用程序接口,进而实现该第一时间对应的功能。本公开提供的技术方案中,因为开发应用程序时便预先设置了上述的跨平台应用程序接口,所以该应用程序在多种不同的平台或运行环境中都可以正常实现相应的功能,提高用户体验。进一步的,因为存在该跨平台应用程序接口,开发人员在对需要跨平台的应用程序也就可以不依赖多种原生平台来开发对应的应用程序,也就提高了开发效率。It can be understood that, in the technical solution provided by the present disclosure, after monitoring and obtaining the first time of the application, the device for implementing the method for implementing the functions in the application will first determine the cross-platform application corresponding to the first time. program interface; because the cross-platform application program interface is encapsulated by at least one platform application program interface having the function corresponding to the first event, and each platform application program interface corresponds to one operating environment; The platform application program interface corresponding to the running environment of the platform where the application program is currently located is called through the cross-platform application program interface, thereby realizing the function corresponding to the first time. In the technical solution provided by the present disclosure, because the above-mentioned cross-platform application program interface is preset when an application program is developed, the application program can normally implement corresponding functions on various platforms or operating environments, thereby improving user experience. . Further, because of the existence of the cross-platform application program interface, developers can develop corresponding applications for applications that need to be cross-platform without relying on multiple native platforms, which improves development efficiency.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
图1为本公开实施例提供的一种实施环境示意图;FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种应用程序中功能的实现方法的流程示意图一;FIG. 2 is a schematic flowchart 1 of a method for implementing functions in an application program provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种应用程序中功能的实现方法的流程示意图二;3 is a second schematic flowchart of a method for implementing functions in an application program provided by an embodiment of the present disclosure;
图4为本公开实施例提供的一种应用程序中功能的实现方法的流程示意图三;FIG. 4 is a schematic flowchart three of a method for implementing functions in an application program provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种应用程序开发方法的流程示意图一;FIG. 5 is a schematic flowchart 1 of an application development method provided by an embodiment of the present disclosure;
图6为本公开实施例提供的一种运行时容器的结构示意图;FIG. 6 is a schematic structural diagram of a runtime container according to an embodiment of the present disclosure;
图7为本公开实施例提供的一种应用程序开发方法的流程示意图二;FIG. 7 is a second schematic flowchart of an application development method provided by an embodiment of the present disclosure;
图8为本公开实施例提供的一种应用程序开发方法的流程示意图三;FIG. 8 is a third schematic flowchart of an application development method provided by an embodiment of the present disclosure;
图9为本公开实施例提供的一种应用程序开发方法的流程示意图四;FIG. 9 is a fourth schematic flowchart of a method for developing an application program provided by an embodiment of the present disclosure;
图10为本公开实施例提供的一种应用程序中功能的实现方法的补充流程示意图一;FIG. 10 is a supplementary flowchart diagram 1 of a method for implementing functions in an application program provided by an embodiment of the present disclosure;
图11为本公开实施例提供的一种应用程序开发方法的流程示意图五;FIG. 11 is a schematic flowchart five of a method for developing an application program provided by an embodiment of the present disclosure;
图12为本公开实施例提供的一种应用程序中功能的实现方法的补充流程示意图二;FIG. 12 is a second supplementary flowchart of a method for implementing functions in an application program provided by an embodiment of the present disclosure;
图13为本公开实施例提供的一种应用程序中功能的实现装置的结构示意图;13 is a schematic structural diagram of an apparatus for implementing functions in an application program provided by an embodiment of the present disclosure;
图14为本公开实施例提供的一种电子设备的结构示意图;FIG. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
图15为本公开实施例提供的另一种电子设备的结构示意图。FIG. 15 is a schematic structural diagram of another electronic device according to an embodiment of the present disclosure.
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second" and the like in the description and claims of the present disclosure and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
另外,在本公开实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本公开实施例的描述中,“多个”是指两个或多于两个。In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in this document is only a description of the associated object The association relationship of , indicates that there can be three kinds of relationships, for example, A and/or B, can indicate that A exists alone, A and B exist at the same time, and B exists alone. Also, in the description of the embodiments of the present disclosure, "plurality" means two or more.
本公开所涉及的数据可以为经用户授权或者经过各方充分授权的数据。The data involved in this disclosure may be data authorized by the user or fully authorized by all parties.
首先,对本公开所涉及的技术术语进行介绍:First, the technical terms involved in the present disclosure are introduced:
Flutter:是Google开源的UI(user interface,用户界面)工具包,帮助开发者通过一套代码库高效构建多平台精美应用,支持移动、Web(world wide web,万维网)、桌面和嵌入式平台。Flutter: It is Google's open source UI (user interface, user interface) toolkit, which helps developers efficiently build multi-platform beautiful applications through a set of code bases, supporting mobile, Web (world wide web, World Wide Web), desktop and embedded platforms.
Flutter引擎:是一个用于运行高品质移动应用的可移植运行时。它实现了Flutter的核心库,动画和图形,文件和网络的I/O,支持可访问性(accessibility),插件架构,以及用于开发,编译和运行Flutter应用程序的Dart运行时和开发工具。Flutter Engine: is a portable runtime for running high-quality mobile applications. It implements Flutter's core libraries, animation and graphics, file and network I/O, supports accessibility, a plugin architecture, and the Dart runtime and development tools for developing, compiling, and running Flutter applications.
Skia:是个2D向量图形处理函数库,包含字型、坐标转换,以及点阵图都有高效能且简洁的表现。Skia: It is a 2D vector graphics processing function library, including font, coordinate conversion, and bitmap with high performance and concise performance.
API:全称为application programming interface,即应用程序编程接口或应用程序接口,是一些预先定义的接口(如函数、HTTP接口),或指软件系统不同组成部分衔接的约定,用来提供应用程序与开发人员基于某软件或硬件得以访问的一组例程,而又无需访问源码,或理解内部工作机制的细节。API: The full name is application programming interface, that is, application programming interface or application programming interface. It is some pre-defined interfaces (such as functions, HTTP interfaces), or refers to the conventions for the connection of different components of a software system, which are used to provide application programs and development. A set of routines that a person can access based on a piece of software or hardware without having access to the source code or understanding the details of the inner workings.
运行时容器:软件运行时期需要的运行环境,该运行环境内包含有软件运行需要的各个功能。Runtime container: The runtime environment required by the software during the runtime, and the runtime environment contains various functions required for the software to run.
SDK:全称为software development kit,即软件开发工具包,具体是一些被软件工程师用于为特定的软件包、软件框架、硬件平台、操作系统等创建应用软件的开发工具的集合。SDK: The full name is software development kit, that is, software development kit, which is a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
Dart:谷歌公司开发的计算机编程语言,是面向对象的、类定义的、单继承的语言。Dart: A computer programming language developed by Google. It is an object-oriented, class-defined, and single-inheritance language.
参考图1所示,为本公开实施例提供的技术方案可能涉及的实施环境的示意图。该实施环境,可以包括客户端01和服务器02,客户端01通过有线通讯方式或无线通讯方式与服务器02通信。Referring to FIG. 1 , it is a schematic diagram of an implementation environment that the technical solutions provided by the embodiments of the present disclosure may involve. The implementation environment may include a client 01 and a server 02, and the client 01 communicates with the server 02 through wired communication or wireless communication.
示例性的,本公开实施例中的客户端01可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等可以进行项目开发的设备,本申请实施例对该客户端的具体形态不作特殊限制。Exemplarily, the client 01 in the embodiment of the present disclosure may be a mobile phone, a tablet computer, a desktop type, a laptop type, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and Cell phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) devices and other devices that can be used for project development, the specific form of the client in the embodiments of the present application No special restrictions are imposed.
示例性的,本公开中的服务器02可以是一台服务器,也可以是多台服务器组成的服务器集群,或者是一个云计算服务中心,本公开对此不做限定。服务器02主要用于接收客户端发送的应用程序的内容请求并返回对应内容,以及用于接收客户端发送的开发请求和代码,并使用自身设定的框架完成应用的构建。Exemplarily, the server 02 in the present disclosure may be a server, a server cluster composed of multiple servers, or a cloud computing service center, which is not limited in the present disclosure. The server 02 is mainly used to receive the content request of the application program sent by the client and return the corresponding content, as well as to receive the development request and code sent by the client, and use the framework set by itself to complete the construction of the application.
目前的跨平台的开发方案,大多针对的场景有限,导致有些开发内容只能在原生平台上进行原生开发,进而使得最终开发得出的软件应用的性能有限,不能很好的在不同的平台实现对应的功能。Most of the current cross-platform development solutions are aimed at limited scenarios, resulting in some development content that can only be natively developed on the native platform, which makes the performance of the final developed software application limited and cannot be well implemented on different platforms. corresponding function.
针对上述问题,本公开提供一种应用程序中功能的实现方法,该方法能够利用跨平台应用程序接口方便的实现应用程序在不同运行环境中的正常使用。该方法的具体执行主体可以为上述的客户端,也可以为上述的服务器,具体根据实际需求而定。本公开实施例后续的描述中,“客户端”指开发人员使用的终端,“服务器”则根据情况的不同,可以是开发人员使用的终端,也可以是和开发人员通过自身使用的终端进行通信交互的服务器。In view of the above problems, the present disclosure provides a method for implementing functions in an application program, which can conveniently realize the normal use of an application program in different operating environments by using a cross-platform application program interface. The specific execution body of the method may be the above-mentioned client or the above-mentioned server, which is determined according to actual needs. In the subsequent description of the embodiments of the present disclosure, "client" refers to a terminal used by developers, and "server" may be a terminal used by developers or communicate with developers through a terminal used by themselves, depending on the situation Interactive server.
参照图2所示,为本公开实施例提供一种应用程序中功能的实现方法的流程示意图。该方法由应用程序中功能的实现装置执行,当该应用程序中功能的实现装置为客户端或客户端中的一部分时,该方法可以包括201-203:Referring to FIG. 2 , an embodiment of the present disclosure provides a schematic flowchart of a method for implementing functions in an application program. The method is executed by means for implementing functions in the application, and when the means for implementing functions in the application is a client or a part of the client, the method may include 201-203:
201、监听并获取应用程序的第一事件。201. Monitor and acquire the first event of the application.
示例性的,第一事件可以是用户在使用某个应用程序时,对应用程序的显示界面中单击某个控件(例如“播放”、“分享”、“转发”等)的点击;或者应用程序在接收到用户触发的相应功能后产生的相关事件;对此本申请不做具体限制,具体依据实际而定。Exemplarily, the first event may be a click on a control (for example, "play", "share", "forward", etc.) in the display interface of the application when the user is using a certain application; or the application Relevant events generated by the program after receiving the corresponding function triggered by the user; there is no specific limitation on this in this application, and it depends on the actual situation.
一种可实现的方式中,实际中因为第一事件产生时,必然会实时产生相应的记录信息,所以201步骤也可以是获取第一事件的记录信息用于表征第一事件。具体可以从记录用于存储各项事件的记录信息的数据库中获取第一事件的记录信息。第一事件的记录信息可以是第一事件的描述信息。例如,第一事件的记录信息可以包括第一事件的记录时间、第一事件的属性以及第一事件的内容说明等。In an achievable manner, in practice, when the first event is generated, corresponding record information must be generated in real time, so step 201 may also be to acquire the record information of the first event to represent the first event. Specifically, the record information of the first event may be acquired from a database that records record information for storing various events. The record information of the first event may be description information of the first event. For example, the recording information of the first event may include the recording time of the first event, the attribute of the first event, the content description of the first event, and the like.
202、确定与第一事件对应的跨平台应用程序接口;跨平台应用程序接口由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到,每种平台应用程序接口对应一种运行环境。202. Determine a cross-platform application program interface corresponding to the first event; the cross-platform application program interface is encapsulated and obtained by at least one platform application program interface having a function corresponding to the first event, and each platform application program interface corresponds to a running surroundings.
示例性的,以第一事件对应的功能为对目标图像进行渲染为例,第一事件对应的快平台应用程序接口可以由安卓平台、ios平台和微软平台中能够实现对目标图像进行渲染的平台应用程序接口封装得到。具体封装方式可以为任一可行方式。在本公开中运行环境和平台一一对应,即每种平台都仅对应各自的运行环境。Exemplarily, taking the function corresponding to the first event as rendering the target image as an example, the fast platform application program interface corresponding to the first event may be a platform capable of rendering the target image in the Android platform, the ios platform and the Microsoft platform. Application program interface package is obtained. The specific packaging manner can be any feasible manner. In the present disclosure, the operating environment and the platform are in one-to-one correspondence, that is, each platform only corresponds to its own operating environment.
203、通过跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。203. Call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface, so as to realize the function corresponding to the first event.
本公开提供的技术方案中,用于实现应用程序中功能的实现方法的设备在监听并获取到应用程序的第一时间后,会首先确定与该第一时间对应的跨平台应用程序接口;因为该跨平台应用程序接口是由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到的,而且每种平台应用程序接口对应一种运行环境;所以之后该设备可以通过该跨平台应用程序接口调用该应用程序当前所处的平台的运行环境对应的平台应用程序接口,进而实现该第一时间对应的功能。本公开提供的技术方案中,因为开发应用程序时便预先设置了上述的跨平台应用程序接口,所以该应用程序在多种不同的平台或运行环境中都可以正常实现相应的功能,提高用户体验。进一步的,因为存在该跨平台应用程序接口,开发人员在对需要跨平台的应用程序也就可以不依赖多种原生平台来开发对应的应用程序,也就提高了开发效率。In the technical solution provided by the present disclosure, after monitoring and obtaining the first time of the application, the device for implementing the method for implementing the functions in the application will first determine the cross-platform application interface corresponding to the first time; because The cross-platform application program interface is encapsulated by at least one platform application program interface having a function corresponding to the first event, and each platform application program interface corresponds to one operating environment; therefore, the device can pass the cross-platform application program interface. The application program interface invokes the platform application program interface corresponding to the running environment of the platform where the application program is currently located, so as to realize the function corresponding to the first time. In the technical solution provided by the present disclosure, because the above-mentioned cross-platform application program interface is preset when an application program is developed, the application program can normally implement corresponding functions on various platforms or operating environments, thereby improving user experience. . Further, because of the existence of the cross-platform application program interface, developers can develop corresponding applications for applications that need to be cross-platform without relying on multiple native platforms, which improves development efficiency.
可选的,结合图2,参照图3所示,203步骤具体可以为:Optionally, with reference to FIG. 2 and as shown in FIG. 3 , step 203 may specifically be:
203、利用预设引擎通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。203. Use the preset engine to invoke the platform application program interface corresponding to the current operating environment through the cross-platform application program interface, so as to realize the function corresponding to the first event.
示例性的,预设引擎可以为flutter引擎。Exemplarily, the preset engine may be a flutter engine.
可选的,结合图2,参照图4所示,203步骤具体还可以包括2031和2032:Optionally, with reference to FIG. 2 and as shown in FIG. 4 , step 203 may specifically include steps 2031 and 2032:
2031、通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取第一事件所需的平台资源。2031. Call a platform application program interface corresponding to the current operating environment through a cross-platform application program interface to acquire platform resources required by the first event.
其中,平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;The platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources;
2032、加载平台资源,以实现第一事件对应的功能。2032. Load platform resources to implement the function corresponding to the first event.
这样一来,便可以使得第一时间对应的平台API获取到相应的平台资源以顺利实现相应的功能。In this way, the corresponding platform API can be obtained at the first time to obtain the corresponding platform resources to smoothly implement the corresponding functions.
这样一来,因为平台API不是直接被调用的,需要经过flutter引擎,而flutter引擎中会预先设定好调用规则,不能任意调用,也就保证了应用程序在使用过程中的安全性。In this way, because the platform API is not called directly, it needs to go through the flutter engine, and the flutter engine will pre-set the calling rules, which cannot be called arbitrarily, which ensures the security of the application during use.
可选的,为了能够使得客户端实现上述实施例提供的技术方案,结合图2,参照图3所示,在201步骤之前还可以包括200A和200B:Optionally, in order to enable the client to implement the technical solutions provided by the foregoing embodiments, with reference to FIG. 2 and as shown in FIG. 3 , before step 201 , 200A and 200B may also be included:
200A、获取应用程序对应的软件包。200A. Obtain a software package corresponding to the application.
示例性的,以安卓平台为例,这里的软件包可以为jar包和so文件。Exemplarily, taking the Android platform as an example, the software packages here can be jar packages and so files.
200B、对软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层。200B, compiling and parsing the software package to construct a cross-platform application program interface layer including multiple cross-platform application program interfaces, a platform application program interface layer including multiple platform application program interfaces, and an engine layer including a preset engine .
其中,每种跨平台应用程序接口对应一种事件,每种平台应用程序接口能够实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Among them, each cross-platform application program interface corresponds to an event, each platform application program interface can implement a function corresponding to an event, each event corresponds to a variety of target platform application program interfaces, and each target platform application program interface corresponds to a an operating environment.
具体的,以安卓平台为例,对软件包进行编译解析后,会存在两部分内容,一部分为包含有预设引擎的编译产物,另一部则为用于启动预设引擎形成引擎层和能够加载形成平台应用程序接口层和跨平台应用程序接口层的编译产物。其中,因为加载编译产物必然会消耗客户端的相关资源,而平台应用程序接口层中的每个平台应用程序接口并不会全部同时使用,所以为了降低对客户端资源的侵占,在本公开实施例中,对平台应用程序接口层中各个平台应用程序接口可以采用懒加载的方式,后续在需要使用到时再进行相关资源的申请和占用。Specifically, taking the Android platform as an example, after compiling and analyzing the software package, there will be two parts, one part is the compiled product containing the preset engine, and the other part is used to start the preset engine to form the engine layer and can Load the compiled artifacts that form the platform API layer and the cross-platform API layer. Among them, because loading the compiled product will inevitably consume the relevant resources of the client, and each platform application interface in the platform application interface layer will not be used at the same time, so in order to reduce the occupation of the client resources, in the embodiment of the present disclosure , each platform application program interface in the platform application program interface layer can be lazily loaded, and subsequent application and occupation of related resources will be performed when they need to be used.
这样一来,便可以使得应用程序在客户端或其他电子设备中运行时,构建出需要的跨平台应用程序接口,从而使得不论当前平台或运行环境是什么,该应用程序的都可以顺利正常的实施自身具备的功能。In this way, the required cross-platform application program interface can be constructed when the application runs on the client or other electronic devices, so that the application can run smoothly and normally no matter what the current platform or operating environment is. Implement your own functionality.
一种可实现的方式中,参照图5所示,为了形成上述的软件包,需要在本公开提供的应用程序中功能的实现方法实施之前,需要实施下述301和302步骤,301和302步骤对应的技术方案的执行主体可以为开发者使用的客户端或者服务器。In an achievable manner, as shown in FIG. 5 , in order to form the above-mentioned software package, the following steps 301 and 302, and steps 301 and 302 need to be implemented before the implementation method of the functions in the application program provided by the present disclosure is implemented. The execution body of the corresponding technical solution may be the client or the server used by the developer.
301、获取至少一种平台应用程序接口。301. Obtain at least one platform application program interface.
其中,每一种平台API对应一种操作系统/平台/运行环境,每一种平台API用于实现一种事件对应的功能。示例性的,每一种平台API具体可以为具备以下操作系统级别功能的API中的一种:图片解码、视频编解码、自定义网络通信协议、进程间内存拷贝。Wherein, each platform API corresponds to an operating system/platform/running environment, and each platform API is used to implement a function corresponding to an event. Exemplarily, each platform API may specifically be one of the following APIs with functions at the operating system level: picture decoding, video encoding and decoding, custom network communication protocol, and inter-process memory copy.
具体的,获取至少一种平台API可以先获取开发需求(可以是具体的功能清单,功能清单中需要的功能可以是绘制窗口、获取内存信息、读写数据等在开发过程中需要用到的各个功能),然后从至少一种操作系统中获取对应开发需求的平台API。以开发需求为功能清单为例,每一种操作系统中都有对应其平台API的说明文档,所以这里可以根据功能清单中的各个功能和每一种操作系统的平台API说明文档,选取对应的平台API。Specifically, to obtain at least one platform API, you can first obtain development requirements (it can be a specific function list, and the functions required in the function list can be various functions that need to be used in the development process, such as drawing windows, obtaining memory information, reading and writing data, etc. function), and then obtain platform APIs corresponding to development requirements from at least one operating system. Taking the development requirements as the function list as an example, each operating system has a description document corresponding to its platform API, so here you can select the corresponding one according to each function in the function list and the platform API description document of each operating system. Platform API.
示例性的,本公开中,针对不同的操作系统,可以根据操作系统的技术文档等获取各个底层功能对应的平台API,在获取平台API了之后,根据平台API形成对应的平台 API列表,然后可以根据不同的功能或类别对所有平台API进行封装。本公开中获取的平台API经过封装后可以形成如图6所示的运行时容器的功能分层中的平台应用程序接口层;在本公开中,这一层定义了统一的API和规范,限定了图6所示的运行时容器在不同平台上运行时实现平台API层中各个API对应的能力时必须遵守的规范。另外,需要说明的是,这一层在形成时,对平台API可以是根据其相应的功能进行封装,也可以是其他任意可行方式,对此本申请不做具体限制。Exemplarily, in the present disclosure, for different operating systems, the platform API corresponding to each underlying function can be obtained according to the technical documents of the operating system, etc. After obtaining the platform API, a corresponding platform API list is formed according to the platform API, and then the All platform APIs are encapsulated according to different functions or categories. The platform API obtained in the present disclosure can be encapsulated to form the platform application program interface layer in the functional layering of the runtime container as shown in FIG. 6; The specifications that must be complied with when the runtime container shown in Figure 6 is running on different platforms to realize the capabilities corresponding to each API in the platform API layer. In addition, it should be noted that, when this layer is formed, the platform API may be encapsulated according to its corresponding function, or may be any other feasible manner, which is not specifically limited in this application.
302、在预设容器中通过预设引擎暴露平台应用程序接口。302. Expose the platform application program interface through the preset engine in the preset container.
示例性的,在本公开中,该预设容器可以是flutter运行时容器、预设引擎可以是flutter引擎。参照图6所示,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,本公开通过对flutter引擎进行改写,将原flutter依赖的实现改为使用301步骤可以形成的平台应用程序接口层,同时对flutter引擎的增加、修改、删除了一些对框架framework层暴露的API,这样一来,在为flutter运行时容器中,flutter引擎(本公开中,flutter引擎可以为flutter引擎层)便可以将平台API层中的平台API封装形成最上层(本公开称为跨平台API层)中的flutter framework api(flutter框架应用程序接口,即前述的跨平台应用程序接口)中的一些API暴露(相当于上述的302步骤),从而使得开发者可以利用最上层暴露的flutter framework api按照自身需求,编写应用代码(即应用程序对应的代码)调用不同的API,实现相应的功能。进一步的,因为flutter引擎中用skia作为渲染引擎,而Skia不是自定义一套组件去映射不同平台的UI组件的,而是用户根据自身需求完成UI组件的设计的,所以如果本公开采用flutter引擎和flutter运行时容器,则可以达到对不同场景自由拓展的目的,也就避免了现有的跨平台开发方案中场景有限的缺陷。另外,flutter技术还会提供一套类似web网页微件widget系统来构建UI,而widget是可以自由拓展的,所以在本公开采用flutter引擎和flutter运行时容器时,开发人员在开发时,还可以更加自由的对UI进行构建,保证应用的丰富显示效果,以提高用户体验。本公开中,暴露属于软件工程中的专用词汇,具体是指提供给开发人员可以调用的接口,不暴露API的话,开发人员在开发时将无法调用相应功能。Exemplarily, in the present disclosure, the preset container may be a flutter runtime container, and the preset engine may be a flutter engine. Referring to Fig. 6, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, the present disclosure rewrites the flutter engine, and changes the implementation of the original flutter dependency to a platform application that can be formed by using 301 steps Program interface layer, while adding, modifying, and deleting some APIs exposed to the framework framework layer to the flutter engine, so that in the runtime container for flutter, the flutter engine (in this disclosure, the flutter engine can be the flutter engine layer ) can encapsulate the platform API in the platform API layer to form some APIs in the flutter framework api (flutter framework application program interface, that is, the aforementioned cross-platform application program interface) in the uppermost layer (referred to as the cross-platform API layer in this disclosure). Expose (equivalent to the above 302 steps), so that developers can use the top-level exposed flutter framework api to write application code (that is, the code corresponding to the application) to call different APIs according to their own needs to implement corresponding functions. Further, because the flutter engine uses skia as the rendering engine, and Skia does not customize a set of components to map UI components on different platforms, but users complete the design of UI components according to their own needs, so if this disclosure uses the flutter engine With the flutter runtime container, it can achieve the purpose of free expansion of different scenarios, which avoids the limited scenarios in the existing cross-platform development solutions. In addition, flutter technology will also provide a set of widget systems similar to web page widgets to build UI, and widgets can be freely expanded, so when this disclosure uses the flutter engine and the flutter runtime container, developers can also Build the UI more freely to ensure the rich display effect of the application to improve the user experience. In this disclosure, exposure is a special vocabulary in software engineering, and specifically refers to an interface provided to developers that can be called. If the API is not exposed, developers will not be able to call corresponding functions during development.
需要说明的是,因为实际中如果平台API过多,会导致预设引擎的性能需求过大,从而使得开发出来的应用程序的代码自身过于臃肿庞大,不便于调试和维护,所以为了避免这一点,本公开中的平台API可以只有那些会对操作系统的关键性能产生影响的功能对应的API。另外,预设引擎在对平台API进行暴露时,会根据不同操作平台的区别,将隶属于不同操作系统的平台API按照相应功能封装后暴露,从而使得开发人员可以调用统一的跨平台API,即开发人员在调用某个跨平台API时,实际上调用了隶属于不同操作系统的多个平台API,从而保证开发出的代码可以适用于多个不同的操作系统。It should be noted that, in practice, if there are too many platform APIs, the performance requirements of the preset engine will be too large, which will make the code of the developed application too bloated and inconvenient for debugging and maintenance, so in order to avoid this , the platform APIs in this disclosure may only have APIs corresponding to those functions that affect the key performance of the operating system. In addition, when the preset engine exposes the platform API, it will encapsulate and expose the platform API belonging to different operating systems according to the corresponding functions according to the difference of different operating platforms, so that developers can call the unified cross-platform API, that is, When a developer calls a cross-platform API, he actually calls multiple platform APIs belonging to different operating systems, thereby ensuring that the developed code can be applied to multiple different operating systems.
基于上述方案,因为平台API是在预设容器中通过预设引擎暴露的,所以保证了平台API的安全,同时因为上述技术方案中的平台API是对应多个操作系统的,所以开发人员在通过暴露的平台API对某个应用进行开发时,可以根据自身需求,使得开发出的 应用代码能够调用针对不同操作系统的不同API,所以最终开发得出的代码可以适用于多种不同操作系统,开发效率高且不需要依赖于原生平台进行开发,所以能够达到不通过原生平台安全的实现一套代码支持多种不同平台的开发方案。进一步的,因为在本公开的技术方案中可以对操作系统级的平台API进行调用,而平台API中具备有可以直接在进程间进行数据交换和通信,不需要通过通信序列化通信,提高了开发完成后应用程序的性能,提高了用户体验。Based on the above solution, because the platform API is exposed through the preset engine in the preset container, the security of the platform API is guaranteed. At the same time, because the platform API in the above technical solution corresponds to multiple operating systems, the developer is required to pass When an application is developed by the exposed platform API, the developed application code can call different APIs for different operating systems according to its own needs, so the final developed code can be applied to a variety of different operating systems. It is efficient and does not need to rely on the native platform for development, so it can achieve a set of code support for a variety of different platforms without using the native platform. Further, because in the technical solution of the present disclosure, the platform API at the operating system level can be called, and the platform API has the ability to directly exchange and communicate data between processes without serializing communication through communication, which improves development. The performance of the application after completion improves the user experience.
可选的,结合图5,参照图7所示,因为在使用预设引擎作为开发应用的重要部分时,预设引擎本身的一些功能也需要供开发人员使用,所以为了满足开发人员对预设引擎本身的使用需求,301步骤之后还可以包括303:Optionally, with reference to FIG. 5 and as shown in FIG. 7 , because when using the preset engine as an important part of developing an application, some functions of the preset engine itself also need to be used by developers, so in order to meet the developer’s preference for preset The usage requirements of the engine itself can also include 303 after step 301:
303、在预设容器中暴露预设引擎对应的核心应用程序接口。303. Expose the core application program interface corresponding to the preset engine in the preset container.
示例的,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,在flutter运行时容器中,核心API位于第二层(本公开中称为平台拓展层),该层可以将自身包含的核心API封装成最上层(跨平台应用程序接口层)的flutter框架应用程序接口中的一部分供开发人员使用。As an example, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in FIG. 6 , in the flutter runtime container, the core API is located in the second layer (referred to as the platform extension layer in this disclosure). ), this layer can encapsulate the core API contained in itself into a part of the application program interface of the flutter framework of the uppermost layer (cross-platform application program interface layer) for developers to use.
结合图5,参照图8所示,因为实际中的平台API的功能可能会较为固定,有时开发人员在需要的功能可能会需要平台API对应功能的变种,例如原平台API可以实现画圆功能,而开发人员可能会需要画方功能,此时如果无法对平台API修改,则可能导致开发人员的需求无法得到满足,所以302步骤可以包括3021-3023:Referring to Figure 5 and Figure 8, because the functions of the platform API in practice may be relatively fixed, sometimes developers may need variants of the corresponding functions of the platform API for the functions they need. For example, the original platform API can realize the function of drawing circles. Developers may need the function of drawing squares. If the platform API cannot be modified at this time, the needs of developers may not be met, so step 302 can include 3021-3023:
3021、接收修改指令。3021. Receive a modification instruction.
其中,修改指令用于指示对平台API进行修改。Wherein, the modification instruction is used to instruct to modify the platform API.
因为,并不是所有平台API都需要对功能进行修改,所以修改指令还可以包括有需要修改的平台API的标识。具体修改可以新增可选参数,以使原始平台API增加新的功能。Because not all platform APIs need to modify functions, the modification instruction may also include an identifier of the platform API that needs to be modified. Specific modifications can add optional parameters to add new functions to the original platform API.
3022、根据修改指令对平台应用程序接口修改得到目标平台应用程序接口。3022. Modify the platform application program interface according to the modification instruction to obtain the target platform application program interface.
3023、在预设容器中通过预设引擎暴露目标平台应用程序接口。3023. Expose the target platform application program interface through the preset engine in the preset container.
示例性的,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,flutter引擎在将平台API层的平台API暴露出来后,如果接收到开发客户端发送的修改指令,则会根据修改指令对其中的部分平台API进行修改并封装形成第二层(平台拓展层)的定制架构应用程序接口(customized framework api),然后再和未修改的平台API以及核心API一起封装成为最上层(跨平台API层)中flutter框架应用程序接口的一部分。需要说明的是,上述3022步骤的目标平台API包括修改后的部分平台API和未修改的平台API,对于未修改的平台API而言,可以认为修改指令指示对其的修改为空。Illustratively, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in Figure 6, after the flutter engine exposes the platform API of the platform API layer, if it receives the If the modification instructions are modified, some of the platform APIs will be modified according to the modification instructions and encapsulated to form the customized framework API of the second layer (platform extension layer), and then combined with the unmodified platform APIs and core APIs. The API is encapsulated together as part of the application program interface of the flutter framework in the top layer (cross-platform API layer). It should be noted that the target platform API in the above step 3022 includes some modified platform APIs and unmodified platform APIs, and for the unmodified platform APIs, it can be considered that the modification instruction indicates that the modification is empty.
这样一来,便可以方便开发人员对平台API进行修改,以满足更多的开发需求。In this way, it is convenient for developers to modify the platform API to meet more development needs.
进一步可选的,基于上述图8对应的技术方案中的平台拓展层,在本公开中,至少一种平台应用程序接口中存在第一平台应用程序接口;第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。Further optionally, based on the platform expansion layer in the technical solution corresponding to FIG. 8, in the present disclosure, there is a first platform application program interface in at least one platform application program interface; the first platform application program interface is a native application program interface. Based on the program interface, it is obtained by extending the corresponding functions.
这样一来,可以使得平台固有的平台API拓展出更多的功能,方便用户使用,提高用户体验。In this way, the inherent platform API of the platform can be expanded with more functions, which is convenient for users to use and improves user experience.
结合图5,参照图9所示,因为开发者在对某个应用进行开发时,可以会需要用到平台API完全不具备的功能,此时单单对平台API进行修改是无法达到需求的,所以此时需要开发人员设计相应的插件以完成相应的功能,所以在301和302对应的技术方案中,还可以包括X1-X3:Referring to Figure 5 and Figure 9, when developers develop an application, they may need to use functions that the platform API does not have at all. At this time, it is impossible to modify the platform API alone. Therefore, At this time, developers need to design corresponding plug-ins to complete corresponding functions, so in the technical solutions corresponding to 301 and 302, X1-X3 can also be included:
X1、接收插件建立指令。X1. Receive a plug-in creation command.
其中,插件建立指令携带有插件建立信息;插件建立指令用于指示建立插件。The plug-in establishment instruction carries plug-in establishment information; the plug-in establishment instruction is used to instruct to establish a plug-in.
X2、根据所插件建立指令建立插件,并对建立的插进进行注册以获取插件对应的插件应用程序接口。X2. Establish a plug-in according to the established plug-in establishment instruction, and register the established plug-in to obtain a plug-in application program interface corresponding to the plug-in.
示例性的,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,插件可以注册在最上层(即跨平台API层),当插件完全使用dart代码编写时,其可以称为flutter功能块(flutter module),当插件不仅由dart代码实现还需要对某类原生平台的功能封装时,可以称为flutter插件(flutter plugin)。在本公开中,这里的插件可以是全新的功能,也可以是对平台API或核心API(对应flutter引擎)的全面覆盖(即包含原有功能,又存在新的功能)。Exemplarily, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in Figure 6, the plug-in can be registered at the top layer (that is, the cross-platform API layer). When the plug-in is completely written in dart code When the plugin is not only implemented by dart code but also needs to encapsulate the functions of a certain kind of native platform, it can be called a flutter plugin. In the present disclosure, a plug-in here can be a brand-new function, or can be a comprehensive coverage of the platform API or core API (corresponding to the flutter engine) (that is, including the original function and the new function).
X3、在预设容器中暴露插件应用程序接口。X3. Expose the plug-in API in the preset container.
示例性的,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,插件API可以为插件接口(pluin-insservice api),当该插件接口被开发人员使用时,其可以提供其对应的flutter module和flutter plugin对应的插件功能。X3步骤主要由最上层跨平台API层实现。Exemplarily, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in FIG. 6 , the plug-in API can be a plug-in interface (pluin-insservice api), when the plug-in interface is used by developers , it can provide the plugin functions corresponding to its corresponding flutter module and flutter plugin. The X3 step is mainly implemented by the top cross-platform API layer.
这样一来,便可以保证开发人员在不同场景的开发需求,开发出的应用程序也就包含有能够实现独特功能的插件,即保证开发的顺利进行也提高后续应用程序的使用体验。In this way, the development needs of developers in different scenarios can be guaranteed, and the developed applications also include plug-ins that can realize unique functions, which ensures the smooth progress of development and improves the experience of subsequent applications.
基于图9对应的技术方案,参照图10所示,本公开提供的应用程序中功能的实现方法还可以包括S1-S3:Based on the technical solution corresponding to FIG. 9 , referring to FIG. 10 , the method for implementing functions in the application program provided by the present disclosure may further include S1-S3:
S1、监听并获取应用程序的第二事件。S1. Monitor and acquire the second event of the application.
S2、确定与第二事件对应的插件。S2. Determine the plug-in corresponding to the second event.
其中,插件可以为图9对应的技术方案中的插件。当然,为了实现图10对应的技术方案,在200A步骤中获取的软件包中应当包含有如图9中所示的平台拓展层对应的代码,后续在200B步骤中,对该软件包进行编译解析时,则可以构建出该平台拓展层,以保证 后续应用程序在被使用时产生的第二事件可以由相应的插件调用。具体该插件是使用自有的函数实现相应的功能还是利用平台API实现相应功能,本公开不做具体显示,具体根据实际需求而定。The plug-in may be the plug-in in the technical solution corresponding to FIG. 9 . Of course, in order to realize the technical solution corresponding to FIG. 10 , the software package obtained in step 200A should contain the code corresponding to the platform expansion layer as shown in FIG. 9 , and in the subsequent step 200B, when compiling and parsing the software package , the platform extension layer can be constructed to ensure that the second event generated when the subsequent application is used can be called by the corresponding plug-in. Specifically, whether the plug-in uses its own function to realize the corresponding function or uses the platform API to realize the corresponding function, this disclosure does not specifically show it, and it depends on the actual demand.
S3、运行插件,以实现第二事件对应的功能。S3. Run the plug-in to realize the function corresponding to the second event.
这样一来,因为应用程序存在能够实现独特功能的插件,所以其中的某些功能可以更加多元化、个性化,从而达到提高用户体验的目的。In this way, because there are plug-ins that can implement unique functions in the application, some of the functions can be more diversified and personalized, so as to achieve the purpose of improving the user experience.
结合图5,参照图11所示,在301和302对应的技术方案中,还可以包括304:With reference to FIG. 5 and as shown in FIG. 11 , in the technical solutions corresponding to 301 and 302, 304 may also be included:
304、在预设容器中暴露第三方软件开发工具包的应用程序接口。304. Expose the application program interface of the third-party software development kit in the preset container.
其中,第三方SDK软件开发工具包(SDK,software development kit)至少用于以下一项或多项:调用所有平台API中的预设API、调用第三方开源数据库中的第三方API;预设API为稳定参数大于预设值的API,稳定参数用于表征所属API被调用时所属API对应的应用程序运行时的稳定以及数据安全程度。Among them, the third-party SDK software development kit (SDK, software development kit) is used for at least one or more of the following: calling preset APIs in all platform APIs, calling third-party APIs in third-party open source databases; preset APIs For an API whose stability parameter is greater than a preset value, the stability parameter is used to represent the stability and data security degree of the application corresponding to the API when the API is called.
示例性的,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,能够实现调用所有平台API中的预设API的功能的第三方SDK可以位于第二层(平台拓展层),具体可以为“直调SDK”,能够实现调用第三方开源数据库中的第三方API的第三方SDK可以为“平台特定实现(plat specific implement)”。Illustratively, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in FIG. 6 , the third-party SDK that can implement the function of calling the preset API in all platform APIs can be located in the second Layer (Platform Expansion Layer), which can specifically be "Direct SDK", and a third-party SDK that can call third-party APIs in third-party open source databases can be "Plat specific implementation".
这样一来,因为在实际开发中除了本公开中可以提供的各类API以外,如果开发人员不想建立插件或者对平台API进行修改,但又想使用其他功能的API时,可以从其他开源AIP库中获取相应的API,所以需要上述的“平台特定实现”,这样一来,可以给开发人员提供更多的开发可能性,提高开发人员的使用体验。另外,对于预设API,其即便不经过flutter引擎也能保证最终开发得出应用以及应用所处操作系统的安全性,所以对于预设API,处于方便考虑,本公开设计上述的“直调SDK”,方便开发人员在使用某种第三方SDK时直接调用平台API层中的预设API,提高开发效率。In this way, in addition to the various APIs that can be provided in this disclosure in actual development, if developers do not want to create plug-ins or modify platform APIs, but want to use APIs with other functions, they can use other open source AIP libraries from other open source AIP libraries. Therefore, the above-mentioned "platform-specific implementation" is required, which can provide developers with more development possibilities and improve the use experience of developers. In addition, for the preset API, even without the flutter engine, it can ensure the security of the final application and the operating system where the application is located. Therefore, for the preset API, for the sake of convenience, the present disclosure designs the above-mentioned "Direct Tuning SDK" ”, which is convenient for developers to directly call the preset API in the platform API layer when using a certain third-party SDK, improving development efficiency.
需要说明的是,以预设容器为flutter运行时容器、预设引擎为flutter引擎为例,参照图6所示,因为flutter技术对应的编写代码是dart代码,而不同操作系统的平台API不一定是使用dart代码编写的,所以为了完成对所有API(平台API)的具体实现以及对上述“平台特定实现”获取的第三方API的代码转换,在第二层(平台拓展层)还包括有“dart实现”。It should be noted that, taking the default container as the flutter runtime container and the default engine as the flutter engine as an example, as shown in Figure 6, because the writing code corresponding to the flutter technology is the dart code, and the platform API of different operating systems is not necessarily It is written in dart code, so in order to complete the specific implementation of all APIs (platform APIs) and the code conversion of third-party APIs obtained from the above "platform specific implementations", the second layer (platform extension layer) also includes " dart implementation".
上述技术方案中,首先获取多个操作系统的平台API,然后在预设容器中通过预设引擎暴露该平台API。因为平台API是在预设容器中通过预设引擎暴露的,所以保证了平台API的安全,同时因为本公开的技术方案中的平台API是对应多个操作系统的,所以开发人员在通过暴露的平台API对某个应用进行开发时,可以根据自身需求,使得开发出的应用代码能够调用针对不同操作系统的不同API,所以最终开发得出的代码可以适用于多种不同操作系统,开发效率高且不需要依赖于原生平台进行开发,所以能够达 到不通过原生平台安全的实现一套代码支持多种不同平台的开发方案。In the above technical solution, the platform APIs of multiple operating systems are first obtained, and then the platform APIs are exposed in the preset container through the preset engine. Because the platform API is exposed through the preset engine in the preset container, the security of the platform API is guaranteed. At the same time, because the platform API in the technical solution of the present disclosure corresponds to multiple operating systems, developers can When developing an application, the platform API can make the developed application code call different APIs for different operating systems according to its own needs, so the final developed code can be applied to a variety of different operating systems, and the development efficiency is high And it does not need to rely on the native platform for development, so it is possible to achieve a development scheme that supports a variety of different platforms with a set of code without the security of the native platform.
基于前述技术方案,开发人员在使用该方案编译好一个应用的后,该应用的程序包在任一平台(操作系统,例如ios系统)编译时,会根据平台的特性,编译生成两部分,第一部分包括对应该平台的flutter引擎和对应该平台的平台API,第二一部分包括运行在第一部分创建的运行环境(flutter运行时容器和dart虚拟机(由flutter引擎生成))中的AOT(aheadof time)编译产物snapshot。当该应用被启动时,第一部分中的flutter引擎会立即加载完成初始化,形成flutter运行时容器中的flutter引擎层和平台API层,并提供可供平台拓展层调用的API(方便平台拓展层调用);其中平台API层中的平台API会向该平台申请底层资源,为了保证底层资源(内存资源、CPU资源等)被该应用申请过多,这里的平台API层中的一部分平台API会懒加载,即在初始化时只会给部分平台API申请底层资源,另外一部分,只有在需要被使用时,才会为其申请底层资源。在flutter引擎层和平台API层初始化完成后,第二部分的AOT编译产物snapshot会在flutter引擎层和平台API层初始化完成形成的运行环境中,完成跨平台API层和平台拓展层的初始化。而后应用便启动成功,在应用被用户使用时,flutter引擎会控制页面UI的渲染,并监听用户的操作,对于用户的操作需要改应用执行的任务,flutter引擎会触发相应回调事件发送给跨平台API层中对应的上层API(例如前述实施例中的flutter framework api),跨平台API层会利用根据接收到该事件的上层API调用不同层的能力来调用该平台的资源(包括网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源等),已完成用户操作对应的图片编辑、视频转码等功能。总体上,通过本申请方案开发出的应用会在平台中生产前述实施例中的flutter运行时容器,该容器接管了类似原生应用中的原生进程的任务,并可以通过容器中的不同层将平台的能力或资源逐层进行了封装,最终通过跨平台API层暴露简单易用的上层API供应用使用,所以本申请提供的技术方案,能够保障最终开发出的跨平台应用能够顺利在不同平台实现对应的宫那个。Based on the aforementioned technical solution, after developers use this solution to compile an application, when the application package is compiled on any platform (operating system, such as ios system), it will be compiled into two parts according to the characteristics of the platform. The first part Including the flutter engine corresponding to the platform and the platform API corresponding to the platform, the second part includes AOT (aheadof) running in the runtime environment (flutter runtime container and dart virtual machine (generated by the flutter engine)) created in the first part time) compile the product snapshot. When the application is started, the flutter engine in the first part will be loaded and initialized immediately, forming the flutter engine layer and platform API layer in the flutter runtime container, and providing APIs that can be called by the platform extension layer (convenient for the platform extension layer to call ); the platform API in the platform API layer will apply for the underlying resources to the platform. In order to ensure that the underlying resources (memory resources, CPU resources, etc.) are applied for too much by the application, some of the platform APIs in the platform API layer here will be lazy loaded. , that is, only some platform APIs will apply for underlying resources during initialization, and the other part will apply for underlying resources only when they need to be used. After the initialization of the flutter engine layer and the platform API layer is completed, the second part of the AOT compilation product snapshot will complete the initialization of the cross-platform API layer and the platform extension layer in the running environment formed by the initialization of the flutter engine layer and the platform API layer. Then the application starts successfully. When the application is used by the user, the flutter engine will control the rendering of the page UI and monitor the user's operation. For the user's operation to change the task performed by the application, the flutter engine will trigger the corresponding callback event and send it to the cross-platform The corresponding upper-layer API in the API layer (for example, the flutter framework api in the foregoing embodiment), the cross-platform API layer will use the ability to call different layers according to the upper-layer API that receives the event to call the resources of the platform (including network resources, GPU resources, CPU resources, file IO resources, memory resources, cross-process communication resources, etc.), and functions such as image editing and video transcoding corresponding to user operations have been completed. In general, the application developed through the solution of the present application will produce the flutter runtime container in the foregoing embodiment in the platform, and the container takes over the tasks of the native process similar to the native application, and can transfer the platform to the platform through different layers in the container. The capabilities or resources are encapsulated layer by layer, and finally the easy-to-use upper-layer API is exposed through the cross-platform API layer for the application to use. Therefore, the technical solution provided in this application can ensure that the finally developed cross-platform application can be successfully implemented on different platforms. The corresponding palace.
可选的,基于上述图11对应的技术方案,本公开提供的应用程序中功能的实现方法中,参照图12所示,还可以包括L1-L3:Optionally, based on the technical solution corresponding to FIG. 11 , in the method for implementing functions in the application provided by the present disclosure, referring to FIG. 12 , L1-L3 may also be included:
L1、监听并获取应用程序的第三事件。L1. Monitor and obtain the third event of the application.
L2、确定与第三事件对应的第三方软件开发工具包应用程序接口。L2. Determine a third-party software development kit application program interface corresponding to the third event.
L3、通过第三方软件开发工具包应用程序接口实现第三事件对应的功能。L3. Implement the function corresponding to the third event through the third-party software development kit application program interface.
这样一来,应用程序在被使用时,对于一些不影响操作系统的安全性和稳定性的平台API或者操作系统以外的开源API数据库,可以通过第三方SDK应用程序接口实现,保证了应用程序功能的多样化和自由性,提高了用户体验。In this way, when the application is used, some platform APIs that do not affect the security and stability of the operating system or open source API databases other than the operating system can be implemented through the third-party SDK application program interface, which ensures the function of the application. The diversity and freedom of the system improve the user experience.
上述说明主要从服务器的角度对本公开实施例提供的方案进行了介绍。可以理解的是,服务器可以分别通过其中配置的应用程序中功能的实现装置实现上述功能。为了实现上述功能,应用程序中功能的实现装置包含了执行各个功能相应的硬件结构和/或软件 模块,这些执行各个功能相应的硬件结构和/或软件模块可以构成一个终端。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的算法步骤,本公开能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。The foregoing description mainly introduces the solutions provided by the embodiments of the present disclosure from the perspective of the server. It can be understood that, the server can implement the above-mentioned functions respectively through means for implementing functions in the application program configured therein. In order to realize the above-mentioned functions, the implementation device of the functions in the application program includes corresponding hardware structures and/or software modules for performing each function, and these corresponding hardware structures and/or software modules for performing each function can constitute a terminal. Those skilled in the art should readily appreciate that the present disclosure can be implemented in hardware or a combination of hardware and computer software in conjunction with the algorithm steps of the examples described in the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this disclosure.
本公开实施例可以根据上述方法示例对服务器进行功能模块的划分,例如,服务器可以包括应用程序中功能的实现装置,应用程序中功能的实现装置可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本公开实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present disclosure, the server may be divided into functional modules according to the foregoing method examples. For example, the server may include a device for implementing functions in an application program, and the device for implementing functions in an application program may divide each function module corresponding to each function, or may divide the two One or more functions are integrated in one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present disclosure is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图13给出了应用在图1所示客户端01中的应用程序中功能的实现装置03的一种可能的结构示意图,该应用程序中功能的实现装置03包括:监听模块31、确定模块32和处理模块33。In the case where each functional module is divided corresponding to each function, FIG. 13 shows a possible structural schematic diagram of the device 03 for implementing the functions in the application program in the client 01 shown in FIG. 1 . The functions in the application program The implementation device 03 includes: a monitoring module 31 , a determination module 32 and a processing module 33 .
具体的,监听模块31,被配置为监听并获取应用程序的第一事件;确定模块32,被配置为确定与监听模块31获取的第一事件对应的跨平台应用程序接口;跨平台应用程序接口由具备有第一事件对应的功能的至少一种平台应用程序接口封装得到,每种平台应用程序接口对应一种运行环境;处理模块33,被配置为通过确定模块32确定的跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。Specifically, the monitoring module 31 is configured to monitor and obtain the first event of the application; the determining module 32 is configured to determine the cross-platform application program interface corresponding to the first event obtained by the monitoring module 31; the cross-platform application program interface It is encapsulated and obtained by at least one platform application program interface having the function corresponding to the first event, and each platform application program interface corresponds to one operating environment; the processing module 33 is configured as a cross-platform application program interface determined by the determining module 32. The platform application program interface corresponding to the current operating environment is called to realize the function corresponding to the first event.
可选的,处理模块33具体被配置为:利用预设引擎通过确定模块32确定的跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。Optionally, the processing module 33 is specifically configured to use the preset engine to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface determined by the determination module 32 to realize the function corresponding to the first event.
可选的,该装置还包括获取模块;获取模块被配置为:获取应用程序对应的软件包;对软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层;每种跨平台应用程序接口对应一种事件,每种平台应用程序接口能够实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Optionally, the device further includes an acquisition module; the acquisition module is configured to: acquire a software package corresponding to the application; compile and parse the software package to construct a cross-platform application interface layer including multiple cross-platform application interfaces , including a platform API layer with multiple platform APIs and an engine layer including a preset engine; each cross-platform API corresponds to an event, and each platform API can implement a function corresponding to an event , each event corresponds to multiple target platform application program interfaces, and each target platform application program interface corresponds to one operating environment.
可选的,至少一种平台应用程序接口中存在第一平台应用程序接口;第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。Optionally, there is a first platform application program interface in at least one platform application program interface; the first platform application program interface is obtained by extending corresponding functions on the basis of the native application program interface.
可选的,监听模块31还被配置为监听并获取应用程序的第二事件;确定模块32还被配置为确定与监听模块31获取的第二事件对应的插件;处理模块33还被配置为运行确定模块32确定的插件,以实现第二事件对应的功能。Optionally, the monitoring module 31 is also configured to monitor and obtain the second event of the application; the determining module 32 is also configured to determine the plug-in corresponding to the second event obtained by the monitoring module 31; the processing module 33 is also configured to run The plug-in determined by the determining module 32 is to implement the function corresponding to the second event.
可选的,处理模块33具体被配置为:通过跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取第一事件所需的平台资源;平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;加载平台资源,以实现第一事件对应的功能。Optionally, the processing module 33 is specifically configured to: call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface to obtain the platform resources required for the first event; the platform resources include any one or more of the following: : Network resources, GPU resources, CPU resources, file IO resources, memory resources, and cross-process communication resources; load platform resources to implement the function corresponding to the first event.
关于上述实施例中的应用程序中功能的实现装置,其中各个模块执行操作的具体方式和相关有益效果已经在前述中的应用程序中功能的实现方法的实施例中进行了详细描述,此处将不再做详细阐述说明。Regarding the apparatus for implementing functions in an application program in the foregoing embodiments, the specific manner in which each module performs operations and related beneficial effects have been described in detail in the foregoing embodiments of the method for implementing functions in an application program. No further elaboration will be given.
在采用集成的单元的情况下,图14是根据一示例性实施例示出的所示的电子设备的一种可能结构示意图,该电子设备可以为上述的应用程序中功能的实现装置,也可以为包含有该装置的客户端或服务器。如图14所示,该电子设备包括处理器41和存储器42。其中,存储器42用于存储处理器41可执行的指令,处理器41则可以实现上述实施例中应用程序中功能的实现装置03中各个模块的功能。In the case of using an integrated unit, FIG. 14 is a schematic diagram showing a possible structure of the electronic device shown according to an exemplary embodiment. The client or server that contains the device. As shown in FIG. 14 , the electronic device includes a processor 41 and a memory 42 . The memory 42 is used for storing the executable instructions of the processor 41, and the processor 41 can realize the functions of each module in the device 03 for realizing the functions in the application program in the above-mentioned embodiment.
其中,在具体的实现中,作为一种实施例,处理器41(41-1和41-2)可以包括一个或多个CPU,例如图14中所示的CPU0和CPU1。且作为一种实施例,空调的控制装置可以包括多个处理器41,例如图14中所示的处理器41-1和处理器41-2。这些处理器41中的每一个CPU可以是一个单核处理器(Single-CPU),也可以是一个多核处理器(Multi-CPU)。这里的处理器41可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。Wherein, in a specific implementation, as an embodiment, the processor 41 ( 41 - 1 and 41 - 2 ) may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 14 . And as an embodiment, the control device of the air conditioner may include a plurality of processors 41, such as the processor 41-1 and the processor 41-2 shown in FIG. 14 . Each of these processors 41 may be a single-core processor (Single-CPU) or a multi-core processor (Multi-CPU). Processor 41 herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
存储器42可以是只读存储器42(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘可读存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器42可以是独立存在,通过总线43与处理器41相连接。存储器42也可以和处理器41集成在一起。 Memory 42 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of static storage devices that can store information and instructions. Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), disk-readable storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and Any other medium that can be accessed by a computer, but is not limited to this. The memory 42 may exist independently, and is connected to the processor 41 through the bus 43 . The memory 42 may also be integrated with the processor 41 .
总线43,可以是工业标准体系结构(industry standard architecture,ISA)总线、外部设备互连(peripheral component interconnect,PCI)总线或扩展工业标准体系结构(extended industry standard architecture,EISA)总线等。该总线43可以分为地址总线、数据总线、控制总线等。为便于表示,图14中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 43 can be an industry standard architecture (industry standard architecture, ISA) bus, a peripheral component interconnect (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus or the like. The bus 43 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is shown in FIG. 14, but it does not mean that there is only one bus or one type of bus.
另外,为了方便电子设备与其他设备(例如服务器或客户端)进行信息交互,该电子设备包括通信接口44。通信接口44,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如控制系统、无线接入网(radio access network,RAN),无线局域网 (wireless local area networks,WLAN)等。通信接口44可以包括接收单元实现接收功能,以及发送单元实现发送功能。In addition, in order to facilitate information interaction between the electronic device and other devices (such as a server or a client), the electronic device includes a communication interface 44 . Communication interface 44, using any transceiver-like device, for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc. . The communication interface 44 may include a receiving unit to implement a receiving function, and a transmitting unit to implement a transmitting function.
在一些实施例中,参照图15所示,该电子设备可以为客户端,此时该电子设备还可选包括有:外围设备接口45和至少一个外围设备。处理器41、存储器42和外围设备接口45之间可以通过总线43或信号线相连。各个外围设备可以通过总线43、信号线或电路板与外围设备接口45相连。具体地,外围设备包括:射频电路46、显示屏47、摄像头48、音频电路49、定位组件50和电源51中的至少一种。In some embodiments, as shown in FIG. 15 , the electronic device may be a client, and in this case, the electronic device may further optionally include: a peripheral device interface 45 and at least one peripheral device. The processor 41, the memory 42 and the peripheral device interface 45 can be connected through a bus 43 or a signal line. Each peripheral device can be connected to the peripheral device interface 45 through a bus 43, a signal line or a circuit board. Specifically, the peripheral devices include: at least one of a radio frequency circuit 46 , a display screen 47 , a camera 48 , an audio circuit 49 , a positioning component 50 and a power supply 51 .
外围设备接口45可被用于将I/O(input/output,输入/输出)相关的至少一个外围设备连接到处理器41和存储器42。在一些实施例中,处理器41、存储器42和外围设备接口45被集成在同一芯片或电路板上;在一些其他实施例中,处理器41、存储器42和外围设备接口45中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不予限定。The peripheral device interface 45 may be used to connect at least one peripheral device related to I/O (input/output) to the processor 41 and the memory 42 . In some embodiments, processor 41, memory 42, and peripherals interface 45 are integrated on the same chip or circuit board; in some other embodiments, any one of processor 41, memory 42, and peripherals interface 45 or The two may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路46用于接收和发射RF(radio frequency,射频)信号,也称电磁信号。射频电路46通过电磁信号与通信网络以及其他通信设备进行通信。射频电路46将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路404包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路46可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或Wi-Fi(wireless fidelity,无线保真)网络。在一些实施例中,射频电路46还可以包括NFC(near field communication,近距离无线通信)有关的电路,本公开对此不加以限定。The radio frequency circuit 46 is used for receiving and transmitting RF (radio frequency, radio frequency) signals, also called electromagnetic signals. The radio frequency circuit 46 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 46 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuitry 46 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: metropolitan area network, mobile communication networks of various generations (2G, 3G, 4G and 5G), wireless local area network and/or Wi-Fi (wireless fidelity, wireless fidelity) network. In some embodiments, the radio frequency circuit 46 may further include a circuit related to NFC (near field communication, short-range wireless communication), which is not limited in the present disclosure.
显示屏47用于显示UI(user interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏47是显示屏时,显示屏47还具有采集在显示屏47的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器41进行处理。此时,显示屏47还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏47可以为一个,设置客户端的前面板;显示屏47可以采用LCD(liquid crystal display,液晶显示屏)、OLED(organic light-emitting diode,有机发光二极管)等材质制备。The display screen 47 is used to display UI (user interface, user interface). The UI can include graphics, text, icons, video, and any combination thereof. When display screen 47 is a display screen, display screen 47 also has the ability to capture touch signals on or over the surface of display screen 47 . The touch signal can be input to the processor 41 as a control signal for processing. At this time, the display screen 47 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 47 may be one, and the front panel of the client is provided; the display screen 47 may be made of materials such as LCD (liquid crystal display, liquid crystal display), OLED (organic light-emitting diode, organic light-emitting diode) and the like .
摄像头组件48用于采集图像或视频。可选地,摄像头组件48包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。音频电路49可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器41进行处理,或者输入至射频电路46以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在客户端的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器41或射频电路46的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当 扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路49还可以包括耳机插孔。The camera assembly 48 is used to capture images or video. Optionally, the camera assembly 48 includes a front camera and a rear camera. Usually, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. Audio circuitry 49 may include a microphone and speakers. The microphone is used to collect the sound waves of the user and the environment, convert the sound waves into electrical signals, and input them to the processor 41 for processing, or to the radio frequency circuit 46 to realize voice communication. For the purpose of stereo acquisition or noise reduction, there can be multiple microphones, which are respectively set at different parts of the client. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 41 or the radio frequency circuit 46 into sound waves. The loudspeaker can be a traditional thin-film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves that cannot be heard by humans for distance measurement and other purposes. In some embodiments, audio circuitry 49 may also include a headphone jack.
定位组件50用于定位客户端的当前地理位置,以实现导航或LBS(location based service,基于位置的服务)。定位组件50可以是基于美国的GPS(global positioning system,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The positioning component 50 is used to locate the current geographic location of the client to implement navigation or LBS (location based service). The positioning component 50 may be a positioning component based on the GPS (global positioning system, global positioning system) of the United States, the Beidou system of China, the Grenas system of Russia, or the Galileo system of the European Union.
电源51用于为客户端中的各个组件进行供电。电源51可以是交流电、直流电、一次性电池或可充电电池。当电源51包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。The power supply 51 is used to power various components in the client. The power source 51 may be alternating current, direct current, disposable batteries or rechargeable batteries. When the power source 51 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,电子设备还包括有一个或多个传感器410。该一个或多个传感器410包括但不限于:加速度传感器、陀螺仪传感器、压力传感器、指纹传感器、光学传感器以及接近传感器。In some embodiments, the electronic device also includes one or more sensors 410 . The one or more sensors 410 include, but are not limited to, acceleration sensors, gyroscope sensors, pressure sensors, fingerprint sensors, optical sensors, and proximity sensors.
加速度传感器可以检测以客户端建立的坐标系的三个坐标轴上的加速度大小。陀螺仪传感器可以检测客户端的机体方向及转动角度,陀螺仪传感器可以与加速度传感器协同采集用户对客户端的3D动作。压力传感器可以设置在客户端的侧边框和/或显示屏47的下层。当压力传感器设置在终端01的侧边框时,可以检测用户对客户端的握持信号。指纹传感器用于采集用户的指纹。光学传感器用于采集环境光强度。接近传感器,也称距离传感器,通常设置在客户端的前面板。接近传感器用于采集用户与客户端的正面之间的距离。The acceleration sensor can detect the acceleration on the three coordinate axes of the coordinate system established by the client. The gyroscope sensor can detect the direction and rotation angle of the client's body, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the client. The pressure sensor may be disposed on the side frame of the client and/or the lower layer of the display screen 47 . When the pressure sensor is arranged on the side frame of the terminal 01, the user's holding signal on the client terminal can be detected. The fingerprint sensor is used to collect the user's fingerprint. Optical sensors are used to collect ambient light intensity. Proximity sensors, also called distance sensors, are usually located on the front panel of the client. Proximity sensors are used to capture the distance between the user and the front of the client.
本领域技术人员可以理解,图14或图15中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 14 or FIG. 15 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or use different components layout.
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有指令,当该可读存储介质上的指令由电子设备的处理器执行时,使得电子设备能够执行前述实施例中提供的应用在电子设备中的应用程序中功能的实现装置上的应用程序中功能的实现方法。Embodiments of the present disclosure further provide a computer-readable storage medium, where instructions are stored on the computer-readable storage medium. When the instructions on the readable storage medium are executed by a processor of an electronic device, the electronic device can perform the foregoing implementation. The example provides a method for implementing functions in an application program on an apparatus for implementing functions in an application program in an electronic device.
本公开实施例还提供一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备执行前述实施例提供的应用程序中功能的实现方法。Embodiments of the present disclosure also provide a computer program product containing instructions, which, when executed on an electronic device, enable the electronic device to execute the method for implementing the functions in the application program provided by the foregoing embodiments.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by Different functional modules are completed, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的 划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common general knowledge or techniques in the technical field not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (15)
- 一种应用程序中功能的实现方法,其特征在于,包括:A method for realizing functions in an application program, characterized in that it includes:监听并获取应用程序的第一事件;Listen to and get the first event of the application;确定与所述第一事件对应的跨平台应用程序接口;所述跨平台应用程序接口由具备有所述第一事件对应的功能的至少一种平台应用程序接口封装得到,每种所述平台应用程序接口对应一种运行环境;Determine a cross-platform application program interface corresponding to the first event; the cross-platform application program interface is packaged and obtained by at least one platform application program interface having a function corresponding to the first event, each type of platform application program The program interface corresponds to a running environment;通过所述跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现所述第一事件对应的功能。The platform application program interface corresponding to the current operating environment is invoked through the cross-platform application program interface, so as to realize the function corresponding to the first event.
- 根据权利要求1所述的应用程序中功能的实现方法,其特征在于,通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现目标事件的功能,包括:The method for implementing functions in an application program according to claim 1, wherein the platform application program interface corresponding to the current operating environment is invoked through the cross-platform application program interface to realize the function of the target event, comprising:利用预设引擎通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。Using the preset engine to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface, so as to realize the function corresponding to the first event.
- 根据权利要求2所述的应用程序中功能的实现方法,其特征在于,还包括:The method for realizing functions in an application program according to claim 2, further comprising:获取所述应用程序对应的软件包;Obtain the software package corresponding to the application;对所述软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层;每种跨平台应用程序接口对应一种事件,每种平台应用程序接口用于实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Compile and analyze the software package to construct a cross-platform application program interface layer including a plurality of cross-platform application program interfaces, a platform application program interface layer including a plurality of platform application program interfaces, and an engine layer including a preset engine ;Each cross-platform API corresponds to one event, each platform API is used to implement a function corresponding to one event, each event corresponds to multiple target platform APIs, and each target platform API corresponds to one an operating environment.
- 根据权利要求1所述的应用程序中功能的实现方法,其特征在于,所述至少一种平台应用程序接口中存在第一平台应用程序接口;所述第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。The method for implementing functions in an application program according to claim 1, wherein a first platform application program interface exists in the at least one platform application program interface; the first platform application program interface is a native application program interface Based on the interface, the corresponding functions are extended.
- 根据权利要求1所述的应用程序中功能的实现方法,其特征在于,还包括:The method for implementing functions in an application program according to claim 1, further comprising:监听并获取应用程序的第二事件;Listen to and get the second event of the application;确定与所述第二事件对应的插件;determining a plug-in corresponding to the second event;运行所述插件,以实现第二事件对应的功能。The plug-in is run to implement the function corresponding to the second event.
- 根据权利要求1所述的应用程序中功能的实现方法,其特征在于,所述通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能,包括:The method for realizing a function in an application program according to claim 1, wherein the platform application program interface corresponding to the current operating environment is invoked through the cross-platform application program interface to realize the function corresponding to the first event, include:通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取所述第一事件所需的平台资源;所述平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;The platform application program interface corresponding to the current operating environment is called through the cross-platform application program interface to obtain the platform resources required by the first event; the platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, cross-process communication resources;加载所述平台资源,以实现所述第一事件对应的功能。Load the platform resource to implement the function corresponding to the first event.
- 一种应用程序中功能的实现装置,其特征在于,包括:A device for realizing functions in an application program, characterized in that it includes:监听模块,被配置为监听并获取应用程序的第一事件;The monitoring module is configured to monitor and obtain the first event of the application;确定模块,被配置为确定与所述监听模块获取的所述第一事件对应的跨平台应用程序接口;所述跨平台应用程序接口由具备有所述第一事件对应的功能的至少一种平台应用程序接口封装得到,每种所述平台应用程序接口对应一种运行环境;a determining module configured to determine a cross-platform application program interface corresponding to the first event acquired by the monitoring module; the cross-platform application program interface is configured by at least one platform having a function corresponding to the first event The application program interface is encapsulated and obtained, and each of the platform application program interfaces corresponds to one operating environment;处理模块,被配置为通过所述确定模块确定的所述跨平台应用程序接口调用当前运行环境对应的平台应用程序接口,以实现所述第一事件对应的功能。The processing module is configured to call the platform application program interface corresponding to the current operating environment through the cross-platform application program interface determined by the determining module, so as to realize the function corresponding to the first event.
- 根据权利要求7所述的应用程序中功能的实现装置,其特征在于,所述处理模块具体被配置为:The device for implementing functions in an application program according to claim 7, wherein the processing module is specifically configured to:利用预设引擎通过所述确定模块确定的所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,以实现第一事件对应的功能。The cross-platform application program interface determined by the determination module is used by the preset engine to call the platform application program interface corresponding to the current operating environment, so as to realize the function corresponding to the first event.
- 根据权利要求8所述的应用程序中功能的实现装置,其特征在于,还包括获取模块;The device for realizing functions in an application program according to claim 8, further comprising an acquisition module;所述获取模块被配置为:获取所述应用程序对应的软件包;The obtaining module is configured to: obtain the software package corresponding to the application;对所述软件包进行编译解析,以构建包括有多个跨平台应用程序接口的跨平台应用程序接口层、包括有多种平台应用程序接口的平台应用程序接口层和包括预设引擎的引擎层;每种跨平台应用程序接口对应一种事件,每种平台应用程序接口用于实现一种事件对应的功能,每种事件对应多种目标平台应用程序接口,每种目标平台应用程序接口对应一种运行环境。Compile and analyze the software package to construct a cross-platform application program interface layer including a plurality of cross-platform application program interfaces, a platform application program interface layer including a plurality of platform application program interfaces, and an engine layer including a preset engine ;Each cross-platform API corresponds to one event, each platform API is used to implement a function corresponding to one event, each event corresponds to multiple target platform APIs, and each target platform API corresponds to one an operating environment.
- 根据权利要求7所述的应用程序中功能的实现装置,其特征在于,所述至少一种平台应用程序接口中存在第一平台应用程序接口;所述第一平台应用程序接口是在原生应用程序接口的基础上扩展了对应功能后得到的。The device for implementing functions in an application program according to claim 7, wherein a first platform application program interface exists in the at least one platform application program interface; the first platform application program interface is a native application program interface Based on the interface, the corresponding functions are extended.
- 根据权利要求7所述的应用程序中功能的实现装置,其特征在于,The device for realizing functions in an application program according to claim 7, wherein,所述监听模块还被配置为监听并获取应用程序的第二事件;The monitoring module is also configured to monitor and obtain the second event of the application;所述确定模块还被配置为确定与所述监听模块获取的所述第二事件对应的插件;The determining module is further configured to determine a plug-in corresponding to the second event acquired by the monitoring module;所述处理模块还被配置为运行所述确定模块确定的所述插件,以实现第二事件对应的功能。The processing module is further configured to run the plug-in determined by the determining module to implement the function corresponding to the second event.
- 根据权利要求7所述的应用程序中功能的实现装置,其特征在于,所述处理模块具体被配置为:The device for implementing functions in an application program according to claim 7, wherein the processing module is specifically configured to:通过所述跨平台应用程序接口调用与当前运行环境对应的平台应用程序接口,获取所述第一事件所需的平台资源;所述平台资源包括以下任一项或多项:网路资源、GPU资源、CPU资源、文件IO资源、内存资源、跨进程通信资源;The platform application program interface corresponding to the current operating environment is called through the cross-platform application program interface to obtain the platform resources required by the first event; the platform resources include any one or more of the following: network resources, GPU resources, CPU resources, file IO resources, memory resources, cross-process communication resources;加载所述平台资源,以实现所述第一事件对应的功能。Load the platform resource to implement the function corresponding to the first event.
- 一种电子设备,其特征在于,包括:An electronic device, comprising:处理器;processor;用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;其中,所述处理器被配置为执行所述指令,以实现如权利要求1-6中任一项所述的应用程序中功能的实现方法。Wherein, the processor is configured to execute the instructions, so as to implement the method for implementing the functions in the application program according to any one of claims 1-6.
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,其特征在于,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备执行如权利要求1-6中任一项所述的应用程序中功能的实现方法。A computer-readable storage medium storing instructions on the computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is made to execute The method for implementing functions in an application program according to any one of claims 1-6.
- 一种计算机程序产品,所述计算机程序产品包括指令,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6中任一项所述的应用程序中功能的实现方法。A computer program product comprising instructions that, when executed on an electronic device, cause the electronic device to perform the implementation of a function in an application as claimed in any one of claims 1-6 method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110310126.9A CN113094123B (en) | 2021-03-23 | 2021-03-23 | Method and device for realizing functions in application program, electronic equipment and storage medium |
CN202110310126.9 | 2021-03-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022199111A1 true WO2022199111A1 (en) | 2022-09-29 |
Family
ID=76669111
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/135062 WO2022199111A1 (en) | 2021-03-23 | 2021-12-02 | Method and apparatus for implementing functions in application program, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113094123B (en) |
WO (1) | WO2022199111A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117389647A (en) * | 2023-10-11 | 2024-01-12 | 北京百度网讯科技有限公司 | Plug-in generation method, application development method, device, equipment and medium |
CN118426876A (en) * | 2024-07-05 | 2024-08-02 | 广州六环信息科技有限公司 | Application program interface generating device, method, storage medium and system |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113094123B (en) * | 2021-03-23 | 2024-10-25 | 北京达佳互联信息技术有限公司 | Method and device for realizing functions in application program, electronic equipment and storage medium |
CN113608801A (en) * | 2021-07-19 | 2021-11-05 | 上海浦东发展银行股份有限公司 | Interface calling method and device, computer equipment and storage medium |
CN113485746B (en) * | 2021-07-28 | 2024-02-06 | 山石网科通信技术股份有限公司 | Method and device for generating application program interface document |
CN113608803A (en) * | 2021-08-16 | 2021-11-05 | 上海万物新生环保科技集团有限公司 | Method and equipment for realizing functional operation in multi-operation environment |
CN113766318A (en) * | 2021-09-09 | 2021-12-07 | 世纪龙信息网络有限责任公司 | Video generation method and device, storage medium and computer equipment |
CN113918214A (en) * | 2021-09-24 | 2022-01-11 | 海宁奕斯伟集成电路设计有限公司 | Program running method, device, electronic device and storage medium |
CN113722019B (en) * | 2021-11-04 | 2022-02-08 | 海尔数字科技(青岛)有限公司 | Display method, device and equipment of platform program |
CN114049416A (en) * | 2021-11-16 | 2022-02-15 | 珠海金山数字网络科技有限公司 | Animation data acquisition method and device |
CN114356307A (en) * | 2021-12-17 | 2022-04-15 | 上海浦东发展银行股份有限公司 | Service interaction method and device, electronic equipment and storage medium |
CN114385265B (en) * | 2022-01-13 | 2024-07-09 | 土巴兔集团股份有限公司 | Network environment switching method based on cross-platform development technology and related equipment thereof |
CN114840271B (en) * | 2022-05-20 | 2024-11-26 | 北京雷石天地电子技术有限公司 | Device function conversion method, device and computer readable storage medium |
WO2023245526A1 (en) * | 2022-06-23 | 2023-12-28 | 广州视源电子科技股份有限公司 | Desktop element operation method, electronic device and intelligent interaction tablet |
CN115866248B (en) * | 2022-11-08 | 2024-01-19 | 格兰菲智能科技有限公司 | Video transcoding method, device, computer equipment and storage medium |
CN116302366B (en) * | 2023-05-26 | 2023-10-20 | 阿里巴巴(中国)有限公司 | Terminal development-oriented XR application development system, method, equipment and medium |
CN117009029B (en) * | 2023-05-26 | 2024-09-24 | 浙江天猫技术有限公司 | XR application and content operation method, device and storage medium |
CN117555645B (en) * | 2024-01-12 | 2024-04-05 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment and medium based on multi-terminal application platform |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110143741A1 (en) * | 2005-07-19 | 2011-06-16 | AOL Inc., | System and method for cross-platform applications on a wireless phone |
CN102681893A (en) * | 2011-03-09 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Cross-platform implementation method for executable programs and mobile terminal |
CN103761087A (en) * | 2014-01-03 | 2014-04-30 | 北京京东尚科信息技术有限公司 | Method and device for cross-platform development of mobile applications |
CN103823697A (en) * | 2014-02-27 | 2014-05-28 | 百度在线网络技术(北京)有限公司 | Cross-platform implementing method of application, system and plug-in manager |
CN113094123A (en) * | 2021-03-23 | 2021-07-09 | 北京达佳互联信息技术有限公司 | Method and device for realizing functions in application program, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108279952A (en) * | 2018-01-23 | 2018-07-13 | 浙江科澜信息技术有限公司 | A kind of realization method and system of cross-platform window management |
-
2021
- 2021-03-23 CN CN202110310126.9A patent/CN113094123B/en active Active
- 2021-12-02 WO PCT/CN2021/135062 patent/WO2022199111A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110143741A1 (en) * | 2005-07-19 | 2011-06-16 | AOL Inc., | System and method for cross-platform applications on a wireless phone |
CN102681893A (en) * | 2011-03-09 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Cross-platform implementation method for executable programs and mobile terminal |
CN103761087A (en) * | 2014-01-03 | 2014-04-30 | 北京京东尚科信息技术有限公司 | Method and device for cross-platform development of mobile applications |
CN103823697A (en) * | 2014-02-27 | 2014-05-28 | 百度在线网络技术(北京)有限公司 | Cross-platform implementing method of application, system and plug-in manager |
CN113094123A (en) * | 2021-03-23 | 2021-07-09 | 北京达佳互联信息技术有限公司 | Method and device for realizing functions in application program, electronic equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117389647A (en) * | 2023-10-11 | 2024-01-12 | 北京百度网讯科技有限公司 | Plug-in generation method, application development method, device, equipment and medium |
CN118426876A (en) * | 2024-07-05 | 2024-08-02 | 广州六环信息科技有限公司 | Application program interface generating device, method, storage medium and system |
Also Published As
Publication number | Publication date |
---|---|
CN113094123B (en) | 2024-10-25 |
CN113094123A (en) | 2021-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022199111A1 (en) | Method and apparatus for implementing functions in application program, electronic device and storage medium | |
US11853820B2 (en) | Cross-process communication method, apparatus, and device | |
KR101215230B1 (en) | Multi-context graphics processing | |
US9058193B2 (en) | Methods and systems for providing compatibility of applications with multiple versions of an operating system | |
WO2019178869A1 (en) | Method for opening esim card account, and terminal | |
WO2019227450A1 (en) | Application function implementation method and electronic device | |
CN109213613B (en) | Image information transmission method and device, storage medium and electronic equipment | |
EP4095723B1 (en) | Permission reuse method, permission reuse-based resource access method, and related device | |
WO2019236261A2 (en) | Annotating dynamic libraries for multi-os applications | |
CN113190362B (en) | Service calling method and device, computer equipment and storage medium | |
CN108376066B (en) | Code processing device and code processing method | |
CN111125602B (en) | Page construction method, device, equipment and storage medium | |
JP7319431B2 (en) | Application function implementation method and electronic device | |
US10599444B2 (en) | Extensible input stack for processing input device data | |
CN110751592A (en) | Graphic resource conversion method, device, electronic device and storage medium | |
CN116820546A (en) | Code generation method, compiler, device, apparatus, and computer readable medium | |
US20190213015A1 (en) | Extensible input stack for processing input device data | |
CN117992189A (en) | Window realization method under multiple systems and electronic equipment | |
CN113867977B (en) | Device control method and device | |
WO2023169212A1 (en) | Method for identifying sdk in application, terminal, and server | |
CN114385723A (en) | Data reading method and device, electronic equipment and storage medium | |
CN113392120A (en) | Method and device for acquiring execution information of SQLite | |
CN111290746A (en) | Object access method, device, equipment and storage medium | |
EP4216052A1 (en) | Method for developing mvvm architecture-based application, and terminal | |
WO2023169157A1 (en) | Sub application running method and apparatus, electronic device, program product, and storage medium |
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: 21932719 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21932719 Country of ref document: EP Kind code of ref document: A1 |