CN115809062A - Operating system development processing method, device, equipment and storage medium - Google Patents

Operating system development processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115809062A
CN115809062A CN202211423033.8A CN202211423033A CN115809062A CN 115809062 A CN115809062 A CN 115809062A CN 202211423033 A CN202211423033 A CN 202211423033A CN 115809062 A CN115809062 A CN 115809062A
Authority
CN
China
Prior art keywords
file
operating system
component
application program
software development
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202211423033.8A
Other languages
Chinese (zh)
Inventor
余洋
邓苏南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202211423033.8A priority Critical patent/CN115809062A/en
Publication of CN115809062A publication Critical patent/CN115809062A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The disclosure provides a development processing method, a development processing device, equipment and a storage medium of an operating system, and relates to the technical field of computers, in particular to the technical field of operating system development. The specific implementation scheme is as follows: responding to a dependency removal request for a third-party software development tool set, and acquiring a bytecode file obtained by compiling source codes of the third-party software development tool set by an operating system, wherein the dependency removal request is used for requesting to remove the dependency of the third-party software development tool set on an application program window component in the operating system; modifying the byte code file according to the dependency information of the third-party software development tool set on the application program window assembly to obtain an updated byte code file; and converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.

Description

Operating system development processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to operating system development technologies in computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for developing and processing an operating system.
Background
In the development process of the operating system, the situation that further development is carried out on the basis of a third-party software development kit is often encountered.
When the third-party software development kit call strongly depends on the application window component in the operating system, and the developer of the operating system cannot change the source code of the third-party software development kit, great inconvenience in development and use is brought.
Disclosure of Invention
The disclosure provides a development processing method, a device, equipment and a storage medium of an operating system.
According to a first aspect of the present disclosure, there is provided a method of development processing of an operating system, the method comprising:
responding to a dependency removal request for a third-party software development tool set, and acquiring a bytecode file obtained by compiling source codes of the third-party software development tool set by an operating system, wherein the dependency removal request is used for requesting to remove the dependency of the third-party software development tool set on an application program window component in the operating system;
modifying the bytecode file according to the dependency information of the third-party software development tool set on the application program window assembly to obtain an updated bytecode file;
and converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.
Further, the method further comprises:
acquiring a background service component in the operating system;
and performing reflection proxy on the application program window component by adopting the background service component so as to transfer the dependence of the third-party software development tool set on the application program window component to the background service component.
Further, the modifying the bytecode file according to the dependency information of the third-party software development tool set on the application program window component to obtain an updated bytecode file, including:
acquiring the dependency information carried in the third-party software development tool set;
determining a code to be replaced in the byte code file according to the dependency information, wherein the code to be replaced is a code in the byte code file, and the file information of the byte code file is consistent with the dependency information;
and replacing the codes to be replaced in the bytecode file by adopting an extensible markup language file, wherein the extensible markup language file comprises replacement codes and a declaration file, the declaration file is used for declaring class names and function signatures of the codes to be replaced, and the replacement codes are used for replacing the codes to be replaced.
Further, converting the updated bytecode file into an executable file of the operating system, including:
and adopting a file conversion tool in the operating system to convert the member variables, the methods and the constants of the updated bytecode file to obtain the executable file.
Further, the performing a reflection proxy on the application window component by using the background service component includes:
acquiring a context object of the background service component;
and reflecting and acting the key node function of the application program window component by adopting the context object of the background service component.
Further, the performing a reflection proxy on the key node function of the application window component by using the context object of the background service component includes:
acquiring a key node function of the application program window component and a parent node function of the key node function, wherein the key node function comprises at least one of the following functions: a resource function resource, a package manager function packageManager, a content observer function contentrole, a window manager function windowManager;
and reflecting and assigning the context object of the background service component to a key node function of the application program window component or the parent node function so as to perform reflection proxy on the key node function.
Further, the context object of the background service component is used for defining an access interface and a call interface, the access interface is used for accessing the global environment information of the operating system and the service provided by the operating system, and the call interface is used for calling an application program in the operating system to execute a target operation.
According to a second aspect of the present disclosure, there is provided an operating system development processing apparatus, the apparatus including:
the device comprises a first obtaining unit, a second obtaining unit and a third-party software development tool set, wherein the first obtaining unit is used for responding to a dependency release request for the third-party software development tool set, and obtaining a bytecode file obtained by compiling source codes of the third-party software development tool set by an operating system, and the dependency release request is used for requesting to release the dependency of the third-party software development tool set on an application program window component in the operating system;
the updating unit is used for modifying the byte code file according to the dependency information of the third-party software development tool set on the application program window assembly so as to obtain an updated byte code file;
and the conversion unit is used for converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.
Further, the apparatus further comprises:
the second acquisition unit is used for acquiring a background service component in the operating system;
and the proxy unit is used for reflecting proxy on the application program window component by adopting the background service component so as to transfer the dependence of the third-party software development tool set on the application program window component to the background service component.
Further, the proxy unit includes:
the first acquiring subunit is configured to acquire the dependency information carried in the third-party software development tool set;
the determining subunit is configured to determine a code to be replaced in the bytecode file according to the dependency information, where the code to be replaced is a code in the bytecode file whose file information is consistent with the dependency information;
and the replacing subunit is used for replacing the code to be replaced in the bytecode file by adopting an extensible markup language file, wherein the extensible markup language file comprises a replacing code and a declaration file, the declaration file is used for declaring the class name and the function signature of the code to be replaced, and the replacing code is used for replacing the code to be replaced.
Further, the conversion unit includes:
and the conversion subunit is used for converting the member variables, the methods and the constants of the updated bytecode file by adopting a file conversion tool in the operating system to obtain the executable file.
Further, the proxy unit includes:
the second acquiring subunit is used for acquiring the context object of the background service component;
and the agent subunit is used for reflecting and acting the key node function of the application program window component by adopting the context object of the background service component.
Further, the agent subunit includes:
an obtaining module, configured to obtain a key node function of the application window component and a parent node function of the key node function, where the key node function includes at least one of: resource function resource, package manager function packageManager, content observer function contentResolver, window manager function windowManager;
and the proxy module is used for reflecting and assigning the context object of the background service component to a key node function of the application program window component or the parent node function so as to perform reflection proxy on the key node function.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods described herein.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of the preceding claims.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising: a computer program, stored in a readable storage medium, from which at least one processor of an electronic device can read the computer program, execution of the computer program by the at least one processor causing the electronic device to perform the method of the first aspect.
According to the technology disclosed by the invention, in response to a dependency release request for the third-party software development tool set, before converting the compiled bytecode file into an executable file of an operating system, the dependency information of the third-party software development tool set on the application program window component is determined, so that the bytecode file is modified according to the dependency information. And then, converting the bytecode file updated according to the dependency information into an executable file by using a file conversion tool, so that the Android operating system develops an application program installation file based on the executable file. The method and the device can achieve the purposes of removing the dependence of the third-party software development kit on the application program window component and reducing the development and maintenance cost under the conditions that the third party does not need to be contacted to modify the source code of the third-party software development kit and the third party does not need to pay for the request.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of a development processing method of an operating system according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a development processing scenario of an operating system in which embodiments of the present disclosure may be implemented;
FIG. 3 is a flowchart of a method for development processing of an operating system according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for development processing of an operating system according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of a method for development processing of an operating system according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of a development processing device for an operating system according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of an alternative operating system development processing apparatus provided in accordance with an embodiment of the present disclosure;
fig. 8 is a block diagram of an electronic device for implementing a development processing method of an operating system according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terms referred to in this application are explained first:
software development kit: broadly refers to a collection of related documents, paradigms and tools that assist in the development of a certain class of software. Generally refers to the collection of development tools used by some software engineers to build application software for a particular software package, software framework, hardware platform, operating system, etc.
Assembly of: refers to the portion of the software block on which an application depends, and almost all modern software systems are composed of components. The components often show different rates of change of code for different parts of the system and have different life cycles.
In an Android operating system, an application window component activity is used as an Android application component and is mainly used for being responsible for displaying a foreground interface, a large amount of system calls are involved in the activity component, certain time is consumed for starting the activity component, and the activity component can be normally used only when a window is located in the foreground interface.
When the third-party software development kit is further developed on the basis of the third-party software development kit, for some scenes which only need background silent starting, that is, scenes which only need background services and do not need interface display, the dependence of the third-party software development kit on the activity component is released at the moment, and the method is particularly important.
The source code of the third-party software development kit is generally confused and provided to developers in the form of compression packages such as jar or aar, and the like, and cannot be directly modified to relieve component dependence.
In order to solve the above problems, the present disclosure provides a method, an apparatus, a device, and a storage medium for development processing of an operating system, which are applied to the technical field of operating system development in the technical field of computers, so as to achieve the purposes of removing the dependency of a third-party software development kit on an activity component and reducing the development and maintenance costs.
Fig. 1 is a flowchart of a method for developing and processing an operating system according to an embodiment of the present disclosure, and as shown in fig. 1, the method for developing and processing an operating system according to the present disclosure includes the following steps:
s101, responding to a dependency release request aiming at the third-party software development tool set, and acquiring a byte code file obtained by compiling a source code of the third-party software development tool set by an operating system.
And S102, modifying the byte code file according to the dependency information of the third-party software development tool set on the application program window assembly to obtain an updated byte code file.
And S103, converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.
Optionally, the dependency resolution request is used to request resolution of the third-party software development tool set on the application window component in the operating system.
Optionally, the operating system may be an Android operating system, the application window activity component serves as an Android application component, and is mainly used for being responsible for displaying a foreground visual interface and interacting with a user, and the design of the application window activity component is very similar to that of a Web page and cannot run in a background.
In one example, during the development process of the Android operating system, a third-party software development tool set, namely a third-party software development tool kit sdk, such as sdk for providing a map service, a third-party payment service and a music playing service, is inevitably introduced.
When sdk cannot meet the development requirement of the Android operating system, the developer of the Android operating system cannot or hardly push a third party to modify sdk, for example, a certain function of a certain sdk needs to be displayed in the foreground by depending on an application window activity component, and the development requirement of the Android operating system only needs to be displayed in the background, and does not want a user to perceive the functional service.
Therefore, when the Android operating system is further developed and processed on the basis of sdk, if the dependence of the third-party software development kit on the activity component needs to be removed, a dependence removal request for the third-party software development kit can be generated to request the removal of the dependence of the third-party software development kit on the activity component, and further, according to the embodiment of the disclosure, the development requirement of the Android operating system can be met.
In an example, as shown in fig. 2, which is a schematic diagram of a development scenario of an Android operating system, the Android operating system may compile engineering source codes by using a Java compiler Javac, for example, in a process of compiling source codes of a third-party software development tool set, a Java command of the Java may be specifically used to compile source codes of the third-party software development tool set, such as abbreviated Java, kotlin, aidl, and the like, into a corresponding byte code file (class file).
It should be noted that the executable binary file obtained by compiling and linking a C + + program can only run on a specified hardware platform and operating system, because the binary file contains the machine language for the target processor. The Java compiler translates the instruction of the Java source file into the bytecode, the bytecode is the 'machine language' of a Java Virtual Machine (JVM), and the bytecode can follow the specification of the virtual machine of the JVM of the Android operating system and can be executed by the JVM of the Android operating system.
In response to a request for releasing the dependency on the third-party software development tool set, as shown in fig. 2, before converting the compiled bytecode file into an executable file of the operating system, determining dependency information of the third-party software development tool set on the application program window component in a bytecode instrumentation manner, for example, obtaining the dependency information from a dependency library of the third-party software development tool set, so as to modify the bytecode file according to the dependency information.
Then, in the embodiment of the present disclosure, on the Dalvik and Art virtual machines of the Android operating system, a file conversion tool may be adopted to integrate the member variables, methods, constants, and the like of the bytecode file updated according to the dependency information into an executable file (dex file) of the Android operating system, so that the Android operating system develops an application installation file based on the executable file.
Still as shown in fig. 2, in the embodiment of the present disclosure, a packaging tool is used to package a resource file input based on an application initialization entry, a compiled resource file obtained through packaging and compiling by the resource packaging tool, and an executable file set obtained from other resource files and a plurality of executable files, so as to obtain an application installation package.
And then, signing the application installation package by using an application signing tool, and aligning and optimizing the signed application installation package by using a byte alignment optimizing tool to obtain the signed and aligned application installation package.
Optionally, the sdk dependency information on the activity component may include, but is not limited to: sdk functions, members, class names, etc. for the dependency points of activity components. In the embodiment of the present disclosure, for example, the development requirements of the Android operating system are as follows: sdk, when the request is silent at the background, the bytecode file can be modified directly according to the dependency information, so that the dependence of sdk on the activity component is replaced by the dependence on other components (e.g., background service component), and further, the dependence of sdk on the activity component can be removed, foreground display is not required, and only background silent start is performed.
According to the embodiment of the disclosure, the dependence of the third-party software development kit on the activity component can be released under the condition that the third party is not required to be contacted to modify the source code of sdk and the third party is not required to pay for the request, and the development and maintenance cost can be reduced.
In an example, as shown in fig. 3, the step S102 of modifying the bytecode file according to the dependency information of the third-party software development tool set on the application window component to obtain an updated bytecode file includes:
and S1021, acquiring the dependency information carried in the third-party software development tool set.
And S1022, determining the codes to be replaced in the bytecode file according to the dependency information.
And S1023, replacing the codes to be replaced in the byte code file by adopting the extensible markup language file.
The code to be replaced is a code in which the file information in the byte code file is consistent with the dependency information.
Since the Android operating system has a very complex compiling flow, in order to implement that bytecode instrumentation operation is conveniently executed like usual java or kotlin code compiling under the condition that developers do not know the compiling flow and the structure of the bytecode, in the embodiment of the disclosure, a form of configuring an xml file is adopted to complete the bytecode instrumentation operation to be implemented, that is, the bytecode file is modified by adopting an xml file replacement mode.
In one example, the xml file includes a replacement code and a declaration file, the declaration file declares a class name and a function signature of the code to be replaced, and the replacement code replaces the code to be replaced.
For example, an xml file can be used for declaring class names and function signatures (which comply with uniqueness) which need to be replaced in the development process, and replacement codes which meet the development requirements of the Android operating system are pre-written in the xml file.
After the compiling process of the Android operating system is triggered, the application framework layer frame for executing the byte code instrumentation scans all class byte code files to match class names and function signatures required to be replaced, which are declared by the xml file, and if the class names and the function signatures are successfully matched, the function implementation is replaced by replacing codes written in the xml file; if the matching is not successful, skipping directly and scanning the next byte code file.
According to the embodiment of the disclosure, after a class file is compiled by a language programming compiler java, a byte code instrumentation operation mode is adopted, after file information such as functions, members and class names of the byte code file is obtained by scanning, according to development requirements of an Android operating system, for example, source codes of sdk with file information consistent with dependency information in the byte code file need to be modified according to the development requirements, functions, members and the like of the source codes to be replaced in the byte code file are replaced by the functions and members in the replacement codes, so that codes to be replaced in the byte code file are modified, and the purpose of removing the dependency of a third-party software development kit on activity components is achieved.
In one example, the step S103 of converting the updated bytecode file into an executable file of the operating system includes:
and S1031, adopting a file conversion tool in the operating system to convert the member variables, methods and constants of the updated bytecode file to obtain the executable file.
In the embodiment of the disclosure, on the Dalvik and Art virtual machines of the Android operating system, a file conversion tool may be adopted to integrate member variables, methods, constants, and the like of the updated bytecode file into an executable file (dex file) recognizable by the virtual machine of the Android operating system, and then, an application installation package is generated based on the executable file.
Therefore, according to the embodiment of the disclosure, after the third-party software development kit is released from dependence on the activity component, the application installation package meeting the development requirement is generated and obtained based on the executable file obtained by converting the updated byte code file, so that the efficiency of developing the application can be improved, and the development cost is reduced.
In one example, as shown in fig. 4, the method further includes:
s201, obtaining the background service component in the operating system.
S202, the background service component is adopted to conduct reflection proxy on the application program window component, so that the dependence of the third-party software development tool set on the application program window component is transferred to the background service component.
Optionally, in the embodiment of the present disclosure, the background service component is a service component of an Android system, in the Android operating system, the service component is mainly responsible for tasks that need to run for a long time, and the service component does not need an interface as compared with the activity component, so that the method is suitable for developing functions that do not have a user interface, but need to run for a long time in the background and are imperceptible to a user, and the functions generally include playing of music, obtaining of network data, time-consuming operation, and the like.
It should be noted that the service component is generally started by the activity component, but does not depend on the activity component, and the service component has its own life cycle, and even if the activity component that starts the service component is destroyed, the service component can still continue to operate until its life cycle is over.
In one example, the reflection proxy replaces the context object in the activity component with the context object of the service, and relies on the execution of the key function node in the activity component proxy. It will also be appreciated that the activity component of the reflected agent in embodiments of the present disclosure performs only a few lightweight operations.
According to the embodiment of the disclosure, the bytecode file is converted into the executable file stage in the compiling stage of the Android operating system, the bytecode instrumentation operation is executed, and for unreleasable dependencies, the dependency of activity files can be fully replaced by service file dependencies in a reflective proxy manner, so that the limitation of the Android operating system is bypassed, and finally the development requirement of sdk for background silent start is met.
In another example, in the step S202, performing a reflection proxy on the application window component by using the background service component includes:
s2021, obtaining the context object of the background service component.
S2022, reflecting and proxying the key node function of the application program window component by adopting the context object of the background service component.
In one example, the context object of the background service component is used to define an access interface and a call interface, where the access interface is used to access global environment information of the operating system and services provided by the operating system, and the call interface is used to call an application program in the operating system to execute a target operation.
For example, the context object may be understood as a working environment in which a current object of the background service component is located in the application program, an access interface for defining some global environment information for accessing the Android operating system, and services provided by the Android operating system, such as accessing a phone service, a window service, and the like in the Android operating system. The background service component may also invoke application-level operations in the operating system through a call interface, such as launching an activity component and a service component, sending broadcast messages, and so on.
In the above example, the key node function of the activity component is reflection-proxied by the context object in the service component, for example, the member attribute of the key node function is reflection-proxied. In the embodiment of the disclosure, by means of a reflective proxy, detection of an Android operating system on a key node function of an activity component can be bypassed, a process which must be executed by a native activity component does not need to be executed, and meanwhile, by matching with the above bytecode instrumentation scheme, dependence of a third-party software development kit on the activity component can be thoroughly removed.
Optionally, the native activity component has to execute a process, such as: mApplication member property of proxy activity component, mBase member property of proxy ContextWrapper class, packagemenger, contentReserver, resource, the me, intent, and classLoader of proxy activity, and so on.
It should be noted that, generally, the application program developed by the Android operating system calls an API interface provided by an application framework layer frame, and a code of the application framework layer is written by a Java code, so that a developer provides an API interface required by the application program to be developed.
The activity component is part of a frame, so, as shown in fig. 5, the activity component may be reflection-proxied by the service component, for example, the service component may reflect mApplication member of the activity component in the frame to mApplication by passing mApplication and windows manager to the activity component by means of reflection proxying, and may reflect mBase member attribute of ContextWrapper class in the frame to point mBase member to mApplication.
Therefore, according to the embodiment of the disclosure, the dependence of sdk on the activity component can be transferred to the service component, and after the dependence of sdk on the activity component is released, the service can be operated only in the background without being displayed in the foreground interface.
In one example, the S2022, performing a reflection proxy on the key node function of the application window component by using the context object of the background service component, includes:
s2030, obtaining the key node function of the application program window component and the parent node function of the key node function.
S2030, assigning the context object of the background service component to the key node function of the application window component or the parent node function in a reflective manner, so as to perform reflective proxy on the key node function.
Optionally, as also shown in fig. 5, the key node function includes at least one of the following: resource function resource, package manager function packageManager, content observer function contentbrowser, and window manager function windowManager.
In addition, in this embodiment of the present disclosure, the proxied key node function may further include: context function, mBase function, mAppplication function, getPackageManager function, getSystemServer function, getBaseContentResolver function, getWindowManager function, and the like.
In one example, since the activity component of the Android operating system is running, some specific resources or classes need to be accessed. The specific resources or classes form the running context of the Android application program.
In the embodiment of the disclosure, the runtime Context of the activity component is described by a contextimpr class, that is, each activity component is associated with a contextimpr class, and the contextimpr class inherits the Context class. For example, if the Context Impl class is used as the key node function of the activity component, the Context class can be understood as the parent node function.
It is understood that the Activity component references a ContextImpl object by its parent class, contextThemeWrapper and the member variable mwase of the ContextWrapper, so that the Activity component can later perform specific operations through the ContextImpl object, such as launching a service component, registering a broadcast receiver, and launching a Content Provider component.
According to the embodiment of the disclosure, the purpose of reflecting proxy on the key node function can be achieved by reflecting and assigning the context object of the service component to the key node function of the activity component or the parent node function, that is, the embodiment of the disclosure provides a processing method for reflecting the object of the activity component by using the context object of the service component, the complete life cycle and the foreground display task of the activity component do not need to be executed, the verification of the activity component by an Android operating system and sdk can be bypassed, and the dependence of sdk on the activity component is released.
It should be noted that the third-party software development kit in this embodiment is not specific to a specific third-party user, and cannot reflect the software development kit information of a specific third-party user. It should be noted that the third-party software development kit in this embodiment is derived from a public data set.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
Fig. 6 is a schematic frame diagram of an operating system development processing apparatus according to an embodiment of the present disclosure, and as shown in fig. 6, the present disclosure also provides an operating system development processing apparatus 600, including:
a first obtaining unit 601, configured to obtain a bytecode file obtained by an operating system compiling source code of a third-party software development tool set in response to a dependency removal request for the third-party software development tool set, where the dependency removal request is used to request that the third-party software development tool set be removed from a dependency on an application window component in the operating system.
An updating unit 602, configured to modify the bytecode file according to the dependency information of the third-party software development tool set on the application window component, so as to obtain an updated bytecode file.
A converting unit 603, configured to convert the updated bytecode file into an executable file of the operating system, so that the operating system develops an application installation file based on the executable file.
Fig. 7 is a schematic diagram of a framework of an optional operating system development processing apparatus according to an example of the present disclosure, as shown in fig. 7, the operating system development processing apparatus 600 further includes:
a second obtaining unit 701, configured to obtain a background service component in the operating system.
The proxy unit 702 is configured to perform a reflective proxy on the application window component by using the background service component, so as to transfer the dependency of the third-party software development tool set on the application window component to the background service component.
In an example according to the present disclosure, the proxy unit includes:
and the first acquiring subunit is configured to acquire the dependency information carried in the third-party software development tool set.
And the determining subunit is used for determining a code to be replaced in the bytecode file according to the dependency information, wherein the code to be replaced is a code in which the file information in the bytecode file is consistent with the dependency information.
And the replacing subunit is used for replacing the codes to be replaced in the bytecode file by adopting an extensible markup language file, wherein the extensible markup language file comprises replacing codes and a declaration file, the declaration file is used for declaring class names and function signatures of the codes to be replaced, and the replacing codes are used for replacing the codes to be replaced.
According to an example of the present disclosure, the conversion unit includes:
and the conversion subunit is used for converting the member variables, the methods and the constants of the updated bytecode file by adopting a file conversion tool in the operating system to obtain the executable file.
According to an example of the present disclosure, the proxy unit includes:
and the second acquiring subunit is used for acquiring the context object of the background service component.
And the agent subunit is used for reflecting and acting the key node function of the application program window component by adopting the context object of the background service component.
According to an example of the present disclosure, the agent subunit includes:
and the acquisition module is used for acquiring the key node function of the application program window component and the parent node function of the key node function. Wherein the key node function includes at least one of: resource function resource, package manager function packageManager, content observer function contentbrowser, and window manager function windowManager.
And the proxy module is used for reflecting and assigning the context object of the background service component to a key node function of the application program window component or the parent node function so as to perform reflection proxy on the key node function.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
According to an embodiment of the disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of the preceding claims.
According to an embodiment of the present disclosure, there is provided a computer program product including: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
There is also provided, in accordance with an embodiment of the present disclosure, an electronic device, fig. 8 shows a schematic block diagram of an example electronic device 800 that may be used to implement an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, such as the development processing method of the operating system. For example, in some embodiments, the development processing method for an operating system may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the development processing method of the operating system described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the development processing method of the operating system in any other suitable manner (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server may be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and VPS service ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (16)

1. A method of development processing of an operating system, the method comprising:
responding to a dependency removal request for a third-party software development tool set, and acquiring a bytecode file obtained by compiling source codes of the third-party software development tool set by an operating system, wherein the dependency removal request is used for requesting to remove the dependency of the third-party software development tool set on an application program window component in the operating system;
modifying the byte code file according to the dependency information of the third-party software development tool set on the application program window assembly to obtain an updated byte code file;
and converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.
2. The method of claim 1, wherein the method further comprises:
acquiring a background service component in the operating system;
and reflecting and acting the application program window component by adopting the background service component so as to transfer the dependence of the third-party software development tool set on the application program window component to the background service component.
3. The method of claim 1, wherein modifying the bytecode file according to the dependency information of the third-party software development tool set on the application window component to obtain an updated bytecode file comprises:
acquiring the dependency information carried in the third-party software development tool set;
determining a code to be replaced in the byte code file according to the dependency information, wherein the code to be replaced is a code in the byte code file, and the file information of the byte code file is consistent with the dependency information;
and replacing the codes to be replaced in the bytecode file by adopting an extensible markup language file, wherein the extensible markup language file comprises replacement codes and a declaration file, the declaration file is used for declaring class names and function signatures of the codes to be replaced, and the replacement codes are used for replacing the codes to be replaced.
4. The method of any of claims 1 or 3, wherein converting the updated bytecode file into an executable file of the operating system comprises:
and adopting a file conversion tool in the operating system to convert the member variables, the methods and the constants of the updated bytecode file to obtain the executable file.
5. The method of claim 2, wherein said employing the background services component to reflectively proxy the application window component comprises:
acquiring a context object of the background service component;
and reflecting and acting the key node function of the application program window component by adopting the context object of the background service component.
6. The method of claim 5, wherein said reflection proxying key node functions of said application window component with context objects of said background services component comprises:
acquiring a key node function of the application program window component and a parent node function of the key node function, wherein the key node function comprises at least one of the following functions: a resource function resource, a package manager function packageManager, a content observer function contentrole, a window manager function windowManager;
and reflecting and assigning the context object of the background service component to a key node function of the application program window component or the parent node function so as to perform reflection proxy on the key node function.
7. The method of claim 5 or 6, wherein the context object of the background service component is used for defining an access interface and a call interface, the access interface is used for accessing the global environment information of the operating system and the service provided by the operating system, and the call interface is used for calling an application program in the operating system to execute a target operation.
8. An apparatus for development processing of an operating system, the apparatus comprising:
the device comprises a first obtaining unit, a second obtaining unit and a third-party software development tool set, wherein the first obtaining unit is used for responding to a dependency release request for the third-party software development tool set, and obtaining a bytecode file obtained by compiling source codes of the third-party software development tool set by an operating system, and the dependency release request is used for requesting to release the dependency of the third-party software development tool set on an application program window component in the operating system;
the updating unit is used for modifying the byte code file according to the dependency information of the third-party software development tool set on the application program window assembly so as to obtain an updated byte code file;
and the conversion unit is used for converting the updated bytecode file into an executable file of the operating system, so that the operating system develops an application program installation file based on the executable file.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the second acquisition unit is used for acquiring a background service component in the operating system;
and the proxy unit is used for reflecting proxy of the application program window component by adopting the background service component so as to transfer the dependence of the third-party software development tool set on the application program window component to the background service component.
10. The apparatus of claim 8, wherein the proxy unit comprises:
the first acquiring subunit is configured to acquire the dependency information carried in the third-party software development tool set;
the determining subunit is configured to determine a code to be replaced in the bytecode file according to the dependency information, where the code to be replaced is a code in the bytecode file whose file information is consistent with the dependency information;
and the replacing subunit is used for replacing the code to be replaced in the bytecode file by adopting an extensible markup language file, wherein the extensible markup language file comprises a replacing code and a declaration file, the declaration file is used for declaring the class name and the function signature of the code to be replaced, and the replacing code is used for replacing the code to be replaced.
11. The apparatus according to any one of claims 8 or 10, wherein the conversion unit comprises:
and the conversion subunit is used for converting the member variables, the methods and the constants of the updated bytecode file by adopting a file conversion tool in the operating system to obtain the executable file.
12. The apparatus of claim 9, wherein the proxy unit comprises:
the second acquiring subunit is used for acquiring the context object of the background service component;
and the agent subunit is used for reflecting and acting the key node function of the application program window component by adopting the context object of the background service component.
13. The apparatus of claim 12, wherein the proxy subunit comprises:
an obtaining module, configured to obtain a key node function of the application window component and a parent node function of the key node function, where the key node function includes at least one of: a resource function resource, a package manager function packageManager, a content observer function contentrole, a window manager function windowManager;
and the proxy module is used for reflecting and assigning the context object of the background service component to a key node function of the application program window component or the parent node function so as to perform reflection proxy on the key node function.
14. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
15. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
16. A computer program product comprising a computer program which, when executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202211423033.8A 2022-11-14 2022-11-14 Operating system development processing method, device, equipment and storage medium Withdrawn CN115809062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211423033.8A CN115809062A (en) 2022-11-14 2022-11-14 Operating system development processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211423033.8A CN115809062A (en) 2022-11-14 2022-11-14 Operating system development processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115809062A true CN115809062A (en) 2023-03-17

Family

ID=85483155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211423033.8A Withdrawn CN115809062A (en) 2022-11-14 2022-11-14 Operating system development processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115809062A (en)

Similar Documents

Publication Publication Date Title
EP3377968B1 (en) Dynamic update of an application in compilation and deployment
CN107041158B (en) Restrictive access control for modular reflection
CN113010181B (en) Deployment method and device of operators in deep learning framework and electronic equipment
US11366643B2 (en) Generating dynamic modular proxies
US10310827B2 (en) Flow-based scoping
CN112149169A (en) Application access method and device and computer readable storage medium
CN109408256B (en) Application calling method and device
CN114327481A (en) Code processing method, device, equipment and storage medium
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
US11163545B2 (en) Type inference optimization
CN112835615A (en) Plug-in processing method and device for software development kit and electronic equipment
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN115809062A (en) Operating system development processing method, device, equipment and storage medium
CN112379885B (en) Applet compiling method, device, equipment and readable storage medium
CN114579334A (en) Communication method, communication device, electronic equipment and storage medium
CN114297119A (en) Intelligent contract execution method, device, equipment and storage medium
CN116685946A (en) Reloading of updated shared libraries without stopping execution of an application
CN111782196A (en) MVP architecture-based development method and device
US11689630B2 (en) Request processing method and apparatus, electronic device, and computer storage medium
CN114968200A (en) Software development kit assembly method, related device and computer program product
CN117632286A (en) OpenApi implementation method and device based on dynamic class loading
CN115145627A (en) Method, device, equipment and storage medium for building local operation environment of plug-in
CN114327496A (en) Code injection method, device, equipment and storage medium
CN115576713A (en) GRPC service application method and device based on class library
CN115934123A (en) Client logic updating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20230317