WO2023087751A1 - 应用程序开发平台及方法、电子设备、存储介质和计算机程序产品 - Google Patents

应用程序开发平台及方法、电子设备、存储介质和计算机程序产品 Download PDF

Info

Publication number
WO2023087751A1
WO2023087751A1 PCT/CN2022/105543 CN2022105543W WO2023087751A1 WO 2023087751 A1 WO2023087751 A1 WO 2023087751A1 CN 2022105543 W CN2022105543 W CN 2022105543W WO 2023087751 A1 WO2023087751 A1 WO 2023087751A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
plug
event
processing function
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/105543
Other languages
English (en)
French (fr)
Inventor
余昌喜
温祖钦
陈宇恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Publication of WO2023087751A1 publication Critical patent/WO2023087751A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the present disclosure relates to but not limited to the field of computer technology, and in particular relates to an application program development platform and method, electronic equipment, storage media and computer program products.
  • edge computing nodes close to data sources has also increased rapidly. Coupled with the consideration of data security and privacy protection, more and more intelligent The application is front-loaded to run on the edge device as an edge computing node.
  • the disclosure proposes a technical solution of an application program development platform and method, electronic equipment, storage media and computer program products.
  • an application development platform including: a function programming component configured to determine a target event processing function corresponding to a target application, wherein the target event processing function is used to process the target Perform data processing on the event data to be processed corresponding to the application; the plug-in model is configured to determine the target plug-in corresponding to the target application, wherein the target plug-in is used to extend the function of the target application; preset calculation A framework configured to access the target event processing function and the target plug-in to build the target application.
  • an application program development method including: determining a target event processing function corresponding to the target application program, wherein the target event processing function is used to process pending events corresponding to the target application program Data processing; determine the target plug-in corresponding to the target application, wherein the target plug-in is used to extend the function of the target application; according to the target event processing function, the target plug-in, and preset A computing framework to build the target application.
  • an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above-mentioned method.
  • a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
  • a computer program product includes a computer program or an instruction, and when the computer program or instruction is run on a computer, causes the computer to execute the above method.
  • the application development platform provides a function programming component to determine the target event processing function used to process the event data corresponding to the target application program, and provides a plug-in model to determine the target application program.
  • the extended target plug-in further provides a preset computing framework, accesses target event processing functions and target plug-ins, and quickly builds target applications, thus effectively improving the development efficiency of target applications.
  • Fig. 1 shows a block diagram of an application program development platform according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of a preset computing framework according to an embodiment of the present disclosure
  • Fig. 3 shows a flow chart of an application program development method according to an embodiment of the present disclosure
  • Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • edge computing nodes close to data sources has also increased rapidly.
  • edge computing nodes In addition to data security and privacy protection considerations, more and more intelligent applications are front-loaded as edge It runs on the edge device of the computing node.
  • the embodiment of the present disclosure provides an application development platform, which can be applied in an edge computing scenario.
  • the application development platform provides a function programming component to determine the target event processing function used to process the event data corresponding to the target application program, and provides a plug-in model to determine the target plug-in used to extend the function of the target application program, and then, Provides a preset computing framework, accesses target event processing functions and target plug-ins, and quickly builds target applications that can run on terminal devices, thereby effectively improving the development efficiency of target applications.
  • Fig. 1 shows a block diagram of an application development platform according to an embodiment of the present disclosure.
  • a development platform refers to a piece of software developed based on a certain programming language or several programming languages. It can also be called a secondary development software framework. Users can perform various tasks on this development software framework.
  • the application development platform 10 includes:
  • the function programming component 11 is configured to determine the target event processing function corresponding to the target application program, wherein the target event processing function is used to perform data processing on the event data to be processed corresponding to the target application program;
  • the plug-in model 12 is configured to determine the target plug-in corresponding to the target application, wherein the target plug-in is used to extend the function of the target application;
  • the preset computing framework 13 is configured to access target event processing functions and target plug-ins to build target applications.
  • the application development platform provides a function programming component to determine the target event processing function used to process the event data corresponding to the target application program, and provides a plug-in model to determine the target application program.
  • the extended target plug-in further provides a preset computing framework, accesses target event processing functions and target plug-ins, and quickly builds target applications, thus effectively improving the development efficiency of target applications.
  • an event-driven preset computing framework may be provided in the application development platform, and a set of standardized cross-platform function running environment may be provided in the preset computing framework.
  • the target application needs to be developed, the developer only needs to develop the target event data processing logic corresponding to the target application, and then the application development platform can use function programming components, plug-in models, and presets based on the target event data processing logic
  • the computing framework uses very little code to complete the development of the target application program, and the developed target application program can support cross-platform operation.
  • Fig. 2 shows a schematic diagram of a preset computing framework according to an embodiment of the present disclosure.
  • the preset computing framework includes input modules, triggers, event buses, executors, function modules, algorithm modules, output modules, and Web Assembly virtual machines.
  • the preset computing framework provides an operating environment based on Web Assembly virtual machine technology.
  • Web Assembly is a binary instruction format based on a stack virtual machine. It is a portable compilation target of a programming language and can support cross-platform operation of multiple programming languages. Therefore, the preset computing framework can provide a cross-platform operating environment through Web Assembly virtual machine technology.
  • the function programming component 10 is configured to determine an initial event processing function by using a preset programming language according to the target event data processing logic; compile the initial event processing function to obtain the target event processing function, Wherein, the target event processing function has a common binary instruction format.
  • the developer After the developer develops the target event data processing logic corresponding to the target application, he can use the function programming component in the application development platform to determine the initial event processing function by using the preset programming language according to the target event data processing logic, and then process the initial event
  • the function is compiled to obtain a target event processing function with a general binary instruction format, so that the target event processing function has generality.
  • the preset programming language may include Python, Rust, C++, Go, etc., which is not limited in the present disclosure.
  • the functional programming component can use the underlying virtual machine (Low Level Virtual Machine, LLVM) compilation tool chain to compile the initial event processing function, generate a Web Assembly bytecode file, and run the Web Assembly bytecode file
  • LLVM Low Level Virtual Machine
  • the application development platform further includes: a configuration component configured to determine the corresponding configuration information when the target event processing function is running; the preset computing framework 13 is configured to load the The target event handler and the target plug-in get the target application.
  • the target plug-in corresponding to the target application can be determined, and the corresponding configuration information of the target event processing function can be determined, and then according to the configuration information, the target event processing function and the target The plug-in is loaded into the preset computing framework, so that the target application can be quickly obtained.
  • the configuration information includes: event source identification (used to indicate the target event source that provides the pending event data corresponding to the target application), bytecode path (used to indicate the Web Assembly bytecode corresponding to the target processing function file storage path), target executor (the executor corresponding to the target event processing function in the preset computing framework), target output module (the output module used to output the data processing results obtained by the target event processing function), concurrent number ( The number of concurrent processing by the target executor), etc., are not limited in this disclosure.
  • an input connection is established between the input module of the preset computing framework shown in FIG. 2 and the target event source, and the predetermined computing framework shown in FIG. 2 is determined Target the output module to make the output connection.
  • the target plug-in corresponding to the target application includes: an event source access plug-in, a hardware platform running plug-in, and an algorithm software development kit (Software Development Kit, SDK) plug-in.
  • an algorithm software development kit Software Development Kit, SDK
  • plug-in design is adopted for event sources, hardware platforms, and algorithm SDKs.
  • the target plugin is implemented based on the Message Queuing Telemetry Transport (MQTT) protocol.
  • MQTT Message Queuing Telemetry Transport
  • the target plug-in can be quickly obtained.
  • the target plug-in includes an event source access plug-in, and the event source access plug-in is used to support different event sources to access the target application; the event source access plug-in is configured to determine the access target application , where the target event source is used to provide pending event data.
  • the target event source corresponding to the target application is connected to the input module of the preset computing framework, and then the target event source is loaded into the preset
  • the target event handler function of the design computing framework provides pending event data.
  • the preset computing framework is configured to: based on the MQTT configuration information corresponding to the event source access plug-in, between the target event source and Establish a network connection between the MQTT proxy servers (Broker) corresponding to the MQTT configuration information; control the MQTT Broker to establish a target topic topic for the target event source; access the target event source based on the preset Internet of Things (IOT) protocol; Network connection, send the pending event data provided by the target event source to the target Topic; when the target event source is closed, disconnect the network connection.
  • IOT Internet of Things
  • the preset computing framework can establish a network connection between the target event source and the MQTT Broker corresponding to the MQTT configuration information, and then control the MQTT Broker to establish a network connection for the target event source.
  • a target Topic where the target Topic is used to receive pending event data provided by the target event source.
  • Access the target event source based on the preset IOT protocol receive initial data from the target event source, convert the initial data into a standard event data format, obtain the pending event data provided by the target event source, and then provide the target event source with The event data to be processed is sent to the target (Topic), so that the target event source provides event data to be processed for the target event processing function loaded into the preset computing framework.
  • the target plug-in is implemented based on a dynamic link library.
  • the target plug-in can be quickly obtained.
  • the preset computing framework is configured to: determine the corresponding dynamic link library for the event source access plug-in, wherein the dynamic link library
  • the link library includes the configuration interface, start interface and shutdown interface corresponding to the event source access plug-in; load the dynamic link library; use the external function interface (Foreign Function Interface, FFI), call the configuration interface, and access the target event source; use FFI, Call the startup interface to receive the pending event data provided by the target event source; use FFI to call the shutdown interface to close the target event source.
  • FFI Form Function Interface
  • the preset computing framework can load the dynamic link library corresponding to the event source access plug-in. Furthermore, the preset computing framework can use the FFI interface to call the Config interface to configure the target event source, that is, connect the target event source to the preset computing framework; call the Open interface to receive the pending event data provided by the target event source; call the Close interface to close The target event source stops serving pending event data.
  • the target plug-in includes a hardware platform running plug-in, and the hardware platform running plug-in is used to support the target application to run on different hardware platforms; the hardware platform running plug-in is configured to determine the target hardware corresponding to the target application A platform, wherein the target hardware platform is used to provide a running environment for the target application program.
  • the plug-in can be run on the hardware platform, so that the developed target application program can run on different hardware platforms, and the expansion of the operating environment can be realized.
  • the plug-in running on the hardware platform can be realized through the MQTT protocol, and can also be realized through the dynamic link library, which is not limited in this disclosure.
  • the target plug-in includes an algorithm software development kit SDK plug-in, and the algorithm SDK plug-in is used to provide different algorithm SDKs for the target application program; the algorithm SDK plug-in is used to determine the target algorithm SDK corresponding to the target application program , wherein the target algorithm SDK is used to provide the corresponding data processing algorithm for the target application program.
  • the algorithm SDK plug-in can be implemented through the MQTT protocol, and can also be implemented through a dynamic link library, which is not limited in this disclosure.
  • the preset computing framework is configured to run the target application program.
  • the preset computing framework is configured to: receive the event data to be processed provided by the target event source connected to the target application; determine the target event processing corresponding to the target event source based on the preset mapping relationship Function; use the target event processing function to process the event data to be processed, and obtain the data processing result.
  • the target event source can be connected to the input module of the preset computing framework shown in Figure 2 to receive the event data to be processed provided by the target event source, and then based on the relationship between the target event source and the target event processing function
  • the mapping relationship is preset, and the event data to be processed is processed by using the target event processing function in the function module to obtain the data processing result.
  • the input module in the preset computing framework shown in FIG. 2 may receive pending event data sent by one or more target event sources, and the function module may include one or more target event processing functions. There may be a many-to-many mapping relationship between target event sources and target event processing functions.
  • the pending event data of one target event source can be sent to multiple target event processing functions for data processing, or one event processing function can process the pending event data sent by multiple target event sources. Process event data for data processing.
  • the trigger in the preset computing framework shown in FIG. 2 converts the The event data to be processed is sent to different queues of the event bus, and the event data to be processed is sent to the executor asynchronously through different queues, waiting to be consumed by the corresponding target event processing function.
  • the first trigger sends the pending event data of the target event source a to the first queue in the event bus, waiting to be processed
  • the target event processing function A is consumed; if there is a second mapping relationship between the target event source b and the target event processing function B, the pending event data of the target event source b is sent to the second queue in the event bus, Waiting to be consumed by the target event handler function B.
  • one executor in the preset computing framework shown in FIG. 2 corresponds to one target event processing function included in the function module.
  • the executor registers with the event bus according to the preset mapping relationship between the target event source and the target event processing function, monitors the corresponding queue in the event bus, and consumes the corresponding queue pending event data for .
  • the first executor corresponds to the target event processing function A, then the first executor registers to the event bus, listens to the first queue in the event bus, and consumes the pending events sent to the first queue by the target event source a Data, that is, the pending event data sent by the target event source a to the first queue, and forwarded to the target event processing function A;
  • the second executor corresponds to the target event processing function B, then the second executor registers to the event bus, monitors the second queue in the event bus, and consumes the pending event data sent by the target event source b to the second queue, That is, the pending event data sent by the target event source b to the second queue is forwarded to the target event processing function B.
  • the preset computing framework provides an operating environment based on the Web Assembly virtual machine technology; based on the first standard interface generated by the Web Assembly virtual machine, the target event processing function is invoked.
  • the executor in the preset computing framework calls the target event processing function corresponding to the executor through the export interface (the first standard interface) of the Web Assembly virtual machine for external output, so that the executor The pending event data in the listening queue is forwarded to the corresponding target event processing function.
  • the first executor invokes the target event processing function A through the first export interface of the Web Assembly virtual machine for external output, so as to send the target event source a to the pending event data in the first queue and forward it to the target event Processing function A;
  • the second executor calls the target event processing function B through the second export interface of the Web Assembly virtual machine for external output, so as to send the target event source b to the pending event data in the second queue and forward it to Target event handler function B.
  • control the target event processing function to call the corresponding target algorithm SDK; based on the data processing algorithm provided by the target algorithm SDK, perform data processing on the event data to be processed , to get the data processing result.
  • the algorithm module in the preset computing framework may include the target algorithm SDK corresponding to the target application program, and the target event processing function may call the target algorithm SDK in the algorithm module as required during the data processing process of the event data to be processed.
  • the algorithm module may include face recognition SDK, feature retrieval SDK, key value (Key Value, KV) storage SDK, etc., which is not limited in this disclosure.
  • the target event processing function calls the target algorithm SDK in the algorithm module through the import interface (the second standard interface) used by the Web Assembly virtual machine for internal input, based on the data provided by the target algorithm SDK Processing algorithm, data processing is performed on the event data to be processed.
  • the import interface the second standard interface
  • the target event processing function performs data processing on the event data to be processed
  • the event processing result is obtained, and the event processing result is returned to the corresponding executor, so that the executor sends the event processing result to the corresponding target output module , complete the result output.
  • the application development platform provides a function programming component to determine the target event processing function used to process the event data corresponding to the target application program, and provides a plug-in model to determine the target application program.
  • the extended target plug-in further provides a preset computing framework, accesses target event processing functions and target plug-ins, and quickly builds target applications, thus effectively improving the development efficiency of target applications.
  • the application development platform of the embodiment of the present disclosure when developing an application corresponding to the intelligent robot, first, based on the event data processing logic of positioning navigation, voice control, and motion control, use the function programming component Create target event processing functions that can realize positioning navigation, voice control, and motion control. Then, the plug-in model can be used to create or reuse existing event source plug-ins to realize the access of event sources such as cameras, radars, and voice sensors, and to create or reuse existing algorithm SDK plug-ins to provide all required functions for target event processing functions. The required algorithm SDK. Finally, load the target event processing function and the algorithm SDK plug-in into the preset computing framework to obtain the function running instance of the application program corresponding to the smart robot, start and run the function running instance, and the smart robot can start working.
  • the function programming component Create target event processing functions that can realize positioning navigation, voice control, and motion control.
  • the plug-in model can be used to create or reuse existing event source plug-ins to realize the access of event sources such as cameras, radars, and voice sensors,
  • the present disclosure also provides an application program development method, an electronic device, a computer-readable storage medium, a program, corresponding technical solutions and descriptions, and refer to corresponding records in the application program development platform part.
  • Fig. 3 shows a flowchart of an application program development method according to an embodiment of the present disclosure.
  • the application program development method can be executed by electronic devices such as terminal equipment or servers, and the terminal equipment can be user equipment (User Equipment, UE), mobile equipment, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant) , PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc.
  • the application program development method can be implemented by calling the computer-readable instructions stored in the memory by the processor.
  • the application development method may be performed by a server.
  • the application development methodology includes:
  • step S31 a target event processing function corresponding to the target application is determined, wherein the target event processing function is used to perform data processing on the pending event data corresponding to the target application.
  • step S32 a target plug-in corresponding to the target application is determined, wherein the target plug-in is used to extend the function of the target application.
  • step S33 the target application program is constructed according to the target event processing function, the target plug-in, and the preset computing framework.
  • determining a target event processing function corresponding to the target application includes:
  • target event data processing logic use the preset programming language to determine the initial event processing function
  • the initial event processing function is compiled to obtain a target event processing function, wherein the target event processing function has a general binary instruction format.
  • the target application is constructed according to the target event processing function, the target plug-in, and the preset computing framework, including:
  • the target event processing function and the target plug-in are loaded into the preset computing framework to obtain the target application program.
  • the target plug-in is implemented based on the message queue telemetry transport MQTT protocol.
  • the target plug-in is implemented based on a dynamic link library.
  • the target plug-in includes an event source access plug-in, and the event source access plug-in is used to support different event sources to access the target application;
  • the application development methodology also includes:
  • a target event source for accessing the target application program is determined, wherein the target event source is used to provide event data to be processed.
  • the application development method when the event source access plug-in is implemented based on the MQTT protocol, the application development method further includes:
  • a network connection is established between the target event source and the MQTT proxy server Broker corresponding to the MQTT configuration information;
  • the application development method further includes:
  • the dynamic link library includes a configuration interface, a startup interface and a shutdown interface corresponding to the event source access plug-in;
  • the target plug-in includes a hardware platform running plug-in, and the hardware platform running plug-in is used to support the target application to run on different hardware platforms;
  • the application development methodology also includes:
  • the target plug-in includes an algorithm software development kit SDK plug-in, and the algorithm SDK plug-in is used to provide different algorithm SDKs for the target application;
  • the application development methodology also includes:
  • the application program development method further includes: running the target application program.
  • running a target application includes:
  • the preset computing framework provides an operating environment based on Web Assembly virtual machine technology
  • the application development methodology also includes:
  • the target event processing function is used to process the event data to be processed to obtain a data processing result, including:
  • the functions or modules included in the application development platform provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and its specific implementation can refer to the descriptions of the above method embodiments.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
  • Computer readable storage media may be volatile or nonvolatile computer readable storage media.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
  • electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable read only memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only Memory, PROM), read-only memory (Read-Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • Static Random-Access Memory SRAM
  • Electrically Erasable Programmable Read-Only Memory Electrically Erasable Programmable Read-Only Memory
  • EEPROM Electrically Era
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch Panel, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect a duration and pressure associated with the touch or swipe operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (Microphone, MIC), and when the electronic device 800 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal. Received audio signals may be further stored in memory 804 or transmitted via communication component 816.
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • the sensor assembly 814 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal Oxide Semiconductor
  • CCD Charge-coupled Device
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access wireless networks based on communication standards, such as wireless networks (WiFi), second-generation mobile communication technology (2-Generation wireless telephone technology, 2G) or third-generation mobile communication technology (3rd-Generation, 3G) , or a combination of them.
  • WiFi wireless networks
  • 2G second-generation mobile communication technology
  • 3rd-Generation, 3G third-generation mobile communication technology
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication.
  • NFC Near Field Communication
  • the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BitTorrent, BT) technology and other technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth BitTorrent, BT
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (Digital Signal Process, DSP), digital signal processing devices (Digital Signal Process Device, DSPD), Programmable Logic Device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components are used to implement the above method.
  • ASICs application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components are used to implement the above method.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
  • This disclosure relates to the field of augmented reality.
  • Augmented Reality By acquiring the image information of the target object in the real environment, and then using various visual correlation algorithms to detect or identify the relevant features, states and attributes of the target object, and to obtain the information that matches the specific application.
  • Augmented Reality effect combining virtual and reality.
  • the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places.
  • Vision-related algorithms can involve visual positioning, Simultaneous Localization and Mapping (SLAM), 3D reconstruction, image registration, background segmentation, key point extraction and tracking of objects, pose or depth detection of objects, etc.
  • SLAM Simultaneous Localization and Mapping
  • 3D reconstruction image registration, background segmentation, key point extraction and tracking of objects, pose or depth detection of objects, etc.
  • Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display.
  • the relevant features, states and attributes of the target object can be detected or identified through the convolutional neural network.
  • the above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
  • Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on the operating system stored in the memory 1932, such as the Microsoft server operating system (Windows Server TM ), the graphical user interface-based operating system (Mac OS X TM ) introduced by Apple Inc., and the multi-user and multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ), or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface-based operating system
  • Unix TM multi-user and multi-process computer operating system
  • Linux TM free and open source Unix-like operating system
  • FreeBSD TM open source Unix-like operating system
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
  • a computer program product may include a computer program or instructions, which, when run on a computer, cause the computer to perform the above method.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), portable compact disk read only memory (Compact Disk Read Only Memory, CD-ROM), digital versatile disk (Digital versatile Disc, DVD), memory stick, floppy disk, mechanical encoding Devices such as punched cards or raised-in-recess structures having instructions stored thereon, and any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • portable compact disk read only memory Compact Disk Read Only Memory
  • CD-ROM Compact Disk Read Only Memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding Devices such as punched cards or raised-in-recess structures having instructions stored thereon, and any suitable combination of the foregoing.
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in the form of one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (Programmable Logic Arrays, PLAs), are personalized by utilizing state information of computer-readable program instructions,
  • the electronic circuitry can execute computer readable program instructions to implement various aspects of the present disclosure.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
  • SDK software development kit
  • Embodiments of the present disclosure provide an application program development platform and method, electronic equipment, a storage medium, and a computer program product
  • the application program development platform includes: a function programming component configured to determine a target event processing function corresponding to a target application program , wherein the target event processing function is used to perform data processing on the event data to be processed corresponding to the target application; the plug-in model is configured to determine the target plug-in corresponding to the target application, wherein the target plug-in It is used to extend the function of the target application program; the preset computing framework is configured to access the target event processing function and the target plug-in to build the target application program.
  • the application program development platform in the embodiment of the present disclosure can effectively improve the development efficiency of the target application program.

Landscapes

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

Abstract

本公开涉及一种应用程序开发平台及方法、电子设备、存储介质和计算机程序产品,所述应用程序开发平台包括:函数编程组件,用于确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;插件模型,用于确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;预设计算框架,用于接入所述目标事件处理函数和所述目标插件,以构建所述目标应用程序。

Description

应用程序开发平台及方法、电子设备、存储介质和计算机程序产品
相关申请的交叉引用
本公开基于申请号为202111362792.3、申请日为2021年11月17日、申请名称为“应用程序开发平台及方法、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及但不限于计算机技术领域,尤其涉及一种应用程序开发平台及方法、电子设备、存储介质和计算机程序产品。
背景技术
随着物联网技术和人工智能(Artificial Intelligence,AI)加速芯片的高速发展,靠近数据源的边缘计算节点的算力也飞速提升,加上对数据安全和隐私保护的考虑,越来越多的智能化应用程序前置到作为边缘计算节点的端边设备上运行。
发明内容
本公开提出了一种应用程序开发平台及方法、电子设备、存储介质和计算机程序产品的技术方案。
根据本公开的一方面,提供了一种应用程序开发平台,包括:函数编程组件,被配置为确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;插件模型,被配置为确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;预设计算框架,被配置为接入所述目标事件处理函数和所述目标插件,构建所述目标应用程序。
根据本公开的一方面,提供了一种应用程序开发方法,包括:确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;根据所述目标事件处理函数、所述目标插件、以及预设计算框架,构建所述目标应用程序。
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行上述方法。
在本公开实施例中,应用程序开发平台提供函数编程组件确定用于对目标应用程序对应的待处理事件数据进行数据处理的目标事件处理函数,以及提供插件模型确定用于对目标应用程序进行功能扩展的目标插件,进而,提供预设计算框架,接入目标事件处理函数和目标插件,快速构建目标应用程序,从而有效提高了目标应用程序的开发效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的一种应用程序开发平台的框图;
图2示出根据本公开实施例的预设计算框架的示意图;
图3示出根据本公开实施例的一种应用程序开发方法的流程图;
图4示出根据本公开实施例的一种电子设备的框图;
图5示出根据本公开实施例的一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
随着物联网技术和AI加速芯片的高速发展,靠近数据源的边缘计算节点的算力也飞速提升,加上对数据安全和隐私保护的考虑,越来越多的智能化应用程序前置到作为边缘计算节点的端边设备上运行。
但是,实际应用中,端边设备对应的硬件平台有很多种,应用程序运行过程中需要加载的算法也多种多样,接入应用程序的输入源也是种类繁多,而且都还在不断增加的趋势中。在这种情况下,相关技术中开发端边设备上运行的智能化应用程序时,需要完成对多种硬件平台的适配,对多种输入源的适配,以及对多种算法的适配,导致智能化应用程序的开发效率较低。
本公开实施例提供了一种应用程序开发平台,可以应用于边缘计算场景中。应用程序开发平台提供函数编程组件确定用于对目标应用程序对应的待处理事件数据进行数据处理的目标事件处理函数,以及提供插件模型确定用于对目标应用程序进行功能扩展的目标插件,进而,提供预设计算框架,接入目标事件处理函数和目标插件,快速构建能够在端边设备中运行的目标应用程序,从而有效提高了目标应用程序的开发效率。
图1示出根据本公开实施例的一种应用程序开发平台的框图。开发平台是指以某种编程语言或者某几种编程语言为基础,开发出来的一个软件,也可以称为是一个二次开发软件框架,用户可以在这个开发软件框架上进行各种各样的应用程序产品的开发,并且在这个开发软件框架上进行应用程序开发的时候,不需要像以往的编程方式那样编写大量的代码,而是只需要进行一些简单的配置,或者是写极少量的代码便可以完成一个应用程序的开发工作。如图1所示,该应用程序开发平台10包括:
函数编程组件11,被配置为确定目标应用程序对应的目标事件处理函数,其中,目 标事件处理函数用于对目标应用程序对应的待处理事件数据进行数据处理;
插件模型12,被配置为确定目标应用程序对应的目标插件,其中,目标插件用于对目标应用程序进行功能扩展;
预设计算框架13,被配置为接入目标事件处理函数和目标插件,以构建目标应用程序。
在本公开实施例中,应用程序开发平台提供函数编程组件确定用于对目标应用程序对应的待处理事件数据进行数据处理的目标事件处理函数,以及提供插件模型确定用于对目标应用程序进行功能扩展的目标插件,进而,提供预设计算框架,接入目标事件处理函数和目标插件,快速构建目标应用程序,从而有效提高了目标应用程序的开发效率。
在一示例中,应用程序开发平台中,可以提供基于事件驱动的预设计算框架,该预设计算框架中可以提供一套标准化的跨平台函数运行环境。在需要开发目标应用程序的情况下,开发者只需要开发目标应用程序对应的目标事件数据处理逻辑,进而应用程序开发平台可以基于目标事件数据处理逻辑,利用函数编程组件、插件模型、以及预设计算框架,利用很少的代码完成目标应用程序的开发,并且开发得到的目标应用程序可以支持跨平台运行。
图2示出根据本公开实施例的预设计算框架的示意图。如图2所示,预设计算框架中包括输入模块、触发器、事件总线、执行器、函数模块、算法模块、输出模块、Web Assembly虚拟机。
在一种可能的实现方式中,预设计算框架基于Web Assembly虚拟机技术提供运行环境。
Web Assembly是一种基于堆栈虚拟机的二进制指令格式,是编程语言的可移植编译目标,可以支持多编程语言跨平台运行。因此,预设计算框架可以通过Web Assembly虚拟机技术提供跨平台的运行环境。
在一种可能的实现方式中,函数编程组件10,被配置为根据目标事件数据处理逻辑,利用预设编程语言,确定初始事件处理函数;对初始事件处理函数进行编译,得到目标事件处理函数,其中,目标事件处理函数具有通用的二进制指令格式。
开发者开发目标应用程序对应的目标事件数据处理逻辑之后,可以利用应用程序开发平台中的函数编程组件,根据目标事件数据处理逻辑,利用预设编程语言确定初始事件处理函数,进而对初始事件处理函数进行编译,得到具有通用的二进制指令格式的目标事件处理函数,以使得目标事件处理函数具有通用性。
在一示例中,预设编程语言可以包括Python、Rust、C++、Go等,本公开对此不作限定。
在一示例中,函数编程组件可以利用底层虚拟机(Low Level Virtual Machine,LLVM)编译工具链,对初始事件处理函数进行编译,生成Web Assembly字节码文件,其中,运行Web Assembly字节码文件可以得到目标事件处理函数。
在一种可能的实现方式中,该应用程序开发平台,还包括:配置组件,被配置为确定目标事件处理函数运行时对应的配置信息;预设计算框架13,被配置为根据配置信息,加载目标事件处理函数和目标插件,得到目标应用程序。
在构建目标应用程序时,可以根据目标应用程序的扩展需求,确定目标应用程序对应的目标插件,以及确定目标事件处理函数运行时对应的配置信息,进而根据配置信息,将目标事件处理函数和目标插件加载到预设计算框架,从而可以快速得到目标应用程序。
在一示例中,配置信息包括:事件源标识(用于指示提供目标应用程序对应的待处理事件数据的目标事件源)、字节码路径(用于指示目标处理函数对应的Web Assembly 字节码文件的存储路径)、目标执行器(预设计算框架中与目标事件处理函数对应的执行器)、目标输出模块(用于输出目标事件处理函数得到的数据处理结果的输出模块)、并发数(目标执行器并发处理的数目)等,本公开对此不作限定。
在确定目标事件处理函数运行时对应的配置信息之后,通过调用预设计算框架中的函数运行接口,将目标事件处理函数和目标插件加载到预设计算框架中,创建目标应用程序对应的运行函数实例。
在一示例中,根据配置信息中的事件源标识,在图2所示的预设计算框架的输入模块和目标事件源之间建立输入连接,以及在图2所示的预设计算框架中确定目标输出模块以建立输出连接。
在一种可能的实现方式中,目标应用程序对应的目标插件包括:事件源接入插件、硬件平台运行插件、算法软件开发包(Software Development Kit,SDK)插件。
为了利用图2所示的预设计算框架灵活扩展得到不同目标应用程序,对事件源、硬件平台和算法SDK等均采用插件化设计。
在一种可能的实现方式中,目标插件是基于消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)协议实现的。
基于MQTT协议,可以快速得到目标插件。
在一种可能的实现方式中,目标插件包括事件源接入插件,事件源接入插件用于支持不同事件源接入目标应用程序;事件源接入插件,被配置为确定接入目标应用程序的目标事件源,其中,目标事件源用于提供待处理事件数据。
在事件源接入插件是基于MQTT协议实现的情况下,基于MQTT协议,以实现将目标应用程序对应的目标事件源,接入预设计算框架的输入模块,进而实现目标事件源为加载到预设计算框架的目标事件处理函数提供待处理事件数据。
在一种可能的实现方式中,在事件源接入插件是基于MQTT协议实现的情况下,预设计算框架,被配置为:基于事件源接入插件对应的MQTT配置信息,在目标事件源和MQTT配置信息对应的MQTT代理服务器(Broker)之间建立网络连接;控制MQTT Broker为目标事件源建立目标主题Topic;基于预设物联网(Internet of Things,IOT)协议,接入目标事件源;基于网络连接,将目标事件源提供的待处理事件数据发送至目标Topic;在关闭目标事件源的情况下,断开网络连接。
基于事件源接入插件对应的MQTT配置信息,可以实现将不同事件源接入预设计算框架。在一些实施例中,根据MQTT配置信息(MQTT Broker地址和端口),预设计算框架可以在目标事件源和MQTT配置信息对应的MQTT Broker之间建立网络连接,进而控制MQTT Broker为目标事件源建立一个目标Topic,其中,目标Topic用于接收目标事件源提供的待处理事件数据。
基于预设IOT协议接入目标事件源,以及从目标事件源接收初始数据,并将初始数据转换成标准的事件数据格式,得到目标事件源提供的待处理事件数据,进而,将目标事件源提供的待处理事件数据发送至目标(Topic),以实现目标事件源为加载到预设计算框架的目标事件处理函数提供待处理事件数据。
在关闭目标事件源的情况下,断开网络连接,停止提供待处理事件数据。
在一种可能的实现方式中,目标插件是基于动态链接库实现的。
基于MQTT协议,可以快速得到目标插件。
在一种可能的实现方式中,在事件源接入插件是基于动态链接库实现的情况下,预设计算框架,被配置为:为事件源接入插件确定对应的动态链接库,其中,动态链接库中包括事件源接入插件对应的配置接口、启动接口和关闭接口;加载动态链接库;利用外部功能接口(Foreign Function Interface,FFI),调用配置接口,接入目标事件源;利 用FFI,调用启动接口,接收目标事件源提供的待处理事件数据;利用FFI,调用关闭接口,关闭目标事件源。
确定事件源接入插件对应的动态链接库,其中,动态链接库中包括三个标准接口:配置(Config)接口、启动(Open)接口、关闭(Close)接口。预设计算框架可以加载事件源接入插件对应的动态链接库。进而,预设计算框架可以利用FFI接口,调用Config接口配置目标事件源,即将目标事件源接入预设计算框架;调用Open接口,接收目标事件源提供的待处理事件数据;调用Close接口,关闭目标事件源,停止提供待处理事件数据。
在一种可能的实现方式中,目标插件包括硬件平台运行插件,硬件平台运行插件用于支持目标应用程序在不同硬件平台上运行;硬件平台运行插件,被配置为确定目标应用程序对应的目标硬件平台,其中,目标硬件平台用于为目标应用程序提供运行环境。
通过对硬件平台进行插件化设计,从而可以利用硬件平台运行插件,实现开发得到的目标应用程序可以在不同硬件平台上运行,实现运行环境的扩展。
硬件平台运行插件可以通过MQTT协议实现,也可以通过动态链接库实现,本公开对此不作限定。
在一种可能的实现方式中,目标插件包括算法软件开发工具包SDK插件,算法SDK插件用于为目标应用程序提供不同的算法SDK;算法SDK插件,用于确定目标应用程序对应的目标算法SDK,其中,目标算法SDK用于为目标应用程序提供对应的数据处理算法。
通过对算法SDK进行插件化设计,可以为开发得到的目标应用程序提供不同的算法SDK,实现运算功能的扩展。
算法SDK插件可以通过MQTT协议实现,也可以通过动态链接库实现,本公开对此不作限定。
在一种可能的实现方式中,预设计算框架,被配置为运行目标应用程序。
将目标应用程序对应的目标事件处理函数和目标插件,加载到预设计算框架,可以得到目标应用程序的函数运行实例,利用预设计算框架的数据处理流程,启动运行该函数运行实例,也即运行目标应用程序。
在一种可能的实现方式中,预设计算框架,被配置为:接收接入目标应用程序的目标事件源提供的待处理事件数据;基于预设映射关系,确定目标事件源对应的目标事件处理函数;利用目标事件处理函数,对待处理事件数据进行数据处理,得到数据处理结果。
基于事件源插件,可以将目标事件源接入图2所示的预设计算框架的输入模块,以接收目标事件源提供的待处理事件数据,进而基于目标事件源与目标事件处理函数之间的预设映射关系,利用函数模块中的目标事件处理函数,对待处理事件数据进行数据处理,得到数据处理结果。
在一示例中,图2所示的预设计算框架中的输入模块可以接收一个或多个目标事件源发送的待处理事件数据,函数模块中可以包括一个或多个目标事件处理函数。目标事件源与目标事件处理函数可以存在多对多的映射关系。
例如,在运行目标应用程序的过程中,可以将一个目标事件源的待处理事件数据发送给多个目标事件处理函数进行数据处理,或者,一个事件处理函数可以对多个目标事件源发送的待处理事件数据进行数据处理。
在一示例中,在运行目标应用程序的过程中,图2所示的预设计算框架中的触发器根据目标事件源和目标事件处理函数之间的预设映射关系,将不同目标事件源的待处理事件数据发送至事件总线的不同队列中,并通过不同队列将待处理事件数据异步发送至 执行器,以等待被对应的目标事件处理函数消费。
例如,在目标事件源a与目标事件处理函数A之间存在第一映射关系的情况下,第一触发器将目标事件源a的待处理事件数据发送至事件总线中的第一队列,等待被目标事件处理函数A被消费;在目标事件源b与目标事件处理函数B之间存在第二映射关系的情况下,将目标事件源b的待处理事件数据发送至事件总线中的第二队列,等待被目标事件处理函数B消费。
在一示例中,图2所示的预设计算框架中的一个执行器对应函数模块中包括的一个目标事件处理函数。在运行目标应用程序的过程中,执行器根据目标事件源和目标事件处理函数之间的预设映射关系,注册到事件总线,并对事件总线中对应的队列进行监听,以及消费对应的队列中的待处理事件数据。
例如,第一执行器对应目标事件处理函数A,则第一执行器注册到事件总线,并对事件总线中的第一队列进行监听,以及消费目标事件源a发送至第一队列的待处理事件数据,即,将目标事件源a发送至第一队列的待处理事件数据,转发至目标事件处理函数A;
第二执行器对应目标事件处理函数B,则第二执行器注册到事件总线,并对事件总线中的第二队列进行监听,以及消费目标事件源b发送至第二队列的待处理事件数据,即,将目标事件源b发送至第二队列的待处理事件数据,转发至目标事件处理函数B。
利用预设计算框架中的输入模块接收待处理事件数据,进而利用触发器、事件总线、执行器,基于预设映射关系,将待处理事件数据发送至对应的目标处理函数,进而利用目标事件处理函数,对待处理事件数据进行数据处理。
在一种可能的实现方式中,预设计算框架基于Web Assembly虚拟机技术提供运行环境;基于Web Assembly虚拟机生成的第一标准接口,调用目标事件处理函数。
在运行目标应用程序的过程中,预设计算框架中的执行器通过Web Assembly虚拟机用于对外输出的export接口(第一标准接口),调用执行器对应的目标事件处理函数,以将执行器监听的队列中的待处理事件数据,转发至对应的目标事件处理函数。
例如,第一执行器通过Web Assembly虚拟机用于对外输出的第一export接口,调用目标事件处理函数A,以将目标事件源a发送至第一队列中的待处理事件数据,转发至目标事件处理函数A;第二执行器通过Web Assembly虚拟机用于对外输出的第二export接口,调用目标事件处理函数B,以将目标事件源b发送至第二队列中的待处理事件数据,转发至目标事件处理函数B。
在一种可能的实现方式中,基于Web Assembly虚拟机生成的第二标准接口,控制目标事件处理函数调用对应的目标算法SDK;基于目标算法SDK提供的数据处理算法,对待处理事件数据进行数据处理,得到数据处理结果。
预设计算框架中的算法模块中可以包括目标应用程序对应的目标算法SDK,目标事件处理函数在对待处理事件数据进行数据处理的过程中,可以根据需要调用算法模块中的目标算法SDK。
其中,算法模块中可以包括人脸识别SDK、特征检索SDK、键值(Key Value,KV)存储SDK等,本公开对此不作限定。
在运行目标应用程序的过程中,目标事件处理函数通过Web Assembly虚拟机用于对内输入的import接口(第二标准接口),调用算法模块中的目标算法SDK,以基于目标算法SDK提供的数据处理算法,对待处理事件数据进行数据处理。
在一示例中,目标事件处理函数对待处理事件数据执行完数据处理之后,得到事件处理结果,并将事件处理结果返回相应的执行器,以使得执行器将事件处理结果发送至相应的目标输出模块,完成结果输出。
在本公开实施例中,应用程序开发平台提供函数编程组件确定用于对目标应用程序对应的待处理事件数据进行数据处理的目标事件处理函数,以及提供插件模型确定用于对目标应用程序进行功能扩展的目标插件,进而,提供预设计算框架,接入目标事件处理函数和目标插件,快速构建目标应用程序,从而有效提高了目标应用程序的开发效率。
在本公开实施例的应用程序开发平台应用于语音控制的智能机器人场景下,开发智能机器人对应的应用程序时,首先,基于定位导航、语音控制、运动控制的事件数据处理逻辑,利用函数编程组件创建能够实现定位导航、语音控制、运动控制的目标事件处理函数。然后,可以利用插件模型创建或复用已有的事件源插件,实现相机、雷达、语音传感器等事件源的接入,以及创建或复用已有的算法SDK插件,为目标事件处理函数提供所需的算法SDK。最后,将目标事件处理函数和算法SDK插件,加载到预设计算框架中,得到智能机器人对应的应用程序的函数运行实例,启动运行该函数运行实例,则智能机器人就可以开始工作了。
此外,本公开还提供了应用程序开发方法、电子设备、计算机可读存储介质、程序,相应技术方案和描述和参见应用程序开发平台部分的相应记载。
图3示出根据本公开实施例的一种应用程序开发方法的流程图。该应用程序开发方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,该应用程序开发方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行该应用程序开发方法。如图3所示,该应用程序开发方法包括:
在步骤S31中,确定目标应用程序对应的目标事件处理函数,其中,目标事件处理函数用于对目标应用程序对应的待处理事件数据进行数据处理。
在步骤S32中,确定目标应用程序对应的目标插件,其中,目标插件用于对目标应用程序进行功能扩展。
在步骤S33中,根据目标事件处理函数、目标插件、以及预设计算框架,构建目标应用程序。
在一种可能的实现方式中,确定目标应用程序对应的目标事件处理函数,包括:
根据目标事件数据处理逻辑,利用预设编程语言,确定初始事件处理函数;
对初始事件处理函数进行编译,得到目标事件处理函数,其中,目标事件处理函数具有通用的二进制指令格式。
在一种可能的实现方式中,根据目标事件处理函数、目标插件、以及预设计算框架,构建目标应用程序,包括:
确定目标事件处理函数运行时对应的配置信息;
根据配置信息,将目标事件处理函数和目标插件,加载到预设计算框架,得到目标应用程序。
在一种可能的实现方式中,目标插件是基于消息队列遥测传输MQTT协议实现的。
在一种可能的实现方式中,目标插件是基于动态链接库实现的。
在一种可能的实现方式中,目标插件包括事件源接入插件,事件源接入插件用于支持不同事件源接入目标应用程序;
该应用程序开发方法还包括:
根据事件源接入插件,确定接入目标应用程序的目标事件源,其中,目标事件源用于提供待处理事件数据。
在一种可能的实现方式中,在事件源接入插件是基于MQTT协议实现的情况下,该应用程序开发方法还包括:
基于事件源接入插件对应的MQTT配置信息,在目标事件源和MQTT配置信息对应的MQTT代理服务器Broker之间建立网络连接;
控制MQTT Broker为目标事件源建立目标主题Topic;
基于预设物联网IOT协议,接入目标事件源;
基于网络连接,将目标事件源提供的待处理事件数据发送至目标Topic;
在关闭目标事件源的情况下,断开网络连接。
在一种可能的实现方式中,在事件源接入插件是基于动态链接库实现的情况下,该应用程序开发方法还包括:
为事件源接入插件确定对应的动态链接库,其中,动态链接库中包括事件源接入插件对应的配置接口、启动接口和关闭接口;
加载动态链接库;
利用外部功能接口FFI,调用配置接口,接入目标事件源;
利用FFI,调用启动接口,接收目标事件源提供的待处理事件数据;
利用FFI,调用关闭接口,关闭目标事件源。
在一种可能的实现方式中,目标插件包括硬件平台运行插件,硬件平台运行插件用于支持目标应用程序在不同硬件平台上运行;
该应用程序开发方法还包括:
根据硬件平台运行插件,确定目标应用程序对应的目标硬件平台,其中,目标硬件平台用于为目标应用程序提供运行环境。
在一种可能的实现方式中,目标插件包括算法软件开发工具包SDK插件,算法SDK插件用于为目标应用程序提供不同的算法SDK;
该应用程序开发方法还包括:
根据算法SDK插件,确定目标应用程序对应的目标算法SDK,其中,目标算法SDK用于为目标应用程序提供对应的数据处理算法。
在一种可能的实现方式中,该应用程序开发方法还包括:运行目标应用程序。
在一种可能的实现方式中,运行目标应用程序,包括:
接收接入目标应用程序的目标事件源提供的待处理事件数据;
基于预设映射关系,确定目标事件源对应的目标事件处理函数;
利用目标事件处理函数,对待处理事件数据进行数据处理,得到数据处理结果。
在一种可能的实现方式中,预设计算框架基于Web Assembly虚拟机技术提供运行环境;
该应用程序开发方法还包括:
基于Web Assembly虚拟机生成的第一标准接口,调用目标事件处理函数。
在一种可能的实现方式中,利用目标事件处理函数,对待处理事件数据进行数据处理,得到数据处理结果,包括:
基于Web Assembly虚拟机生成的第二标准接口,控制目标事件处理函数调用对应的目标算法SDK;
基于目标算法SDK提供的数据处理算法,对待处理事件数据进行数据处理,得到数据处理结果。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
在一些实施例中,本公开实施例提供的应用程序开发平台具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描 述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图4示出根据本公开实施例的一种电子设备的框图。如图4所示,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图4,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable read only memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch Panel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(Microphone,MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储 在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)或电荷耦合装置(Charge-coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(2-Generation wireless telephone technology,2G)或第三代移动通信技术(3rd-Generation,3G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(BitTorrent,BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(Digital Signal Process,DSP)、数字信号处理设备(Digital Signal Process Device,DSPD)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的增强现实(Augmented Reality,AR)效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、即时定位与地图构建(Simultaneous Localization and Mapping,SLAM)、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。
图5示出根据本公开实施例的一种电子设备的框图。如图5所示,电子设备1900可以被提供为一服务器。参照图5,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机程序或指令,在计算机程序或指令在计算机上运行的情况下,使得计算机执行上述方法。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(Compact Disk Read Only Memory,CD-ROM)、数字多功能盘(Digital versatile Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算 机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(Programmable Logic Arrays,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(SDK)等等。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。
工业实用性
本公开实施例提供了一种应用程序开发平台及方法、电子设备、存储介质和计算机程序产品,其中,应用程序开发平台包括:函数编程组件,被配置为确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;插件模型,被配置为确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;预设计算框架,被配置为接入所述目标事件处理函数和所述目标插件,以构建所述目标应用程序。本公开实施例中的应用程序开发平台可以有效提高目标应用程序的开发效率。

Claims (18)

  1. 一种应用程序开发平台,包括:
    函数编程组件,被配置为确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;
    插件模型,被配置为确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;
    预设计算框架,被配置为接入所述目标事件处理函数和所述目标插件,构建所述目标应用程序。
  2. 根据权利要求1所述的平台,其中,所述函数编程组件,被配置为:
    根据目标事件数据处理逻辑,利用预设编程语言,确定初始事件处理函数;
    对所述初始事件处理函数进行编译,得到所述目标事件处理函数,其中,所述目标事件处理函数具有二进制指令格式。
  3. 根据权利要求1或2所述的平台,其中,所述平台还包括:
    配置组件,被配置为确定在所述目标事件处理函数运行的情况下对应的配置信息;
    所述预设计算框架,被配置为根据所述配置信息,加载所述目标事件处理函数和所述目标插件,得到所述目标应用程序。
  4. 根据权利要求1至3中任意一项所述的平台,其中,所述目标插件是基于消息队列遥测传输MQTT协议实现的。
  5. 根据权利要求1至3中任意一项所述的平台,其中,所述目标插件是基于动态链接库实现的。
  6. 根据权利要求4或5所述的平台,其中,所述目标插件包括事件源接入插件,所述事件源接入插件用于支持不同事件源接入所述目标应用程序;
    所述事件源接入插件,被配置为确定接入所述目标应用程序的目标事件源,其中,所述目标事件源用于提供所述待处理事件数据。
  7. 根据权利要求6所述的平台,其中,在所述事件源接入插件是基于MQTT协议实现的情况下,所述预设计算框架,被配置为:
    基于所述事件源接入插件对应的MQTT配置信息,在所述目标事件源和所述MQTT配置信息对应的MQTT代理服务器Broker之间建立网络连接;
    控制所述MQTT Broker为所述目标事件源建立目标主题Topic;
    基于预设物联网IOT协议,接入所述目标事件源;
    基于所述网络连接,将所述目标事件源提供的所述待处理事件数据发送至所述目标Topic;
    在关闭所述目标事件源的情况下,断开所述网络连接。
  8. 根据权利要求6所述的平台,其中,在所述事件源接入插件是基于动态链接库实现的情况下,所述预设计算框架,被配置为:
    为所述事件源接入插件确定对应的动态链接库,其中,所述动态链接库中包括所述事件源接入插件对应的配置接口、启动接口和关闭接口;
    加载所述动态链接库;
    利用外部功能接口FFI,调用所述配置接口,接入所述目标事件源;
    利用所述FFI,调用所述启动接口,接收所述目标事件源提供的所述待处理事件数据;
    利用所述FFI,调用所述关闭接口,关闭所述目标事件源。
  9. 根据权利要求4或5所述的平台,其中,所述目标插件包括硬件平台运行插件,所述硬件平台运行插件用于支持所述目标应用程序在不同硬件平台上运行;
    所述硬件平台运行插件,被配置为确定所述目标应用程序对应的目标硬件平台,其中,所述目标硬件平台用于为所述目标应用程序提供运行环境。
  10. 根据权利要求4或5所述的平台,其中,所述目标插件包括算法软件开发工具包SDK插件,所述算法SDK插件用于为所述目标应用程序提供不同的算法SDK;
    所述算法SDK插件,被配置为确定所述目标应用程序对应的目标算法SDK,其中,所述目标算法SDK用于为所述目标应用程序提供对应的数据处理算法。
  11. 根据权利要求1至10中任意一项所述的平台,其中,所述预设计算框架,被配置为运行所述目标应用程序。
  12. 根据权利要求11所述的平台,其中,所述预设计算框架,被配置为:
    接收接入所述目标应用程序的目标事件源提供的所述待处理事件数据;
    基于预设映射关系,确定所述目标事件源对应的所述目标事件处理函数;
    利用所述目标事件处理函数,对所述待处理事件数据进行数据处理,得到数据处理结果。
  13. 根据权利要求12所述的平台,其中,所述预设计算框架基于Web Assembly虚拟机提供运行环境;
    所述预设计算框架基于所述Web Assembly虚拟机生成的第一标准接口,调用所述目标事件处理函数。
  14. 根据权利要求13所述的平台,其中,所述预设计算框架基于所述Web Assembly虚拟机生成的第二标准接口,控制所述目标事件处理函数调用对应的目标算法SDK;
    所述预设计算框架基于所述目标算法SDK提供的数据处理算法,对所述待处理事件数据进行数据处理,得到数据处理结果。
  15. 一种应用程序开发方法,包括:
    确定目标应用程序对应的目标事件处理函数,其中,所述目标事件处理函数用于对所述目标应用程序对应的待处理事件数据进行数据处理;
    确定所述目标应用程序对应的目标插件,其中,所述目标插件用于对所述目标应用程序进行功能扩展;
    根据所述目标事件处理函数、所述目标插件、以及预设计算框架,构建所述目标应用程序。
  16. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求15所述的方法。
  17. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求15所述的方法。
  18. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在计算机上运行的情况下,使得所述计算机执行如权利要求15所述的方法。
PCT/CN2022/105543 2021-11-17 2022-07-13 应用程序开发平台及方法、电子设备、存储介质和计算机程序产品 Ceased WO2023087751A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111362792.3A CN114035902A (zh) 2021-11-17 2021-11-17 应用程序开发平台及方法、电子设备和存储介质
CN202111362792.3 2021-11-17

Publications (1)

Publication Number Publication Date
WO2023087751A1 true WO2023087751A1 (zh) 2023-05-25

Family

ID=80144759

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105543 Ceased WO2023087751A1 (zh) 2021-11-17 2022-07-13 应用程序开发平台及方法、电子设备、存储介质和计算机程序产品

Country Status (2)

Country Link
CN (1) CN114035902A (zh)
WO (1) WO2023087751A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117950756A (zh) * 2024-02-22 2024-04-30 北京江民新科技术有限公司 自适应环境的插件框架设计方法、系统、设备及储存介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035902A (zh) * 2021-11-17 2022-02-11 上海商汤智能科技有限公司 应用程序开发平台及方法、电子设备和存储介质
CN114879954B (zh) * 2022-03-29 2025-05-27 上海商汤智能科技有限公司 应用程序定义方法及装置、电子设备和存储介质
CN119718335A (zh) * 2025-02-28 2025-03-28 永赢金融租赁有限公司 一种单码多平台的编译方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200026787A1 (en) * 2018-07-23 2020-01-23 Wipro Limited METHOD, SYSTEM, AND FRAMEWORK FOR IMPLEMENTING INTERNET OF THINGS (IoT) APPLICATIONS
CN110928531A (zh) * 2019-11-19 2020-03-27 中国电子科技集团公司第四十一研究所 一种电磁频谱监测系统软件平台构建方法
CN111831269A (zh) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 一种应用开发系统、运行方法、设备及存储介质
CN112527268A (zh) * 2020-12-16 2021-03-19 极弦科技有限公司 一种面向高性能复杂测试测量应用的高效率软件开发模式和架构
CN114035902A (zh) * 2021-11-17 2022-02-11 上海商汤智能科技有限公司 应用程序开发平台及方法、电子设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636139B (zh) * 2015-01-26 2018-05-15 北京邮电大学 一种可视化跨平台移动应用开发与生成系统
CN111596969B (zh) * 2020-05-09 2022-11-25 中国电子科技集团公司第二十八研究所 一种基于微内核加插件式的软件架构方法
CN113138768B (zh) * 2021-04-29 2023-11-07 北京百度网讯科技有限公司 应用程序包生成方法、装置、电子设备以及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200026787A1 (en) * 2018-07-23 2020-01-23 Wipro Limited METHOD, SYSTEM, AND FRAMEWORK FOR IMPLEMENTING INTERNET OF THINGS (IoT) APPLICATIONS
CN110928531A (zh) * 2019-11-19 2020-03-27 中国电子科技集团公司第四十一研究所 一种电磁频谱监测系统软件平台构建方法
CN111831269A (zh) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 一种应用开发系统、运行方法、设备及存储介质
CN112527268A (zh) * 2020-12-16 2021-03-19 极弦科技有限公司 一种面向高性能复杂测试测量应用的高效率软件开发模式和架构
CN114035902A (zh) * 2021-11-17 2022-02-11 上海商汤智能科技有限公司 应用程序开发平台及方法、电子设备和存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117950756A (zh) * 2024-02-22 2024-04-30 北京江民新科技术有限公司 自适应环境的插件框架设计方法、系统、设备及储存介质

Also Published As

Publication number Publication date
CN114035902A (zh) 2022-02-11

Similar Documents

Publication Publication Date Title
CN109800737B (zh) 面部识别方法及装置、电子设备和存储介质
CN114035902A (zh) 应用程序开发平台及方法、电子设备和存储介质
WO2022043741A1 (zh) 网络训练、行人重识别方法及装置、存储介质、计算机程序
CN111222637A (zh) 神经网络模型部署方法及装置、电子设备和存储介质
CN113806054A (zh) 任务处理方法及装置、电子设备和存储介质
CN110633755A (zh) 网络训练方法、图像处理方法及装置、电子设备
CN110188871B (zh) 运算方法、装置及相关产品
CN110134532A (zh) 一种信息交互方法及装置、电子设备和存储介质
WO2022247103A1 (zh) 图像处理方法及装置、电子设备和计算机可读存储介质
US20210209962A1 (en) Teaching system and method, electronic device, and storage medium
CN114020264A (zh) 算子处理方法及装置、电子设备和存储介质
CN110968362A (zh) 应用运行方法、装置及存储介质
CN111784773B (zh) 图像处理方法及装置、神经网络训练方法及装置
CN110851240A (zh) 功能调用方法、装置及存储介质
TW202248848A (zh) 智慧攝影機的軟體定義方法、電子設備和電腦可讀儲存介質
WO2022183656A1 (zh) 数据生成方法、装置、设备、存储介质及程序
CN113076108B (zh) 一种代码执行方法、装置和用于代码执行的装置
CN109685041B (zh) 图像分析方法及装置、电子设备和存储介质
CN115098262A (zh) 一种多神经网络任务处理方法及装置
CN114860358A (zh) 一种对象处理方法、装置、电子设备及存储介质
CN110163372B (zh) 运算方法、装置及相关产品
CN113220134B (zh) 一种输入方法、装置和用于输入的装置
CN113869295A (zh) 对象检测方法及装置、电子设备和存储介质
CN114879954B (zh) 应用程序定义方法及装置、电子设备和存储介质
CN112988194B (zh) 基于设备信息的程序优化方法、装置、电子设备及存储介质

Legal Events

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

Ref document number: 22894294

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 22894294

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 22894294

Country of ref document: EP

Kind code of ref document: A1

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 22894294

Country of ref document: EP

Kind code of ref document: A1