WO2023184810A1 - 应用程序定义方法及装置、电子设备、存储介质和计算机程序产品 - Google Patents

应用程序定义方法及装置、电子设备、存储介质和计算机程序产品 Download PDF

Info

Publication number
WO2023184810A1
WO2023184810A1 PCT/CN2022/109451 CN2022109451W WO2023184810A1 WO 2023184810 A1 WO2023184810 A1 WO 2023184810A1 CN 2022109451 W CN2022109451 W CN 2022109451W WO 2023184810 A1 WO2023184810 A1 WO 2023184810A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
service
end device
application program
intelligent front
Prior art date
Application number
PCT/CN2022/109451
Other languages
English (en)
French (fr)
Inventor
吴辉
许雷
蔡鹏飞
周浩
Original Assignee
上海商汤智能科技有限公司
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 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023184810A1 publication Critical patent/WO2023184810A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Definitions

  • the present disclosure relates to but is not limited to the field of computer technology, and in particular, to an application definition method and device, electronic equipment, storage media and computer program products.
  • Intelligent front-end devices can correspond to multiple product lines to achieve different functions, such as target tracking, pedestrian detection and other functions.
  • the embodiments of the present disclosure provide a technical solution of an application definition method and device, electronic equipment, storage media, and computer program products.
  • an application definition method is provided, which is applied to an intelligent front-end device, including: determining a target hardware resource occupancy level matching the intelligent front-end device according to hardware resource parameters of the intelligent front-end device; According to the preset service-oriented interface framework in the intelligent front-end device, load the program package of the first application program under the target hardware resource occupancy level to the intelligent front-end device, wherein at least in the service-oriented interface framework including an interface for running an application program; in the case of running the first application program based on the interface for running the application program in the service interface framework, the intelligent front-end device implements the corresponding function of the first application program. Function.
  • an application definition apparatus is provided, which is applied to an intelligent front-end device, including: a determining part configured to determine a match with the intelligent front-end device according to hardware resource parameters of the intelligent front-end device.
  • the target hardware resource occupancy level; the loading part is configured to load the program package of the first application program under the target hardware resource occupancy level to the intelligent front-end according to the preset service interface framework in the intelligent front-end device.
  • the device wherein the service interface framework at least includes an interface for running an application program; the running part is configured to run the first application program based on the interface for running the application program in the service interface framework.
  • the intelligent front-end device implements the function corresponding to the first application program.
  • an electronic device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call instructions stored in the memory to Execute the above 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 instructions.
  • the electronic device causes the electronic device to execute the above method.
  • the target hardware resource occupancy level matching the intelligent front-end device is determined according to the hardware resource parameters of the intelligent front-end device, and then the target hardware resource occupancy level is lowered according to the preset service interface framework in the intelligent front-end device.
  • the program package of the first application program is loaded into the intelligent front-end device, wherein the service interface framework includes an interface for running the application program, and the first application program is run based on the interface for running the application program in the service interface framework.
  • the intelligent front-end device implements the function corresponding to the first application program.
  • the first application program that matches its own hardware resource parameters can be selected for the intelligent front-end device, so that there is no need to consider the difference in hardware resources to do a lot of secondary development, that is, it can achieve the selected first application program.
  • An intelligent front-end device with functions corresponding to an application improves the product development efficiency of intelligent front-end devices.
  • Figure 1 is a schematic diagram of a service-oriented interface framework for application definition of intelligent front-end devices provided by an embodiment of the present disclosure
  • Figure 2 is a flow chart of an application definition method provided by an embodiment of the present disclosure
  • Figure 3 is a schematic diagram of running a target application based on the service interface framework provided by an embodiment of the present disclosure
  • Figure 4 is a schematic structural diagram of a service-oriented interface framework for application definition of intelligent front-end devices provided by an embodiment of the present disclosure
  • Figure 5 is a schematic diagram of application development based on the service-based interface framework provided by an embodiment of the present disclosure
  • Figure 6 is a schematic diagram of an algorithm module in the service interface framework provided by an embodiment of the present disclosure.
  • Figure 7 is a schematic diagram of an algorithm module group in the service interface framework provided by an embodiment of the present disclosure.
  • Figure 8 is a schematic diagram of multiplexing an algorithm module group according to an embodiment of the present disclosure.
  • Figure 9 is a block diagram of an application definition device provided by an embodiment of the present disclosure.
  • Figure 10 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • exemplary means "serving as an example, example, or illustrative.” Any embodiment described herein as “exemplary” is not necessarily to be construed as superior or superior to other embodiments.
  • a and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
  • at least one herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, and C, which can mean including from A, Any one or more elements selected from the set composed of B and C.
  • intelligent front-end devices With the vigorous development of intelligent front-end devices and front-end algorithms, intelligent front-end devices are also becoming more and more intelligent. Intelligent front-end devices can correspond to multiple product lines to achieve different functions, such as target tracking, pedestrian detection and other functions. While manufacturers of intelligent front-end equipment are experiencing rapid growth in profits, they are also faced with the problem that as product lines increase, stocking and inventory inevitably occur in each product line, resulting in an increase in overall inventory that erodes profits. At a time when the global supply chain is becoming increasingly tense, this contradiction has become more acute, affecting the development speed and scale of the entire intelligent front-end.
  • the smart front-end device here may be a device installed at the data collection site or at the front end, such as a smart camera, an access control camera, a law enforcement recorder, an inspection robot, etc.
  • a smart camera an access control camera
  • a law enforcement recorder an inspection robot
  • the embodiments of the present disclosure do not limit the specific form of the smart front-end device.
  • an architecture similar to that of a mobile phone system can also be used to regard each front-end algorithm as an application (Application, APP).
  • the application defines the camera SDC, and different applications can be downloaded to the smart front-end device through the application store. Change the functions of intelligent front-end devices to achieve the purpose of switching between different product lines.
  • the hardware design of smart front-end devices has resource redundancy, resulting in no cost advantage.
  • the cost of installing applications for the first time is huge. , often no longer changes functionality after installation, making it difficult for other downloadable new applications to take advantage.
  • FIG. 1 is a schematic diagram of a service-oriented interface framework for defining application programs for intelligent front-end devices provided by an embodiment of the present disclosure.
  • the service interface framework includes an algorithm layer 101, a functional abstraction interface layer 102, a platform 103 and a service interface layer 104.
  • the algorithm layer 101 includes multiple processors and multiple algorithm modules corresponding to each processor, for example, a portrait detection algorithm module, a license plate recognition algorithm module corresponding to processor A, etc.
  • the functional abstraction interface layer 102 includes multiple abstracted functional interfaces, such as detection interfaces, quality interfaces, attribute interfaces, etc.
  • Platform 103 includes different architecture platforms, such as Android, Linux and Windows platforms, indicating that the service-oriented interface framework is applicable to platforms such as Android, Linux and Windows.
  • the service interface layer 104 includes a plurality of application program identifiers that can be selected by the intelligent front-end device, and divides all application program identifiers into multiple hardware resource occupancy levels according to the hardware resource occupancy of the application program. As shown in Figure 1, the service interface layer 104 includes three hardware resource occupancy levels L1, L2, and L3. Each hardware resource occupancy level includes multiple application identifiers that can be selected by the intelligent front-end device. For example, hardware resource occupancy
  • the application identifier under level L1 can be passenger flow statistics.
  • the package for the application indicated by the application ID is stored on the server.
  • the hardware resource occupancy of the application indicated by the application ID under the hardware resource occupancy level L1 is less than the hardware resource occupancy of the application indicated by the application ID under the hardware resource occupancy level L2; the application under the hardware resource occupancy level L2
  • the hardware resource occupancy of the application indicated by the identifier is smaller than the hardware resource occupancy of the application indicated by the application identifier under hardware resource occupancy level L3.
  • Hardware resources may include memory, computing power, or other forms of hardware resources, which are not specifically limited in the embodiments of the present disclosure.
  • the above-mentioned smart front-end device can be applied to Linux, Android, Windows and other platforms, and the embodiments of the present disclosure do not specifically limit this.
  • the occupancy of hardware resources can be determined in advance based on the service interface layer in the service interface framework, so that there is no need to design resource redundancy for intelligent front-end equipment, thus ensuring intelligent Cost competitive advantage of front-end equipment.
  • an application that can realize the specific function is determined based on the service interface layer in the service interface framework.
  • the hardware resource occupancy level of the application identification corresponding to the program is determined, and the hardware resource occupancy of the intelligent front-end device is determined based on the hardware resource occupancy corresponding to the hardware resource occupancy level.
  • the service-oriented interface framework shown in Figure 1 is integrated into the intelligent front-end device, and then the application definition of the intelligent front-end device can be based on the service-oriented interface framework.
  • the target hardware resource occupancy level matching the intelligent front-end device can be determined, and then based on the preset service interface framework in the intelligent front-end device, the program of the target application under the target hardware resource occupancy level can be determined
  • the package is loaded into the intelligent front-end device.
  • the intelligent front-end device implements the functions corresponding to the target application.
  • the target application that matches its own hardware resource parameters can be selected for the intelligent front-end device, so that there is no need to consider the difference in hardware resources to do a lot of secondary development, and you can get the application that can achieve the selected target.
  • the intelligent front-end equipment with corresponding functions of the program improves the product development efficiency of intelligent front-end equipment.
  • FIG. 2 is a flow chart of an application definition method provided by an embodiment of the present disclosure. This method is applied to smart front-end devices. As shown in Figure 2, the method may include steps S21 to S23:
  • step S21 a target hardware resource occupancy level matching the intelligent front-end device is determined based on the hardware resource parameters of the intelligent front-end device.
  • the smart front-end device here may be a device installed at the data collection site or at the front end, such as a smart camera, an access control camera, a law enforcement recorder, an inspection robot, etc.
  • a smart camera an access control camera
  • a law enforcement recorder an inspection robot
  • the embodiments of the present disclosure do not limit the specific form of the smart front-end device.
  • the hardware resource parameters of the intelligent front-end device may include parameters such as memory size and computing power, which are not specifically limited in the embodiments of the present disclosure.
  • the target hardware resource occupancy level matching the intelligent front-end device can be determined.
  • the hardware resource parameter can be the memory size.
  • the memory size corresponding to the hardware resource occupancy level L1 is 56 to 256MB
  • the memory size corresponding to the hardware resource occupancy level L2 is 256 to 526MB
  • the memory size corresponding to the hardware resource occupancy level L3 is 526 to 1024MB.
  • the target hardware resource occupancy level matching the smart front-end device is L1.
  • step S22 load the program package of the first application program under the target hardware resource occupancy level to the intelligent front-end device according to the preset service interface framework in the intelligent front-end device, wherein the service interface framework at least includes: Interface for running applications.
  • the service interface framework also includes a collection of functional modules.
  • the first application After determining the target hardware resource occupancy level that matches the intelligent front-end device, the first application can be selected under the target hardware resource occupancy level based on the service-oriented interface framework pre-integrated in the intelligent front-end device, and then the first application program can be The program package is downloaded from the server to the smart front-end device.
  • the number of first applications selected under the target hardware resource occupancy level may be one or multiple, and this is not specifically limited in this embodiment of the disclosure.
  • At least one first application program can be selected under the target hardware resource occupancy level L2, and then the selected at least one first application program can be selected.
  • An application package is downloaded from the server to the smart front-end device.
  • the program package of the first application after the program package of the first application is downloaded from the server to the smart front-end device, it can be stored locally on the smart front-end device. For example, it is stored in the hard disk of the smart front-end device, and when the first application needs to be run, the program package of the first application is read from the hard disk.
  • the program package of the first application can be downloaded from the server in real time.
  • step S23 when the first application program is run based on the interface for running the application program in the service-based interface framework, the smart front-end device implements the functions corresponding to the first application program.
  • the service interface framework includes a set of interfaces and functional modules for running applications
  • running the first application based on the interface for running applications in the service interface framework can enable the intelligent front-end device to implement the first application. function.
  • Running the first application program based on the service-oriented interface framework will be described in detail later in conjunction with possible implementation methods of the embodiments of the present disclosure, and will not be described in detail here.
  • the first application program that matches its own hardware resource parameters can be selected for the intelligent front-end device, so that there is no need to consider the difference in hardware resources and do a large amount of secondary development, that is, it can be obtained
  • the intelligent front-end device that can realize the function corresponding to the selected first application program improves the product development efficiency of the intelligent front-end device.
  • the method further includes: loading the program package of the second application program under the target hardware resource occupancy level to the intelligent front-end device according to the service-oriented interface framework; and running the interface of the application program based on the service-oriented interface framework.
  • the smart front-end device switches to implement functions corresponding to the second application.
  • the program package of the second application under the target hardware resource occupancy level can be loaded to the intelligent front-end device based on the service-oriented interface framework, so that the service-oriented interface framework can be used based on the service-oriented interface framework.
  • the smart front-end device switches to implement functions corresponding to the second application.
  • embodiments of the present disclosure can switch different product functions of smart front-end devices according to actual conditions before the smart front-end devices leave the factory for sale. This effectively reduces the problem of inventory backlog.
  • the service-oriented interface framework includes: an algorithm layer, a functional abstraction interface layer, and a service-oriented interface layer.
  • the service interface layer is used to provide applications with different hardware resource occupancy levels to intelligent front-end devices;
  • the functional abstract interface layer is used to provide multiple functional abstract interfaces for running applications to intelligent front-end devices;
  • the algorithm layer is used to It provides algorithm software development kit (SDK) interfaces and multiple algorithm modules for running applications to intelligent front-end devices.
  • SDK algorithm software development kit
  • the service-oriented interface layer 104 can provide applications at three hardware resource occupancy levels to intelligent front-end devices; the functional abstraction interface layer 102 can provide detection interfaces, quality interfaces, and quality interfaces for running applications to intelligent front-end devices. Functional interfaces such as attribute interfaces; the algorithm layer 101 can provide the algorithm SDK interface for running applications and multiple algorithm modules corresponding to different processors to the intelligent front-end device.
  • the target application includes a first application or a second application
  • the service interface layer includes a service interface
  • the program package of the target application under the target hardware resource occupancy level is Loading to the smart front-end device includes: loading the program package of the target application to the smart front-end device by calling the service interface.
  • the service-oriented interface layer includes a service-oriented interface (Service API).
  • Users manufactured of intelligent front-end devices
  • the service interface framework includes at least an input interface and an output interface;
  • the application definition method provided by this disclosure also includes: inputting the image to be processed by calling the input interface; calling the target application corresponding to The functional abstract interface runs the target application, performs image processing on the image to be processed, and obtains the image processing results; by calling the output interface, the image processing results are output asynchronously.
  • the input/output (I/O) mode is adopted in the service interface framework, and the input interface and output interface are set to asynchronous structures, so that users can input one or more images to be processed by calling the input interface, and then call the corresponding
  • the functional abstraction interface runs the target application, performs image processing on one or more images to be processed, obtains the image processing results, and asynchronously outputs the image processing results of each image to be processed by calling the output interface.
  • the embodiment of the present disclosure sets the input interface and the output interface to an asynchronous structure, which can effectively improve the image processing efficiency of multiple images to be processed.
  • Figure 3 is a schematic diagram of running a target application based on the service interface framework provided by an embodiment of the present disclosure.
  • the image to be processed is input by calling the input interface 301 (Frame In); and then the target application is run by calling the corresponding functional abstract interface to implement image processing of the image to be processed and obtain the image processing result; finally, By calling the output interface 302 (Result Out), the image processing results are output asynchronously.
  • the target application program corresponds to a set of algorithm module handles; by calling the functional abstraction interface corresponding to the application program, the target application program is run, the image to be processed is image processed, and the image processing result is obtained, including: by calling the target application program
  • the corresponding functional abstract interface determines the data processing logic corresponding to the target application; based on the data processing logic, the algorithm SDK interface is used to sequentially call multiple algorithm modules corresponding to the algorithm module handle set; multiple algorithm modules are used to perform image processing on the image to be processed. Process to obtain image processing results.
  • the program package of the target application includes its corresponding data processing logic and algorithm module handle set.
  • the algorithm module handle set is used to indicate multiple algorithm modules required to run the target application runtime.
  • the data processing logic can indicate multiple algorithm modules. The calling sequence of Image processing results.
  • the target application is the license plate detection application 307 (carplate).
  • the data processing logic of the license plate detection application is determined. Based on this The data processing logic uses the algorithm SDK interface to sequentially call the tracking algorithm module 308 (track), quality detection algorithm module 309 (quality), attribute algorithm module 310 (attribute), etc. indicated by the module handle set.
  • the module to be processed is input into the tracking algorithm module 308, and the output result of the tracking algorithm module 308 is input into the quality detection algorithm module 309, and then the output result of the quality detection algorithm module 309 is input into the attribute algorithm module 310, until finally Output image processing results.
  • the data processing logic can connect the input and output of multiple algorithm modules in series to finally obtain the image processing results.
  • the service interface framework also includes an initialization interface 303 (API Init) and a de-initialization interface 304 (API DeInit), which are used to implement interface initialization and de-initialization.
  • the initialization interface and the de-initialization interface can adopt common initialization interfaces and de-initialization interfaces in related technologies, which are not specifically limited in the embodiments of the present disclosure.
  • the service interface framework also includes a parameter configuration interface 305 (Param Set) and a parameter acquisition interface 306 (Param Get), which are used to dynamically configure parameters required for application running. For example, configure the dynamic configuration of quality filtering parameters required when running a license plate detection application.
  • a parameter configuration interface 305 Param Set
  • a parameter acquisition interface 306 Param Get
  • the service API provides a concise and friendly calling interface, performs necessary checks on the user's calls, and then passes them to the application instance interface.
  • the service-oriented interface calls the APP through the implementation of the abstract interface.
  • the application instance abstracts the necessary interfaces and focuses on the logical implementation of the demand itself. It internally processes input continuously in the form of queues and threads, and connects the input and output of the algorithm module in series according to the Pipeline logic, ultimately producing the demand results corresponding to the APP.
  • Algorithm module instances focus on the implementation of a single algorithm function (such as detection, quality and attributes, etc.), internally process inputs in the form of queues and threads, and generate output of algorithm results. In order to achieve a certain algorithm capability.
  • the connections between algorithm modules are orchestrated by the pipeline within the application.
  • Algorithm SDK interface calls shield differences in hardware platforms.
  • the service interface layer also includes a database interface; the method further includes: after obtaining the image processing results, storing the image processing results in the corresponding database by calling the database interface.
  • the service interface layer may also include a database interface to store the image processing results in the corresponding database by calling the database interface.
  • FIG. 4 is a schematic structural diagram of a service-oriented interface framework for defining application programs for intelligent front-end devices provided by an embodiment of the present disclosure.
  • the service interface layer also includes a database interface 402 (DB API); among which, the service interface 401 can include Application program 408, module 409 and tool 410; database interface 402 can be an independent portrait library interface, providing corresponding database functions according to actual needs.
  • DB API database interface 402
  • the database manager 404 (DB Manager), feature database 405 (Feature DB), feature extractor 406 (Extracter) shown in Figure 4 and other modules that can provide database functions can be called.
  • the service interface layer also includes the running environment interface 403 (Env API); the method also includes: performing authorization verification by calling the running environment interface; when the authorization verification is passed, the service interface framework Load into the smart front-end device.
  • Env API running environment interface 403
  • the service-based interface layer also includes a running environment interface to implement authorization verification of the service-based interface framework, and if the authorization verification passes, the service-based interface
  • the framework is integrated into smart front-end devices.
  • the service interface layer also includes the environment interface 403 (Env API).
  • the authorization text file 407 (License) is loaded for authorization verification.
  • the target application program includes the first application program or the second application program; the method further includes: based on the business functions selected by the user, using the service interface framework to develop a target application that can realize the business functions Program package.
  • new target applications that are not included in the service-oriented interface layer of the service-oriented interface framework can also be developed to enrich the optional applications that the service-oriented interface framework can provide to intelligent front-end devices.
  • the service-oriented interface framework includes an application template library; based on the business functions selected by the user, the service-oriented interface framework is used to develop a program package of the target application that can realize the business functions, including: based on the business functions , determine the data processing logic corresponding to the target application, and the algorithm module handle set corresponding to the target application, where the algorithm module handle set is used to indicate multiple algorithm modules required to implement business functions; based on the user from the application template library The selected target application template, as well as the data processing logic and algorithm module handle collection, generate the program package of the target application.
  • Figure 5 is a schematic diagram of application development based on the service-based interface framework provided by an embodiment of the present disclosure.
  • the service-oriented interface framework provides rich basic functional support, such as functional interfaces, algorithm module calls, debugging tool support, application template libraries and other rich and friendly development environments (in the dotted box in Figure 5 (shown in Figure 5), so that developers only need to focus on the development of demand logic for business functions, such as business logic 501 (business logic) and data processing logic 502 (alg pipeline) in Figure 5, thus effectively improving application development efficiency.
  • the APP development framework shown in Figure 5 is used to support APP development with minimal functional requirements and is committed to simplifying development logic.
  • the rich basic functions support isolation from the APP development scope, which facilitates the rapid production of long-tail applications and the parallel production of multiple developers.
  • the algorithm module handle set corresponding to the target application can be determined, and then the target application template can be quickly generated based on the target application template selected by the user from the application template library, as well as the data processing logic and algorithm module handle set.
  • the application package Based on the business logic and data processing logic, the algorithm module handle set corresponding to the target application can be determined, and then the target application template can be quickly generated based on the target application template selected by the user from the application template library, as well as the data processing logic and algorithm module handle set.
  • the service-based interface framework provides rich basic functional support, which can facilitate the rapid development of long-tail applications with low application frequency.
  • parallel development by different developers can be realized, effectively improving development efficiency.
  • the program package of the target application developed based on the service interface framework can have an independent version number. After a new target application is developed, the identifier of the newly developed target application can be added to the service interface layer of the service interface framework, so that it can be subsequently applied by the intelligent front-end device.
  • the service interface framework includes a debugging tool; the method further includes: debugging the program package of the target application by invoking the debugging tool.
  • the package of the target application can also be debugged to improve the performance of the package of the target application.
  • each algorithm module in the service-oriented interface framework is active, that is, it can perform data processing on the input data to be processed in real time and output the data processing results.
  • Figure 6 is a schematic diagram of an algorithm module in the service interface framework provided by an embodiment of the present disclosure. As shown in Figure 6, the algorithm module performs input data structure conversion 602 (input wrapper) on the data to be processed in input 601 (input), and adds the converted data to be processed to the input queue 603 (input queue).
  • input data structure conversion 602 input wrapper
  • input queue 603 input queue
  • the data to be processed in the input queue is processed based on the data processing thread 604 (process thread) to obtain the data processing results.
  • Algorithm modules of the same type can be dynamically merged into an algorithm module group according to the actual situation, so that multiple algorithm modules can be called by calling one algorithm module group.
  • each algorithm module instance is active and processes input and output in real time.
  • the algorithm module is a basic layer module that provides simple and easy-to-use algorithm function calls for APP development.
  • Algorithm module (Module) is the smallest algorithm unit, which can be understood as an operator and is active.
  • Figure 7 is a schematic diagram of an algorithm module group in the service interface framework provided by an embodiment of the present disclosure. As shown in Figure 7, multiple attribute algorithm modules 701 to 704 (attribute) are merged into an attribute algorithm module group 705 (Module Group ("attribute")), and multiple feature algorithm modules 707 to 710 (feature) are merged into A feature algorithm module group 711 (Module Group ("feature”)).
  • attribute algorithm module group 705 Module Group
  • feature feature
  • multiple algorithm modules in the algorithm module group are scheduled through the scheduler 706 (scheduler) in the algorithm module group.
  • the algorithm module can dynamically join or exit the algorithm module group (Module Group).
  • the external caller uses an algorithm module group as an algorithm module and is called by the scheduler (scheduler) in the algorithm module group.
  • algorithm module groups multiplexing algorithm functions can be realized and resource consumption caused by redundant algorithm modules can be reduced. For example, in the case of multiple applications running with the same functionality, a set of algorithm module groups can be shared among the multiple applications.
  • Figure 8 is a schematic diagram of multiplexing an algorithm module group according to an embodiment of the present disclosure.
  • a set of feature algorithm module groups 801 can be shared, that is, the 4-channel face recognition application can share two feature algorithm modules in the feature algorithm module group.
  • algorithm module instances of the same type can be dynamically merged into an algorithm module group (Module Group).
  • the benefit brought by the grouping mechanism is that algorithm functions are fully reused in multiple channels and the resource consumption caused by algorithm instances is reduced.
  • a service-oriented interface framework includes a collection of interfaces and functional modules for running application programs.
  • the service-oriented interface framework is integrated into an intelligent front-end device, and then Application definitions for intelligent front-end devices can be based on this service-oriented interface framework.
  • the target hardware resource occupancy level matching the intelligent front-end device can be determined, and then based on the preset service interface framework in the intelligent front-end device, the first application program under the target hardware resource occupancy level can be determined.
  • the program package is loaded into the intelligent front-end device.
  • the intelligent front-end device implements the functions corresponding to the first application.
  • the first application program that matches its own hardware resource parameters can be selected for the intelligent front-end device, so that there is no need to consider the difference in hardware resources to do a lot of secondary development, that is, it can achieve the selected first application program.
  • An intelligent front-end device with functions corresponding to an application improves the product development efficiency of intelligent front-end devices.
  • the program package of the second application under the target hardware resource occupancy level can be loaded to the intelligent front-end device based on the service-based interface framework, thereby enabling the service-based
  • the interface framework runs the second application
  • the smart front-end device switches to implement the functions corresponding to the second application, so that before the smart front-end device leaves the factory and is sold, the smart front-end device can be switched to different product functions according to the actual situation, thus Effectively reduce the problem of inventory backlog.
  • equipment manufacturers can select multiple "service-oriented interfaces" to be integrated on one smart hardware according to the hardware planning stage; they can also add “service-oriented interfaces" of the same level to the selected hardware planning. "application. In this way, different product functions can be switched according to the sales situation at the factory stage, and the inventory problem faced by fragmented intelligent front-end equipment can be solved. At the same time, resource occupancy can be predicted in advance during the hardware planning stage, eliminating the need for resource redundancy design and ensuring product competitiveness.
  • the embodiments of the present disclosure also provide an application definition device, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any application definition method provided by the embodiments of the present disclosure.
  • the corresponding technical solutions and descriptions are Please refer to the corresponding records in the methods section and will not repeat them again.
  • FIG 9 is a block diagram of an application definition device provided by an embodiment of the present disclosure.
  • the device is applied to intelligent front-end equipment, as shown in Figure 9.
  • the device 90 includes:
  • the determining part 91 is configured to determine the target hardware resource occupancy level matching the intelligent front-end device according to the hardware resource parameters of the intelligent front-end device;
  • the loading part 92 is configured to load the program package of the first application program under the target hardware resource occupancy level to the intelligent front-end device according to the preset service interface framework in the intelligent front-end device, wherein the service interface framework at least includes a user. interface for running applications;
  • the running part 93 is configured to enable the intelligent front-end device to implement the functions corresponding to the first application when the first application is run based on the interface for running the application in the service interface framework.
  • the loading module 92 is also configured to load the program package of the second application under the target hardware resource occupancy level to the intelligent front-end device according to the service interface framework; the running part 93 is also configured to load the package based on the service interface When the interface for running an application program described in the interface framework runs a second application program, the intelligent front-end device switches to implement the functions corresponding to the second application program.
  • the service-oriented interface framework at least includes: an algorithm layer, a functional abstraction interface layer and a service-oriented interface layer; a service-oriented interface layer configured to provide applications under different hardware resource occupancy levels to intelligent front-end devices; functional abstraction The interface layer is configured to provide multiple functional abstract interfaces for running applications to smart front-end devices; the algorithm layer is configured to provide algorithm SDK interfaces and multiple algorithm modules for running applications to smart front-end devices.
  • the target application includes a first application or a second application
  • the service interface layer includes a service interface
  • the loading part 92 is specifically configured to: by calling the service interface, load the program of the target application The package is loaded into the smart front-end device.
  • the service interface framework includes at least an input interface and an output interface; the device 90 also includes: an input part for inputting images to be processed by calling the input interface;
  • the image processing part is configured to run the target application by calling the functional abstract interface corresponding to the target application, perform image processing on the image to be processed, and obtain the image processing result;
  • the output part is configured to asynchronously output the image processing result by calling the output interface.
  • the target application corresponds to a set of algorithm module handles;
  • the image processing part is specifically configured as follows: by calling the functional abstraction interface corresponding to the target application, determine the data processing logic corresponding to the target application; based on the data processing logic, Use the algorithm SDK interface to sequentially call multiple algorithm modules corresponding to the algorithm module handle set; use multiple algorithm modules to perform image processing on the image to be processed to obtain the image processing result.
  • the service interface layer also includes a database interface; the device 90 also includes: a storage part configured to store the image processing results in the corresponding database by calling the database interface after obtaining the image processing results.
  • the service interface layer also includes a running environment interface; the device 90 also includes: an authorization verification part configured to perform authorization verification on the service interface framework by calling the running environment interface; the loading part 92, Configure to load the service-oriented interface framework into the intelligent front-end device when the authorization verification is passed.
  • the target application program includes a first application program or a second application program; the device 90 also includes: a development part configured to use the service-based interface framework to develop a system that can implement the business based on the business functions selected by the user. The package of the target application for the function.
  • the service interface framework includes an application template library; the development part is specifically configured to: based on business functions, determine the data processing logic corresponding to the target application, and the algorithm module handle set corresponding to the target application, where , the algorithm module handle set is used to indicate multiple algorithm modules required to implement business functions; based on the target application template selected by the user from the application template library, as well as the data processing logic and algorithm module handle set, the target application is generated Package.
  • the service interface framework includes a debugging tool; the device 90 also includes: a debugging part configured to debug the program package of the target application by invoking the debugging tool.
  • This method has a specific technical relationship with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining a natural Technical effects of regular computer system internal performance improvements.
  • the functions or modules provided by the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules provided by the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • Embodiments of the present disclosure also provide 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.
  • Computer-readable storage media may be volatile or non-volatile computer-readable storage media.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium that stores a computer program. When the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. .
  • the computer program product can be implemented specifically through hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium.
  • the computer program product is embodied as a software product, such as a Software Development Kit (SDK), etc. wait.
  • SDK Software Development Kit
  • the electronic device may be provided as a terminal, a server, or other forms of equipment.
  • Figure 10 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • the hardware entity of the electronic device 10 includes: a processor 11, a communication interface 12 and a memory 13, where:
  • Processor 11 generally controls the overall operation of electronic device 10 .
  • the communication interface 12 can enable the electronic device to communicate with other terminals or servers through the network.
  • the memory 13 is configured to store instructions and applications executable by the processor 11, and can also cache data to be processed or processed by the processor 11 and each module in the electronic device 10 (for example, image data, audio data, voice communication data and Video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data can be transmitted between the processor 11, the communication interface 12 and the memory 13 through the bus 14.
  • Embodiments of the present disclosure relate to the field of augmented reality.
  • augmented reality By obtaining image information of target objects in the real environment, and then using various visual related algorithms to detect or identify the relevant features, states and attributes of the target objects, thereby obtaining specific applications.
  • the target object may involve the face, limbs, gestures, actions, etc. related to the human body, or the identifiers or markers related to the object, or the sand table, display area or display items related to the venue or place.
  • Vision-related algorithms can involve visual positioning, SLAM, three-dimensional reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc.
  • Convolutional neural networks can be used to detect or identify the relevant features, states and attributes of target objects.
  • the above-mentioned convolutional neural network is a network model obtained through model training based on a deep learning framework.
  • Embodiments of the present disclosure may be systems, methods, and/or computer program products.
  • a computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of embodiments of the present disclosure.
  • Computer-readable storage media may be tangible devices that can retain and store instructions for use by an instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or Flash memory), Static Random Access Memory (SRAM), Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD), Memory Stick, Floppy Disk, Mechanical Coding Device, such as a printer with instructions stored on it.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • Flash memory Static Random Access Memory
  • CD-ROM Compact Disk Read Only Memory
  • DVD Digital Versatile Disk
  • Memory Stick
  • 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., light pulses through fiber optic cables), or through electrical wires. transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or 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 network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
  • Computer program instructions for performing operations of embodiments of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or programmed in one or more Source or object code written in any combination of 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.
  • the 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 an Internet service provider through the Internet). connect).
  • LAN local area network
  • WAN wide area network
  • an external computer such as an Internet service provider through the Internet. connect
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA)
  • the electronic circuit can Computer readable program instructions are executed to implement various aspects of embodiments of the present disclosure.
  • These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements 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. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s).
  • Executable instructions may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the computer program product can be implemented specifically through hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium.
  • the computer program product is embodied as a software product, such as a Software Development Kit (SDK), etc. wait.
  • SDK Software Development Kit
  • the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible The internal logic is determined.
  • the products applying the disclosed technical solution will clearly inform the personal information processing rules and obtain the individual's independent consent before processing personal information.
  • the product applying the disclosed technical solution must obtain the individual's separate consent before processing the sensitive personal information, and at the same time meet the requirement of "express consent”. For example, setting up clear and conspicuous signs on personal information collection devices such as cameras to inform them that they have entered the scope of personal information collection, and that personal information will be collected.
  • personal information processing rules may include personal information processing rules.
  • Information such as information processors, purposes of processing personal information, methods of processing, and types of personal information processed.

Landscapes

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

Abstract

一种应用程序定义方法及装置(90)、电子设备(10)、存储介质和计算机程序产品,所述方法应用于智能前端设备,包括:根据所述智能前端设备的硬件资源参数,确定与所述智能前端设备匹配的目标硬件资源占用级别;根据所述智能前端设备中预设的服务化接口框架,将所述目标硬件资源占用级别下的第一应用程序的程序包加载至所述智能前端设备,其中,所述服务化接口框架中至少包括用于运行应用程序的接口;在基于所述服务化接口框架中所述运行应用程序的接口运行所述第一应用程序的情况下,所述智能前端设备实现所述第一应用程序对应的功能。

Description

应用程序定义方法及装置、电子设备、存储介质和计算机程序产品
相关申请的交叉引用
本公开基于申请号为202210325128.x、申请日为2022年03月29日、申请名称为“应用程序定义方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及但不限于计算机技术领域,尤其涉及一种应用程序定义方法及装置、电子设备、存储介质和计算机程序产品。
背景技术
随着智能前端设备以及前端算法的蓬勃发展,智能前端设备呈现出越来越智能化的趋势。智能前端设备可以对应多条产品线,以实现不同的功能,例如,实现目标跟踪、行人检测等功能。
在智能前端设备的生产阶段,需要为不同产品线下的智能前端设备开发相应的应用程序以实现对应的功能。
发明内容
本公开实施例提出了一种应用程序定义方法及装置、电子设备、存储介质和计算机程序产品的技术方案。
根据本公开实施例的一方面,提供了一种应用程序定义方法,应用于智能前端设备,包括:根据智能前端设备的硬件资源参数,确定与所述智能前端设备匹配的目标硬件资源占用级别;根据所述智能前端设备中预设的服务化接口框架,将所述目标硬件资源占用级别下的第一应用程序的程序包加载至所述智能前端设备,其中,所述服务化接口框架中至少包括用于运行应用程序的接口;在基于所述服务化接口框架中所述运行应用程序的接口运行所述第一应用程序的情况下,所述智能前端设备实现所述第一应用程序对应的功能。
根据本公开实施例的一方面,提供了一种应用程序定义装置,应用于智能前端设备,其中,包括:确定部分,配置为根据智能前端设备的硬件资源参数,确定与所述智能前端设备匹配的目标硬件资源占用级别;加载 部分,配置为根据所述智能前端设备中预设的服务化接口框架,将所述目标硬件资源占用级别下的第一应用程序的程序包加载至所述智能前端设备,其中,所述服务化接口框架中至少包括用于运行应用程序的接口;运行部分,配置为在基于所述服务化接口框架中所述运行应用程序的接口运行所述第一应用程序的情况下,所述智能前端设备实现所述第一应用程序对应的功能。
根据本公开实施例的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
根据本公开实施例的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开实施例的一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行上述方法。
在本公开实施例中,根据智能前端设备的硬件资源参数,确定与智能前端设备匹配的目标硬件资源占用级别,进而根据智能前端设备中预设的服务化接口框架,将目标硬件资源占用级别下的第一应用程序的程序包加载至智能前端设备,其中,服务化接口框架中包括用于运行应用程序的接口,在基于服务化接口框架中所述运行应用程序的接口运行第一应用程序的情况下,智能前端设备实现第一应用程序对应的功能。这样,基于服务化接口框架,可以为智能前端设备选择与其自身的硬件资源参数相匹配的第一应用程序,以使得无需考虑硬件资源差异做大量的二次开发,即可以得到能够实现所选第一应用程序对应功能的智能前端设备,提高了智能前端设备的产品开发效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开实施例的实施例,并与说明书一起用于说明本公开实施例的技术方案。
图1为本公开实施例提供的用于对智能前端设备进行应用程序定义的服务化接口框架的示意图;
图2为本公开实施例提供的应用程序定义方法的流程图;
图3为本公开实施例提供的基于服务化接口框架运行目标应用程序的 示意图;
图4为本公开实施例提供的用于对智能前端设备进行应用程序定义的服务化接口框架的结构示意图;
图5为本公开实施例提供的基于服务化接口框架进行应用程序开发的示意图;
图6为本公开实施例提供的服务化接口框架中算法模块的示意图;
图7为本公开实施例提供的服务化接口框架中算法模块组的示意图;
图8为本公开实施例提供的对算法模块组进行多路复用的示意图;
图9为本公开实施例提供的应用程序定义装置的框图;
图10为本公开实施例提供的电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开实施例的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开实施例,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开实施例同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开实施例的主旨。
随着智能前端设备以及前端算法的蓬勃发展,智能前端设备也呈现越来越智能化的趋势。智能前端设备可以对应多条产品线,以实现不同的功能,例如,实现目标跟踪、行人检测等功能。智能前端设备的生产厂商在盈利快速增长的同时,也面临着产品线增多后,各产品线不可避免出现备货和库存,导致总体库存增大侵蚀利润的难题。在全球供应链日趋紧张的当下,这一矛盾更加尖锐,造成整个智能前端发展速度和规模受到影响。
这里的智能前端设备可以是安装在数据采集现场或者最前端的设备,例如,智能摄像机、门禁摄像机、执法记录仪、巡查机器人等,本公开实施例对智能前端设备的具体形式不作限定。
一般情况下,通过将智能前端设备的核心硬件模组化,例如,将不同 产品线的智能前端设备所需要的硬件做成模组,标准化输入输出,各产品线通过硬件模组组合产出新产品。这样通过提升通用模组的生产规模和高流转控制,可以将各产品线的成本和库存压到很低的水平。但是,该方式对于企业本身的规模、模组设计能力和管理运营能力要求很高,需要有专门的模组设计和生产部门,并且,在硬件模组化之后,各产品线的能力上限受到模组本身设计的限制。另外,还可以采用类似手机系统的架构,将各前端算法看成一款应用程序(Application,APP),例如,应用程序定义相机SDC,通过应用商店可以将不同应用程序下载到智能前端设备上,来改变智能前端设备的功能,从而达到不同产品线之间切换的目的。但是,该方式为了能够预期安装多款应用程序,智能前端设备在硬件设计上存在资源冗余,导致没有成本优势,并且,特殊智能前端设备(例如,安防摄像机),首次安装应用程序的成本巨大,往往在安装结束后就不再改变功能,因此,其它的可下载新应用程序很难发挥优势。
在本公开实施例中,提供了一种服务化接口框架,该服务化接口框架中包括用于运行应用程序的接口和功能模块的集合。图1为本公开实施例提供的用于对智能前端设备进行应用程序定义的服务化接口框架的示意图。
如图1所示,服务化接口框架包括算法层101、功能抽象接口层102、平台103和服务化接口层104。算法层101包括多个处理器和每个处理器对应的多个算法模块,例如,A处理器对应的人像检测算法模块、车牌识别算法模块等。功能抽象接口层102包括抽象出来的多个功能接口,例如,检测接口、质量接口、属性接口等。
平台103包括不同的架构平台,例如Android、Linux和Windows平台,表示服务化接口框架适用于Android、Linux和Windows等平台。服务化接口层104包括多个可供智能前端设备选择的应用程序标识,且根据应用程序的硬件资源占用情况,将所有应用程序标识划分为多个硬件资源占用级别。如图1所示,服务化接口层104包括三个硬件资源占用级别L1、L2、L3,每个硬件资源占用级别下包括多个可供智能前端设备选择的应用程序标识,例如,硬件资源占用级别L1下的应用程序标识可以是客流统计。应用程序标识指示的应用程序的程序包存储在服务器中。
其中,硬件资源占用级别L1下的应用程序标识指示的应用程序的硬件资源占用,小于硬件资源占用级别L2下的应用程序标识指示的应用程序的硬件资源占用;硬件资源占用级别L2下的应用程序标识指示的应用程序的硬件资源占用,小于硬件资源占用级别L3下的应用程序标识指示的应用程序的硬件资源占用。硬件资源可以包括内存、算力,还可以包括其它形式的硬件资源,本公开实施例对此不作具体限定。
上述智能前端设备可以适用于Linux、Android、Windows等平台,本公开实施例对此不作具体限定。
在对智能前端设备进行生产前硬件规划的阶段,可以基于服务化接口 框架中的服务化接口层,提前确定硬件资源占用情况,以使得无需对智能前端设备进行资源冗余设计,从而保障了智能前端设备的成本竞争优势。
例如,在需要生产具备某特定功能的智能前端设备的情况下,在对智能前端设备进行生产前硬件规划的阶段,基于服务化接口框架中的服务化接口层,确定能实现该特定功能的应用程序对应的应用程序标识所在的硬件资源占用级别,进而根据该硬件资源占用级别对应的硬件资源占用情况,确定智能前端设备的硬件资源占用情况。
在生产得到智能前端设备后,将图1所示的服务化接口框架集成在智能前端设备中,进而可以基于该服务化接口框架,对智能前端设备进行应用程序定义。
基于智能前端设备的硬件资源参数,可以确定与智能前端设备匹配的目标硬件资源占用级别,进而基于智能前端设备中预设的服务化接口框架,将目标硬件资源占用级别下的目标应用程序的程序包加载至智能前端设备,在基于服务化接口框架运行目标应用程序的情况下,智能前端设备实现目标应用程序对应的功能。
这样,基于服务化接口框架,可以为智能前端设备选择与其自身的硬件资源参数相匹配的目标应用程序,以使得无需考虑硬件资源差异做大量的二次开发,即可以得到能够实现所选目标应用程序对应功能的智能前端设备,提高了智能前端设备的产品开发效率。
下面对本公开实施例的对智能前端设备进行应用程序定义的方法进行详细描述。
图2为本公开实施例提供的应用程序定义方法的流程图。该方法应用于智能前端设备。如图2所示,该方法可以包括步骤S21至步骤S23:
在步骤S21中,根据智能前端设备的硬件资源参数,确定与智能前端设备匹配的目标硬件资源占用级别。
这里的智能前端设备可以是安装在数据采集现场或者最前端的设备,例如,智能摄像机、门禁摄像机、执法记录仪、巡查机器人等,本公开实施例对智能前端设备的具体形式不作限定。
智能前端设备的硬件资源参数可以包括内存大小、算力大小等参数,本公开实施例对此不作具体限定。
基于智能前端设备的硬件资源参数,以及服务化接口框架的服务化接口层,可以确定与智能前端设备匹配的目标硬件资源占用级别。
以上述图1为例,硬件资源参数可以是内存大小。服务化接口层中硬件资源占用级别L1对应的内存大小是56~256MB,硬件资源占用级别L2对应的内存大小是256~526MB,硬件资源占用级别L3对应的内存大小是526~1024MB。在智能前端设备的内存大小是128MB的情况下,与智能前端设备匹配的目标硬件资源占用级别是L1。
在步骤S22中,根据智能前端设备中预设的服务化接口框架,将目标 硬件资源占用级别下的第一应用程序的程序包加载至智能前端设备,其中,服务化接口框架中至少包括用于运行应用程序的接口。
在一些实施例中,服务化接口框架中还包括功能模块的集合。
在确定与智能前端设备匹配的目标硬件资源占用级别后,可以基于预先集成在智能前端设备中的服务化接口框架,在目标硬件资源占用级别下选择第一应用程序,进而将第一应用程序的程序包从服务器中下载至智能前端设备。在目标硬件资源占用级别下选择的第一应用程序的个数可以是一个,也可以是多个,本公开实施例对此不作具体限定。
以上述图1为例,在确定与智能前端设备匹配的目标硬件资源占用级别是L2的情况下,可以在目标硬件资源占用级别L2下选择至少一个第一应用程序,进而将选择的至少一个第一应用程序的程序包从服务器中下载至智能前端设备。
在一些实施例中,第一应用程序的程序包从服务器中下载至智能前端设备之后,可以存储在智能前端设备本地。例如,存储在智能前端设备的硬盘中,在需要运行第一应用程序时,从硬盘中读取第一应用程序的程序包。
在一些实施例中,在智能前端设备需要运行第一应用程序时,可以实时从服务器中下载第一应用程序的程序包。
在步骤S23中,在基于服务化接口框架中所述运行应用程序的接口运行第一应用程序的情况下,智能前端设备实现第一应用程序对应的功能。
由于服务化接口框架中包括用于运行应用程序的接口和功能模块的集合,因此,基于服务化接口框架中运行应用程序的接口运行第一应用程序,可以使得智能前端设备实现第一应用程序对应的功能。后文会结合本公开实施例可能的实现方式,对基于服务化接口框架运行第一应用程序进行详细描述,此处不作赘述。
在本公开实施例中,基于服务化接口框架,可以为智能前端设备选择与其自身的硬件资源参数相匹配的第一应用程序,以使得无需考虑硬件资源差异做大量的二次开发,即可以得到能够实现所选第一应用程序对应功能的智能前端设备,提高了智能前端设备的产品开发效率。
在一些实施例中,该方法还包括:根据服务化接口框架,将目标硬件资源占用级别下的第二应用程序的程序包加载至智能前端设备;在基于服务化接口框架中运行应用程序的接口运行第二应用程序的情况下,智能前端设备切换实现第二应用程序对应的功能。
在需要对智能前端设备进行产品功能切换的情况下,可以基于服务化接口框架,将目标硬件资源占用级别下的第二应用程序的程序包加载至智能前端设备,从而使得在基于服务化接口框架运行第二应用程序的情况下,智能前端设备切换实现第二应用程序对应的功能。
相比于对智能前端设备进行产品功能固定化或碎片化硬件功能模组的 方式,本公开实施例可以在智能前端设备出厂销售之前,根据实际情况,对智能前端设备进行不同产品功能的切换,从而有效降低库存积压的问题。
在一些实施例中,服务化接口框架包括:算法层、功能抽象接口层、服务化接口层。其中,服务化接口层,用于向智能前端设备提供不同硬件资源占用级别下的应用程序;功能抽象接口层,用于向智能前端设备提供运行应用程序的多个功能抽象接口;算法层,用于向智能前端设备提供运行应用程序的算法软件开发工具包(Software Development Kit,SDK)接口和多个算法模块。
以上述图1为例,服务化接口层104可以向智能前端设备提供三个硬件资源占用级别下的应用程序;功能抽象接口层102可以向智能前端设备提供运行应用程序的检测接口、质量接口、属性接口等功能接口;算法层101可以向智能前端设备提供运行应用程序的算法SDK接口和不同处理器对应的多个算法模块。
在一些实施例中,目标应用程序包括第一应用程序或第二应用程序,服务化接口层中包括服务化接口;根据服务化接口框架,将目标硬件资源占用级别下的目标应用程序的程序包加载至智能前端设备,包括:通过调用服务化接口,将目标应用程序的程序包加载至智能前端设备。
服务化接口层中包括服务化接口(Service API),用户(智能前端设备的生产厂商)可以通过调用服务化接口,将希望智能前端设备运行的目标应用程序的程序包加载至智能前端设备。例如,调用服务化接口,在服务化接口中输入目标应用程序的标识,以实现将目标应用程序的程序包加载至智能前端设备。
在一些实施例中,服务化接口框架中至少包括输入接口、输出接口;本公开例提供的应用程序定义方法还包括:通过调用所述输入接口,输入待处理图像;通过调用目标应用程序对应的功能抽象接口,运行目标应用程序,对待处理图像进行图像处理,得到图像处理结果;通过调用输出接口,异步输出图像处理结果。
在服务化接口框架采用输入/输出(I/O)模式,将输入接口和输出接口设置为异步结构,以使得用户可以通过调用输入接口,输入一个或多个待处理图像,进而通过调用对应的功能抽象接口运行目标应用程序,对该一个或多个待处理图像进行图像处理,得到图像处理结果,并通过调用输出接口,异步输出每个待处理图像的图像处理结果。
相比于对输入接口和输出接口设置为同步结构,也即调用输入接口输入一个待处理图像,只有当输出接口输出该待处理图像的图像处理结果之后,才能再次调用输入接口输入下一个待处理图像的方式,本公开实施例将输入接口和输出接口设置为异步结构的方式,可以有效提高多个待处理图像的图像处理效率。
图3为本公开实施例提供的基于服务化接口框架运行目标应用程序的 示意图。如图3所示,通过调用输入接口301(Frame In),输入待处理图像;进而通过调用对应的功能抽象接口运行目标应用程序,以实现对待处理图像的图像处理,得到图像处理结果;最终,通过调用输出接口302(Result Out),异步输出图像处理结果。
在一些实施例中,目标应用程序对应一个算法模块句柄集合;通过调用应用程序对应的功能抽象接口,运行目标应用程序,对待处理图像进行图像处理,得到图像处理结果,包括:通过调用目标应用程序对应的功能抽象接口,确定目标应用程序对应的数据处理逻辑;基于数据处理逻辑,利用算法SDK接口,依次调用算法模块句柄集合对应的多个算法模块;利用多个算法模块,对待处理图像进行图像处理,得到图像处理结果。
目标应用程序的程序包中包括其对应的数据处理逻辑和算法模块句柄集合,算法模块句柄集合用于指示运行目标应用程序运行时所需的多个算法模块,数据处理逻辑可以指示多个算法模块的调用顺序,因此,基于目标应用程序对应的数据处理逻辑,利用算法SDK接口,依次调用算法模块句柄集合对应的多个算法模块,从而可以利用多个算法模块,对待处理图像进行图像处理,得到图像处理结果。
以上述图3为例,如图3所示,目标应用程序是车牌检测应用程序307(carplate),通过调用车牌检测应用程序307对应的检测接口,确定车牌检测应用程序的数据处理逻辑,基于该数据处理逻辑,利用算法SDK接口,依次调用模块句柄集合指示的跟踪算法模块308(track)、质量检测算法模块309(quality)、属性算法模块310(attribute)等。
在一些实施例中,将待处理模块输入跟踪算法模块308,以及将跟踪算法模块308的输出结果输入质量检测算法模块309,进而将质量检测算法模块309的输出结果输入属性算法模块310,直至最终输出图像处理结果。也就是说,数据处理逻辑可以串联多个算法模块的输入输出,最终得到图像处理结果。
基于算法层中的算法SDK接口,可以屏蔽不同硬件平台的差异,有效实现不同算法模块的调用。
以上述图3为例,如图3所示,服务化接口框架中还包括初始化接口303(API Init)和反初始化接口304(API DeInit),用于实现接口初始化和反初始化。其中,初始化接口和反初始化接口可以采用相关技术中通用的初始化接口和反初始化接口,本公开实施例对此不作具体限定。
如图3所示,服务化接口框架中还包括参数配置接口305(Param Set)和参数获取接口306(Param Get),用于进行应用程序运行所需参数的动态配置。例如,配置车牌检测应用程序运行时所需的质量筛选参数的动态配置。
在一些实施例中,服务化接口(Service API)提供了简洁友好的调用接口,对用户的调用进行必要检验,然后传到应用实例接口。服务化接口通 过抽象接口的实现,调用APP。应用实例(APP Instance)抽象必要的接口,专注于需求本身逻辑实现,内部通过队列和线程的形式不间断处理输入,并按照Pipeline逻辑串联算法模块的输入输出,最终产生APP所对应的需求结果。算法模块实例专注单个算法功能实现(如检测、质量和属性等),内部通过队列于线程的形式处理输入,并产生算法结果的输出。以此实现某个算法能力。算法模块之间的联系,由应用内的pipeline进行编排。算法SDK接口调用,屏蔽硬件平台的差异。
在一些实施例中,服务化接口层中还包括数据库接口;该方法还包括:在得到图像处理结果之后,通过调用数据库接口,将图像处理结果存储在对应的数据库中。
服务化接口层中还可以包括数据库接口,以实现通过调用数据库接口,将图像处理结果存储在对应的数据库中。
图4为本公开实施例提供的用于对智能前端设备进行应用程序定义的服务化接口框架的结构示意图。如图4所示,服务化接口层中除了包括上述用于加载应用程序的服务化接口401(Service API)之外,还包括数据库接口402(DB API);其中,服务化接口401中可以包括应用程序408、模块409和工具410;数据库接口402可以是独立的人像库接口,按照实际需求提供相应的数据库功能。
基于数据库接口,可以调用图4所示的数据库管理器404(DB Manager)、特征数据库405(Feature DB)、特征提取器406(Extracter)等可以提供数据库功能的模块。
在一些实施例中,服务化接口层中还包括运行环境接口403(Env API);该方法还包括:通过调用运行环境接口,进行授权验证;在授权验证通过的情况下,将服务化接口框架加载至智能前端设备中。
为了避免服务化接口框架被非法篡改和篡用,服务化接口层中还包括运行环境接口,以实现对服务化接口框架的授权校验,并在授权校验通过的情况下,将服务化接口框架集成至智能前端设备中。
以上述图4为例,服务化接口层中还包括环境接口403(Env API),通过调用环境接口,以加载授权文本文件407(License),进行授权校验。
在一些实施例中,目标应用程序包括第一应用程序或所述第二应用程序;该方法还包括:基于用户选定的业务功能,利用服务化接口框架,开发得到能够实现业务功能的目标应用程序的程序包。
基于服务化接口框架,还可以开发得到服务化接口框架的服务化接口层中没有的新的目标应用程序,以丰富服务化接口框架能够提供给智能前端设备可选的应用程序。
在一些实施例中,服务化接口框架中包括应用程序模板库;基于用户选定的业务功能,利用服务化接口框架,开发得到能够实现业务功能的目标应用程序的程序包,包括:基于业务功能,确定目标应用程序对应的数 据处理逻辑,以及目标应用程序对应的算法模块句柄集合,其中,算法模块句柄集合用于指示实现业务功能所需的多个算法模块;基于用户从应用程序模板库中选定的目标应用程序模板,以及数据处理逻辑、算法模块句柄集合,生成目标应用程序的程序包。
图5为本公开实施例提供的基于服务化接口框架进行应用程序开发的示意图。如图5所示,服务化接口框架中提供了丰富的基础功能支持,例如,功能接口、算法模块调用、调试工具支持、应用程序模板库等丰富友好的开发环境(如图5中虚线框中所示),以使得开发者仅需关注业务功能的需求逻辑的开发,如图5中的业务逻辑501(business logic),数据处理逻辑502(alg pipeline),从而有效提高了应用程序开发效率。
图5所示的APP的开发框架,用于支持最小化的功能需求APP开发,并致力于最简化开发逻辑。同时通过丰富的基础功能支持与APP开发范围隔离,方便长尾应用的快速生产和多开发者并行生产。
基于业务逻辑和数据处理逻辑,可以确定目标应用程序对应的算法模块句柄集合,进而基于用户从应用程序模板库中选定的目标应用程序模板,以及数据处理逻辑、算法模块句柄集合,快速生成目标应用程序的程序包。
此外,基于服务化接口框架提供了丰富的基础功能支持,可以方便应用频率较低的长尾应用的快速开发。而且,基于服务化接口框架,可以实现不同开发者的并行开发,有效提高了开发效率。
基于服务化接口框架开发得到的目标应用程序的程序包,可以具备独立的版本号。在开发得到新的目标应用程序之后,可以将新开发的目标应用程序的标识添加到服务化接口框架的服务化接口层,以使得后续可以被智能前端设备所应用。
在一些实施例中,服务化接口框架中包括调试工具;该方法还包括:通过调用调试工具,对目标应用程序的程序包进行调试。
基于服务化接口框架中的调试工具,还可以对目标应用程序的程序包进行调试,以提高目标应用程序的程序包的性能。
在一些实施例中,服务化接口框架中的各算法模块均具有活性,即可以实时对输入的待处理数据进行数据处理,并输出数据处理结果。
图6为本公开实施例提供的服务化接口框架中算法模块的示意图。如图6所示,算法模块对输入601(input)的待处理数据进行输入数据结构转换602(input wrapper),并将转换后的待处理数据加入输入队列603(input queue)。
基于数据处理线程604(process thread)对输入队列中的待处理数据进行数据处理,得到数据处理结果。
对数据处理结果进行输出数据结构转换605(output wrapper),并将转换后的图像处理结果加入输出队列606(output queue),进而对输出队列606(output queue)中的图像数据处理结果依次输出607(output)。
对于相同类型的算法模块,可以根据实际情况,动态合并为一个算法模块组,以使得通过调用一个算法模块组,实现对多个算法模块的调用。
在一些实施例中,每个算法模块实例都具有活性,并实时处理输入输出。算法模块为基础层模块,为APP开发提供了简单易用的算法功能调用。算法模块(Module)为最小算法单位,可以理解为算子,并且具备活性。
图7为本公开实施例提供的服务化接口框架中算法模块组的示意图。如图7所示,将多个属性算法模块701至704(attribute)合并为一个属性算法模块组705(Module Group(“attribute”)),将多个特征算法模块707至710(feature)合并为一个特征算法模块组711(Module Group(“feature”))。
在一个算法模块组内部,通过算法模块组内的调度程序706(scheduler),对算法模块组内的多个算法模块进行调度。
这里,算法模块(Module)可以动态加入或退出算法模块组(Module Group),外部调用者将一个算法模块组当作一个算法模块使用,由算法模块组内的调度程序(scheduler)调用。
利用算法模块组,可以实现多路复用算法功能,减少冗余的算法模块所带来的资源消耗。例如,在多路相同功能的应用程序运行的情况下,可以在多路应用程序中共享一组算法模块组。
图8为本公开实施例提供的对算法模块组进行多路复用的示意图。如图8所示,针对4路人脸识别应用程序,可以共享一组特征算法模块组801,即该4路人脸识别应用程序,可以共享该特征算法模块组中的两个特征算法模块。
在一些实施例中,对于同类型的算法模块实例,可以动态合并为一个算法模块组(Module Group)。分组机制带来的好处是多路充分复用算法功能,并减少算法实例所带来的资源消耗。
在本公开实施例中,提供了一种服务化接口框架,该服务化接口框架中包括用于运行应用程序的接口和功能模块的集合,将该服务化接口框架集成在智能前端设备中,进而可以基于该服务化接口框架,对智能前端设备进行应用程序定义。基于智能前端设备的硬件资源参数,可以确定与智能前端设备匹配的目标硬件资源占用级别,进而基于智能前端设备中预设的服务化接口框架,将目标硬件资源占用级别下的第一应用程序的程序包加载至智能前端设备,在基于服务化接口框架运行第一应用程序的情况下,智能前端设备实现第一应用程序对应的功能。
这样,基于服务化接口框架,可以为智能前端设备选择与其自身的硬件资源参数相匹配的第一应用程序,以使得无需考虑硬件资源差异做大量的二次开发,即可以得到能够实现所选第一应用程序对应功能的智能前端设备,提高了智能前端设备的产品开发效率。
而且,在需要对智能前端设备进行产品功能切换的情况下,可以基于服务化接口框架,将目标硬件资源占用级别下的第二应用程序的程序包加 载至智能前端设备,从而使得在基于服务化接口框架运行第二应用程序的情况下,智能前端设备切换实现第二应用程序对应的功能,从而可以在智能前端设备出厂销售之前,根据实际情况,对智能前端设备进行不同产品功能的切换,从而有效降低库存积压的问题。
在本公开实施例中,设备厂商可以根据硬件规划阶段选定多款“服务化接口”集成于一个智能硬件上;也可以在已选定的硬件规划上,新增同级别的“服务化接口”应用。从而可以在出厂阶段,根据销售情况切换不同的产品功能,解决碎片化的智能前端设备所面临的库存问题。同时在硬件规划阶段可提前预知资源占用,从而无需进行资源冗余设计,从而保障产品竞争优势。
可以理解,本公开实施例提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开实施例不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开实施例还提供了应用程序定义装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开实施例提供的任一种应用程序定义方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图9为本公开实施例提供的应用程序定义装置的框图。该装置应用于智能前端设备,如图9所示,装置90包括:
确定部分91,配置为根据智能前端设备的硬件资源参数,确定与智能前端设备匹配的目标硬件资源占用级别;
加载部分92,配置为根据智能前端设备中预设的服务化接口框架,将目标硬件资源占用级别下的第一应用程序的程序包加载至智能前端设备,其中,服务化接口框架中至少包括用于运行应用程序的接口;
运行部分93,配置为在基于服务化接口框架中所述运行应用程序的接口运行第一应用程序的情况下,智能前端设备实现第一应用程序对应的功能。
在一些实施例中,加载模块92,还配置为根据服务化接口框架,将目标硬件资源占用级别下的第二应用程序的程序包加载至智能前端设备;运行部分93,还配置为在基于服务化接口框架中所述运行应用程序的接口运行第二应用程序的情况下,智能前端设备切换实现第二应用程序对应的功能。
在一些实施例中,服务化接口框架至少包括:算法层、功能抽象接口层和服务化接口层;服务化接口层,配置为向智能前端设备提供不同硬件资源占用级别下的应用程序;功能抽象接口层,配置为向智能前端设备提供运行应用程序的多个功能抽象接口;算法层,配置为向智能前端设备提供运行应用程序的算法SDK接口和多个算法模块。
在一些实施例中,目标应用程序包括第一应用程序或第二应用程序,服务化接口层中包括服务化接口;加载部分92,具体配置为:通过调用服务化接口,将目标应用程序的程序包加载至智能前端设备。
在一些实施例中,服务化接口框架中至少包括输入接口、输出接口;装置90,还包括:输入部分,用于通过调用输入接口,输入待处理图像;
图像处理部分,配置为通过调用目标应用程序对应的功能抽象接口,运行目标应用程序,对待处理图像进行图像处理,得到图像处理结果;输出部分,配置为通过调用输出接口,异步输出图像处理结果。
在一些实施例中,目标应用程序对应一个算法模块句柄集合;图像处理部分,具体配置为:通过调用目标应用程序对应的功能抽象接口,确定目标应用程序对应的数据处理逻辑;基于数据处理逻辑,利用算法SDK接口,依次调用算法模块句柄集合对应的多个算法模块;利用多个算法模块,对待处理图像进行图像处理,得到图像处理结果。
在一些实施例中,服务化接口层还包括数据库接口;装置90,还包括:存储部分,配置为在得到图像处理结果之后,通过调用数据库接口,将图像处理结果存储在对应的数据库中。
在一些实施例中,服务化接口层中还包括运行环境接口;装置90,还包括:授权验证部分,配置为通过调用运行环境接口,对所述服务化接口框架进行授权验证;加载部分92,配置为在授权验证通过的情况下,将服务化接口框架加载至智能前端设备中。
在一些实施例中,目标应用程序包括第一应用程序或第二应用程序;装置90,还包括:开发部分,配置为基于用户选定的业务功能,利用服务化接口框架,开发得到能够实现业务功能的目标应用程序的程序包。
在一些实施例中,服务化接口框架中包括应用程序模板库;开发部分,具体配置为:基于业务功能,确定目标应用程序对应的数据处理逻辑,以及目标应用程序对应的算法模块句柄集合,其中,算法模块句柄集合用于指示实现业务功能所需的多个算法模块;基于用户从应用程序模板库中选定的目标应用程序模板,以及数据处理逻辑、算法模块句柄集合,生成目标应用程序的程序包。
在一些实施例中,服务化接口框架中包括调试工具;装置90,还包括:调试部分,配置为通过调用调试工具,对目标应用程序的程序包进行调试。
该方法与计算机系统的内部结构存在特定技术关联,且能够解决如何提升硬件运算效率或执行效果的技术问题(包括减少数据存储量、减少数据传输量、提高硬件处理速度等),从而获得符合自然规律的计算机系统内部性能改进的技术效果。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序产品,计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,计算机程序被计算机读取并执行时,实现上述方法中的部分或全部步骤。该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
电子设备可以被提供为终端、服务器或其它形态的设备。
图10为本公开实施例提供的电子设备的框图。参照图10,该电子设备10的硬件实体包括:处理器11、通信接口12和存储器13,其中:
处理器11通常控制电子设备10的总体操作。
通信接口12可以使电子设备通过网络与其他终端或服务器通信。
存储器13配置为存储由处理器11可执行的指令和应用,还可以缓存待处理器11以及电子设备10中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。处理器11、通信接口12和存储器13之间可以通过总线14进行数据传输。
本公开实施例涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。
本公开实施例可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开实施 例的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开实施例操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开实施例的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开实施例的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开实施例的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
若本公开技术方案涉及个人信息,应用本公开技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本公开技术方案涉及敏感个人信息,应用本公开技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围 即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (15)

  1. 一种应用程序定义方法,应用于智能前端设备,所述方法包括:
    根据所述智能前端设备的硬件资源参数,确定与所述智能前端设备匹配的目标硬件资源占用级别;
    根据所述智能前端设备中预设的服务化接口框架,将所述目标硬件资源占用级别下的第一应用程序的程序包加载至所述智能前端设备,其中,所述服务化接口框架中至少包括用于运行应用程序的接口;
    在基于所述服务化接口框架中所述运行应用程序的接口运行所述第一应用程序的情况下,所述智能前端设备实现所述第一应用程序对应的功能。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    根据所述服务化接口框架,将所述目标硬件资源占用级别下的第二应用程序的程序包加载至所述智能前端设备;
    在基于所述服务化接口框架中所述运行应用程序的接口运行所述第二应用程序的情况下,所述智能前端设备切换实现所述第二应用程序对应的功能。
  3. 根据权利要求1或2所述的方法,其中,所述服务化接口框架至少包括:算法层、功能抽象接口层和服务化接口层;
    所述服务化接口层,用于向所述智能前端设备提供不同硬件资源占用级别下的应用程序;
    所述功能抽象接口层,用于向所述智能前端设备提供运行应用程序的多个功能抽象接口;
    所述算法层,用于向所述智能前端设备提供运行应用程序的算法SDK接口和多个算法模块。
  4. 根据权利要求3所述的方法,其中,目标应用程序至少包括所述第一应用程序或第二应用程序,所述服务化接口层中包括服务化接口;
    根据所述服务化接口框架,将所述目标硬件资源占用级别下的目标应用程序的程序包加载至所述智能前端设备,包括:
    通过调用所述服务化接口,将所述目标应用程序的程序包加载至所述智能前端设备。
  5. 根据权利要求4所述的方法,其中,所述服务化接口框架中至少包括输入接口、输出接口;所述方法还包括:
    通过调用所述输入接口,输入待处理图像;
    通过调用所述目标应用程序对应的功能抽象接口,运行所述目标应用程序,对所述待处理图像进行图像处理,得到图像处理结果;
    通过调用所述输出接口,异步输出所述图像处理结果。
  6. 根据权利要求5所述的方法,其中,所述目标应用程序对应一个算法模块句柄集合;
    所述通过调用所述目标应用程序对应的功能抽象接口,运行所述目标应用程序,对所述待处理图像进行图像处理,得到图像处理结果,包括:
    通过调用所述目标应用程序对应的功能抽象接口,确定所述目标应用程序对应的数据处理逻辑;
    基于所述数据处理逻辑,利用所述算法SDK接口,依次调用所述算法模块句柄集合对应的多个算法模块;
    利用所述多个算法模块,对所述待处理图像进行图像处理,得到图像处理结果。
  7. 根据权利要求5或6所述的方法,其中,所述服务化接口层还包括数据库接口;所述方法还包括:
    在得到所述图像处理结果之后,通过调用所述数据库接口,将所述图像处理结果存储在对应的数据库中。
  8. 根据权利要求3至7中任意一项所述的方法,其中,所述服务化接口层中还包括运行环境接口;所述方法还包括:
    通过调用所述运行环境接口,对所述服务化接口框架进行授权验证;
    在所述授权验证通过的情况下,将所述服务化接口框架加载至所述智能前端设备中。
  9. 根据权利要求1至8中任意一项所述的方法,其中,目标应用程序包括所述第一应用程序或第二应用程序;
    所述方法还包括:
    基于用户选定的业务功能,利用所述服务化接口框架,开发得到能够实现所述业务功能的所述目标应用程序的程序包。
  10. 根据权利要求9所述的方法,其中,所述服务化接口框架中包括应用程序模板库;
    所述基于用户选定的业务功能,利用所述服务化接口框架,开发得到能够实现所述业务功能的所述目标应用程序的程序包,包括:
    基于所述业务功能,确定所述目标应用程序对应的数据处理逻辑,以及所述目标应用程序对应的算法模块句柄集合,其中,所述算法模块句柄集合用于指示实现所述业务功能所需的多个算法模块;
    基于用户从所述应用程序模板库中选定的目标应用程序模板,以及所述数据处理逻辑、所述算法模块句柄集合,生成所述目标应用程序的程序包。
  11. 根据权利要求10所述的方法,其中,所述服务化接口框架中包括调试工具;所述方法还包括:
    通过调用所述调试工具,对所述目标应用程序的程序包进行调试。
  12. 一种应用程序定义装置,应用于智能前端设备,所述装置包括:
    确定部分,配置为根据智能前端设备的硬件资源参数,确定与所述智能前端设备匹配的目标硬件资源占用级别;
    加载部分,配置为根据所述智能前端设备中预设的服务化接口框架,将所述目标硬件资源占用级别下的第一应用程序的程序包加载至所述智能前端设备,其中,所述服务化接口框架中至少包括用于运行应用程序的接口;
    运行部分,配置为在基于所述服务化接口框架中所述运行应用程序的接口运行所述第一应用程序的情况下,所述智能前端设备实现所述第一应用程序对应的功能。
  13. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。
  14. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。
  15. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行权利要求1至11中任意一项所述的方法。
PCT/CN2022/109451 2022-03-29 2022-08-01 应用程序定义方法及装置、电子设备、存储介质和计算机程序产品 WO2023184810A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210325128.XA CN114879954A (zh) 2022-03-29 2022-03-29 应用程序定义方法及装置、电子设备和存储介质
CN202210325128.X 2022-03-29

Publications (1)

Publication Number Publication Date
WO2023184810A1 true WO2023184810A1 (zh) 2023-10-05

Family

ID=82668614

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/109451 WO2023184810A1 (zh) 2022-03-29 2022-08-01 应用程序定义方法及装置、电子设备、存储介质和计算机程序产品

Country Status (2)

Country Link
CN (1) CN114879954A (zh)
WO (1) WO2023184810A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719073A (zh) * 2009-11-20 2010-06-02 浪潮集团山东通用软件有限公司 一种基于智能客户端的按需下载实现方法
CN105260186A (zh) * 2015-10-19 2016-01-20 厦门骐俊物联科技股份有限公司 用于嵌入式系统的应用程序sdk的构建方法及装置
US20190369977A1 (en) * 2018-06-05 2019-12-05 Microsoft Technology Licensing, Llc On-demand installer for resource packages
CN113312103A (zh) * 2021-05-31 2021-08-27 浙江商汤科技开发有限公司 智能摄像机的软件定义方法及装置、电子设备和存储介质
CN113377465A (zh) * 2021-06-07 2021-09-10 上海商汤智能科技有限公司 基于服务的sdk调用方法及装置、电子设备和存储介质
CN114035902A (zh) * 2021-11-17 2022-02-11 上海商汤智能科技有限公司 应用程序开发平台及方法、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719073A (zh) * 2009-11-20 2010-06-02 浪潮集团山东通用软件有限公司 一种基于智能客户端的按需下载实现方法
CN105260186A (zh) * 2015-10-19 2016-01-20 厦门骐俊物联科技股份有限公司 用于嵌入式系统的应用程序sdk的构建方法及装置
US20190369977A1 (en) * 2018-06-05 2019-12-05 Microsoft Technology Licensing, Llc On-demand installer for resource packages
CN113312103A (zh) * 2021-05-31 2021-08-27 浙江商汤科技开发有限公司 智能摄像机的软件定义方法及装置、电子设备和存储介质
CN113377465A (zh) * 2021-06-07 2021-09-10 上海商汤智能科技有限公司 基于服务的sdk调用方法及装置、电子设备和存储介质
CN114035902A (zh) * 2021-11-17 2022-02-11 上海商汤智能科技有限公司 应用程序开发平台及方法、电子设备和存储介质

Also Published As

Publication number Publication date
CN114879954A (zh) 2022-08-09

Similar Documents

Publication Publication Date Title
WO2022160707A1 (zh) 结合rpa和ai的人机互动方法、装置、存储介质及电子设备
CN109002510B (zh) 一种对话处理方法、装置、设备和介质
US10699055B2 (en) Generative adversarial networks for generating physical design layout patterns
CN108920135B (zh) 一种自定义业务生成方法、装置、计算机设备及存储介质
JP2022018095A (ja) マルチモーダル事前訓練モデル取得方法、装置、電子デバイス及び記憶媒体
US9418241B2 (en) Unified platform for big data processing
US10956747B2 (en) Creating sparsely labeled video annotations
CN104735468A (zh) 一种基于语义分析将图像合成新视频的方法及系统
US20100275186A1 (en) Segmentation for static analysis
US11650983B2 (en) Selecting an optimal combination of systems for query processing
JP2023542469A (ja) キーポイント検出に基づくコンピュータによる自動化された相互作用活動認識
CN116360735A (zh) 一种表单生成方法、装置、设备和介质
CN115774552A (zh) 配置化的算法设计方法、装置、电子设备及可读存储介质
WO2023184810A1 (zh) 应用程序定义方法及装置、电子设备、存储介质和计算机程序产品
US20200026963A1 (en) Reducing computational costs of deep reinforcement learning by gated convolutional neural network
US12019673B2 (en) Digital semantic structure conversion
US11556881B2 (en) Generation of business process model
US20230419047A1 (en) Dynamic meeting attendee introduction generation and presentation
US11714614B2 (en) Code generation tool for cloud-native high-performance computing
KR102541600B1 (ko) 실물 객체 인식 기반 상담 서비스 제공 장치 및 방법
US11714610B2 (en) Software code integration from a media file
US11537394B2 (en) Systems and methods for analyzing computational architectures
WO2023061293A1 (en) Knowledge graph driven content generation
US10831261B2 (en) Cognitive display interface for augmenting display device content within a restricted access space based on user input
CN115408003A (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: 22934630

Country of ref document: EP

Kind code of ref document: A1