Cross-platform intelligent service framework for front-end development

By designing a cross-platform intelligent service framework, the problem of intelligent algorithm service scheduling in front-end development is solved, the front-end separation and efficient operation of intelligent applications are achieved, and the difficulty and cost of transplantation is reduced.

CN119105755APending Publication Date: 2024-12-10SUZHOU AEROSPACE INFORMATION RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411128579.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Front-end development lacks intelligent algorithm service scheduling, algorithm API is complex and difficult to integrate, device adaptation is inconsistent, and software and hardware optimization is difficult to achieve.

Method used

Design a cross-platform intelligent service framework for front-end development, including application layer, communication layer, decision optimization layer and intelligent service layer, realize intelligent service access through JavaScript API, combine decision engine and running database for model optimization selection, and support multi-threading and NPU processing.

Benefits of technology

It realizes the separation of front and back ends, reduces the cost of transplantation and maintenance, improves the operation efficiency and accuracy of smart applications, and supports the easy adaptation of multiple mobile systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105755A_ABST
    Figure CN119105755A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-platform intelligent service framework for front-end development, which comprises an application layer, a communication layer, a decision optimization layer and an intelligent service layer, and is characterized in that the application layer is an H5 standard front-end page and is responsible for interaction with a user and display and update of an interface; the communication layer is mainly used for forwarding user requests and intelligent service response results; the decision optimization layer mainly comprises a decision engine and various optimization strategies; the intelligent service layer mainly comprises an intelligent service engine and various intelligent services. The intelligent service engine is constructed between the application program and the bottom layer intelligent service, the HTML5 standard is supported, different operating systems and intelligent framework differences are shielded, and stable and available intelligent services are provided for the upper layer application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to OpenHarmony operating system software module integration technology, and in particular to a cross-platform intelligent service framework for front-end development. Background Art

[0002] Front-end development refers to building and implementing the interface part that users interact with directly in a web page or application. It involves designing and developing the visual part of a web page using technologies such as HTML, CSS, and JavaScript. Although front-end development has become more powerful and comprehensive through the continuous development of front-end technologies and tools, it has always lacked the scheduling of intelligent algorithm service elements.

[0003] Intelligent algorithm services mainly refer to the back-end use of models to process images, sounds, and other services, involving technologies such as C++ and model processing. First, most algorithm APIs are complex to use and difficult to integrate with applications; second, the current service models are inconsistent in terms of device adaptation, making it difficult to optimize software and hardware. Summary of the invention

[0004] The purpose of the present invention is to propose a cross-platform intelligent service framework for front-end development.

[0005] The technical solution to achieve the purpose of the present invention is: a cross-platform intelligent service framework for front-end development, consisting of an application layer, a communication layer, a decision optimization layer, and an intelligent service layer, wherein:

[0006] The application layer is the H5 standard front-end page, which is responsible for interacting with users and displaying and updating the interface;

[0007] The communication layer includes the communication client and the communication server. The communication client is responsible for monitoring the service access request information from the application layer and the service processing result information from the communication server; the server is responsible for monitoring the service access request information from the communication client and the service processing result information from the intelligent service engine;

[0008] The decision optimization layer includes the decision engine, optimization strategy and operation database. The decision engine is used to monitor the service access request information from the server and generate optimization execution request information for the task in combination with the historical operation data of the model in the operation database. The optimization strategy includes model preheating and C / G / NPU processors for the decision engine to select for optimization.

[0009] The intelligent service layer includes the intelligent service engine, basic services, extended services and the operation database. The intelligent service engine is responsible for monitoring the optimization execution request information from the decision optimization layer and distributing the optimization execution request information to the corresponding basic services or extended services. Both the basic services and extended services are intelligent services. On the one hand, they are used to monitor the optimization execution request information distributed by the intelligent service engine and ultimately realize the service functions. On the other hand, they are used to send the operation information, including execution efficiency, execution accuracy and CPU occupancy rate, to the operation database. The basic services are built-in services of the framework, and the extended services are other intelligent services developed by users based on the framework development specifications. The operation database receives the operation information from the basic services / extended services and updates the storage for reference and optimization by the decision engine.

[0010] Furthermore, the service access request information includes a request ID, a callback function CB, and an intelligent processing request field. The request ID is designed to be a string type with an indefinite length and a maximum length of 256 bytes. A different ID is randomly generated by a function for each request. The callback function CB is designed to be in a two-parameter form, with the first parameter being err, which is used to process the error result return, and the second parameter being data, which is used to obtain the correct processing result. The intelligent processing request is packaged in the JsonString format, and the intelligent processing request includes a service name serviceName, an image path picPath, a preheating optimization preheater, a multi-threading optimization multhread, and a processor optimization process field. The service name serviceName is designed to be a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested service name. The image path picPath is designed to be a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested image path. The preheating preheater is designed to be a Boolean type, and the default is true to preload the model and run it for the first time. The multi-thread multhread is designed to be a Boolean type, and the default is false, and multi-threading is not used to perform this task. The processor process is designed to be a string type with a length of 3 bytes and the default is CPU, and the model inference service is completed through the system CPU.

[0011] Furthermore, the service processing result information includes a response ID, a result status flag status, a callback hold flag keep, and an intelligent service result field. The response ID is designed to be a string type with an indefinite length and a maximum length of 256 bytes, which is consistent with the request ID in the service access request; the result status flag status is designed to be a Boolean type. When the value is true, it indicates that the request service is completely executed, and the corresponding front-end executes the correct callback and obtains the intelligent service result. When the value is false, it indicates that the request service execution is interrupted, and the corresponding front-end callback function executes the wrong part for exception handling; the callback hold flag keep is designed to be a Boolean type. When the value is true, it indicates that the front-end callback is executed and continues to wait for the next execution result. When the value is false, it indicates that this result is the last result and the front-end callback can be removed from the database; the intelligent service result result is designed to be a json type with a maximum length of 65536 bytes, and the field contains the service content.

[0012] Furthermore, the application layer completes the construction of the graphics rendering page based on the front-end framework VUE; the business logic is controlled by ES6 standard JavaScript, and the JavaScript API encapsulated by the intelligent service framework is used here to initiate the corresponding intelligent service access request to realize intelligent service access.

[0013] Furthermore, in the communication layer:

[0014] The communication client listens to and processes two parts of the message: on the one hand, it parses the service access request from the application layer, records the application layer callback processing function and the corresponding unique ID allocated therein into the database, reorganizes the ID and the part except the callback function into an intelligent processing request and forwards it to the communication server; on the other hand, it parses the service request result from the communication server, searches and calls the callback processing function corresponding to its ID in the database, and the parameter is the intelligent processing result part in the service request result, and then decides to remove it from the database or keep it according to the keep parameter in the service request result;

[0015] The communication server monitors and processes two parts of messages: on the one hand, it forwards the intelligent processing request from the communication client directly to the decision optimization layer for processing; on the other hand, it forwards the service request result from the intelligent service engine to the client.

[0016] Furthermore, in the decision optimization layer:

[0017] The decision engine parses the intelligent processing request from the communication server. It first obtains the service name serviceName, determines the specific content of the required service, and then checks the options of its optimization parameters. If multhread is true, multi-thread detection is turned on; if NPU is true, the NPU chip is started; if preHeater is true, the model is initialized and preheated. At this time, you also need to check the running database, which contains multiple models for each service, and will record and update the execution efficiency, execution accuracy, and CPU occupancy of the model running on the device. According to the model ranking of the service, it automatically selects the execution model that best suits the device for this task, and finally sends the selected model and optimization decision to the intelligent service layer.

[0018] Furthermore, in the intelligent service layer:

[0019] The intelligent service engine monitors and processes messages from two aspects: on the one hand, it searches for intelligent services based on the model selected by the decision optimization layer, and forwards the model and optimization decision to the corresponding intelligent service; on the other hand, it receives and forwards the intelligent processing results of the intelligent service, packages them into service request results, and sends them to the communication service end;

[0020] Intelligent services include already developed basic services and extended services. Basic services include widely used services: image classification service, target detection service, text detection service, and speech recognition service. Extended services develop other intelligent services based on framework development specifications or expand model categories on existing basic services. On the one hand, intelligent services monitor the models and optimization decisions from the intelligent service engine, select models for actual preheating, multi-threading, and NPU processing, and send intelligent processing results to the intelligent service engine. On the other hand, they write the accuracy, CPU occupancy, and execution efficiency of each processing into the running database.

[0021] The running database is a lightweight database service for mobile devices. On the one hand, it stores and updates the model data of each intelligent service operation and sorts the model data individually and comprehensively according to the accuracy, CPU occupancy rate, and execution efficiency. On the other hand, it provides the stored data to the decision optimization engine for optimizing the task for the device, and selects the model based on the sorting and the task's requirements for accuracy, CPU occupancy rate, and execution efficiency.

[0022] Furthermore, the running database fields include serial number id, service services, model name modelname, model path modelpath, execution efficiency means, execution accuracy accuracy, and CPU occupancy rate cpurass; the serial number is an integer type and is sorted in sequence; the service services is a string type, indicating which category of intelligent service selectable models the current model belongs to. If the application layer requests a detection service, the decision engine will check the data entries of model 1 and model 2 belonging to the detection service in the database; the model name modelname is a string type, marking the model name; the model path modelpath is a string type, indicating the model storage location, which is used for subsequent search and loading of the model; the execution efficiency means is a floating point type, indicating the time the model uses each time the device executes a task and is continuously accumulated and updated; the execution accuracy accuracy is a floating point type, indicating the accuracy of the model each time it executes a task; the CPU occupancy rate cpurass is a floating point type, indicating the memory usage when the model uses the CPU to execute tasks.

[0023] Compared with the prior art, the present invention has the following significant advantages: 1) It realizes cross-language calls, so front-end developers can focus on the development of interfaces and interactions, and back-end developers can focus on the development of expanded intelligent services. The front-end and back-end are separated, which reduces the cost of transplantation and maintenance. 2) Basic intelligent services are deployed on the back-end, and users only need to implement front-end interface interactions based on the HTML5 standard to quickly and concisely access intelligent services and generate intelligent applications. 3) The decision optimization engine and operating database are implemented in the underlying intelligent services, and the execution of intelligent service tasks is optimized from both software and hardware aspects, which improves the operating efficiency and accuracy of intelligent applications. 3) The underlying service is completely developed based on C++ and can be easily ported and adapted to multiple mobile systems, including Android, Hongmeng, open source Hongmeng, etc., which improves the cross-platform nature of the framework and reduces the difficulty of user application porting. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a diagram of the smart service framework.

[0025] Figure 2 Implement the code for the client part of the communication.

[0026] Figure 3 Implement code for the communication server part.

[0027] Figure 4 To service access requests.

[0028] Figure 5 For intelligent processing of requests.

[0029] Figure 6 Request result for the service.

[0030] Figure 7 To expand some service codes.

[0031] Figure 8 To run some samples of the database. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0033] like Figure 1 As shown in the figure, the architecture of an intelligent service framework is a four-layer architecture system: application layer, decision optimization layer, intelligent service layer and communication layer. Among them:

[0034] (1) Application layer

[0035] The application layer is mainly the H5 standard front-end page developed by users, which is responsible for interacting with users and displaying and updating the interface.

[0036] The application layer completes the construction of the graphics rendering page based on the front-end framework VUE; the business logic is controlled by ES6 standard JavaScript. Here, the JavaScript API encapsulated by the intelligent service framework is used to initiate the corresponding intelligent service access request to realize intelligent service access.

[0037] (2) Communication layer

[0038] The communication layer mainly implements the communication client and server based on the websocket protocol. The communication client is responsible for monitoring the service access request information from the application layer and the service processing result information from the communication server; the communication server is responsible for monitoring the intelligent processing request information from the communication client and the service processing result information from the intelligent service engine.

[0039] The communication client listens to and processes two parts of the message: on the one hand, it parses the service access request from the application layer, records the application layer callback processing function and the corresponding unique ID assigned to the database, reorganizes the ID and the part except the callback function into an intelligent processing request and forwards it to the communication server; on the other hand, it parses the service request result from the communication server, searches and calls the callback processing function corresponding to its ID in the database, and the parameter is the intelligent processing result part in the service request result, and then decides to remove it from the database or keep it according to the Keep parameter in the service request result. Figure 2 , build a communication client.

[0040] The communication server mainly monitors and processes two parts of messages: on the one hand, it directly forwards the intelligent processing request from the client to the decision optimization layer for processing; on the other hand, it forwards the service request results from the intelligent service engine to the communication client. Figure 3 , build a communication server.

[0041] like Figure 4 A service access request that complies with the intelligent service framework standard should include a request ID, a callback function CB, and an intelligent processing request field. The request ID is designed as a string type with an indefinite length and a maximum length of 256 bytes. Each request is randomly generated by the function. The callback function CB is designed as a two-parameter form. The first parameter is err, which is used to process the error result return, and the second parameter is data, which is used to obtain the correct processing result. The intelligent processing request is packaged in JsonString format.

[0042] like Figure 5 , an intelligent processing request that complies with the intelligent service framework standard should include fields such as service name serviceName, image path picPath, preheating optimization preheater, multithreading optimization multhread, and processor optimization process. The service name serviceName is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested service name, such as target detection (recognize); the image path picPath is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested image path, such as / sdcard / recognize.jpg; preheating preheater is designed as a Boolean type, and the default is true to preload the model and run it for the first time; multithreading multhread is designed as a Boolean type, and the default is false, and multithreading is not used to perform this task; the processor process is designed as a string type with a length of 3 bytes and the default is CPU, and the model inference service is completed through the system CPU.

[0043] like Figure 6, a service processing result information that meets the intelligent service framework standard should include the response ID, the result status flag status, the callback keep flag keep, and the intelligent service result result field. The response ID is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is consistent with the request ID in the service access request; the result status flag status is designed as a Boolean type. When the value is true, it means that the request service is fully executed, corresponding to the front-end executing the correct callback and obtaining the intelligent service results such as the coordinates and category information of the detected target. When the value is false, it means that the request service execution is interrupted, and the front-end callback function executes the wrong part for exception handling; the callback keep flag keep is designed as a Boolean type. When the value is true, it means that the front-end callback is executed and continues to wait for the next execution result. When the value is false, it means that this result is the last result and the front-end callback can be removed from the database; the intelligent service result result is designed as a json type with a maximum length of 65536 bytes. The field contains service content, such as the number of detected targets, target size, target category, etc.

[0044] (3) Decision Optimization Layer

[0045] The decision optimization layer mainly includes the decision engine and optimization strategy. The decision engine is used to monitor the intelligent processing request information from the communication service layer, and generate a unique optimization decision for the task in combination with the historical operation data of the model in the operation database; the optimization strategy includes model preheating, C / G / NPU processor, etc., for the decision engine to select and optimize; the operation database stores the historical data of the current device intelligent service model operation, including execution efficiency, accuracy, and CPU occupancy, for the decision engine to refer to for optimization.

[0046] The decision engine parses the intelligent processing request from the communication server, first obtains the service name serviceName, determines the specific content of the required service, such as the detection service, and then checks the options for its optimization parameters. If multhread is true, multi-threaded detection is enabled, if NPU is true, the NPU chip is started, if preHeater is true, the model is initialized and preheated, etc. At this time, you also need to check the running database, which contains multiple models for each service, and will record and update the execution efficiency, accuracy, cpu occupancy rate, etc. of the model running on the device. According to the single / comprehensive ranking of the service model, the most suitable execution model for the device for this task is automatically selected. The default selection scheme uses the execution accuracy ranking as the first factor, and then sorts by execution efficiency in the accuracy order. Select the currently supported cpu occupancy rate model from top to bottom, and finally send the selected model and optimization decision to the intelligent service layer.

[0047] (4) Intelligent service layer

[0048] The intelligent service layer mainly includes the intelligent service engine, basic services, extended services and operation database. The intelligent service engine is mainly responsible for monitoring the optimization execution request information from the decision optimization layer and distributing the request to the corresponding basic services or extended services; the basic services and extended services are both intelligent services. On the one hand, they are used to monitor the optimization execution request information distributed by the intelligent service engine and ultimately realize service functions, such as target detection, and on the other hand, they are used to send the model execution efficiency, accuracy, etc. to the operation database. The basic services are built-in services of the framework, and the extended services are other intelligent services developed by users based on the framework development specifications; the operation database receives the operation information from the basic services / extended services and updates the storage, and continuously optimizes the execution data of the model on this device.

[0049] The intelligent service engine monitors and processes messages from two aspects: on the one hand, it searches for intelligent services based on the model selected from the decision optimization layer, and forwards the model and optimization decision to the corresponding intelligent service; on the other hand, it receives and forwards the intelligent processing results of the intelligent service, packages them into service request results, and sends them to the communication server.

[0050] Intelligent services include already developed basic services and extended services. Basic services include widely used services: image classification services, target detection services, text detection services, and speech recognition services; extended services can develop other intelligent services based on framework development specifications or expand model categories on existing basic services. On the one hand, intelligent services monitor the models and optimization decisions from the intelligent service engine, select the model for actual preheating, multi-threading, and NPU processing, and send the intelligent processing results to the intelligent service engine; on the other hand, the execution efficiency, accuracy, and CPU occupancy of each processing are written into the running database. Figure 7 ,The extended service implements the intelligent service by inheriting the ,reasoning function, and finally returns the result to the intelligent ,service engine.

[0051] like Figure 8, the fields of the running database include serial number id, service services, model name modelname, model path modelpath, execution efficiency means, execution accuracy accuracy, cpu occupancy rate cpurass, etc. The serial number is of integer type and is sorted in sequence; the service services is of string type, indicating which type of intelligent service the current model belongs to and which model can be selected. If the application layer requests the detection service, the decision engine will check the data entries of model 1 and model 2 belonging to the detection service in the database; the model name modelname is of string type, marking the model name; the model path modelpath is of string type, indicating the model storage location, which is used for subsequent search and loading of the model; the execution efficiency means is of floating point type, indicating the time used by the model to execute tasks each time on this device and continuously accumulating and updating; the execution accuracy accuracy is of floating point type, indicating the accuracy of the model to execute tasks each time; the cpu occupancy rate cpurass is of floating point type, indicating the memory usage of the model when using the cpu to execute tasks.

[0052] In summary, the present invention is a service framework that supports front-end and back-end separation and intelligent platform deployment, supports standard HTML5 development, realizes rapid access and optimization of intelligent element modules, reduces the cost of intelligent application transplantation, and improves the software and hardware optimization level of the algorithm.

[0053] Example

[0054] In order to verify the effectiveness of the solution of the present invention, the following experimental design is carried out. In this embodiment, the development process of the cross-platform intelligent service framework for front-end development includes the following steps:

[0055] Step S10: Use the open source Hongmeng system development software DevEco Studio to build an OpenHarmony system application project. This project is used to compile the device software installation package. The directory structure of the project includes front-end page files, intelligent service files, framework files and configuration files. The front-end page file stores the user's H5 page source code, resource files and compiled front-end operation logic files, etc. The intelligent service file stores the compiled intelligent service file of voice recognition, the framework file stores the relevant front-end and back-end files of the intelligent service framework, and the configuration file stores the access files for peripheral services.

[0056] Step S20: Use the mainstream front-end framework to complete the page development for the application to interact with the user. After the development is completed, compile and copy the logic files such as the page data request to the S10 project structure directory.

[0057] Step S30: Under the newly created project in step S10, create a module for expanding the speech recognition service and write a processing interface for the Native operation reasoning code corresponding to the page data request in step S10. Store the specific function code related to speech recognition reasoning in the CPP directory of the module, such as initialization, preheating, recognition, etc., and return the result of the request to the front end through a fixed interface that interacts with the intelligent framework. Use the IDE to compile the speech recognition service code to generate the SO dynamic library file of the service, and copy it to the project structure directory of S10.

[0058] Step S40: Copy the extended service library file generated in the module of step S30 to the project structure directory of step S10, create a new configuration file to configure the accessed extended service path and service name, and use the framework's functions to parse and render the front-end page file. Use DevEco Studio software to package the project and install it on the device of the OpenHarmony system to complete the project.

[0059] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0060] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A cross-platform intelligent service framework for front-end development, It is characterized in that It consists of application layer, communication layer, decision optimization layer and intelligent service layer, among which: The application layer is the H5 standard front-end page, which is responsible for interacting with users and displaying and updating the interface; The communication layer includes the communication client and the communication server. The communication client is responsible for monitoring the service access request information from the application layer and the service processing result information from the communication server; the server is responsible for monitoring the service access request information from the communication client and the service processing result information from the intelligent service engine; The decision optimization layer includes the decision engine, optimization strategy and operation database. The decision engine is used to monitor the service access request information from the server and generate optimization execution request information for the task in combination with the historical operation data of the model in the operation database. The optimization strategy includes model preheating and C / G / NPU processors for the decision engine to select for optimization. The intelligent service layer includes the intelligent service engine, basic services, extended services and the operation database. The intelligent service engine is responsible for monitoring the optimization execution request information from the decision optimization layer and distributing the optimization execution request information to the corresponding basic services or extended services. Both the basic services and extended services are intelligent services. On the one hand, they are used to monitor the optimization execution request information distributed by the intelligent service engine and ultimately realize the service functions. On the other hand, they are used to send the operation information, including execution efficiency, execution accuracy and CPU occupancy rate, to the operation database. The basic services are built-in services of the framework, and the extended services are other intelligent services developed by users based on the framework development specifications. The operation database receives the operation information from the basic services / extended services and updates the storage for reference and optimization by the decision engine.

2. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that The service access request information includes the request ID, callback function CB, and intelligent processing request field. The request ID is designed as a string type with an indefinite length and a maximum length of 256 bytes. A different ID is randomly generated by the function for each request. The callback function CB is designed as a double-parameter form. The first parameter is err, which is used to process the error result return, and the second parameter is data, which is used to obtain the correct processing result. The intelligent processing request is packaged in JsonString format. The intelligent processing request includes the service name serviceName, image path picPath, preheating optimization preheater, multi-threading optimization multhread, and processor optimization process fields. The service name serviceName is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested service name; the image path picPath is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is used to describe the requested image path; preheating preheater is designed as a Boolean type, and the default is true to preload the model and run it for the first time; multi-threading multhread is designed as a Boolean type, and the default is false, and multi-threading is not used to perform this task; the processor process is designed as a string type with a length of 3 bytes and a default of CPU, and the model inference service is completed through the system CPU.

3. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that The service processing result information includes the response ID, the result status flag bit status, the callback hold flag bit keep, and the intelligent service result field. The response ID is designed as a string type with an indefinite length and a maximum length of 256 bytes, which is consistent with the request ID in the service access request. The result status flag bit status is designed as a Boolean type. When the value is true, it means that the request service is fully executed, and the corresponding front-end executes the correct callback and obtains the intelligent service result. When the value is false, it means that the request service execution is interrupted, and the corresponding front-end callback function executes the error part for exception handling. The callback hold flag keep is designed as a Boolean type. When the value is true, it means that the front-end callback will continue to be retained after the current execution and wait for the next execution result. When the value is false, it means that this result is the last result and the front-end callback can be removed from the database. The intelligent service result result is designed as a json type with a maximum length of 65536 bytes. The field contains the service content.

4. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that The application layer completes the construction of the graphics rendering page based on the front-end framework VUE; the business logic is controlled by ES6 standard JavaScript. Here, the JavaScript API encapsulated by the intelligent service framework is used to initiate the corresponding intelligent service access request to realize intelligent service access.

5. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that In the communication layer: The communication client listens to and processes two parts of the message: on the one hand, it parses the service access request from the application layer, records the application layer callback processing function and the corresponding unique ID allocated therein into the database, reorganizes the ID and the part except the callback function into an intelligent processing request and forwards it to the communication server; on the other hand, it parses the service request result from the communication server, searches and calls the callback processing function corresponding to its ID in the database, and the parameter is the intelligent processing result part in the service request result, and then decides to remove it from the database or keep it according to the keep parameter in the service request result; The communication server monitors and processes two parts of messages: on the one hand, it forwards the intelligent processing request from the communication client directly to the decision optimization layer for processing; on the other hand, it forwards the service request result from the intelligent service engine to the client.

6. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that In the decision optimization layer: The decision engine parses the intelligent processing request from the communication server. It first obtains the service name serviceName, determines the specific content of the required service, and then checks the options of its optimization parameters. If multhread is true, multi-thread detection is turned on; if NPU is true, the NPU chip is started; if preHeater is true, the model is initialized and preheated. At this time, you also need to check the running database, which contains multiple models for each service, and will record and update the execution efficiency, execution accuracy, and CPU occupancy of the model running on the device. According to the model ranking of the service, it automatically selects the execution model that best suits the device for this task, and finally sends the selected model and optimization decision to the intelligent service layer.

7. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that In the intelligent service layer: The intelligent service engine monitors and processes messages from two aspects: on the one hand, it searches for intelligent services based on the model selected by the decision optimization layer, and forwards the model and optimization decision to the corresponding intelligent service; on the other hand, it receives and forwards the intelligent processing results of the intelligent service, packages them into service request results, and sends them to the communication service end; Intelligent services include already developed basic services and extended services. Basic services include widely used services: image classification service, object detection service, text detection service, and speech recognition service. Extended services develop other intelligent services based on framework development specifications or expand model categories on existing basic services. On the one hand, the intelligent service monitors the models and optimization decisions from the intelligent service engine, selects the model for actual preheating, multi-threading, and NPU processing, and sends the intelligent processing results to the intelligent service engine; on the other hand, the accuracy, CPU occupancy, and execution efficiency of each processing are written into the operation database; The running database is a lightweight database service for mobile devices. On the one hand, it stores and updates the model data of each intelligent service operation and sorts the model data individually and comprehensively according to the accuracy, CPU occupancy rate, and execution efficiency. On the other hand, it provides the stored data to the decision optimization engine for optimizing the task for the device, and selects the model based on the sorting and the task's requirements for accuracy, CPU occupancy rate, and execution efficiency.

8. A cross-platform intelligent service framework for front-end development according to claim 1, It is characterized in that The fields of the running database include serial number id, service services, model name modelname, model path modelpath, execution efficiency means, execution accuracy accuracy, and CPU occupancy rate cpurass; the serial number is of integer type and is sorted in sequence; the service services is of string type, indicating which type of intelligent service selectable model the current model belongs to. If the application layer requests the detection service, the decision engine will check the data entries of model 1 and model 2 belonging to the detection service in the database; the model name modelname is of string type, marking the model name; the model path modelpath is of string type, indicating the model storage location, which is used for subsequent search and loading of the model; the execution efficiency means is of floating point type, indicating the time the model uses each time the device executes a task and is continuously accumulated and updated; the execution accuracy accuracy is of floating point type, indicating the accuracy of the model each time it executes a task; the CPU occupancy rate cpurass is of floating point type, indicating the memory usage when the model uses the CPU to execute tasks.