CN114327388A - Application method, device, equipment and medium of AI development environment in Android system - Google Patents

Application method, device, equipment and medium of AI development environment in Android system Download PDF

Info

Publication number
CN114327388A
CN114327388A CN202111593432.4A CN202111593432A CN114327388A CN 114327388 A CN114327388 A CN 114327388A CN 202111593432 A CN202111593432 A CN 202111593432A CN 114327388 A CN114327388 A CN 114327388A
Authority
CN
China
Prior art keywords
application
data
development
application data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111593432.4A
Other languages
Chinese (zh)
Inventor
孙晓刚
杨玖泞
林云
蒋长良
唐泽宇
白维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Agaxi Intelligent Technology Co ltd
Original Assignee
Chengdu Agaxi Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Agaxi Intelligent Technology Co ltd filed Critical Chengdu Agaxi Intelligent Technology Co ltd
Priority to CN202111593432.4A priority Critical patent/CN114327388A/en
Publication of CN114327388A publication Critical patent/CN114327388A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the field of artificial intelligence, and discloses an application method of an AI development environment in an Android system, which comprises the following steps: acquiring original 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 in the AI development script set; performing AI processing on the original application data by using the target AI development script to obtain AI application data; and transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to finish the AI application of the original application data. The invention also provides an application device of the AI development environment in the Android system, electronic equipment and a computer readable storage medium. The invention can solve the problem that the user is difficult to realize the function assumption of the user about artificial intelligence and the diversity development of the mobile application is hindered.

Description

Application method, device, equipment and medium of AI development environment in Android system
Technical Field
The invention relates to the field of artificial intelligence, in particular to an application method and device of an AI development environment in an Android system, electronic equipment and a computer-readable storage medium.
Background
With the iterative update of the smart phone, the data processing performance of the smart phone is rapidly developed. The demands placed on handset capabilities and functionality are also beginning to become diversified. Therefore, the application of artificial intelligence to the mobile end is also developing.
However, most applications of the mobile terminal do not have open related interfaces for users to develop functions by themselves, and most applications are bound with algorithms, so that the users are difficult to separate the applications, the users are difficult to realize the function assumption about artificial intelligence, and the diversity development of the mobile applications is hindered.
Disclosure of Invention
The invention provides an application method and device of an AI development environment in an Android system and a computer readable storage medium, and mainly aims to solve the problems that a user cannot easily realize the function assumption of artificial intelligence and the diversity development of mobile application is hindered.
In order to achieve the above object, the application method of the AI development environment in the Android system provided by the present invention includes:
acquiring original 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 in the AI development script set;
performing AI processing on the original application data by using the target AI development script to obtain AI application data;
and transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to finish the AI application of the original application data.
Optionally, the obtaining the original application data includes:
receiving a data acquisition instruction, and analyzing the data acquisition instruction to obtain a target data interface;
data is called at the target data interface to obtain application layer data;
and mapping the application layer data into a memory file by using a pre-constructed Android JNI layer, and transmitting the memory file to a pre-constructed kernel space in a memory sharing mode to obtain the original application data.
Optionally, the receiving an AI development script set constructed by a user according to a preset AI application function includes:
compiling a corresponding AI development application program set according to the AI application function;
and packaging the AI development application program set to obtain the AI development script set.
Optionally, the selecting a target AI development script in the AI development script set includes:
an AI function requirement input by a user is received,
and selecting a corresponding AI development script in the AI development script set according to the AI function requirement to obtain the target AI development script.
Optionally, the performing, by using the target AI development script, an AI process on the original application data to obtain AI application data includes:
reading original application data in the kernel space by using the target AI development script, and performing preprocessing on the original application data to obtain standard application data;
extracting the characteristics of the standard application data to obtain characteristic data;
and performing AI processing on the characteristic data by using the AI algorithm in the target AI development script, and rewriting the characteristic data after the AI processing into the kernel space to obtain the AI application data.
Optionally, the transmitting the AI application data to a pre-built application layer, and the application layer presenting the AI application data, includes:
reading AI application data of the kernel space by using a pre-constructed Python server, and packaging the read AI application data to the Python server interface to obtain AI application data to be transmitted;
capturing a data request instruction of the application layer by using a monitoring thread in the Python server;
and sending the data to be transmitted to the application layer according to the data request instruction, and displaying the AI application data by utilizing the components of the application layer.
Optionally, before receiving an AI development script set constructed by a user according to a preset AI application function, the method further includes:
obtaining an android application;
and building a python editor and a python development environment in the android application.
In order to solve the above problem, the present invention further provides an application apparatus of an AI development environment in an Android system, where the apparatus includes:
the original application data acquisition module is used for acquiring original application data;
the AI function selection module is used for receiving an AI development script set constructed by a user according to a preset AI application function and selecting a target AI development script in the AI development script set;
the AI data processing module is used for executing AI processing on the original application data by using the target AI development script to obtain AI application data;
and the AI application display module is used for transmitting the AI application data to a pre-constructed application layer, and the application layer displays the AI application data to complete the AI application of the original application data.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the application method of the AI development environment in the Android system.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the method for applying the AI development environment in the Android system.
Compared with the background art: most applications of a mobile terminal do not have open related interfaces for users to develop functions by themselves, most applications are bound with an algorithm, and the users are difficult to separate the applications, so that the users are difficult to realize own function assumption about artificial intelligence, and the phenomenon of diversity development of mobile applications is hindered. After the original application data is acquired, a user can select a specific target AI development script in a pre-constructed AI development script set according to the needs of the user to realize a corresponding AI processing function, and 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, specific AI development can be carried out on the original application data, and then the AI idea of oneself is realized, user's use experience is greatly enriched for user's mobile terminal has very big flexibility and expansibility. Therefore, the application method, the application device, the electronic equipment and the computer readable storage medium of the AI development environment in the Android system can solve the problems that most applications are bound with the algorithm, the user is difficult to separate the applications, the user is difficult to realize the function assumption about artificial intelligence, and the diversity development of mobile applications is hindered.
Drawings
Fig. 1 is a schematic flowchart illustrating an application method of an AI development environment in an Android system according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart showing a detailed implementation of one of the steps in FIG. 1;
FIG. 3 is a schematic flow chart showing another step of FIG. 1;
fig. 4 is a functional block diagram of an application device in an Android system in an AI development environment according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the method for applying the AI development environment to the Android system according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the 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 electronic devices such as a server and a terminal 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 may be executed by software or hardware installed in the terminal device or the server device, and the software may 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, and the like.
Referring to fig. 1, a schematic flowchart of an application method of an AI development environment in an Android system according to an embodiment of the present invention is shown. In this embodiment, the method for applying the AI development environment to the Android system includes:
s1, acquiring original application data;
in detail, the original application data refers to data in an application program layer in an Android system architecture, and can be acquired by mobile terminal application software and a preset device, or acquired by loading a local video, a picture and the like. For example: the mobile phone comprises image data acquired by a mobile phone camera, voice data recorded by a mobile phone microphone and the like.
In detail, referring to fig. 2, the acquiring of the original application data includes:
s11, receiving a data acquisition instruction, and analyzing the data acquisition instruction to obtain a target data interface;
s12, calling data from the target data interface to obtain application layer data;
s13, mapping the application layer data into a memory file by using a pre-constructed Android JNI layer, and transmitting the memory file to a pre-constructed kernel space in a memory sharing mode to obtain the original application data.
Optionally, the data obtaining instruction is triggered by a user clicking a relevant button on a pre-built client application, for example: clicking a camera shooting button of the mobile phone, clicking a recording button of the mobile phone, and the like. The Android system architecture can be divided into an application program layer, an application program framework layer, a system operation library layer and a Linux kernel layer according to function division. The Android JNI layer is located in the application program framework layer, and the kernel space is located in the Linux kernel layer. The application layer data may be sent to the kernel space using JNI techniques.
In the embodiment of the present invention, the application layer data may be mapped into the memory file by packaging a C + + function memory, and the memory file is transferred to the kernel space by using a shared memory.
In detail, the original application data may be acquired from the application framework layer by 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 subject to AI processing.
The application framework layer provides various APIs that may be used to build applications, and some core applications of android itself are completed using these APIs. All application development must adhere to the principles of the application framework layer, and extensions are made on this basis to access the API framework used by the core application. The android application framework layer provides a series of class libraries required for developing android applications, a reuse mechanism is adopted, developers can perform rapid application development, assemblies of the android platform or various application assemblies of the alternative platform can be conveniently and efficiently used, and AI application functions are achieved. The application framework layer may include: the system comprises four Android components, an activity manager, a window manager, a content provider, a view system, a package manager, a notification manager, an XMPP service and the like.
S2, receiving an AI development script set constructed by a user according to a preset AI application function, and selecting a target AI development script in the AI development script set;
in detail, the AI application function may include currently mainstream AI functions, such as: AI face exchange, image recognition, emotion recognition, and the like. The AI development script set may be a script set written based on Python language that can implement the AI application function. The target AI development script refers to a script file that can implement a user-specified AI application function.
In an embodiment of the present invention, before receiving an AI development script set constructed by a user according to a preset AI application function, the method further includes:
obtaining an android application;
and building a python editor and a python development environment in the android application.
In detail, the embodiment of the invention can be used for developing the AI based on the Python language and applying the AI development to the Android system. Therefore, in the embodiment of the invention, firstly, a development environment of Python needs to be built in the android application, and the Python development environment can be obtained by associating a Python application program with the Python editor in the android application. In detail, the editor may employ a vscode editor.
In the embodiment of the present invention, the receiving an AI development script set constructed by a user according to a preset AI application function includes:
compiling a corresponding AI development application program set according to the AI application function;
and packaging the AI development application program set to obtain the AI development script set.
In detail, a Python language can be used to write a corresponding functional language according to the AI application function, so as to implement a corresponding AI application function, for example: and 3, AI face changing is realized, and a corresponding AI face changing application program can be written according to the requirement.
In an embodiment of the present invention, the selecting a target AI development script in the AI development script set includes:
an AI function requirement input by a user is received,
and selecting a corresponding AI development script in the AI development script set according to the AI function requirement to obtain the target AI development script.
Understandably, the user can select the relevant AI function requirements by himself according to the needs, such as: and when the user selects the AI function of emotion recognition, the function of emotion recognition can be realized when the user clicks the relevant button on the client.
S3, executing AI processing on the original application data by using the target AI development script to obtain AI application data;
in the embodiment of the present invention, the AI application data is data that realizes a function required by a user, for example: AI face changing data, picture recognition data, emotion recognition data, and the like.
In detail, referring to fig. 3, the obtaining AI application data by performing AI processing on the original application data by using the target AI development script includes:
s31, reading original application data in the kernel space by using the target AI development script, and preprocessing the original application data to obtain standard application data;
s32, extracting the characteristics of the standard application data to obtain characteristic data;
and S33, performing AI processing on the characteristic data by using the AI algorithm in the target AI development script, and rewriting the AI-processed characteristic data into the kernel space to obtain the AI application data.
In detail, the AI process is a data processing technology that implements functions that can be developed by the existing AI technology. For example: AI face exchange, image recognition, emotion recognition, and the like.
In the embodiment of the invention, the data processing mode corresponding to the AI function can be inquired according to the AI function required by the user. And compiling a Python logic program language corresponding to the data processing mode by utilizing the existing Python programming environment, and integrating to obtain the script file according to the Python logic program language corresponding to the data processing mode.
In detail, a data interaction interface needs to be constructed to receive the original application data, and the AI application data is obtained by performing predetermined AI processing on the original application data through an AI technology in an AI development environment. Finally, the AI application data can be passed to the kernel space again through the data interaction interface.
In the embodiment of the invention, the data to be processed needs to be digitally processed, so that the subsequent AI technical processing is facilitated. For example: data such as file input data, photographing input data, camera real-time input data and the like acquired from the application layer program layer can be used as the data to be processed. And converting the data to be processed into digital data by the digitalization technologies such as voice coding, multimedia streaming, image pixelation and the like.
In detail, the pre-processing criteria may be: and preprocessing the digitized data by data processing means such as picture scaling, data normalization and data standardization to obtain the standard application data.
Optionally, in the embodiment of the present invention, feature extraction may be performed on the normalized data by using existing feature extraction means such as VGG16, Darknet, Resnet, and the like, so as to obtain the feature data.
In the embodiment of the present invention, the AI process may perform prediction processing on the feature data through feature prediction and prediction visualization. The feature prediction can adopt means such as key point position prediction, prediction frame offset prediction, pixel point category prediction and the like to obtain the prediction data.
It should be understood that the prediction visualization may utilize means such as key point connection, target frame and region differentiation to perform visualization operation on the prediction data, so as to obtain the target data and implement AI processing of data.
S4, transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to complete the AI application of the original application data.
In detail, the application layer may refer to the application layer. All applications installed on the handset are in this layer, for example: the mobile phone is provided with a program or software downloaded by the mobile phone.
In this embodiment of the present invention, the transmitting the AI application data to a pre-constructed application layer, and the displaying the AI application data by the application layer, includes:
reading AI application data of the kernel space by using a pre-constructed Python server, and packaging the read AI application data to the Python server interface to obtain AI application data to be transmitted;
capturing a data request instruction of the application layer by using a monitoring thread in the Python server;
and sending the data to be transmitted to the application layer according to the data request instruction, and displaying the AI application data by utilizing the components of the application layer.
In the embodiment of the invention, the AI application data can be read by utilizing the pre-established Python server and encapsulated to the service interface of the Python server, so that the application program layer can conveniently call the AI application data.
In the embodiment of the present invention, the monitoring thread needs to be built in the Python server to monitor whether the application layer sends a data request instruction. When the application layer sends the data request instruction, the monitoring thread receives the data request instruction in real time. When the monitoring thread acquires the data request instruction, a data forwarding instruction is started, and the AI application data subjected to AI processing is sent to the application layer by using the data forwarding instruction, so that the application layer acquires the AI application data.
In detail, in the embodiment of the present invention, after the application layer obtains the AI application data, the AI application data is subjected to AI presentation by using an AI technology preset in the application layer, so as to implement application of an AI function to a mobile terminal. For example: and AI functions such as face changing and human hair color rendering.
Compared with the background art: most applications of a mobile terminal do not have open related interfaces for users to develop functions by themselves, most applications are bound with an algorithm, and the users are difficult to separate the applications, so that the users are difficult to realize own function assumption about artificial intelligence, and the phenomenon of diversity development of mobile applications is hindered. After the original application data is acquired, a user can select a specific target AI development script in a pre-constructed AI development script set according to the needs of the user to realize a corresponding AI processing function, and 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, specific AI development can be carried out on the original application data, and then the AI idea of oneself is realized, user's use experience is greatly enriched for user's mobile terminal has very big flexibility and expansibility. Therefore, the application method, the application device, the electronic equipment and the computer readable storage medium of the AI development environment in the Android system can solve the problems that most applications are bound with the algorithm, the user is difficult to separate the applications, the user is difficult to realize the function assumption about artificial intelligence, and the diversity development of mobile applications is hindered.
Fig. 4 is a functional block diagram of an application device in an Android system in an AI development environment according to an embodiment of the present invention.
The application device 100 of the AI development environment in the Android system according to the present invention may be installed in an electronic device. According to the realized functions, the application device 100 of the AI development environment in the Android system may include an original application data obtaining module 101, an AI function selecting module 102, an AI data processing module 103, and an AI application displaying module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
The original application data obtaining module 101 is configured to obtain original application data;
in detail, the original application data refers to data in an application program layer in an Android system architecture, and can be acquired by mobile terminal application software and a preset device, or acquired by loading a local video, a picture and the like. For example: the mobile phone comprises image data acquired by a mobile phone camera, voice data recorded by a mobile phone microphone and the like.
In detail, the acquiring the raw application data includes:
receiving a data acquisition instruction, and analyzing the data acquisition instruction to obtain a target data interface;
data is called at the target data interface to obtain application layer data;
and mapping the application layer data into a memory file by using a pre-constructed Android JNI layer, and transmitting the memory file to a pre-constructed kernel space in a memory sharing mode to obtain the original application data.
Optionally, the data obtaining instruction is triggered by a user clicking a relevant button on a pre-built client application, for example: clicking a camera shooting button of the mobile phone, clicking a recording button of the mobile phone, and the like. The Android system architecture can be divided into an application program layer, an application program framework layer, a system operation library layer and a Linux kernel layer according to function division. The Android JNI layer is located in the application program framework layer, and the kernel space is located in the Linux kernel layer. The application layer data may be sent to the kernel space using JNI techniques.
In the embodiment of the present invention, the application layer data may be mapped into the memory file by packaging a C + + function memory, and the memory file is transferred to the kernel space by using a shared memory.
In detail, the original application data may be acquired from the application framework layer by 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 subject to AI processing.
The application framework layer provides various APIs that may be used to build applications, and some core applications of android itself are completed using these APIs. All application development must adhere to the principles of the application framework layer, and extensions are made on this basis to access the API framework used by the core application. The android application framework layer provides a series of class libraries required for developing android applications, a reuse mechanism is adopted, developers can perform rapid application development, assemblies of the android platform or various application assemblies of the alternative platform can be conveniently and efficiently used, and AI application functions are achieved. The application framework layer may include: the system comprises four Android components, an activity manager, a window manager, a content provider, a view system, a package manager, a notification manager, an XMPP service and the like.
The AI function selection module 102 is configured 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 in the AI development script set;
in detail, the AI application function may include currently mainstream AI functions, such as: AI face exchange, image recognition, emotion recognition, and the like. The AI development script set may be a script set written based on Python language that can implement the AI application function. The target AI development script refers to a script file that can implement a user-specified AI application function.
In an embodiment of the present invention, before receiving an AI development script set constructed by a user according to a preset AI application function, the method further includes:
obtaining an android application;
and building a python editor and a python development environment in the android application.
In detail, the embodiment of the invention can be used for developing the AI based on the Python language and applying the AI development to the Android system. Therefore, in the embodiment of the invention, firstly, a development environment of Python needs to be built in the android application, and the Python development environment can be obtained by associating a Python application program with the Python editor in the android application. In detail, the editor may employ a vscode editor.
In the embodiment of the present invention, the receiving an AI development script set constructed by a user according to a preset AI application function includes:
compiling a corresponding AI development application program set according to the AI application function;
and packaging the AI development application program set to obtain the AI development script set.
In detail, a Python language can be used to write a corresponding functional language according to the AI application function, so as to implement a corresponding AI application function, for example: and 3, AI face changing is realized, and a corresponding AI face changing application program can be written according to the requirement.
In an embodiment of the present invention, the selecting a target AI development script in the AI development script set includes:
an AI function requirement input by a user is received,
and selecting a corresponding AI development script in the AI development script set according to the AI function requirement to obtain the target AI development script.
Understandably, the user can select the relevant AI function requirements by himself according to the needs, such as: and when the user selects the AI function of emotion recognition, the function of emotion recognition can be realized when the user clicks the relevant button on the client.
The AI data processing module 103 is configured to perform AI processing on the original application data by using the target AI development script to obtain AI application data;
in the embodiment of the present invention, the AI application data is data that realizes a function required by a user, for example: AI face changing data, picture recognition data, emotion recognition data, and the like.
In detail, the obtaining AI application data by performing AI processing on the original application data by using the target AI development script includes:
reading original application data in the kernel space by using the target AI development script, and performing preprocessing on the original application data to obtain standard application data;
extracting the characteristics of the standard application data to obtain characteristic data;
and performing AI processing on the characteristic data by using the AI algorithm in the target AI development script, and rewriting the characteristic data after the AI processing into the kernel space to obtain the AI application data.
In detail, the AI process is a data processing technology that implements functions that can be developed by the existing AI technology. For example: AI face exchange, image recognition, emotion recognition, and the like.
In the embodiment of the invention, the data processing mode corresponding to the AI function can be inquired according to the AI function required by the user. And compiling a Python logic program language corresponding to the data processing mode by utilizing the existing Python programming environment, and integrating to obtain the script file according to the Python logic program language corresponding to the data processing mode.
In detail, a data interaction interface needs to be constructed to receive the original application data, and the AI application data is obtained by performing predetermined AI processing on the original application data through an AI technology in an AI development environment. Finally, the AI application data can be passed to the kernel space again through the data interaction interface.
In the embodiment of the invention, the data to be processed needs to be digitally processed, so that the subsequent AI technical processing is facilitated. For example: data such as file input data, photographing input data, camera real-time input data and the like acquired from the application layer program layer can be used as the data to be processed. And converting the data to be processed into digital data by the digitalization technologies such as voice coding, multimedia streaming, image pixelation and the like.
In detail, the pre-processing criteria may be: and preprocessing the digitized data by data processing means such as picture scaling, data normalization and data standardization to obtain the standard application data.
Optionally, in the embodiment of the present invention, feature extraction may be performed on the normalized data by using existing feature extraction means such as VGG16, Darknet, Resnet, and the like, so as to obtain the feature data.
In the embodiment of the present invention, the AI process may perform prediction processing on the feature data through feature prediction and prediction visualization. The feature prediction can adopt means such as key point position prediction, prediction frame offset prediction, pixel point category prediction and the like to obtain the prediction data.
It should be understood that the prediction visualization may utilize means such as key point connection, target frame and region differentiation to perform visualization operation on the prediction data, so as to obtain the target data and implement AI processing of data.
The AI application display module 104 is configured to transmit the AI application data to a pre-constructed application layer, and the application layer displays the AI application data to complete an AI application of the original application data.
In detail, the application layer may refer to the application layer. All applications installed on the handset are in this layer, for example: the mobile phone is provided with a program or software downloaded by the mobile phone.
In this embodiment of the present invention, the transmitting the AI application data to a pre-constructed application layer, and the displaying the AI application data by the application layer, includes:
reading AI application data of the kernel space by using a pre-constructed Python server, and packaging the read AI application data to the Python server interface to obtain AI application data to be transmitted;
capturing a data request instruction of the application layer by using a monitoring thread in the Python server;
and sending the data to be transmitted to the application layer according to the data request instruction, and displaying the AI application data by utilizing the components of the application layer.
In the embodiment of the invention, the AI application data can be read by utilizing the pre-established Python server and encapsulated to the service interface of the Python server, so that the application program layer can conveniently call the AI application data.
In the embodiment of the present invention, the monitoring thread needs to be built in the Python server to monitor whether the application layer sends a data request instruction. When the application layer sends the data request instruction, the monitoring thread receives the data request instruction in real time. When the monitoring thread acquires the data request instruction, a data forwarding instruction is started, and the AI application data subjected to AI processing is sent to the application layer by using the data forwarding instruction, so that the application layer acquires the AI application data.
In detail, in the embodiment of the present invention, after the application layer obtains the AI application data, the AI application data is subjected to AI presentation by using an AI technology preset in the application layer, so as to implement application of an AI function to a mobile terminal. For example: and AI functions such as face changing and human hair color rendering.
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:
compared with the background art: most applications of a mobile terminal do not have open related interfaces for users to develop functions by themselves, most applications are bound with an algorithm, and the users are difficult to separate the applications, so that the users are difficult to realize own function assumption about artificial intelligence, and the phenomenon of diversity development of mobile applications is hindered. After the original application data is acquired, a user can select a specific target AI development script in a pre-constructed AI development script set according to the needs of the user to realize a corresponding AI processing function, and 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, specific AI development can be carried out on the original application data, and then the AI idea of oneself is realized, user's use experience is greatly enriched for user's mobile terminal has very big flexibility and expansibility. Therefore, the application method, the application device, the electronic equipment and the computer readable storage medium of the AI development environment in the Android system can solve the problems that most applications are bound with the algorithm, the user is difficult to separate the applications, the user is difficult to realize the function assumption about artificial intelligence, and the diversity development of mobile applications is hindered.
Fig. 5 is a schematic structural diagram of an electronic device for implementing an application method of an AI development environment in an Android system according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11 and a bus, and may further 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.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used to store not only application software installed in the electronic device 1 and various types of data, such as codes of the application 12 in the Android system in the AI development environment, but also data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged 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 a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., application programs of the AI development environment in the Android system, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and 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 are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The memory 11 in the electronic device 1 stores an application 12 of an AI development environment in the Android system, which is a combination of a plurality of instructions that, when executed in the processor 10, can implement:
acquiring original 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 in the AI development script set;
performing AI processing on the original application data by using the target AI development script to obtain AI application data;
and transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to finish the AI application of the original application data.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 to fig. 5, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring original 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 in the AI development script set;
performing AI processing on the original application data by using the target AI development script to obtain AI application data;
and transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to finish the AI application of the original application data.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An application method of an AI development environment in an Android system is characterized by comprising the following steps:
acquiring original 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 in the AI development script set;
performing AI processing on the original application data by using the target AI development script to obtain AI application data;
and transmitting the AI application data to a pre-constructed application layer, and displaying the AI application data by the application layer to finish the AI application of the original application data.
2. The method for applying the AI development environment to the Android system of claim 1, wherein the obtaining of the raw application data comprises:
receiving a data acquisition instruction, and analyzing the data acquisition instruction to obtain a target data interface;
data is called at the target data interface to obtain application layer data;
and mapping the application layer data into a memory file by using a pre-constructed Android JNI layer, and transmitting the memory file to a pre-constructed kernel space in a memory sharing mode to obtain the original application data.
3. The method for applying the AI development environment in the Android system according to claim 1, wherein the receiving an AI development script set constructed by a user according to a preset AI application function includes:
compiling a corresponding AI development application program set according to the AI application function;
and packaging the AI development application program set to obtain the AI development script set.
4. The method for applying the AI development environment in the Android system of claim 3, wherein the selecting a target AI development script in the AI development script set comprises:
an AI function requirement input by a user is received,
and selecting a corresponding AI development script in the AI development script set according to the AI function requirement to obtain the target AI development script.
5. The method for applying the AI development environment to the Android system according to claim 4, wherein the performing AI processing on the raw application data by using the target AI development script to obtain AI application data includes:
reading original application data in the kernel space by using the target AI development script, and performing preprocessing on the original application data to obtain standard application data;
extracting the characteristics of the standard application data to obtain characteristic data;
and performing AI processing on the characteristic data by using the AI algorithm in the target AI development script, and rewriting the characteristic data after the AI processing into the kernel space to obtain the AI application data.
6. The method for applying the AI development environment to the Android system according to claim 5, wherein the transmitting the AI application data to a pre-built application layer and the application layer presenting the AI application data comprises:
reading AI application data of the kernel space by using a pre-constructed Python server, and packaging the read AI application data to the Python server interface to obtain AI application data to be transmitted;
capturing a data request instruction of the application layer by using a monitoring thread in the Python server;
and sending the data to be transmitted to the application layer according to the data request instruction, and displaying the AI application data by utilizing the components of the application layer.
7. The method for applying the AI development environment to the Android system according to claim 3, wherein before receiving the AI development script set constructed by the user according to the preset AI application function, the method further comprises:
obtaining an android application;
and building a python editor and a python development environment in the android application.
8. An application apparatus of an AI development environment in an Android system, the apparatus comprising:
the original application data acquisition module is used for acquiring original application data;
the AI function selection module is used for receiving an AI development script set constructed by a user according to a preset AI application function and selecting a target AI development script in the AI development script set;
the AI data processing module is used for executing AI processing on the original application data by using the target AI development script to obtain AI application data;
and the AI application display module is used for transmitting the AI application data to a pre-constructed application layer, and the application layer displays the AI application data to complete the AI application of the original application data.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of applying the AI development environment of any one of claims 1 to 7 in the Android system.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements a method of applying an AI development environment according to any one of claims 1 to 7 in an Android system.
CN202111593432.4A 2021-12-23 2021-12-23 Application method, device, equipment and medium of AI development environment in Android system Pending CN114327388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111593432.4A CN114327388A (en) 2021-12-23 2021-12-23 Application method, device, equipment and medium of AI development environment in Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111593432.4A CN114327388A (en) 2021-12-23 2021-12-23 Application method, device, equipment and medium of AI development environment in Android system

Publications (1)

Publication Number Publication Date
CN114327388A true CN114327388A (en) 2022-04-12

Family

ID=81055524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111593432.4A Pending CN114327388A (en) 2021-12-23 2021-12-23 Application method, device, equipment and medium of AI development environment in Android system

Country Status (1)

Country Link
CN (1) CN114327388A (en)

Similar Documents

Publication Publication Date Title
CN111932562B (en) Image identification method and device based on CT sequence, electronic equipment and medium
US11514263B2 (en) Method and apparatus for processing image
CN111985504B (en) Copying detection method, device, equipment and medium based on artificial intelligence
CN108829518B (en) Method and device for pushing information
CN111985197A (en) Template generation method based on medical information
CN115205225A (en) Training method, device and equipment of medical image recognition model and storage medium
CN112085019A (en) Character recognition model generation system, method and device and computer equipment
CN115600644A (en) Multitasking method and device, electronic equipment and storage medium
CN111950707B (en) Behavior prediction method, device, equipment and medium based on behavior co-occurrence network
CN112486807A (en) Pressure testing method and device, electronic equipment and readable storage medium
Richter et al. Service-based processing and provisioning of image-abstraction techniques
CN113934481A (en) Notification information pushing method, intelligent terminal and storage medium
CN114327388A (en) Application method, device, equipment and medium of AI development environment in Android system
CN111192643A (en) Medical record data processing method and related equipment
CN114390200B (en) Camera cheating identification method, device, equipment and storage medium
CN114185522A (en) Page theme customizing method and device, electronic equipment and storage medium
CN112183347A (en) Depth space gradient-based in-vivo detection method, device, equipment and medium
CN113255456A (en) Non-active living body detection method, device, electronic equipment and storage medium
CN114913649A (en) Display state monitoring method, device, equipment and computer readable storage medium
CN111667411A (en) Image transmission method and device, electronic equipment and storage medium
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN113645064B (en) Task issuing method and device, electronic equipment and storage medium
CN115190362B (en) Data processing method and device, electronic equipment and storage medium
CN114596305A (en) Picture detection method, device and equipment based on browser and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination