Processing method and electronic equipment

By obtaining operation permission information when the target triggers the operation and recompiling the compiled files of the target processing model under specific conditions, the problem of mismatch between model loading and runtime compilation files in the prior art is solved, and the efficiency and success rate of model loading and running is improved.

CN119938182APending Publication Date: 2025-05-06LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411999542.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When loading and running models in AIPCs in the AIPCs of the prior art, the compilation files need to be based on the corresponding compiled files, and the compiled files rely on user permissions and reasoning frameworks, resulting in the running model being unable to load if the compiled files that are not stored or mismatched.

Method used

Provides a processing method to respond to the target trigger operation and obtain operation permission information. If specific conditions are met (such as the operation permission does not match the model precompiled file or the access path is invalid), the target processing model is recompiled to obtain the target model compilation file, and the model is loaded and run based on the file.

Benefits of technology

Ensure that the permissions of the recompiled target model compilation file match the target trigger operation, and that the file is complete and accurate, improving the efficiency and success rate of loading and running the target processing model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938182A_ABST
    Figure CN119938182A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and electronic equipment, and the processing method comprises the steps: obtaining the operation authority information of a target triggering operation in response to the obtained target triggering operation, and enabling the target triggering operation to be used for calling a target processing model; under the condition that the target condition is met, recompiling the target processing model based on the operation authority information to obtain a target model compiling file; and loading and operating the target processing model based on the target model compiling file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of device processing technology, and in particular to a processing method and electronic equipment. Background Art

[0002] At present, the AIPC large model has different reasoning frameworks based on different platforms, for example, OpenVINO on the Intel platform, XILINX on the AMD platform, and ONNX on the NV platform.

[0003] Since the model in AIPC needs to be loaded and run based on its corresponding compiled file, and the compiled file corresponding to the model depends on the user permissions and reasoning framework, when calling the model processing task in AIPC, if the corresponding compiled file is not stored or the compiled file does not correspond to the user permissions and reasoning framework, the model cannot be loaded and run. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a processing method and an electronic device.

[0005] On the one hand, an embodiment of the present application provides a processing method, including:

[0006] In response to obtaining a target triggering operation, obtaining operation permission information of the target triggering operation, wherein the target triggering operation is used to call a target processing model;

[0007] When the target condition is met, the target processing model is recompiled based on the operation authority information to obtain a target model compilation file;

[0008] The target processing model is loaded and executed based on the target model compilation file.

[0009] In a possible implementation, satisfying the target condition includes at least one of the following:

[0010] If the operation permission information does not match the obtained model precompiled file, determining that the target condition is met;

[0011] If a model precompiled file matching the operation permission information cannot be obtained, determining that the target condition is met;

[0012] If the access path corresponding to the operation authority information fails, determining that the target condition is met;

[0013] If the operation authority information does not pass the target authority authentication, it is determined that the target condition is met.

[0014] In a possible implementation, the target processing model is recompiled based on the operation permission information, including at least one of the following:

[0015] In a case where the target trigger operation has administrator authority but the first model pre-compiled file with administrator authority attribute is not accessed, recompiling the target processing model based on the administrator authority;

[0016] In a case where the target trigger operation has ordinary user authority but fails to access the second model precompiled file with ordinary user authority attributes, recompiling the target processing model based on the ordinary user authority;

[0017] In a case where the target triggering operation has temporary user authority, the target processing model is recompiled based on the temporary user authority.

[0018] In a possible implementation, the method further includes at least one of the following:

[0019] storing a target model compilation file obtained by recompiling the target processing model into a target storage address corresponding to the operation authority information, wherein the storage address of the model compilation file obtained by different operation authority information is different;

[0020] Update the model driver of the target processing model to obtain the access path of the target model compilation file;

[0021] Perform target verification processing on the recompiled target model compilation file.

[0022] In a possible implementation manner, when a target trigger operation is obtained, the method further includes:

[0023] Obtaining model-driven update information of the target processing model;

[0024] When the update information indicates that the model driver has been updated, the step of obtaining the operation permission information of the target trigger operation is performed;

[0025] and / or,

[0026] When the update information indicates that there is no update to the model driver, the target processing model is loaded and executed based on the current model precompiled file.

[0027] In a possible implementation, the method further includes at least one of the following:

[0028] In the case that the target trigger operation has administrator authority and a first model precompiled file with administrator authority attributes is obtained, updating the access path of the model driver of the target processing model to the first model precompiled file, or moving the first model precompiled file to a first storage directory corresponding to the administrator authority;

[0029] When the target trigger operation has ordinary user authority and a second model precompiled file with ordinary user authority attributes is obtained, the access path of the model driver of the target processing model to the second model precompiled file is updated, or the second model precompiled file is moved to a second storage directory corresponding to the ordinary user authority.

[0030] In a possible implementation, the step of loading and running the target processing model based on the target model compilation file includes:

[0031] The target model compilation file is loaded into the target operating environment using the model driver of the target processing model, so as to perform corresponding model reasoning operations using the model reasoning framework represented by the target model compilation file.

[0032] In a possible implementation, the obtaining target trigger operation includes at least one of the following:

[0033] Obtaining an operation of starting a target application, wherein the target application is an application capable of invoking a target processing model to provide a target functional service;

[0034] In response to monitoring that target character string data is input into a target application, determining to obtain the target trigger operation;

[0035] In response to monitoring that the target voice segment data is input into the target application, determining to obtain the target trigger operation;

[0036] In response to monitoring the input target trajectory data, determining to obtain the target trigger operation;

[0037] In response to monitoring the target gesture action or the target posture change data, determining to obtain the target trigger operation;

[0038] In response to the behavior parameter when the interaction data is input satisfying the corresponding parameter threshold, it is determined that the target trigger operation is obtained.

[0039] On the other hand, an embodiment of the present application further provides an electronic device, comprising at least one processor and at least one processing model capable of running on the processor, wherein when the processing model is called by at least one application running on the electronic device, the electronic device performs at least one of the following:

[0040] Obtaining operation permission information of a trigger operation that triggers the call;

[0041] When the target condition is met, recompile the target processing model in the at least one processing model based on the operation permission information to obtain a target model compilation file;

[0042] The target processing model is loaded and executed based on the target model compilation file.

[0043] In a possible implementation, the electronic device includes a first body and a second body that are rotatably connected, and at least one of the first body and the second body has a display screen to output the functional service options provided by the target processing model in response to the trigger operation on the display screen;

[0044] and / or,

[0045] The electronic device is also capable of performing at least one of the following:

[0046] In a case where the trigger operation has administrator authority but does not access the first model pre-compiled file with administrator authority attributes, recompiling the target processing model based on the administrator authority;

[0047] In the case where the trigger operation has ordinary user authority but does not access the second model precompiled file with ordinary user authority attributes, recompile the target processing model based on the ordinary user authority; or

[0048] In a case where the trigger operation has temporary user authority, the target process model is recompiled based on the temporary user authority.

[0049] Before responding to a target trigger operation, i.e., calling a target processing model, the embodiment of the present application first determines whether the operation permission information of the target trigger operation satisfies the target condition. If so, that is, the electronic device does not store a model compilation file corresponding to the operation permission information, or the model precompiled file stored in the electronic device does not fully match the operation permission information, or the model compilation file stored in the electronic device is incomplete, the target processing model is recompiled based on the operation permission information, so as to use the recompiled target model compilation file to load and run the target processing model, thereby ensuring that the permissions corresponding to the recompiled target model compilation file match the permissions of the target trigger operation, and ensuring that the recompiled target model compilation file is complete and accurate, etc., thereby improving the efficiency and success rate of loading and running the target processing model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0051] Figure 1 A flowchart of a processing method provided by the present application is shown;

[0052] Figure 2 A flow chart showing another processing method provided by the present application. DETAILED DESCRIPTION

[0053] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0054] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0055] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0056] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0057] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0058] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0059] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0060] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0061] On the one hand, a processing method provided by an embodiment of the present application can ensure that the permissions corresponding to the target model compilation file match the permissions of the target trigger operation, and ensure that the target model compilation file is complete and accurate, thereby effectively improving the efficiency and success rate of loading and running the target processing model.

[0062] As one example, Figure 1 A flowchart of a processing method provided in an embodiment of the present application is shown, wherein specific steps include S101-S103.

[0063] S101, in response to obtaining a target triggering operation, obtaining operation permission information of the target triggering operation, where the target triggering operation is used to call a target processing model.

[0064] Optionally, the processing method of the embodiment of the present application is applied to artificial intelligence personalized computers AIPC, AI Tablet, AIPhone, AI server, etc., wherein AIPC, AI Tablet, AIPhone, AI server are equipped with hardware and software for processing artificial intelligence tasks, and can provide users with an interactive interface, so that users can perform certain operations based on the interactive interface to call the AI ​​large model embedded in the AIPC to process tasks.

[0065] In one example, AIPC can collect the operations performed by the user on AIPC or the hardware and software on AIPC in real time. After obtaining the operations performed by the user, it is determined whether the collected operations are target trigger operations, wherein the target trigger operation is used to call the target processing model, that is, the target trigger operation can start running the local AI model file to perform reasoning operations.

[0066] Optionally, the processing model in the AIPC is associated with the application on the AIPC, so that the corresponding processing model can be directly called based on the application to improve the user experience. For example, the calling model can be set to be directly triggered when the application is started, or the model can be called based on a preset operation during the running of the application after the application is started, such as displaying a virtual button in the interactive interface of the application during the running of the application, and the user clicks the virtual button to trigger the calling model, etc. Or during the running of the application, based on the user's interactive operation or interactive data, the user's need to call the AI ​​function service can be determined, and the corresponding AI processing model can be actively called. Among them, the calling model is directly triggered when the application is started, without the need for the user to call it manually, and the user experience is better, but if the started application does not perform task processing through the model, it will cause a waste of running resources and reduce the running speed; in addition, after the application is started, the model is called based on a preset operation during the running of the application, and the user needs to manually perform certain operations to call the model, and the degree of automation is relatively low, but it effectively avoids the waste of running resources and does not affect the running speed.

[0067] Correspondingly, if it is set to directly trigger the calling model when starting the application, the target trigger operation corresponds to the operation of starting the target application; if it is set to call the model based on the preset operation during the running of the application after starting the application, the target trigger operation corresponds to other operations. Other operations can be set to click a virtual button, which is used to trigger the calling model to process subsequent tasks. Other operations can also be set to click on the data to be processed and select the processing method of AI processing. AI processing includes but is not limited to generating text based on the data to be processed, generating images based on the data to be processed, searching for related data (including one or more of text, pictures and tables) based on the data to be processed, translating the data to be processed, summarizing the data to be processed, and performing image processing on the data to be processed (in this case, the data to be processed is an image).

[0068] Here, the target application is an application that requires model assistance to perform tasks, such as an application with AI functions, that is, an application that provides AI services to users by performing AI tasks.

[0069] After determining that the operation performed by the user is a target trigger operation, the target trigger operation is obtained in response to obtain the operation permission information of the target trigger operation. Among them, when obtaining the operation permission information of the target trigger operation, it can be obtained based on the startup method of starting the target application, wherein the startup method of the application is determined by the user when starting the application, and different startup methods correspond to different operation permissions; it can also be obtained by viewing the default permission setting of the target application, and the default permission setting of the application is configured by the development platform before the application goes online; it can also be obtained by viewing the default permission configuration when the target processing model is called. Similarly, when generating the model, a call permission is set for the model so that the user can quickly call the model when using it for the first time. The embodiment of the present application does not limit the above-mentioned method of obtaining the operation permission information, as long as the operation permission information of the target trigger operation can be obtained. If the user starts the target application with administrator authority, it can be considered that the operation permission information obtained is administrator authority information; if the user starts the target application with ordinary user authority, it can be considered that the operation permission information obtained is ordinary user authority.

[0070] The operation permission information in the embodiment of the present application may include the permission corresponding to the target trigger operation, such as administrator permission, ordinary user permission or temporary permission, etc. Optionally, when the target application corresponding to the target trigger operation is started or running, there is an application process corresponding to the target application, and the progress information of the application process includes at least the icon of the target application, the corresponding user identification and permission level, etc. The permission included in the operation permission information can be determined based on the icon, user identification and permission level of the target application.

[0071] S102: When the target condition is met, the target processing model is recompiled based on the operation authority information to obtain a target model compilation file.

[0072] After obtaining the operation permission information of the target trigger operation, further determine whether the operation permission information meets the target condition. Among them, the target condition may include that the model compilation file corresponding to the operation permission information is not stored in the electronic device. For example, the model precompiled file stored in the electronic device corresponds to the administrator's authority, but the operation permission information of the target trigger operation includes the trigger operation corresponding to the ordinary user's authority. At this time, the operation permission information of the target trigger operation meets the target condition. The target condition may also include that the model precompiled file stored in the electronic device does not completely match the operation permission information. For example, the operation permission information may also include the version information, operating environment and driver of the target application. If the version information, operating environment and driver of the target application do not completely match the model precompiled file stored in the electronic device, the operation permission information of the target trigger operation meets the target condition. The target condition may include that the model compilation file stored in the electronic device is incomplete, etc.

[0073] When the target conditions are met, the target processing model is recompiled based on the operation permission information to obtain a target model compilation file (model reasoning framework). Here, the permissions corresponding to the recompiled target model compilation file are consistent with the permissions included in the operation permission information, and the target model compilation file is complete and matches the operating environment and driver.

[0074] S103, loading and running the target processing model based on the target model compilation file.

[0075] After the target model compilation file is recompiled, the target processing model is loaded and run based on the target model compilation file (model reasoning framework). As an example, the target model compilation file is loaded into the target operating environment using the model driver of the target processing model, so as to perform the corresponding model reasoning operation using the model reasoning framework represented by the target model compilation file.

[0076] Before responding to a target trigger operation, i.e., calling a target processing model, the embodiment of the present application first determines whether the operation permission information of the target trigger operation satisfies the target condition. If so, that is, the electronic device does not store a model compilation file corresponding to the operation permission information, or the model precompiled file stored in the electronic device does not fully match the operation permission information, or the model compilation file stored in the electronic device is incomplete, the target processing model is recompiled based on the operation permission information, so as to use the recompiled target model compilation file to load and run the target processing model, thereby ensuring that the permissions corresponding to the recompiled target model compilation file match the permissions of the target trigger operation, and ensuring that the recompiled target model compilation file is complete and accurate, etc., thereby improving the efficiency and success rate of loading and running the target processing model.

[0077] Optionally, after obtaining the operation permission information of the target trigger operation, when determining whether the operation permission information meets the target condition, if at least one of the following conditions exists, it is determined that the operation permission information meets the target condition:

[0078] First case

[0079] If the operation permission information does not match the obtained model precompiled file, it is determined that the target condition is met. Here, the operation permission information may include the permission corresponding to the target trigger operation, the version information of the target application, the operating environment and the driver, etc. Based on this, the permission corresponding to the target trigger operation included in the operation permission information and the permission corresponding to the obtained model precompiled file are compared to see whether they match. If the permission corresponding to the target trigger operation included in the operation permission information is the administrator permission, and the permission corresponding to the obtained model precompiled file is the ordinary user permission, that is, the operation permission information does not match the obtained model precompiled file, then it is determined that the operation permission information meets the target condition. In another example, the operating environment and driver of the target application are compared to see whether they match the operating environment and driver corresponding to the obtained model precompiled file, and the version of the operating environment and driver of the target application is different from the version of the operating environment and driver corresponding to the obtained model precompiled file, then it is determined that the operation permission information meets the target condition, wherein the operating environment and driver on the electronic device may generate version updates at any time, therefore, there may be a situation where the version of the operating environment and driver of the target application is different from the version of the operating environment and driver corresponding to the obtained model precompiled file.

[0080] Second case

[0081] If the model precompiled file that matches the operation permission information cannot be obtained, it is determined that the target condition is met. Optionally, the model is usually precompiled to obtain a model precompiled file, and the precompiled model precompiled file is stored in a storage area, so that when the model is called, the model precompiled file can be directly obtained from the storage area, and the model precompiled file can be loaded to achieve the purpose of quickly calling the model. In addition, different storage areas are set for different permissions, so that the model precompiled file corresponding to the operation permission information can be quickly found in actual applications. If the operation permission information of the target trigger operation is obtained, and the corresponding storage area is determined according to the permissions included in the operation permission information, and there is no model precompiled file stored in the storage area, then it is determined that the operation permission information meets the target condition.

[0082] The third case

[0083] If the access path corresponding to the operation permission information is invalid, it is determined that the target condition is met. As an example, after the model is precompiled to obtain a model precompiled file and the storage of the model precompiled file is completed, the storage path of the model precompiled file is recorded, and the storage path is associated with the corresponding permission during precompilation. The storage path corresponding to the model precompiled file is the access path corresponding to the operation permission information. If the operation permission information of the target trigger operation is obtained, and the corresponding storage path is determined according to the permissions included in the operation permission information, if the storage path is an invalid path, it is determined that the operation permission information meets the target condition. Among them, the reasons for the storage path being an invalid path may include the upgrade or update of the operating system of the electronic device, the upgrade or update of the target application, and the logical errors caused by abnormal shutdown, sudden power failure, etc. of the file system.

[0084] The fourth case

[0085] If the operation permission information fails to pass the target permission authentication, it is determined that the target condition is met. As an example, for electronic devices with higher security requirements or for applications in electronic devices with higher security requirements, a permission authentication process can be set to ensure that the target trigger operation is a trigger operation with permission, thereby preventing data leakage in the electronic device or application. Based on this, after obtaining the operation permission information of the target trigger operation, the permissions included in the operation permission information are authenticated. If the authentication fails, such as the startup permission corresponding to the target application is the administrator permission, the target processing model can be triggered to be called, and the permissions included in the operation permission information are ordinary user permissions or temporary permissions, then it is characterized that the operation permission information has not passed the target permission authentication, and then it is determined that the operation permission information meets the target condition.

[0086] Determining whether the operation permission information meets the target conditions according to the above situation can not only ensure the data security of the electronic device or the target application, but also avoid the waste of processing resources caused by loading a model precompiled file that does not match the operation permission information.

[0087] As can be seen from the above, when the target conditions are met, the target processing model is recompiled based on the operation permission information to obtain the target model compilation file, thereby achieving the purpose of loading and running the target processing model. Optionally, the embodiment of the present application shows a compilation method for recompiling the target processing model based on the operation permission information, including at least one of the following:

[0088] The first compilation method

[0089] In the case where the target trigger operation has administrator authority but does not access the first model precompiled file with administrator authority attributes, the target processing model is recompiled based on the administrator authority. As can be seen from the above, there are many situations where the operation authority information meets the target conditions. Based on this, for the case where the target trigger operation has administrator authority but does not access the first model precompiled file with administrator authority attributes, that is, the authority included in the target trigger operation is administrator authority, and the first model precompiled file corresponding to the administrator authority is not stored on the electronic device, at this time, the target processing model is recompiled based on the administrator authority to obtain the first model precompiled file corresponding to the administrator authority, and the first model precompiled file is the target model compilation file.

[0090] The second compilation method

[0091] In the case where the target trigger operation has ordinary user authority but does not access the second model precompiled file with ordinary user authority attributes, the target processing model is recompiled based on the ordinary user authority. Similarly, for the case where the target trigger operation has ordinary user authority but does not access the second model precompiled file with ordinary user authority attributes, that is, the authority included in the target trigger operation is ordinary user authority, and the electronic device does not store the second model precompiled file corresponding to the ordinary user authority, at this time, the target processing model is recompiled based on the ordinary user authority to obtain the second model precompiled file corresponding to the ordinary user authority. In this scenario, the second model precompiled file is the target model compilation file.

[0092] The third compilation method

[0093] In the case where the target trigger operation has temporary user permissions, the target processing model is recompiled based on the temporary user permissions. Among them, for an electronic device or a target application, a corresponding temporary user identity can be set for a temporary user, and the temporary user identity has temporary user permissions. It can be known that the temporary user permissions can be used once by default, or the temporary user permissions can only run the electronic device or target application once. Based on this, the precompiled files corresponding to the temporary user permissions will not be stored on the electronic device, and there will be no associated access paths. Based on this, if the permissions included in the operation permission information of the target trigger operation are temporary user permissions, there is no need to determine whether the operation permission information matches the obtained model precompiled file, and there is no need to determine whether the model precompiled file matching the operation permission information can be obtained, and there is no need to determine the access path and its validity. The target processing model can be directly recompiled based on the temporary user permissions.

[0094] As an example, one can follow Figure 2The above three compilation methods are executed according to the steps in the flowchart shown to obtain the target model compilation file, wherein the specific steps include S201-S206.

[0095] S201: Determine the authority of the target triggering operation based on the operation authority information.

[0096] S202: If it is determined that the target triggering operation has administrator authority, access a first model precompiled file with administrator authority attributes.

[0097] S203: If the first model pre-compiled file is not accessed, recompile the target processing model based on the administrator authority.

[0098] S204: If it is determined that the target trigger operation has ordinary user authority, access a second model precompiled file with ordinary user authority attributes.

[0099] S205: If the second model pre-compiled file is not accessed, recompile the target processing model based on the normal user authority.

[0100] S206: If it is determined that the target triggering operation has temporary user authority, recompile the target processing model based on the temporary user authority.

[0101] Here, the association between the administrator authority and the first model precompiled file, and the association between the ordinary user authority and the second model precompiled file, are both pre-set, so that after determining the authority of the target trigger operation, the corresponding model precompiled file can be obtained more quickly.

[0102] After the target processing model is recompiled based on the operation authority information, the processing performed on the target model compilation file includes at least one of the following:

[0103] First treatment

[0104] The target model compilation file obtained by recompiling the target processing model is stored in the target storage address corresponding to the operation permission information. The target storage address can be a historical storage address corresponding to the operation permission information, or a new storage address created for the operation permission information. It should be noted that when the target storage address is a historical storage address corresponding to the operation permission information, when storing the recompiled target model compilation file, first search for the historical storage address corresponding to the operation permission information, and then use the recompiled target model compilation file to replace other model compilation files under the target storage address.

[0105] Furthermore, the target model compilation file is obtained by recompiling the target processing model based on the operation permission information, that is, the model compilation files obtained by compiling the same model based on different operation permission information are also different. In order to distinguish different model compilation files, the storage addresses of the model compilation files obtained by different operation permission information are set differently.

[0106] Second treatment

[0107] Update the model driver of the target processing model to obtain the access path of the target model compilation file. Correspondingly, as can be seen from the above, different access paths correspond to different operation permission information for the same application, that is, the model compilation file stored under the access path corresponding to the operation permission information matches the operation permission information. Based on this, in order to be able to quickly and accurately call the target processing model, that is, quickly and accurately load the model compilation file corresponding to the operation permission information, after the target processing model is recompiled to obtain and store the target model compilation file, the access path corresponding to the operation permission information is updated based on the target storage address of the target model compilation file, that is, the model driver of the target processing model is updated to obtain the access path of the target model compilation file, so that after obtaining the target trigger operation, the model driver of the target processing model can be used to quickly and accurately obtain the target model compilation file according to the updated access path, thereby achieving the purpose of loading and running the target processing model.

[0108] Third treatment

[0109] The target model compilation file obtained by recompilation is subjected to target verification processing. Optionally, in order to ensure the matching of the target model compilation file and the operation permission information and the accuracy, integrity and security of the target model compilation file, after recompiling and obtaining the target model compilation file, it is further determined whether the operation permission information matches the target model compilation file to determine whether the target model compilation file passes the matching verification; and the content in the target model compilation file is traversed to determine whether there are garbled characters, format errors, missing content, abnormal content, blacklist content, etc. in the content to determine whether the target model compilation file passes the accuracy verification, integrity verification and security verification.

[0110] Correspondingly, only when the target model compilation file passes the matching check, accuracy check, integrity check and security check at the same time, can it be determined that the target model compilation file is the model compilation file required for the target trigger operation to call the target processing model.

[0111] The above processing performed on the target model compilation file can not only ensure the response rate of responding to the target trigger operation to load and run the target processing model, but also ensure the success rate of loading and running the target processing model, that is, the accuracy of obtaining the target model compilation file.

[0112] In another example, when the target processing model is loaded and run based on the target model compilation file, the target model compilation file is loaded into the target operating environment by using the model driver of the target processing model to form a corresponding model reasoning framework and then perform the corresponding model reasoning operation, but different model drivers can load different model compilation files. Based on this, when the target trigger operation is obtained, the update information of the model driver of the target processing model is also obtained, wherein the update information at least includes the last running time, update time, version number of the last running time and current version number of the model driver of the target processing model, etc. It can be determined based on the last running time and update time whether the model driver has been updated. For example, if the last running time is earlier than the update time, it indicates that the model driver has been updated; if the last running time is later than the update time, it indicates that the model driver has not been updated. Similarly, it is also possible to determine whether the model driver has been updated by comparing the version number of the last running time and the current version number.

[0113] Furthermore, when the update information indicates that the model driver has been updated, the step of obtaining the operation permission information of the target trigger operation is performed, and then the target model compilation file is recompiled, that is, when responding to the target trigger operation, the current model driver can load the recompiled target model compilation file into the target operating environment, and then obtain the model reasoning framework to perform the corresponding model reasoning operation. In this way, the situation that the current model driver does not match the model driver corresponding to the model compilation file and cannot load the model compilation file is avoided.

[0114] Correspondingly, when the update information indicates that the model driver does not have an update, the target processing model is loaded and run based on the current model precompiled file.

[0115] In another example, after obtaining the operation permission information of the target trigger operation, there is a situation where the operation permission information does not meet the target conditions. At this time, the operation permission information matches the obtained model precompiled file, such as the target trigger operation has administrator authority, and the first model precompiled file with administrator authority attributes is obtained, or the target trigger operation has ordinary user authority, and the second model precompiled file with ordinary user authority attributes is obtained.

[0116] In the case where the target trigger operation has administrator privileges and obtains a first model precompiled file with administrator privilege attributes, the access path of the model driver of the target processing model to the first model precompiled file can be updated, so that when the target processing model is loaded and run, the first model precompiled file can be obtained based on the access path, and the first model precompiled file can be loaded into the target running environment using the model driver of the target processing model. As another example, in the case where the target trigger operation has administrator privileges and obtains a first model precompiled file with administrator privilege attributes, the first model precompiled file can also be moved to the first storage directory corresponding to the administrator privileges. When the target processing model is loaded and run, the index of the first model precompiled file can be found through the first storage directory to obtain the address of the first model precompiled file, and then the first model precompiled file can be obtained. Then, the model driver of the target processing model can be used to load the first model precompiled file into the target running environment. The embodiment of the present application does not limit the access path of the model driver for updating the target processing model to the first model precompiled file, or moves the first model precompiled file to the first storage directory corresponding to the administrator's authority, as long as the first model precompiled file can be obtained when the target processing model is loaded and run.

[0117] Similarly, when the target trigger operation has ordinary user permissions and a second model precompiled file with ordinary user permission attributes is obtained, the model driver of the target processing model updates the access path of the second model precompiled file, or the second model precompiled file is moved to a second storage directory corresponding to ordinary user permissions.

[0118] In the embodiment of the present application, different trigger operations can be set to load and run the target processing model according to different application scenarios, hardware properties of the electronic device, operating characteristics of the target application, etc.

[0119] Optionally, obtaining a target trigger operation in the embodiment of the present application includes at least one of the following:

[0120] First: obtain the operation of starting the target application, the target application is an application that can call the target processing model to provide the target functional service. For example, an application based on the data to be processed that generates texts and an application based on the data to be processed that generates images can call the target processing model to provide AI services such as generating texts based on the data to be processed or generating images based on the data to be processed, that is, the application based on the data to be processed that generates texts and the application based on the data to be processed that generates images are the target applications, and here, the AI ​​service is the target functional service. For the target application, the operation of starting the target application is set to be an operation that can call the target processing model, that is, the operation of starting the target application is the target trigger operation. Based on this, while obtaining the operation of starting the target application, the target trigger operation is obtained.

[0121] Another: There is a target application, only some of its functions need to call the target processing model. Based on this, it can be set that in the process of running the target application, the user needs to perform a preset operation before the target processing model can be called. The preset operation may include inputting specific data, performing specific actions, generating specific interactive behaviors, etc., and different preset operations can be set for different target applications.

[0122] In one example, in response to monitoring the input of target string data in the target application, it is determined that the target trigger operation is obtained. For example, the input target string data is a preset operation set for the target application, and the target string data may include strings such as @AI or @Lenovo, #AI#, "help", "Xiaotian / AI NOW", etc. If any of the above strings is monitored through the target application, it is determined that the target trigger operation is obtained, and then the target processing model is called to provide AI services.

[0123] In another example, in response to monitoring the input of the target voice segment data in the target application, it is determined that the target trigger operation is obtained. For example, inputting the target voice segment data is a preset operation set for the target application, and the target voice segment data may include the name of the AI ​​service assistant (such as "Lenovo Xiaotian / AI NOW"), the name of the target processing model, a specific voice, etc. Similarly, if any of the above voice segments is monitored through the target application, it is determined that the target trigger operation is obtained, and then the target processing model is called to provide AI services. Of course, in this example, the electronic device is equipped with an audio acquisition device to collect voice data through the audio acquisition device, and then monitor whether the target voice segment data exists in the collected voice data.

[0124] In another example, in response to monitoring the input of target trajectory data, it is determined that a target trigger operation is obtained. For example, inputting a specific graphic is a preset operation set for the target application, wherein the graphic may include an "AI" shape, an "L" shape, etc. Accordingly, the user needs to input the trajectory data corresponding to the graphic according to the graphic to trigger the call of the target processing model, that is, when the electronic device collects the trajectory data and the collected trajectory data corresponds to a specific graphic, it is determined that a target trigger operation is obtained. When running the target application, if it is collected that the user interacts continuously with the touch screen through a finger or the user controls the cursor to move continuously on the display interface through a mouse, at this time, monitor whether the graphic corresponding to the collected trajectory data is a specific graphic. If so, it is determined that the collected trajectory data is the target trajectory data, and a target trigger operation is also obtained. Among them, the trajectory data includes the interaction position of the finger and the touch screen or the position of the cursor on the display interface, etc.

[0125] In another example, in response to monitoring the target gesture action or target posture change data, it is determined that the target trigger operation is obtained. Here, executing the target gesture action or generating the target posture change data is the preset operation corresponding to the target application. Among them, for the scene where a touch screen is set on the electronic device, the target gesture action may include two-finger long press, sliding, etc. for the touch screen; for the scene where a mouse or stylus is set on the electronic device, the target gesture action may include clicking a virtual key by a mouse or stylus; for the scene where a keyboard is set on the electronic device, the target gesture action may include pressing a specific key in the keyboard; for the scene where an image acquisition device such as a camera is set on the electronic device, the target gesture action may include the user's gesture or body movement, the action that changes the posture of the electronic device (such as shaking, adjusting the screen angle), etc. The electronic device collects the user's determined interaction action or corresponding interaction data through the above-mentioned interactive device (including a touch screen, a mouse or stylus, a keyboard, and an image acquisition device). If the collected interaction action or corresponding interaction data is a target gesture action or target posture change data, it is determined that the target trigger operation is obtained.

[0126] In addition, it is also possible to monitor whether there are target gesture actions based on the interactive tasks generated in the process data, such as word-marking tasks, screenshot tasks, circling tasks, dragging tasks, floating tasks, eye tracking tasks, etc. When the above tasks are monitored, it is determined that the target trigger operation is obtained.

[0127] In another example, in response to the behavior parameters when inputting interactive data satisfying the corresponding parameter threshold, it is determined that the target trigger operation is obtained. Here, the electronic device collects the interactive data generated by the user and the electronic device in real time. For example, the interactive data is modified for specific data, and the number of modifications to the specific data is monitored, that is, the behavior parameters when the interactive data is input. If the corresponding parameter threshold is met, such as the number of modifications to the specific data is greater than 10 times, then it indicates that the user needs AI services, and it is determined that the target trigger operation is obtained. Optionally, the behavioral parameters when inputting interactive data can also include repeatedly entering the same data, deleting / restoring the same data, etc.

[0128] On the other hand, an embodiment of the present application also provides an electronic device corresponding to a processing method. Since the principle of solving the problem by the electronic device in the present application is similar to the above-mentioned processing method of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0129] The electronic device provided in the embodiment of the present application specifically includes at least one processor and at least one processing model that can run on the processor. For example, for a graphics processor (Graphics Processing Unit, GPU), a graphics generation model is constructed. After the user calls the graphics generation model through application A on the electronic device, that is, after the graphics generation model is loaded and run, the GPU can use the graphics generation model to provide AI services to the user, including but not limited to identifying the content in the user-specified image and generating corresponding text, identifying the content in the user-specified image and generating associated images, etc.; for example, an audio processing model is constructed for the audio processor. After the user calls the audio processing model through application B on the electronic device, the audio processor can transmit the user audio collected by the audio collector to the audio processing model, so that the audio processing model provides AI services to the user, including but not limited to generating music related to the user audio, changing the timbre of the user audio, etc. As a result, the electronic device can provide different types of AI services to the user, meeting the user's demand for artificial intelligence services.

[0130] When the processing model is called by at least one application running on the electronic device, the electronic device performs at least one of the following:

[0131] Obtaining operation permission information of a trigger operation that triggers the call;

[0132] When the target condition is met, recompile the target processing model in the at least one processing model based on the operation permission information to obtain a target model compilation file;

[0133] The target processing model is loaded and executed based on the target model compilation file.

[0134] Considering that the electronic device includes a single-screen device, a dual-screen device or even a multi-screen device, the electronic device in the embodiment of the present application includes a first body and a second body that are rotatably connected, and at least one of the first body and the second body has a display screen to output the function service options provided by the target processing model in response to the trigger operation on the display screen;

[0135] and / or,

[0136] The electronic device is also capable of performing at least one of the following:

[0137] In a case where the trigger operation has administrator authority but does not access the first model pre-compiled file with administrator authority attributes, recompiling the target processing model based on the administrator authority;

[0138] In the case where the trigger operation has ordinary user authority but does not access the second model precompiled file with ordinary user authority attributes, recompile the target processing model based on the ordinary user authority; or

[0139] In a case where the trigger operation has temporary user authority, the target process model is recompiled based on the temporary user authority.

[0140] It is worth noting that the above steps may be executed by a processor included in the electronic device, or by a model driver included in the electronic device.

[0141] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0142] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.

[0143] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.

Claims

1. A processing method comprising: In response to obtaining a target triggering operation, obtaining operation permission information of the target triggering operation, wherein the target triggering operation is used to call a target processing model; When the target condition is met, the target processing model is recompiled based on the operation authority information to obtain a target model compilation file; The target processing model is loaded and executed based on the target model compilation file.

2. The processing method according to claim 1, wherein: Meet the target conditions, including at least one of the following: If the operation permission information does not match the obtained model precompiled file, determining that the target condition is met; If a model precompiled file matching the operation permission information cannot be obtained, determining that the target condition is met; If the access path corresponding to the operation authority information fails, determining that the target condition is met; If the operation authority information does not pass the target authority authentication, it is determined that the target condition is met.

3. The processing method according to claim 1 or 2, wherein: Recompiling the target processing model based on the operation permission information includes at least one of the following: In a case where the target trigger operation has administrator authority but the first model pre-compiled file with administrator authority attribute is not accessed, recompiling the target processing model based on the administrator authority; In a case where the target trigger operation has ordinary user authority but fails to access the second model precompiled file with ordinary user authority attributes, recompiling the target processing model based on the ordinary user authority; In a case where the target triggering operation has temporary user authority, the target processing model is recompiled based on the temporary user authority.

4. The processing method according to claim 3, further comprising at least one of the following: storing a target model compilation file obtained by recompiling the target processing model into a target storage address corresponding to the operation authority information, wherein the storage address of the model compilation file obtained by different operation authority information is different; Update the model driver of the target processing model to obtain the access path of the target model compilation file; Perform target verification processing on the recompiled target model compilation file.

5. The processing method according to claim 1, further comprising: Obtaining model-driven update information of the target processing model; When the update information indicates that the model driver has been updated, the step of obtaining the operation permission information of the target trigger operation is performed; and / or, When the update information indicates that there is no update to the model driver, the target processing model is loaded and executed based on the current model precompiled file.

6. The processing method according to claim 1, wherein: Also includes at least one of the following: In the case that the target trigger operation has administrator authority and a first model precompiled file with administrator authority attributes is obtained, updating the access path of the model driver of the target processing model to the first model precompiled file, or moving the first model precompiled file to a first storage directory corresponding to the administrator authority; When the target trigger operation has ordinary user authority and a second model precompiled file with ordinary user authority attributes is obtained, the access path of the model driver of the target processing model to the second model precompiled file is updated, or the second model precompiled file is moved to a second storage directory corresponding to the ordinary user authority.

7. The processing method according to claim 1, wherein: Loading and running the target processing model based on the target model compilation file includes: The target model compilation file is loaded into the target operating environment using the model driver of the target processing model, so as to perform corresponding model reasoning operations using the model reasoning framework represented by the target model compilation file.

8. The processing method according to claim 1, wherein: The obtaining target trigger operation includes at least one of the following: Obtaining an operation of starting a target application, wherein the target application is an application capable of invoking a target processing model to provide a target functional service; In response to monitoring that target character string data is input into a target application, determining to obtain the target trigger operation; In response to monitoring that the target voice segment data is input into the target application, determining to obtain the target trigger operation; In response to monitoring the input target trajectory data, determining to obtain the target trigger operation; In response to monitoring the target gesture action or the target posture change data, determining to obtain the target trigger operation; In response to the behavior parameter when the interaction data is input satisfying the corresponding parameter threshold, it is determined that the target trigger operation is obtained.

9. An electronic device, comprising at least one processor and at least one processing model capable of running on the processor, wherein when the processing model is called by at least one application running on the electronic device, the electronic device performs at least one of the following: Obtaining operation permission information of a trigger operation that triggers the call; When the target condition is met, recompile the target processing model in the at least one processing model based on the operation permission information to obtain a target model compilation file; The target processing model is loaded and executed based on the target model compilation file.

10. The electronic device according to claim 9, wherein: The electronic device comprises a first body and a second body which are rotatably connected, and at least one of the first body and the second body has a display screen for outputting the function service options provided by the target processing model in response to the trigger operation on the display screen; and / or, The electronic device is also capable of performing at least one of the following: In a case where the trigger operation has administrator authority but does not access the first model pre-compiled file with administrator authority attributes, recompiling the target processing model based on the administrator authority; In a case where the trigger operation has ordinary user authority but fails to access the second model pre-compiled file with ordinary user authority attributes, recompiling the target processing model based on the ordinary user authority; or, In a case where the trigger operation has temporary user authority, the target process model is recompiled based on the temporary user authority.