A SO library optimization method and device, a storage medium and an electronic device

CN123012512APending Publication Date: 2026-10-30安徽三七极光网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411436251.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,当安卓应用在模拟器环境下运行时,由于硬件和系统环境的差异,常常面临兼容性和稳定性问题,特别是涉及到SO库的情况

Benefits of technology

[0041]在本说明书提供的SO库优化方法中,在模拟器环境下,获取应用运行时动态链接SO库的运行数据;从所述运行数据中提取所述SO库的特征信息;将所述特征信息输入预先训练的分析模型,得到所述分析模型输出的优化方案;根据所述优化方案调整所述SO库。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012512A_ABST
    Figure CN123012512A_ABST
Patent Text Reader

Abstract

The specification discloses an SO library optimization method, device, storage medium and electronic equipment. In the SO library optimization method provided in the specification, in a simulator environment, running data of an application running time dynamic link SO library is acquired; feature information of the SO library is extracted from the running data; the feature information is input into a pre-trained analysis model to obtain an optimization scheme output by the analysis model; and the SO library is adjusted according to the optimization scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to an SO library optimization method, apparatus, storage medium, and electronic device. Background Technology

[0002] Nowadays, Android emulators are a common type of computer software. Emulators allow users to run Android applications in a computer environment, enabling them to experience Android games or software even without an Android device.

[0003] Dynamically linked (Shared Object, SO) libraries are special files that contain functions and data written in C or C++. These functions and data can be shared and reused by multiple programs, and are commonly used library files in the Android system. However, when Android applications run in an emulator environment, due to differences in hardware and system environments, they often face compatibility and stability issues, especially when SO libraries are involved.

[0004] Therefore, how to quickly and effectively solve the compatibility and stability issues of SO libraries in simulator environments, and optimize them, is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides an SO library optimization method, apparatus, storage medium, and electronic device to at least partially solve the aforementioned problems existing in the prior art.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for optimizing SO libraries, including:

[0008] In the simulator environment, obtain runtime data of dynamically linked SO libraries during application runtime;

[0009] Extract the feature information of the SO library from the runtime data;

[0010] The feature information is input into a pre-trained analysis model to obtain the optimization scheme output by the analysis model;

[0011] Adjust the SO library according to the optimization scheme.

[0012] Specifically, before extracting the feature information of the SO library from the runtime data, the method further includes:

[0013] The running data is preprocessed, wherein the preprocessing includes at least one of data cleaning, formatting, data encoding, and normalization.

[0014] Specifically, the feature information includes at least one of the following: crash name, crash type, data location, interface information, and dependency relationship.

[0015] Specifically, the analysis model includes at least subnet extraction, subnet parsing, and subnet optimization;

[0016] The feature information is input into a pre-trained analysis model to obtain an optimized solution output by the analysis model, specifically including:

[0017] The feature information is input into the extraction subnet of a pre-trained analysis model, and the encoded features of the feature information are extracted through the extraction subnet.

[0018] The encoded features are input into the parsing subnet, and the parsing subnet outputs the anomaly information of the SO library based on the encoded features;

[0019] The abnormal information is input into the optimization subnet to obtain the optimization scheme output by the optimization subnet.

[0020] Specifically, the pre-training of the analysis model includes:

[0021] The running data of the SO library when the application runs and anomalies occur in the simulator environment is collected from historical data and used as sample data. The solutions to the anomalies are then identified as annotation schemes.

[0022] Extract sample feature information from the sample data;

[0023] The sample feature information is input into the analysis model to be trained to obtain the undetermined optimization scheme output by the analysis model.

[0024] The analysis model is trained based on the differences between the proposed optimization scheme and the annotation scheme.

[0025] Specifically, the analysis model is trained based on the difference between the proposed optimization scheme and the annotation scheme, including:

[0026] The optimization objective is to minimize the difference between the proposed optimization scheme and the labeled scheme, or to achieve convergence of the analysis model, and to adjust the parameters of the analysis model accordingly.

[0027] When the recall rate of the analysis model is not less than a preset threshold, the analysis model is considered to have completed training.

[0028] Specifically, the method further includes:

[0029] The runtime data is used as training samples;

[0030] Obtain the running data of the SO library adjusted according to the optimization scheme, and use it as optimization data;

[0031] The optimization scheme is adjusted based on the optimization data to obtain an improved optimization scheme;

[0032] The analysis model is fine-tuned using the training samples and the improved optimization scheme.

[0033] This specification provides an SO library optimization device, the device comprising:

[0034] The acquisition module is used to acquire runtime data of dynamically linked SO libraries during application runtime in the simulator environment;

[0035] The extraction module is used to extract feature information of the SO library from the runtime data;

[0036] The input module is used to input the feature information into a pre-trained analysis model to obtain the optimization scheme output by the analysis model.

[0037] An optimization module is used to adjust the SO library according to the optimization scheme.

[0038] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described SO library optimization method.

[0039] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the SO library optimization method described above.

[0040] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0041] In the SO library optimization method provided in this specification, in a simulator environment, runtime data of dynamically linked SO libraries are obtained during application runtime; feature information of the SO library is extracted from the runtime data; the feature information is input into a pre-trained analysis model to obtain an optimization scheme output by the analysis model; and the SO library is adjusted according to the optimization scheme.

[0042] When optimizing an SO library in an Android emulator environment using the SO library optimization method provided in this manual, real-time runtime data of the SO library can be collected during application operation. Feature information is extracted from this data, and a trained analysis model is used to input the feature information into an optimization scheme for the SO library. Finally, the SO library is optimized based on the optimization scheme output by the analysis model. This method can quickly locate and resolve potential anomalies that may occur when the SO library runs in an emulator environment, while providing optimization solutions to improve the subsequent running state of the SO library and prevent the recurrence of similar anomalies. It effectively monitors and optimizes the SO library while significantly reducing time and manpower costs. Attached Figure Description

[0043] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0044] Figure 1 This is a flowchart illustrating one of the SO library optimization methods described in this specification.

[0045] Figure 2 This is a schematic diagram of the model structure of an analysis model provided in this specification;

[0046] Figure 3 This is a schematic diagram of an SO library optimization device provided in this specification;

[0047] Figure 4 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0049] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0050] Figure 1 This is a flowchart illustrating one SO library optimization method described in this specification, which specifically includes the following steps:

[0051] S100: In the simulator environment, obtain runtime data of the application's dynamically linked SO library.

[0052] All steps in the SO library optimization method provided in this manual can be implemented by any electronic device with computing capabilities, such as a terminal or server.

[0053] Shared Object (SO) library files, also known as dynamic link library files, are common binary files that typically contain code, data, and other information. Currently, SO libraries are primarily used in Linux systems and Android systems developed based on Linux for program execution and linking, enabling system-level and application-level code reuse and modular programming. These files can be reused by multiple applications, thereby saving storage space and improving execution efficiency.

[0054] The primary function of shared object (SO) libraries is to store the program code, variables, and other essential resources required by an application. These are typically the result of compiling source code and are crucial components in implementing software functionality. When a program runs, the operating system loads the corresponding shared library files, enabling the program to perform specific functions. Furthermore, because these files are shared, data and information can be transferred between different applications.

[0055] This method is applied to optimize SO libraries in an emulator environment that simulates the Android system on a computer, in order to diagnose and resolve compatibility and stability issues arising from SO libraries in the emulator environment. Based on this, this step first obtains the runtime data of the SO libraries in the emulator environment.

[0056] Typically, the runtime data of the SO library obtained in this step is data from an application running in the emulator environment. When executing this method, the application running in the emulator environment can be any Android application; this manual does not impose specific restrictions on this.

[0057] S102: Extract the feature information of the SO library from the running data.

[0058] After obtaining the running data of the SO library in step S100, this step allows for the extraction of feature information needed for subsequent analysis of the SO library from the running data. In this method, the feature information of the SO library is used as input to the analysis model, and the analysis model can output different results based on different feature information.

[0059] Additionally, in practical applications, the runtime data of the SO library contains a large amount of data, some of which is not helpful for the operation of the analysis model in this method. Furthermore, considering the diverse data types and formats obtained, preprocessing can be performed on the runtime data before extracting feature information. Specifically, the runtime data can be preprocessed, including at least one of data cleaning, formatting, data encoding, and normalization.

[0060] Based on the required feature information, corresponding rules can be set for preprocessing operations to ensure that the feature information is not filtered out by the preprocessing operations. Preprocessing operations can significantly reduce the amount of invalid data, standardize the data format, effectively simplify the complexity of subsequent data processing, and improve the overall efficiency of the SO library in optimizing this process.

[0061] Depending on the expected functionality of the analysis model, the feature information that needs to be extracted from the runtime data can also vary. Taking the technical problem addressed in this application as an example, when the analysis model mainly focuses on the compatibility and stability of SO libraries running in a simulator environment, the feature information may include at least one of the following: crash name, crash type, data location, interface information, and dependencies.

[0062] Among them, the crash name is the identifier of the crash that occurred in the application in the simulator; the crash type is the type of crash that occurred in the application; the data location is the location of the extracted data in the SO library; the interface information is the interface called when the SO library interacts with the application; and the dependency relationship is the information of other resources that the SO depends on at runtime.

[0063] S104: Input the feature information into the pre-trained analysis model to obtain the optimization scheme output by the analysis model.

[0064] After extracting feature information from the SO library's operational data in step S102, a pre-trained analysis model can be used to analyze the SO library in this step. In this method, the analysis model is used to obtain an optimization scheme for adjusting the operational state of the SO library based on the feature information.

[0065] To ensure the analysis model can achieve the above functions, various model structures are possible. This specification provides a specific embodiment for reference. Specifically, the analysis model may include at least an extraction subnet, a parsing subnet, and an optimization subnet. When using the analysis model to obtain an optimization scheme for the SO library, the feature information can be input into the extraction subnet of the pre-trained analysis model to extract the encoded features of the feature information; the encoded features are input into the parsing subnet to output the anomaly information of the SO library based on the encoded features; the anomaly information is input into the optimization subnet to obtain the optimization scheme output by the optimization subnet.

[0066] Figure 2 This is a schematic diagram of the model structure for an analytical model provided in this specification. Figure 2 As shown, the analysis model may include at least an extraction subnet, a parsing subnet, and an optimization subnet. The extraction subnet encodes feature information to obtain coded features that can be recognized by the neural network layers; the parsing subnet analyzes the anomalies and potential faults that occur or arise during the operation of the SO library based on the extracted coded features; and the optimization subnet determines corresponding optimization schemes based on the anomalies and faults identified by the analysis subnet, ultimately adjusting the operating state of the SO library according to the optimization scheme.

[0067] Among them, the encoding features are the data obtained by encoding the feature information extracted from the running data. In other words, the encoding features are the expression form of the feature information in a language that the computer can recognize. The anomaly information is the intermediate layer data obtained by the parsing subnet based on the encoding features. Its main meaning is to characterize what kind of anomaly has occurred in the SO library. The optimization scheme is the final output of the analysis model. The computer can adjust the SO library according to the optimization scheme output by the analysis model. That is, the computer can automatically execute the optimization scheme output by the analysis model.

[0068] S106: Adjust the SO library according to the optimization scheme.

[0069] After obtaining the optimization scheme for optimizing the SO library from the analysis model in step S104, the SO library can be adjusted and optimized in this step using the optimization scheme output by the analysis model.

[0070] When optimizing an SO library in an Android emulator environment using the SO library optimization method provided in this manual, real-time runtime data of the SO library can be collected during application operation. Feature information is extracted from this data, and a trained analysis model is used to input the feature information into an optimization scheme for the SO library. Finally, the SO library is optimized based on the optimization scheme output by the analysis model. This method can quickly locate and resolve potential anomalies that may occur when the SO library runs in an emulator environment, while providing optimization solutions to improve the subsequent running state of the SO library and prevent the recurrence of similar anomalies. It effectively monitors and optimizes the SO library while significantly reducing time and manpower costs.

[0071] Additionally, the analysis model used in this application can be pre-trained. Specifically, the running data of the SO library when the application runs and anomalies occur in a simulator environment can be collected from historical data as sample data, and the solutions to the anomalies can be determined as annotation schemes; sample feature information is extracted based on the sample data; the sample feature information is input into the analysis model to be trained to obtain the undetermined optimization scheme output by the analysis model; and the analysis model is trained based on the difference between the undetermined optimization scheme and the annotation scheme.

[0072] During the historical operation of the SO library, there are real processes of encountering and resolving anomalies. Therefore, historical operational data from the SO library can be directly utilized when training the analysis model. Since the primary purpose of the analysis model used in this method is to optimize and adjust the SO library when compatibility and stability issues arise, the historical operational data from when the SO library encountered anomalies can be used as training samples. Simultaneously, the solutions implemented in the past to address these anomalies can be used as annotation schemes for supervised training of the analysis model. Of course, users can also construct additional sample data and annotation schemes to train the analysis model, sacrificing training cost for better training results.

[0073] In supervised training, the primary basis for adjusting the model is the loss during model training. In this method, the loss of the analysis model can be obtained based on the difference between the output of the analysis model, i.e., the undetermined optimization scheme, and the labeled scheme. Based on this, when training the analysis model, specifically, the optimization objective is to minimize the difference between the undetermined optimization scheme and the labeled scheme, or to achieve model convergence, and the parameters of the analysis model are adjusted accordingly. When the recall rate of the analysis model is not less than a preset threshold, the training of the analysis model is considered complete.

[0074] Generally, the closer the model output is to the labeled data used during training, the better the model's performance meets the user's expectations. Specifically, in this method, the smaller the difference between the undetermined optimization scheme in the analysis model's output and the labeled scheme, the more effectively the analysis model's output can optimize the SO library. Therefore, in this method, minimizing the difference between the undetermined optimization scheme in the analysis model's output and the labeled scheme can be used as the optimization objective to adjust the parameters of the analysis model. Of course, during training, there may be situations where the model converges and the loss is difficult to reduce further; in this case, the training of the analysis model can also be considered complete.

[0075] Simultaneously, after adjusting the model parameters, the effectiveness of the analysis model can be tested and accepted using test set data. The test set includes runtime data from the SO library and corresponding optimization schemes. When testing the analysis model using the test set, if the recall rate of the analysis model is not less than a preset threshold, it indicates that the performance of the analysis model meets user expectations and can be formally deployed. In this method, the recall rate of the analysis model is the probability that when feature information extracted from any runtime data in the test set is input into the analysis model, the optimization scheme output by the analysis model is the same as the optimization scheme corresponding to that runtime data.

[0076] Furthermore, the analytical model used in this specification can be pre-trained on a large scale, and after being put into application, it can continuously collect data accumulated during the inference process, thereby fine-tuning and optimizing the analytical model itself. Specifically, the running data can be determined as training samples; the running data of the SO library adjusted according to the optimization scheme can be obtained as optimization data; the optimization scheme can be adjusted according to the optimization data to obtain an improved optimization scheme; and the analytical model can be fine-tuned using the training samples and the improved optimization scheme.

[0077] As is foreseeable, with the continuous changes in the simulator environment and the iterative upgrades of applications, it is difficult for the analysis model to maintain its optimal performance for an extended period. Each time the analysis model runs, it provides a corresponding optimization scheme based on the input. The results obtained after optimizing the SO library using the output optimization scheme may vary. However, in this method, the optimization scheme output by the analysis model can be adjusted and improved based on the results of optimizing the SO library using the adopted optimization scheme, resulting in a better optimization scheme, i.e., an improved optimization scheme.

[0078] Based on this, the collected data can be used as new training samples, the improved optimization scheme can be used as new annotations, and the analysis model can be trained and fine-tuned. Specifically, this involves fine-tuning the parameters of the analysis model based on the differences between the newly determined improved optimization scheme and the optimization scheme output by the analysis model. Since the number of training samples is relatively small, this process can be completed in real time during the operation of the analysis model without interrupting its deployment.

[0079] The above are the SO library optimization methods provided in this manual. Based on the same approach, this manual also provides corresponding SO library optimization devices, such as... Figure 3 As shown.

[0080] Figure 3 This specification provides a schematic diagram of an SO library optimization device, which specifically includes:

[0081] Module 200 is used to obtain runtime data of dynamically linked SO libraries during application runtime in the simulator environment;

[0082] Extraction module 202 is used to extract feature information of the SO library from the running data;

[0083] The input module 204 is used to input the feature information into a pre-trained analysis model to obtain the optimization scheme output by the analysis model;

[0084] Optimization module 206 is used to adjust the SO library according to the optimization scheme.

[0085] Optionally, the device further includes a processing module 208, specifically used to preprocess the running data, wherein the preprocessing includes at least one of data cleaning, formatting, data encoding, and normalization.

[0086] Optionally, the feature information includes at least one of the following: crash name, crash type, data location, interface information, and dependency relationship.

[0087] Optionally, the analysis model includes at least subnet extraction, subnet parsing, and subnet optimization;

[0088] The input module 204 is specifically used to input the feature information into the extraction subnet of the pre-trained analysis model, extract the encoded features of the feature information through the extraction subnet; input the encoded features into the parsing subnet, output the anomaly information of the SO library through the parsing subnet based on the encoded features; input the anomaly information into the optimization subnet to obtain the optimization scheme output by the optimization subnet.

[0089] Optionally, the device further includes a training module 210, specifically used to collect the running data of the SO library when the application runs and anomalies occur in the simulator environment from historical data, as sample data, and determine the solution to the anomaly as a labeling scheme; extract sample feature information based on the sample data; input the sample feature information into the analysis model to be trained to obtain the undetermined optimization scheme output by the analysis model; and train the analysis model based on the difference between the undetermined optimization scheme and the labeling scheme.

[0090] Optionally, the training module 210 is specifically used to adjust the parameters of the analysis model with the goal of minimizing the difference between the undetermined optimization scheme and the annotation scheme, or the convergence of the analysis model; and to determine that the analysis model training is complete when the recall rate of the analysis model is not less than a preset threshold.

[0091] Optionally, the device further includes a fine-tuning module 212, specifically used to determine the running data as training samples; acquire the running data of the SO library adjusted according to the optimization scheme as optimization data; adjust the optimization scheme according to the optimization data to obtain an improved optimization scheme; and fine-tune the analysis model using the training samples and the improved optimization scheme.

[0092] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The provided SO library optimization method.

[0093] This instruction manual also provides Figure 4 The diagram shows a schematic structural representation of the electronic device. Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The SO library optimization method described above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0094] Improvements in a technology can be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology can now be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement in methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog are the most commonly used. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0095] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0096] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0097] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0098] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0099] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0100] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0101] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0102] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0103] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0104] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0105] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0106] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0108] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0109] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.

Claims

1. An SO library optimization method, characterized in that, include: In the simulator environment, obtain runtime data of dynamically linked SO libraries during application runtime; Extract the feature information of the SO library from the runtime data; The feature information is input into a pre-trained analysis model to obtain the optimization scheme output by the analysis model; Adjust the SO library according to the optimization scheme.

2. The method as described in claim 1, characterized in that, Before extracting the feature information of the SO library from the runtime data, the method further includes: The running data is preprocessed, wherein the preprocessing includes at least one of data cleaning, formatting, data encoding, and normalization.

3. The method as described in claim 1, characterized in that, The feature information includes at least one of the following: crash name, crash type, data location, interface information, and dependency relationship.

4. The method as described in claim 1, characterized in that, The analysis model includes at least subnet extraction, subnet parsing, and subnet optimization; The feature information is input into a pre-trained analysis model to obtain an optimized solution output by the analysis model, specifically including: The feature information is input into the extraction subnet of a pre-trained analysis model, and the encoded features of the feature information are extracted through the extraction subnet. The encoded features are input into the parsing subnet, and the parsing subnet outputs the anomaly information of the SO library based on the encoded features; The abnormal information is input into the optimization subnet to obtain the optimization scheme output by the optimization subnet.

5. The method as described in claim 1, characterized in that, Pre-training the analysis model specifically includes: The running data of the SO library when the application runs and anomalies occur in the simulator environment is collected from historical data and used as sample data. The solutions to the anomalies are then identified as annotation schemes. Extract sample feature information from the sample data; The sample feature information is input into the analysis model to be trained to obtain the undetermined optimization scheme output by the analysis model. The analysis model is trained based on the differences between the proposed optimization scheme and the annotation scheme.

6. The method as described in claim 5, characterized in that, The analysis model is trained based on the differences between the proposed optimization scheme and the annotation scheme, specifically including: The optimization objective is to minimize the difference between the proposed optimization scheme and the labeled scheme, or to achieve convergence of the analysis model, and to adjust the parameters of the analysis model accordingly. When the recall rate of the analysis model is not less than a preset threshold, the analysis model is considered to have completed training.

7. The method as described in claim 1, characterized in that, The method further includes: The runtime data is used as training samples; Obtain the running data of the SO library adjusted according to the optimization scheme, and use it as optimization data; The optimization scheme is adjusted based on the optimization data to obtain an improved optimization scheme; The analysis model is fine-tuned using the training samples and the improved optimization scheme.

8. An SO library optimization device, characterized in that, include: The acquisition module is used to acquire runtime data of dynamically linked SO libraries during application runtime in the simulator environment; The extraction module is used to extract feature information of the SO library from the runtime data; The input module is used to input the feature information into a pre-trained analysis model to obtain the optimization scheme output by the analysis model. An optimization module is used to adjust the SO library according to the optimization scheme.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 7.