An application method, device, equipment and medium of AI development environment in Android system
By providing an AI development environment in mobile applications, users can customize AI functions, solving the problem of lack of open interfaces and separable algorithms in mobile applications, and achieving higher flexibility and expansion.
Patent Information
- Application Number
- CN202111593432.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The lack of open interfaces and separable algorithms in mobile applications has made it difficult for users to implement customized artificial intelligence functions, hindering the development of diversity of mobile applications.
Provides an AI development environment, which realizes user-defined AI functions by obtaining original application data, receiving AI development scripts built by users, executing AI processing and transmitting results to the application layer, displaying AI application data.
Allowing users to select and execute specific AI processing functions according to their needs enriches the user experience, improves the flexibility and expansion of the mobile terminal, and solves the problem that users find it difficult to implement customized AI functions.
Smart Images

Figure CN114327388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to an application method, device, electronic device and computer-readable storage medium of an AI development environment in an Android system. Background Art
[0002] With the iteration and update of smart phones, the data processing performance of mobile phones has also developed rapidly. People's demands for mobile phone performance and functions have also begun to diversify. Therefore, the application of artificial intelligence on mobile terminals has also begun to flourish.
[0003] However, most mobile applications today do not open relevant interfaces for users to develop functions on their own, and most applications are bundled with algorithms, making it difficult for users to separate them. This makes it difficult for users to realize their own ideas about artificial intelligence functions, hindering the diverse development of mobile applications. Summary of the invention
[0004] The present invention provides an application method, device and computer-readable storage medium of an AI development environment in an Android system, the main purpose of which is to solve the problem that it is difficult for users to realize their own functional ideas related to artificial intelligence, which hinders the diversified development of mobile applications.
[0005] To achieve the above object, the present invention provides an application method of an AI development environment in an Android system, comprising:
[0006] Get raw application data;
[0007] Receiving an AI development script set constructed by a user according to a preset AI application function, and selecting a target AI development script from the AI development script set;
[0008] Using the target AI development script to perform AI processing on the original application data to obtain AI application data;
[0009] The AI application data is transmitted to a pre-built application layer, and the application layer displays the AI application data, completing the AI application of the original application data.
[0010] Optionally, the obtaining original application data includes:
[0011] Receiving a data acquisition instruction, parsing the data acquisition instruction, and obtaining a target data interface;
[0012] Retrieving data at the target data interface to obtain application layer data;
[0013] The application layer data is mapped into a memory file by using the pre-built Android JNI layer, and the memory file is transferred to the pre-built kernel space through a shared memory method to obtain the original application data.
[0014] Optionally, the receiving of the AI development script set constructed by the user according to the preset AI application function includes:
[0015] According to the AI application functions, write a corresponding AI development application program set;
[0016] The AI development application program set is encapsulated to obtain the AI development script set.
[0017] Optionally, the selecting a target AI development script from the AI development script set includes:
[0018] Receive AI function requirements input by users,
[0019] According to the AI function requirement, a corresponding AI development script is selected from the AI development script set to obtain the target AI development script.
[0020] Optionally, the using the target AI development script to perform AI processing on the original application data to obtain AI application data includes:
[0021] Using the target AI development script to read the original application data in the kernel space, preprocessing the original application data to obtain standard application data;
[0022] Extracting features of the standard application data to obtain feature data;
[0023] The feature data is AI processed using the AI algorithm in the target AI development script, and the feature data after AI processing is rewritten into the kernel space to obtain the AI application data.
[0024] Optionally, transmitting the AI application data to a pre-built application layer, and the application layer displaying the AI application data, includes:
[0025] Using a pre-built Python server to read the AI application data in the kernel space, and encapsulating the read AI application data into the Python server interface to obtain the AI application data to be transmitted;
[0026] Using the monitoring thread in the Python server to capture the data request instruction of the application layer;
[0027] According to the data request instruction, the data to be transmitted is sent to the application layer, and the components of the application layer are used to display the AI application data.
[0028] Optionally, before receiving the AI development script set constructed by the user according to the preset AI application function, the method further includes:
[0029] Get the Android app;
[0030] Build a python editor and python development environment in the Android application.
[0031] In order to solve the above problems, the present invention also provides an application device of an AI development environment in an Android system, the device comprising:
[0032] An original application data acquisition module, used to acquire original application data;
[0033] An AI function selection module is used to receive an AI development script set constructed by a user according to a preset AI application function, and select a target AI development script from the AI development script set;
[0034] An AI data processing module, configured to perform AI processing on the original application data using the target AI development script to obtain AI application data;
[0035] The AI application display module is used to transmit the AI application data to the pre-built application layer, and the application layer displays the AI application data to complete the AI application of the original application data.
[0036] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0037] a memory storing at least one instruction; and
[0038] The processor executes the instructions stored in the memory to implement the application method of the above-mentioned AI development environment in the Android system.
[0039] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned AI development environment application method in the Android system.
[0040] Compared with the background technology: most of the applications on the mobile terminal nowadays do not open relevant interfaces for users to develop functions by themselves, and most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications. The embodiment of the present invention collects the original application data by receiving the user's data acquisition instruction. After obtaining the original application data, the user can select a specific target AI development script from the pre-built AI development script set according to their own needs to realize the corresponding AI processing function. Each AI development script in the AI development script set can realize a specific AI function according to the original application data. Through the target AI development script, the original application data can be specifically developed by AI, and then realize your own AI ideas, which greatly enriches the user's experience and makes the user's mobile terminal have very large flexibility and expansibility. Therefore, the application method, device, electronic device and computer-readable storage medium of the AI development environment proposed in the present invention in the Android system can solve the problem that most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of a method for applying an AI development environment in an Android system provided by an embodiment of the present invention;
[0042] Figure 2 for Figure 1 A detailed implementation flow chart of one of the steps in the process;
[0043] Figure 3 for Figure 1 A detailed implementation flow diagram of another step in FIG.
[0044] Figure 4 A functional module diagram of an application device of an AI development environment in an Android system provided by an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the structure of an electronic device for implementing a method for applying the AI development environment in an Android system provided by an embodiment of the present invention.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] The embodiment of the present application provides an application method of an AI development environment in an Android system. The execution subject of the application method of the AI development environment in the Android system includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the application method of the AI development environment in the Android system can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0049] Reference Figure 1 FIG. 1 is a flow chart of a method for applying an AI development environment in an Android system according to an embodiment of the present invention. In this embodiment, the method for applying the AI development environment in an Android system includes:
[0050] S1. Obtain original application data;
[0051] Specifically, the original application data refers to the data in the application layer in the Android system architecture, which can be obtained by mobile application software and preset devices, or by loading local videos, pictures, etc. For example: image data obtained by the mobile phone camera, voice data collected by the mobile phone microphone, etc.
[0052] For details, see Figure 2 As shown, the obtaining of original application data includes:
[0053] S11, receiving a data acquisition instruction, parsing the data acquisition instruction, and obtaining a target data interface;
[0054] S12, retrieving data from the target data interface to obtain application layer data;
[0055] S13. Using the pre-built Android JNI layer, the application layer data is mapped into a memory file, and the memory file is transferred to the pre-built kernel space through a shared memory method to obtain the original application data.
[0056] Optionally, the data acquisition instruction is triggered by a user clicking a related button in a pre-built client application, for example, clicking a camera button on a mobile phone, clicking a recording button on a mobile phone, etc. The Android system architecture can be divided into an application layer, an application framework layer, a system runtime layer, and a Linux kernel layer according to functions. The Android JNI layer is located in the application framework layer, and the kernel space is located in the Linux kernel layer. The JNI technology can be used to send the application layer data to the kernel space.
[0057] In the embodiment of the present invention, the application layer data can be mapped to the memory file by encapsulating C++ function memory, and then the memory file can be transferred to the kernel space by using shared memory.
[0058] In detail, the original application data can be obtained from the application layer using the application framework layer, and the application layer data is stored in the Linux kernel layer, and the data stored in the Linux kernel layer is not processed by AI.
[0059] The application framework layer provides various APIs that may be used to build applications. Some of the core applications that come with Android are completed using these APIs. All application development must comply with the principles of the application framework layer, and at the same time expand on this basis to access the API framework used by the core application. Android's application framework layer provides a series of class libraries required for the development of Android applications. Using a reuse mechanism, developers can quickly develop applications, conveniently and efficiently use the components of the Android platform itself or replace the various application components of the platform itself to realize AI application functions. The application framework layer may include: Android's four major components, activity manager, window manager, content provider, view system, package manager, notification manager and XMPP service, etc.
[0060] S2. Receive an AI development script set constructed by a user according to a preset AI application function, and select a target AI development script from the AI development script set;
[0061] In detail, the AI application function may include the current mainstream AI functions, such as: AI face-changing, image recognition, emotion recognition, etc. The AI development script set may be a set of scripts written in Python that can implement the AI application function. The target AI development script refers to a script file that can implement the AI application function specified by the user.
[0062] In the embodiment of the present invention, before receiving the AI development script set constructed by the user according to the preset AI application function, the method further includes:
[0063] Get the Android app;
[0064] Build a python editor and python development environment in the Android application.
[0065] In detail, the embodiment of the present invention can perform AI development based on Python language, and apply the AI development to the Android system. Therefore, the embodiment of the present invention first needs to build a Python development environment in the Android application, and the Python development environment can be obtained by associating the Python application with the Python editor in the Android application. In detail, the editor can use the vscode editor.
[0066] In an embodiment of the present invention, the receiving of an AI development script set constructed by a user according to a preset AI application function includes:
[0067] According to the AI application functions, write a corresponding AI development application program set;
[0068] The AI development application program set is encapsulated to obtain the AI development script set.
[0069] In detail, Python language can be used to write corresponding functional languages according to the AI application functions to implement corresponding AI application functions. For example, to implement AI face-changing, a corresponding AI face-changing application program can be written as needed.
[0070] In the embodiment of the present invention, the step of selecting a target AI development script from the AI development script set includes:
[0071] Receive AI function requirements input by users,
[0072] According to the AI function requirement, a corresponding AI development script is selected from the AI development script set to obtain the target AI development script.
[0073] It is understandable that users can select relevant AI function requirements according to their needs. For example, if a user selects the AI function of emotion recognition, the emotion recognition function can be realized when the user clicks the relevant button on the client.
[0074] S3, using the target AI development script to perform AI processing on the original application data to obtain AI application data;
[0075] In the embodiment of the present invention, the AI application data is data that realizes the user's required functions, such as: AI face-changing data, image recognition data, and emotion recognition data.
[0076] For details, see Figure 3As shown, the use of the target AI development script to perform AI processing on the original application data to obtain AI application data includes:
[0077] S31, using the target AI development script to read the original application data in the kernel space, performing preprocessing on the original application data to obtain standard application data;
[0078] S32, extracting features of the standard application data to obtain feature data;
[0079] S33. Perform AI processing on the feature data using the AI algorithm in the target AI development script, and rewrite the AI-processed feature data into the kernel space to obtain the AI application data.
[0080] Specifically, the AI processing is a data processing technology that realizes the functions that can be developed by existing AI technology, such as AI face-changing, image recognition, emotion recognition, etc.
[0081] In the embodiment of the present invention, the data processing method corresponding to the AI function can be queried according to the AI function required by the user. The Python logic program language corresponding to the data processing method is written using the existing Python programming environment, and then the script file is obtained by integrating the Python logic program language corresponding to the data processing method.
[0082] Specifically, a data interaction interface needs to be constructed to receive the original application data, and the original application data is subjected to predetermined AI processing by the AI technology in the AI development environment to obtain the AI application data. Finally, the AI application data can be transferred to the kernel space again through the data interaction interface.
[0083] In the embodiment of the present invention, the data to be processed needs to be digitized to facilitate subsequent AI technology processing. For example, file input data, photo input data, and camera real-time input data obtained from the application layer program layer can be used as the data to be processed. The data to be processed is converted into digital data through digital technologies such as voice coding, multimedia streaming, and image pixelation.
[0084] In detail, the preprocessing standard may be: preprocessing the digital data by data processing means such as image scaling, data normalization and data standardization to obtain the standard application data.
[0085] Optionally, in the embodiment of the present invention, existing feature extraction means such as VGG16, Darknet and Resnet can be used to extract features from the standardized data to obtain the feature data.
[0086] In an embodiment of the present invention, the AI processing can perform prediction processing on the feature data through feature prediction and prediction visualization. The feature prediction can obtain the prediction data by means of key point position prediction, prediction box offset prediction, and pixel point category prediction.
[0087] It should be understood that the prediction visualization can use key point connections, target frames, and area distinctions to visualize the prediction data, thereby obtaining the target data and realizing AI processing of the data.
[0088] S4. The AI application data is transmitted to a pre-built application layer, and the application layer displays the AI application data to complete the AI application of the original application data.
[0089] In detail, the application layer may refer to the application program layer. All applications installed on the mobile phone are in this layer, for example: programs that come with the mobile phone or software downloaded by the mobile phone.
[0090] In the embodiment of the present invention, the transmitting the AI application data to the pre-built application layer, and the application layer displaying the AI application data, includes:
[0091] Using a pre-built Python server to read the AI application data in the kernel space, and encapsulating the read AI application data into the Python server interface to obtain the AI application data to be transmitted;
[0092] Using the monitoring thread in the Python server to capture the data request instruction of the application layer;
[0093] According to the data request instruction, the data to be transmitted is sent to the application layer, and the components of the application layer are used to display the AI application data.
[0094] In an embodiment of the present invention, a pre-built Python server can be used to read the AI application data and encapsulate the AI application data into the service interface of the Python server, so that the application layer can call the AI application data.
[0095] In an embodiment of the present invention, it is necessary to build the monitoring thread in the Python server to monitor whether the application layer issues a data request instruction. When the application layer issues the data request instruction, the monitoring thread will receive the data request instruction in real time. When the monitoring thread obtains the data request instruction, it will start the data forwarding instruction, and use the data forwarding instruction to send the AI application data processed by AI to the application layer, so that the application layer can obtain the AI application data.
[0096] In detail, in the embodiment of the present invention, after the application layer obtains the AI application data, it will use the AI technology pre-set in the application layer to perform AI presentation on the AI application data, thereby realizing the application of AI functions on the mobile terminal. For example: AI face-changing, human hair color rendering and other AI functions.
[0097] Compared with the background technology: most of the applications on the mobile terminal nowadays do not open relevant interfaces for users to develop functions by themselves, and most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications. The embodiment of the present invention collects the original application data by receiving the user's data acquisition instruction. After obtaining the original application data, the user can select a specific target AI development script from the pre-built AI development script set according to their own needs to realize the corresponding AI processing function. Each AI development script in the AI development script set can realize a specific AI function according to the original application data. Through the target AI development script, the original application data can be specifically developed by AI, and then realize your own AI ideas, which greatly enriches the user's experience and makes the user's mobile terminal have very large flexibility and expansibility. Therefore, the application method, device, electronic device and computer-readable storage medium of the AI development environment proposed in the present invention in the Android system can solve the problem that most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications.
[0098] like Figure 4 , which is a functional module diagram of an application device of an AI development environment in an Android system provided by an embodiment of the present invention.
[0099] The application device 100 of the AI development environment in the Android system of the present invention can be installed in an electronic device. According to the functions implemented, the application device 100 of the AI development environment in the Android system may include an original application data acquisition module 101, an AI function selection module 102, an AI data processing module 103 and an AI application display module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0100] The original application data acquisition module 101 is used to acquire original application data;
[0101] Specifically, the original application data refers to the data in the application layer in the Android system architecture, which can be obtained by mobile application software and preset devices, or by loading local videos, pictures, etc. For example: image data obtained by the mobile phone camera, voice data collected by the mobile phone microphone, etc.
[0102] In detail, the obtaining of original application data includes:
[0103] Receiving a data acquisition instruction, parsing the data acquisition instruction, and obtaining a target data interface;
[0104] Retrieving data at the target data interface to obtain application layer data;
[0105] The application layer data is mapped into a memory file by using the pre-built Android JNI layer, and the memory file is transferred to the pre-built kernel space through a shared memory method to obtain the original application data.
[0106] Optionally, the data acquisition instruction is triggered by a user clicking a related button in a pre-built client application, for example, clicking a camera button on a mobile phone, clicking a recording button on a mobile phone, etc. The Android system architecture can be divided into an application layer, an application framework layer, a system runtime layer, and a Linux kernel layer according to functions. The Android JNI layer is located in the application framework layer, and the kernel space is located in the Linux kernel layer. The JNI technology can be used to send the application layer data to the kernel space.
[0107] In the embodiment of the present invention, the application layer data can be mapped to the memory file by encapsulating C++ function memory, and then the memory file can be transferred to the kernel space by using shared memory.
[0108] In detail, the original application data can be obtained from the application layer using the application framework layer, and the application layer data is stored in the Linux kernel layer, and the data stored in the Linux kernel layer is not processed by AI.
[0109] The application framework layer provides various APIs that may be used to build applications. Some of the core applications that come with Android are completed using these APIs. All application development must comply with the principles of the application framework layer, and at the same time expand on this basis to access the API framework used by the core application. Android's application framework layer provides a series of class libraries required for the development of Android applications. Using a reuse mechanism, developers can quickly develop applications, conveniently and efficiently use the components of the Android platform itself or replace the various application components of the platform itself to realize AI application functions. The application framework layer may include: Android's four major components, activity manager, window manager, content provider, view system, package manager, notification manager and XMPP service, etc.
[0110] The AI function selection module 102 is used to receive an AI development script set constructed by a user according to a preset AI application function, and select a target AI development script from the AI development script set;
[0111] In detail, the AI application function may include the current mainstream AI functions, such as: AI face-changing, image recognition, emotion recognition, etc. The AI development script set may be a set of scripts written in Python that can implement the AI application function. The target AI development script refers to a script file that can implement the AI application function specified by the user.
[0112] In the embodiment of the present invention, before receiving the AI development script set constructed by the user according to the preset AI application function, the method further includes:
[0113] Get the Android app;
[0114] Build a python editor and python development environment in the Android application.
[0115] In detail, the embodiment of the present invention can perform AI development based on Python language, and apply the AI development to the Android system. Therefore, the embodiment of the present invention first needs to build a Python development environment in the Android application, and the Python development environment can be obtained by associating the Python application with the Python editor in the Android application. In detail, the editor can use the vscode editor.
[0116] In an embodiment of the present invention, the receiving of an AI development script set constructed by a user according to a preset AI application function includes:
[0117] According to the AI application functions, write a corresponding AI development application program set;
[0118] The AI development application program set is encapsulated to obtain the AI development script set.
[0119] In detail, Python language can be used to write corresponding functional languages according to the AI application functions to implement corresponding AI application functions. For example, to implement AI face-changing, a corresponding AI face-changing application program can be written as needed.
[0120] In the embodiment of the present invention, the step of selecting a target AI development script from the AI development script set includes:
[0121] Receive AI function requirements input by users,
[0122] According to the AI function requirement, a corresponding AI development script is selected from the AI development script set to obtain the target AI development script.
[0123] It is understandable that users can select relevant AI function requirements according to their needs. For example, if a user selects the AI function of emotion recognition, the emotion recognition function can be realized when the user clicks the relevant button on the client.
[0124] The AI data processing module 103 is used to perform AI processing on the original application data using the target AI development script to obtain AI application data;
[0125] In the embodiment of the present invention, the AI application data is data that realizes the user's required functions, such as: AI face-changing data, image recognition data, and emotion recognition data.
[0126] In detail, the using the target AI development script to perform AI processing on the original application data to obtain AI application data includes:
[0127] Using the target AI development script to read the original application data in the kernel space, preprocessing the original application data to obtain standard application data;
[0128] Extracting features of the standard application data to obtain feature data;
[0129] The feature data is AI processed using the AI algorithm in the target AI development script, and the feature data after AI processing is rewritten into the kernel space to obtain the AI application data.
[0130] Specifically, the AI processing is a data processing technology that realizes the functions that can be developed by existing AI technology, such as AI face-changing, image recognition, emotion recognition, etc.
[0131] In the embodiment of the present invention, the data processing method corresponding to the AI function can be queried according to the AI function required by the user. The Python logic program language corresponding to the data processing method is written using the existing Python programming environment, and then the script file is obtained by integrating the Python logic program language corresponding to the data processing method.
[0132] Specifically, a data interaction interface needs to be constructed to receive the original application data, and the original application data is subjected to predetermined AI processing by the AI technology in the AI development environment to obtain the AI application data. Finally, the AI application data can be transferred to the kernel space again through the data interaction interface.
[0133] In the embodiment of the present invention, the data to be processed needs to be digitized to facilitate subsequent AI technology processing. For example, file input data, photo input data, and camera real-time input data obtained from the application layer program layer can be used as the data to be processed. The data to be processed is converted into digital data through digital technologies such as voice coding, multimedia streaming, and image pixelation.
[0134] In detail, the preprocessing standard may be: preprocessing the digital data by data processing means such as image scaling, data normalization and data standardization to obtain the standard application data.
[0135] Optionally, in the embodiment of the present invention, existing feature extraction means such as VGG16, Darknet and Resnet can be used to extract features from the standardized data to obtain the feature data.
[0136] In an embodiment of the present invention, the AI processing can perform prediction processing on the feature data through feature prediction and prediction visualization. The feature prediction can obtain the prediction data by means of key point position prediction, prediction box offset prediction, and pixel point category prediction.
[0137] It should be understood that the prediction visualization can use key point connections, target frames, and area distinctions to visualize the prediction data, thereby obtaining the target data and realizing AI processing of the data.
[0138] The AI application display module 104 is used to transmit the AI application data to the pre-built application layer, and the application layer displays the AI application data to complete the AI application of the original application data.
[0139] In detail, the application layer may refer to the application program layer. All applications installed on the mobile phone are in this layer, for example: programs that come with the mobile phone or software downloaded by the mobile phone.
[0140] In the embodiment of the present invention, the transmitting the AI application data to the pre-built application layer, and the application layer displaying the AI application data, includes:
[0141] Using a pre-built Python server to read the AI application data in the kernel space, and encapsulating the read AI application data into the Python server interface to obtain the AI application data to be transmitted;
[0142] Using the monitoring thread in the Python server to capture the data request instruction of the application layer;
[0143] According to the data request instruction, the data to be transmitted is sent to the application layer, and the components of the application layer are used to display the AI application data.
[0144] In an embodiment of the present invention, a pre-built Python server can be used to read the AI application data and encapsulate the AI application data into the service interface of the Python server, so that the application layer can call the AI application data.
[0145] In an embodiment of the present invention, it is necessary to build the monitoring thread in the Python server to monitor whether the application layer issues a data request instruction. When the application layer issues the data request instruction, the monitoring thread will receive the data request instruction in real time. When the monitoring thread obtains the data request instruction, it will start the data forwarding instruction, and use the data forwarding instruction to send the AI application data processed by AI to the application layer, so that the application layer can obtain the AI application data.
[0146] In detail, in the embodiment of the present invention, after the application layer obtains the AI application data, it will use the AI technology pre-set in the application layer to perform AI presentation on the AI application data, thereby realizing the application of AI functions on the mobile terminal. For example: AI face-changing, human hair color rendering and other AI functions.
[0147] In detail, the AI development environment in the embodiment of the present invention can produce the following technical effects in the application device 100 in the Android system:
[0148] Compared with the background technology: most of the applications on the mobile terminal nowadays do not open relevant interfaces for users to develop functions by themselves, and most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications. The embodiment of the present invention collects the original application data by receiving the user's data acquisition instruction. After obtaining the original application data, the user can select a specific target AI development script from the pre-built AI development script set according to their own needs to realize the corresponding AI processing function. Each AI development script in the AI development script set can realize a specific AI function according to the original application data. Through the target AI development script, the original application data can be specifically developed by AI, and then realize your own AI ideas, which greatly enriches the user's experience and makes the user's mobile terminal have very large flexibility and expansibility. Therefore, the application method, device, electronic device and computer-readable storage medium of the AI development environment proposed in the present invention in the Android system can solve the problem that most applications are bundled with algorithms, which makes it difficult for users to separate them, making it difficult for users to realize their own functional ideas about artificial intelligence, hindering the diversified development of mobile applications.
[0149] like Figure 5 , which is a schematic diagram of the structure of an electronic device for implementing an application method of an AI development environment in an Android system provided by an embodiment of the present invention.
[0150] The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an application 12 of an AI development environment in an Android system.
[0151] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the application 12 of the AI development environment in the Android system, but also can be used to temporarily store data that has been output or is to be output.
[0152] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes the programs or modules stored in the memory 11 (such as the application program of the AI development environment in the Android system, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0153] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0154] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0155] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0156] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0157] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0158] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0159] The application 12 of the AI development environment in the Android system stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can achieve:
[0160] Get raw application data;
[0161] Receiving an AI development script set constructed by a user according to a preset AI application function, and selecting a target AI development script from the AI development script set;
[0162] Using the target AI development script to perform AI processing on the original application data to obtain AI application data;
[0163] The AI application data is transmitted to a pre-built application layer, and the application layer displays the AI application data, completing the AI application of the original application data.
[0164] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0165] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0166] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0167] Get raw application data;
[0168] Receiving an AI development script set constructed by a user according to a preset AI application function, and selecting a target AI development script from the AI development script set;
[0169] Using the target AI development script to perform AI processing on the original application data to obtain AI application data;
[0170] The AI application data is transmitted to a pre-built application layer, and the application layer displays the AI application data, completing the AI application of the original application data.
[0171] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0172] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0174] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0175] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0176] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0177] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An application method of AI development environment in Android system, It is characterized in that The method comprises: Get raw application data; Receiving an AI development script set constructed by a user according to a preset AI application function, and selecting a target AI development script from the AI development script set; Using the target AI development script to perform AI processing on the original application data to obtain AI application data; The AI application data is transmitted to a pre-built application layer, and the application layer displays the AI application data, completing the AI application of the original application data; The receiving user builds an AI development script set according to a preset AI application function, including: According to the AI application functions, write a corresponding AI development application program set; Encapsulating the AI development application set to obtain the AI development script set; The selecting a target AI development script from the AI development script set includes: Receive AI function requirements input by users, According to the AI function requirement, a corresponding AI development script is selected from the AI development script set to obtain the target AI development script; The using the target AI development script to perform AI processing on the original application data to obtain AI application data includes: Using the target AI development script to read the original application data in the kernel space, preprocessing the original application data to obtain standard application data; Extracting features of the standard application data to obtain feature data; The feature data is AI processed using the AI algorithm in the target AI development script, and the feature data after AI processing is rewritten into the kernel space to obtain the AI application data.
2. The method for applying the AI development environment in the Android system as claimed in claim 1, It is characterized in that The obtaining of original application data includes: Receiving a data acquisition instruction, parsing the data acquisition instruction, and obtaining a target data interface; Retrieving data at the target data interface to obtain application layer data; The application layer data is mapped into a memory file by using the pre-built Android JNI layer, and the memory file is transferred to the pre-built kernel space through a shared memory method to obtain the original application data.
3. The method for applying the AI development environment in the Android system as claimed in claim 1, It is characterized in that The transmitting the AI application data to a pre-built application layer, and the application layer displaying the AI application data, includes: Using a pre-built Python server to read the AI application data in the kernel space, and encapsulating the read AI application data into the Python server interface to obtain the AI application data to be transmitted; Using the monitoring thread in the Python server to capture the data request instruction of the application layer; According to the data request instruction, the data to be transmitted is sent to the application layer, and the components of the application layer are used to display the AI application data.
4. The method for applying the AI development environment in an Android system as claimed in claim 1, It is characterized in that Before receiving the AI development script set constructed by the user according to the preset AI application function, the method further includes: Get the Android app; Build a python editor and python development environment in the Android application.
5. An application device of an AI development environment in an Android system, It is characterized in that The device comprises: An original application data acquisition module, used to acquire original application data; An AI function selection module is used to receive an AI development script set constructed by a user according to a preset AI application function, and select a target AI development script from the AI development script set; An AI data processing module, configured to perform AI processing on the original application data using the target AI development script to obtain AI application data; An AI application display module is used to transmit the AI application data to a pre-built application layer, and the application layer displays the AI application data to complete the AI application of the original application data; The receiving user builds an AI development script set according to a preset AI application function, including: According to the AI application functions, write a corresponding AI development application program set; Encapsulating the AI development application set to obtain the AI development script set; The selecting a target AI development script from the AI development script set includes: Receive AI function requirements input by users, According to the AI function requirement, a corresponding AI development script is selected from the AI development script set to obtain the target AI development script; The using the target AI development script to perform AI processing on the original application data to obtain AI application data includes: Using the target AI development script to read the original application data in the kernel space, preprocessing the original application data to obtain standard application data; Extracting features of the standard application data to obtain feature data; The feature data is AI processed using the AI algorithm in the target AI development script, and the feature data after AI processing is rewritten into the kernel space to obtain the AI application data.
6. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the application method of the AI development environment in the Android system as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by the processor, the method for applying the AI development environment in the Android system as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Artificial intelligence function providing method and device and storage medium
CN112148267A