Application development method, device, equipment and medium based on SDK automatic renaming
Through the method of automatically rename and encapsulation of SDK, the problem of conflicts between compiler package names and resource names caused by repeated references of SDK is solved, which improves integration convenience and privacy, and improves efficiency and sustainability through automated scripts.
Patent Information
- Application Number
- CN202210961390.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-08-11
AI Technical Summary
When solving the problem of conflict between compiler package name and resource name caused by repeated references in the prior art, there are problems of low convenience and low privacy, and manual package name change is inefficient and error-prone.
Through the application development method based on the automatic name change of SDK, the original SDK is used to encapsulate and obtain software development tools, traverse the application installation package to obtain package information and resource file information, and modify the same content area using automated modification scripts to form a new software development tool, and input it into the SDK manager to complete application development.
There is no need to split the SDK, just one SDK is required, which improves the convenience of integration, ensures privacy, and improves efficiency, avoids errors and achieves continuity through automated scripts.
Smart Images

Figure CN115268900B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application development technology, and in particular to an application development method, device, electronic device and computer-readable storage medium based on SDK automatic renaming. Background Art
[0002] In line with the principle of not reinventing the wheel and minimizing the encapsulation of functions, an Android application will use many SDKs. SDKs will also use other SDKs to form nested references. Then, there will be a problem. It is possible that the code of the same SDK will be repeatedly referenced, which will cause conflicts, resulting in the compiler reporting conflicts between package names and resource names. For example, an App references SDK 2 and SDK 3, and SDK2 and SDK 3 both reference SDK 1. If SDK2 and SDK3 are both output as an SDK, then they will contain the content of SDK 1, and integrating them into the App will cause conflicts.
[0003] Currently, the following simple solution exists: if an SDK references other SDKs, then when it is used, it is simply referenced in the compilation stage, and it is not packaged into the SDK when used. In other words, one SDK is split into multiple SDKs. Finally, when the Android application is used, it will reference the multiple SDKs that have been split. However, this solution has the following defects: Low convenience: Since one SDK is split into multiple SDKs, the integrator has to reference multiple SDKs, which reduces the convenience of integration; Low privacy: When developing an APP, it is only necessary to provide one SDK to implement a certain function, but if this solution is adopted, some other more detailed SDKs must also be provided. This will cause part of the SDK's logic to be exposed, resulting in lower privacy.
[0004] Therefore, there is an urgent need for an application development method, device, electronic device, and computer-readable storage medium based on SDK automatic renaming that can solve the problem of repeated references to compiler package names and resource names that lead to partial exposure of SDK logic and result in low privacy, improve integration convenience, and ensure privacy. Summary of the invention
[0005] The present invention provides an application development method based on automatic SDK renaming to solve the problems of low convenience of existing solutions: since one SDK is split into multiple SDKs, the integrator has to reference multiple SDKs, which reduces the convenience of integration; low privacy: when developing an APP, it is originally only necessary to provide one SDK to implement a certain function, but if this solution is adopted, some other more detailed SDKs must also be provided, which will cause part of the SDK's logic to be exposed, resulting in a problem of low privacy.
[0006] To achieve the above object, the present invention provides an application development method based on SDK automatic renaming, comprising:
[0007] Perform SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and package the target application program through the first software development tool and the second software development tool to form an application installation package;
[0008] Traversing the application installation package to obtain package information and resource file information; and obtaining the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0009] Modifying the content of the same content area by using a preset automatic modification script to form a new first software development tool and a new second software development tool;
[0010] The new first software development tool and the new second software development tool are input into a preset SDK manager to complete application development.
[0011] Optionally, in the step of performing SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and packaging the target application program by using the first software development tool and the second software development tool to form an application installation package, the step includes:
[0012] Based on the pre-configured parameters, referencing the original SDK that depends on it forms a first software development tool and a second software development tool, and using the first software development tool and the second software development tool to write an application program for the source program obtained according to the original SDK to form a target application program;
[0013] The target application is matched with the first software development tool and the second software development tool to form an application installation package.
[0014] Optionally, traversing the application installation package to obtain package information and resource file information includes:
[0015] Traversing the application installation packages through a preset information combing component to form a manifest file about all application installation packages;
[0016] Information is extracted from the manifest file to obtain package information and resource file information about the application installation package; wherein the package information at least includes a file package name and package file attributes; and the resource file information at least includes a resource file name and a resource file suffix.
[0017] Optionally, acquiring the same content area of the first software development tool and the second software development tool according to the package information and the resource file information includes:
[0018] Extracting files having the same file package name and the same file attributes, the same resource file name and the same resource file suffix from the first software development tool and the second software development tool according to the package information and the resource file information and placing them into a preset same folder; and placing code files having the same code package name from the first software development tool and the second software development tool into the same folder;
[0019] The contents in the same folder are regarded as the same content area.
[0020] Optionally, the modifying the content of the same content area by using a preset automatic modification script to form a new first software development tool and a new second software development tool includes:
[0021] Performing region locking on the content in the same content region to form differential content;
[0022] The difference content replaces a portion of the same content area in the first software development tool to form a new first software development tool, and the second software development tool is renamed to be a new second software development tool in parallel with the new first software development tool.
[0023] Optionally, the step of inputting the new first software development tool and the new second software development tool into a preset SDK manager to complete application development includes:
[0024] Inputting the novel first software development tool and the novel second software development tool into a preset SDK manager;
[0025] Listing all SDK information of the new first software development tool and the new second software development tool through a list script command preset in the SDK manager;
[0026] Segmenting all the SDK information through preset components, and storing the segmentation results in a preset array object temporary storage unit;
[0027] The version information of the SDK tool to be downloaded is taken out from the array object temporary storage module; and the version information is stored in a preset result array unit to achieve application deployment and complete application development.
[0028] Optionally, after the application deployment is achieved by storing the version information in a preset result array unit and the application development is completed, rollback modification is also included; wherein the rollback modification includes:
[0029] The new first software development tool and the new second software development tool are modified and restored to the first software development tool and the second software development tool; and the first software development tool and the second software development tool are rolled back to the original file packages.
[0030] In order to solve the above problem, the present invention also provides an application development device based on SDK automatic renaming, the device comprising:
[0031] An installation package packaging unit, configured to perform SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and to package a target application program through the first software development tool and the second software development tool to form an application installation package;
[0032] A file traversal unit, configured to traverse the application installation package to obtain package information and resource file information; and to obtain the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0033] An SDK modification unit, configured to modify the content of the same content area through a preset automatic modification script to form a new first software development tool and a new second software development tool;
[0034] The SDK application unit is used to input the new first software development tool and the new second software development tool into a preset SDK manager to complete application development.
[0035] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0036] a memory storing at least one instruction; and
[0037] The processor executes the instructions stored in the memory to implement the steps in the above-mentioned application development method based on SDK automatic renaming.
[0038] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned application development method based on SDK automatic renaming.
[0039] The embodiment of the present invention first references the original SDK to obtain the first software development tool and the second software development tool respectively, references the first software development tool and the second software development tool to encapsulate the target application to form an application installation package; traverses the application installation package to obtain package information and resource file information; obtains the same content area of the first software development tool and the second software development tool according to the package information and the resource file information; modifies the content of the same content area in the first software development tool and the second software development tool through a preset automatic modification script to form a new first software development tool and a new second software development tool; inputs the new first software development tool and the new second software development tool into a preset SDK manager to complete application development, so that there is no need to split, only one SDK needs to be provided, integration is convenient, and internal details and processes will not be exposed; and compared with manual package name change, the efficiency is greatly improved through the automated script, and it is a one-time thing, errors are avoided through script modification, and sustainability is improved through script automated packaging integrated with tools such as Jenkins. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a process of an application development method based on SDK automatic renaming provided by an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a module of an application development device based on SDK automatic renaming provided by an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of the internal structure of an electronic device according to an application development method based on SDK automatic renaming provided by an embodiment of the present invention;
[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0045] In line with the principle of not reinventing the wheel and minimizing the encapsulation of functions, an Android application will use many SDKs. SDKs will also use other SDKs to form nested references. Then, there will be a problem. It is possible that the code of the same SDK will be repeatedly referenced, which will cause conflicts, resulting in conflicts between the package name and the resource name reported by the compiler. For example, an App references Sdk 2 and Sdk 3, and Sdk 2 and Sdk 3 both reference Sdk 1. If Sdk 2 and Sdk 3 are both output as an Sdk, then they will contain the content of Sdk 1, and integrating them into the App will cause conflicts.
[0046] Currently, the following simple solution exists: if an SDK references other SDKs, then when it is used, it is simply referenced in the compilation stage, and it is not packaged into the SDK when used. In other words, one SDK is split into multiple SDKs. Finally, when the Android application is used, it will reference the multiple SDKs that have been split. However, this solution has the following defects: Low convenience: Since one SDK is split into multiple SDKs, the integrator has to reference multiple SDKs, which reduces the convenience of integration; Low privacy: When developing an APP, it was originally only necessary to provide one SDK to implement a certain function, but if this solution is adopted, some other more detailed SDKs must also be provided, which will cause part of the SDK's logic to be exposed, resulting in lower privacy; or manually change the package name to avoid conflicts, but manual package name changes are inefficient and prone to errors.
[0047] In order to solve the above problems, an embodiment of the present invention provides an application development method based on SDK automatic renaming.
[0048] In this embodiment, the executing entity is the application development system based on SDK automatic renaming of the entire server cluster, and the application development system based on SDK automatic renaming is integrated in the server cluster, that is, different modules of the application development system based on SDK automatic renaming under the server cluster perform different operation steps respectively, wherein the architecture of the server cluster includes multiple servers, multiple cluster instances running under each server, and multiple scheduled tasks stored under each cluster instance, so that the orderly execution of the scheduled task is achieved through the following steps.
[0049] like Figure 1 As shown, in this embodiment, the application development method based on SDK automatic renaming includes:
[0050] S1: performing SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and packaging a target application program through the first software development tool and the second software development tool to form an application installation package;
[0051] S2: traverse the application installation package to obtain package information and resource file information; and obtain the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0052] S3: modifying the content of the same content area by using a preset automatic modification script to form a new first software development tool and a new second software development tool;
[0053] S4: Inputting the new first software development tool and the new second software development tool into a preset SDK manager to complete application development.
[0054] exist Figure 1 In the illustrated embodiment, step S1 is a process of referencing the original SDK to obtain a first software development tool and a second software development tool respectively, and referencing the first software development tool and the second software development tool to encapsulate the target application to form an application installation package; wherein,
[0055] The step of performing SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and packaging a target application program by using the first software development tool and the second software development tool to form an application installation package includes:
[0056] S11: referencing the original SDK that depends on it based on pre-configured parameters to form a first software development tool and a second software development tool, and using the first software development tool and the second software development tool to write an application program for the source program obtained according to the original SDK to form a target application program;
[0057] Among them, in this embodiment, the original SDK is recorded as SDK1, and the first software development tool and the second software development tool are recorded as SDK2 and SDK3 respectively. That is, App references Sdk 2 and Sdk 3, and Sdk 2 and Sdk 3 both reference Sdk1. At this time, Sdk 2 and Sdk 3 are both output as one Sdk, so they will both contain the content of Sdk 1.
[0058] S12: Match the target application with the first software development tool and the second software development tool to form an application installation package.
[0059] exist Figure 1 In the embodiment shown, since Sdk 2 and Sdk 3 are both output as one Sdk in this embodiment, they both contain the content of Sdk 1, and integrating them into the App will cause conflicts, so steps S2-S4 need to be performed subsequently.
[0060] In this embodiment, step S2 is a process of traversing the application installation package to obtain package information and resource file information; and obtaining the same content area of the first software development tool and the second software development tool according to the package information and the resource file information, wherein traversing the application installation package to obtain package information and resource file information includes:
[0061] Traversing the application installation packages through a preset information combing component to form a list file about all application installation packages; the form of the information combing component is not specifically limited, and can be any plug-in or component with data reading and combing function;
[0062] The code package name is extracted from the code file, and information is extracted from the manifest file to obtain package information and resource file information about the application installation package; wherein the package information includes at least the file package name and package file attributes; and the resource file information includes at least the resource file name and the resource file suffix.
[0063] Acquiring the same content area of the first software development tool and the second software development tool according to the package information and the resource file information includes:
[0064] S21: extracting files having the same file package name and the same file attribute, the same resource file name and the same resource file suffix from the first software development tool and the second software development tool according to the package information and the resource file information and placing them into a preset same folder; and placing code files having the same code package name from the first software development tool and the second software development tool into the same folder;
[0065] S22: Using the contents in the same folder as the same content area.
[0066] Step S3 is a process of modifying the content of the same content area in the first software development tool and the second software development tool through a preset automated modification script to form a new first software development tool and a new second software development tool; wherein,
[0067] The method of modifying the content of the same content area in the first software development tool and the second software development tool by using a preset automatic modification script to form a new first software development tool and a new second software development tool includes:
[0068] S31: performing region locking on the content in the same content region to form differential content;
[0069] S32: replacing a portion of the same content area in the first software development tool with the difference content to form a new first software development tool, and renaming the second software development tool to name the second software development tool as a new second software development tool in parallel with the new first software development tool.
[0070] In a specific embodiment, the specific operation steps of steps S31 and S32 in actual application are: first define a task called change, which is used to modify the code related to the package name in all files, as well as the file name of the resource file, the package name, so file name and calling place, layout file name and calling place in the code, and perform the following steps:
[0071] Filter out the file list containing the package name, including java, xml, and cpp files; traverse the list to modify the package name, that is, the package name in JNI is separated by underscores (_), and the package names in Java and xml are separated by dots (.); rename the so file, that is, modify the so name specified in CMakeLists.txt. Add the specified prefix; then modify the name of the place where so is used in the Java file, that is, the place where System.loadLibrary is called; modify the layout file name, add the specified prefix; modify the name of the place where the layout file is used, which includes two parts, @layout in the layout file and R.layout in the Java file.
[0072] Define a task named copyAll to copy the modified content to a new directory; define a task named deleteOri to delete all files in the original directory; finally define a task called changePackage to combine the three tasks of change, copyAll, and deleteOri and execute them in sequence.
[0073] Step S4 is a process of inputting the new first software development tool and the new second software development tool into a preset SDK manager to complete application development; wherein,
[0074] The step of inputting the novel first software development tool and the novel second software development tool into a preset SDK manager to complete application development includes:
[0075] Inputting the novel first software development tool and the novel second software development tool into a preset SDK manager;
[0076] List all SDK information of the new first software development tool and the new second software development tool through a list script command (list script command) preset in the SDK manager;
[0077] Segmenting all the SDK information through preset components, and storing the segmentation results in a preset array object temporary storage unit (resultArray);
[0078] The version information of the SDK tool to be downloaded is taken out from the array object temporary storage module (resultArray); and the version information is saved in the preset result array unit (listResult) to achieve application deployment and complete application development.
[0079] In addition, the method further includes step S5, that is, after the version information is stored in a preset result array unit to achieve application deployment and application development is completed, a step of rolling back the modification is also included; wherein,
[0080] After the application development is completed, the new first software development tool and the new second software development tool are modified and restored to the first software development tool and the second software development tool; and the first software development tool and the second software development tool are rolled back to the original file package.
[0081] In this embodiment, when the step S5 is actually performed, the step S5 is completed by a pre-written rollback script, that is, after the packaging of the current application development is completed, the modified code is rolled back to avoid uploading the code due to an erroneous operation.
[0082] In addition, in the above specific embodiment, a total of three tasks are involved in the specific operation process: change, makeSdk, and discardChange. Since the automatically generated R.java file will be generated in the configuration stage, change and makeSdk cannot be combined into one task for execution. Otherwise, the package name of R.java will still be the original package name, resulting in compilation failure. In order to avoid manual execution one by one, a shell script is written containing three tasks and executed through one command.
[0083] In this embodiment, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0084] As described above, the application development method based on automatic SDK renaming provided by the embodiment of the present invention first references the original SDK to obtain the first software development tool and the second software development tool respectively, references the first software development tool and the second software development tool to encapsulate the target application to form an application installation package; traverses the application installation package to obtain package information and resource file information; obtains the same content area of the first software development tool and the second software development tool according to the package information and the resource file information; modifies the content of the same content area in the first software development tool and the second software development tool through a preset automatic modification script to form a new first software development tool and a new second software development tool; inputs the new first software development tool and the new second software development tool into the preset SDK manager to complete the application development, so that there is no need to split, only one SDK needs to be provided, integration is convenient, and internal details and processes will not be exposed; and, compared with manual package name renaming, the efficiency is greatly improved through the automated script, and it is a one-time thing, errors are avoided through script modification, and sustainability is improved by integrating script automated packaging through tools such as Jenkins.
[0085] like Figure 2 As shown, the present invention provides an application development device 100 based on SDK automatic renaming, and the present invention can be installed in an electronic device. According to the functions implemented, the application development device 100 based on SDK automatic renaming can include an installation package packaging unit 101, a file traversal unit 102, an SDK change unit 103, and an SDK application unit 104. The module described in the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0086] In this embodiment, the functions of each module / unit are as follows:
[0087] The installation package packaging unit 101 is used to perform SDK packaging based on the original SDK to obtain a first software development tool and a second software development tool respectively, and to package the target application program through the first software development tool and the second software development tool to form an application installation package;
[0088] A file traversal unit 102 is used to traverse the application installation package to obtain package information and resource file information; and obtain the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0089] SDK modification unit 103, used for modifying the content of the same content area through a preset automatic modification script to form a new first software development tool and a new second software development tool;
[0090] The SDK application unit 104 is used to input the new first software development tool and the new second software development tool into a preset SDK manager to complete application development.
[0091] The installation package packaging unit 101 performs SDK packaging based on the original SDK to obtain the first software development tool and the second software development tool respectively, and packages the target application program through the first software development tool and the second software development tool to form an application installation package, including:
[0092] S11: referencing the original SDK that depends on it based on pre-configured parameters to form a first software development tool and a second software development tool, and using the first software development tool and the second software development tool to write an application program for the source program obtained according to the original SDK to form a target application program;
[0093] S12: Matching the target application with the first software development tool and the second software development tool to form an application installation package;
[0094] Among them, in this embodiment, the original SDK is recorded as SDK1, and the first software development tool and the second software development tool are recorded as SDK2 and SDK3 respectively. That is, App references Sdk 2 and Sdk 3, and Sdk 2 and Sdk 3 both reference Sdk1. At this time, Sdk 2 and Sdk 3 are both output as one Sdk, so they will both contain the content of Sdk 1.
[0095] S13: Matching the target application with the first software development tool and the second software development tool to form an application installation package.
[0096] The file traversal unit 102 traverses the application installation package to obtain package information and resource file information; and obtains the same content area of the first software development tool and the second software development tool according to the package information and the resource file information, including:
[0097] S21: extracting files having the same file package name and the same file attribute, the same resource file name and the same resource file suffix from the first software development tool and the second software development tool according to the package information and the resource file information and placing them into a preset same folder; and placing code files having the same code package name from the first software development tool and the second software development tool into the same folder;
[0098] S22: Using the contents in the same folder as the same content area.
[0099] The SDK modification unit 103, in the process of modifying the content of the same content area in the first software development tool and the second software development tool by using a preset automatic modification script to form a new first software development tool and a new second software development tool, includes:
[0100] S31: performing region locking on the content in the same content region to form differential content;
[0101] S32: replacing a portion of the same content area in the first software development tool with the difference content to form a new first software development tool, and renaming the second software development tool to name the second software development tool as a new second software development tool in parallel with the new first software development tool.
[0102] The SDK application unit 104 inputs the new first software development tool and the new second software development tool into the preset SDK manager to complete the application development process; including:
[0103] Inputting the novel first software development tool and the novel second software development tool into a preset SDK manager;
[0104] List all SDK information of the new first software development tool and the new second software development tool through a list script command (list script command) preset in the SDK manager;
[0105] Segmenting all the SDK information through preset components, and storing the segmentation results in a preset array object temporary storage unit (resultArray);
[0106] The version information of the SDK tool to be downloaded is taken out from the array object temporary storage module (resultArray); and the version information is saved in the preset result array unit (listResult) to achieve application deployment and complete application development.
[0107] As described above, the application development device based on automatic SDK renaming provided by the present invention references the original SDK to obtain the first software development tool and the second software development tool respectively, and references the first software development tool and the second software development tool to encapsulate the target application to form an application installation package; traverses the application installation package to obtain package information and resource file information; obtains the same content area of the first software development tool and the second software development tool according to the package information and the resource file information; modifies the content of the same content area in the first software development tool and the second software development tool through a preset automatic modification script to form a new first software development tool and a new second software development tool; inputs the new first software development tool and the new second software development tool into the preset SDK manager to complete application development, so that there is no need to split, only one SDK needs to be provided, integration is convenient, and internal details and processes will not be exposed; and, compared with manual package name renaming, the efficiency is greatly improved through the automated script, and it is a one-time thing, errors are avoided through script modification, and sustainability is improved through script automated packaging integrated with tools such as Jenkins.
[0108] like Figure 3 As shown, the present invention provides an electronic device 1 of an application development method based on SDK automatic renaming.
[0109] The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an application development program 12 based on SDK automatic renaming.
[0110] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as code developed based on the automatic renaming of the application based on SDK, but also be used to temporarily store data that has been output or is to be output.
[0111] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as application development programs automatically renamed based on SDK, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0112] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0113] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0114] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0115] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0116] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0117] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0118] The application development program 12 based on SDK automatic renaming stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can achieve:
[0119] Reference the original SDK to obtain a first software development tool and a second software development tool respectively, and reference the first software development tool and the second software development tool to package the target application to form an application installation package;
[0120] Traversing the application installation package to obtain package information and resource file information; obtaining the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0121] Modifying the content of the same content area in the first software development tool and the second software development tool by using a preset automated modification script to form a new first software development tool and a new second software development tool;
[0122] The new first software development tool and the new second software development tool are input into a preset SDK manager to complete application development.
[0123] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned application development based on SDK automatic renaming, the data of the above-mentioned application development based on SDK automatic renaming is stored in the node of the blockchain where this server cluster is located.
[0124] The server can be a stand-alone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0125] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0126] An embodiment of the present invention further provides a computer-readable storage medium, which may be non-volatile or volatile, and stores a computer program, which, when executed by a processor, implements:
[0127] Reference the original SDK to obtain a first software development tool and a second software development tool respectively, and reference the first software development tool and the second software development tool to package the target application to form an application installation package;
[0128] Traversing the application installation package to obtain package information and resource file information; obtaining the same content area of the first software development tool and the second software development tool according to the package information and the resource file information;
[0129] Modifying the content of the same content area in the first software development tool and the second software development tool by using a preset automated modification script to form a new first software development tool and a new second software development tool;
[0130] The new first software development tool and the new second software development tool are input into a preset SDK manager to complete application development.
[0131] Specifically, the specific implementation method when the computer program is executed by the processor can refer to the description of the relevant steps in the application development method based on SDK automatic renaming in the embodiment, which will not be repeated here.
[0132] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0133] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0135] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0136] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0137] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0138] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An application development method based on SDK automatic renaming, characterized in that: include: Perform SDK packaging based on the original SDK to obtain a first software development kit and a second software development kit respectively, and package the target application program through the first software development kit and the second software development kit to form an application installation package; Traversing the application installation package to obtain package information and resource file information; and acquiring the same content area of the first software development kit and the second software development kit according to the package information and the resource file information; The traversing of the application installation package to obtain package information and resource file information includes: traversing the application installation package through a preset information combing component to form a manifest file about all application installation packages; extracting information from the manifest file to obtain package information and resource file information about the application installation package; wherein the package information at least includes a file package name and package file attributes; the resource file information at least includes a resource file name and a resource file suffix; obtaining the same content area of the first software development kit and the second software development kit according to the package information and the resource file information, including: extracting files with the same file package name and the same file attributes, and with the same resource file name and resource file suffix in the first software development kit and the second software development kit according to the package information and the resource file information and placing them into a preset same folder; and placing code files with the same code package name in the first software development kit and the second software development kit into the same folder; and using the content in the same folder as the same content area; Modifying the content of the same content area by a preset automatic modification script to form a new first software development kit and a new second software development kit; Modifying the content of the same content area by a preset automatic modification script to form a new first software development kit and a new second software development kit includes: region locking the content in the same content area to form differential content; replacing a portion of the same content area in the first software development kit with the differential content to form a new first software development kit, and renaming the second software development kit to name the second software development kit as a new second software development kit in parallel with the new first software development kit; The new first software development kit and the new second software development kit are input into a preset SDK manager to complete application development.
2. The application development method based on SDK automatic renaming as claimed in claim 1, characterized in that: The step of performing SDK packaging based on the original SDK to obtain a first software development kit and a second software development kit respectively, and packaging the target application program through the first software development kit and the second software development kit to form an application installation package includes: Based on the pre-configured parameters, referencing the original SDK that depends on it forms a first software development kit and a second software development kit, and using the first software development kit and the second software development kit to write an application program for the source program obtained according to the original SDK to form a target application program; The target application is associated with the first software development kit and the second software development kit to form an application installation package.
3. The application development method based on SDK automatic renaming as claimed in claim 2, characterized in that: The step of inputting the new first software development kit and the new second software development kit into a preset SDK manager to complete application development includes: Inputting the new first software development kit and the new second software development kit into a preset SDK manager; List all SDK information of the new first software development kit and the new second software development kit through a list script command preset in the SDK manager; Segmenting all the SDK information through preset components, and storing the segmentation results in a preset array object temporary storage unit; The version information of the SDK tool to be downloaded is taken out from the array object temporary storage unit; and the version information is stored in a preset result array unit to achieve application deployment and complete application development.
4. The application development method based on SDK automatic renaming as claimed in claim 3, characterized in that: After the application development is completed by storing the version information in a preset result array unit to achieve application deployment, a rollback modification is also included; wherein the rollback modification includes: The new first software development kit and the new second software development kit are modified and restored to the first software development kit and the second software development kit; and the first software development kit and the second software development kit are rolled back to the original file packages.
5. An application development device based on SDK automatic renaming, characterized in that: The device comprises: An installation package packaging unit, configured to perform SDK packaging based on the original SDK to obtain a first software development kit and a second software development kit respectively, and to package a target application program through the first software development kit and the second software development kit to form an application installation package; The file traversal unit is used to traverse the application installation package to obtain package information and resource file information; and obtain the same content area of the first software development kit and the second software development kit according to the package information and the resource file information; the traversal of the application installation package to obtain the package information and resource file information includes: traversing the application installation package through a preset information combing component to form a manifest file about all application installation packages; extracting information from the manifest file to obtain the package information and resource file information about the application installation package; wherein the package information at least includes a file package name and a package file attribute; the resource file information at least includes a resource file The method comprises: extracting files with the same file package name and the same file attribute, the same resource file name and the same resource file suffix from the first software development kit and the second software development kit according to the package information and the resource file information and placing them into a preset same folder; and placing code files with the same code package name from the first software development kit and the second software development kit into the same folder; and taking the content in the same folder as the same content area; The SDK changing unit is used to modify the content of the same content area through a preset automatic modification script to form a new first software development kit and a new second software development kit; the content modification of the same content area through a preset automatic modification script to form a new first software development kit and a new second software development kit includes: region locking the content in the same content area to form differential content; replacing a part of the same content area in the first software development kit with the differential content to form a new first software development kit, and renaming the second software development kit to name the second software development kit as a new second software development kit in parallel with the new first software development kit; The SDK application unit is used to input the new first software development kit and the new second software development kit into a preset SDK manager to complete application development.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the steps in the application development method based on SDK automatic renaming as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the application development method based on SDK automatic renaming as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Android application installation package making device and method, electronic device and storage medium
CN108427552A
SDK interface packaging method and device, storage medium and electronic equipment
CN109857404A