A data processing method, apparatus, electronic device, and storage medium
By decoupling the SDK code template from the template plug-in and deploying it in the cloud, the problem of restricted SDK code template updates is solved, and efficient update and obtaining the SDK code templates in engineering projects is achieved, improving the efficiency of developing applications.
Patent Information
- Application Number
- CN202211501644.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-11-28
AI Technical Summary
When developing applications in engineering projects, there are a large number of SDKs and limited code template updates, resulting in inefficient development. Especially when application functions continue to increase and update, developers cannot update the SDK code templates in time.
Decouple the SDK's code templates from the template plug-in, deploy them in the cloud, and deploy the template plug-in in the development environment to have logical process functions. It supports obtaining and updating the SDK's code template collection from the cloud, allowing developers to bypass the template plug-in for updates.
It improves the efficiency of developing SDKs in engineering projects, supports timely updates of the SDK code template collection according to actual needs, reduces network resource consumption, avoids obtaining unnecessary templates, and improves development efficiency.
Smart Images

Figure CN115809054B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a data processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the rapid development of technology, application programs have become increasingly important in life and work. Developers of manufacturers can develop application programs for the general public to use, so as to achieve the purpose of providing services for the general public based on the application programs.
[0003] Currently, developers can use computer programming languages to develop application programs, etc. For example, developers can run a development environment on a terminal, create an engineering project in the development environment, then write computer program code in the engineering project, and then compile the computer program code written in the engineering project to obtain an application program. Summary of the Invention
[0004] This application discloses a data processing method, apparatus, electronic device, and storage medium.
[0005] In a first aspect, this application discloses a data processing method applied to an electronic device. The electronic device has a development environment, and an engineering project is created in the development environment. The method includes:
[0006] When receiving an insertion operation for inserting an SDK of a target function into an engineering project, display an index page of the code template of the SDK;
[0007] Obtain local index information of a first code template set of the SDK of the target function input on the index page;
[0008] According to the local index information, determine whether the first code template set has been loaded in the root directory of the engineering project;
[0009] When the first code template set has been loaded in the root directory of the engineering project, display the code templates in the first code template set that has been loaded in the root directory of the engineering project. The code templates at least include: general function codes for developing the SDK of the target function and filling positions for personalized function codes of the SDK of the target function;
[0010] When the first code template set has not been loaded in the root directory of the engineering project, determine whether the first code template set is stored in the cloud according to the local index information. When the first code template set is stored in the cloud, obtain the first code template set from the cloud according to the local index information, and display the code templates in the first code template set.
[0011] In an alternative implementation, determining whether the first code template set is stored in the cloud according to the local index information includes:
[0012] Determining whether the local index information exists in the correspondence between the pre-stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK;
[0013] When the local index information exists in the correspondence, determining that the first code template set is stored in the cloud;
[0014] Or,
[0015] When the local index information does not exist in the correspondence, determining that the first code template set is not stored in the cloud.
[0016] In an alternative implementation, obtaining the first code template set from the cloud according to the local index information includes:
[0017] Obtaining the cloud index information of the first code template set according to the local index information;
[0018] Obtaining the first code template set from the cloud according to the cloud index information.
[0019] In an alternative implementation, obtaining the cloud index information of the first code template set according to the local index information includes:
[0020] Determining the cloud index information corresponding to the local index information in the correspondence between the pre-stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK.
[0021] In an alternative implementation, the local index information at least includes the first version information of the first code template set;
[0022] The method further includes:
[0023] When the first code template set is not stored in the cloud, obtaining the second version information of the second code template set of the SDK of the target function in the cloud; wherein, among the version information of each code template set of the SDK of the target function, the second version information is adjacent to the first version information;
[0024] Obtaining the second code template set from the cloud according to the second version information;
[0025] Displaying the code templates in the second code template set.
[0026] In an alternative implementation, obtaining the second version information of the second code template set of the SDK of the target function in the cloud includes:
[0027] Determining the local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship between the local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK;
[0028] When there is one piece of local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship, obtaining the second version information according to the version information in the determined one piece of local index information in the correspondence relationship;
[0029] Or,
[0030] When there are two or more pieces of local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship, selecting the version information with the smallest distance from the first version information from the version information in the two or more pieces of local index information as the second version information.
[0031] In an alternative implementation, the method further includes:
[0032] After obtaining the first code template set from the cloud, storing the first code template set in the root directory of the engineering project.
[0033] In a second aspect, the present application discloses a data processing method applied to an electronic device, and the method includes:
[0034] Obtaining the old code template set of the SDK of the target function;
[0035] Obtaining the modification operation on the old code template set of the SDK of the target function to obtain the new code template set of the SDK of the target function;
[0036] Uploading the new code template set of the SDK of the target function to the cloud, so that the cloud stores the new code template set of the SDK of the target function, assigns new cloud index information to the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device;
[0037] Receiving the new cloud index information returned by the cloud;
[0038] Obtaining the new local index information of the new code template set of the SDK of the target function;
[0039] Store the correspondence between the new cloud index information and the new local index information.
[0040] In an optional implementation, the electronic device has a development environment, and an engineering project is created in the development environment;
[0041] The method further includes:
[0042] Store a new code template set of the SDK of the target function in the root directory of the engineering project.
[0043] In an optional implementation, the storing the correspondence between the new cloud index information and the new local index information includes:
[0044] Upload the new cloud index information and the new local index information to the PARSE platform, so that the PARSE platform stores the correspondence between the new cloud index information and the new local index information.
[0045] In a third aspect, the present application shows a data processing device, which is applied to an electronic device. The electronic device has a development environment, and an engineering project is created in the development environment. The device includes:
[0046] A display module, configured to display an index page of the code template of the SDK when receiving an insertion operation for inserting the SDK of the target function in the engineering project;
[0047] A first obtaining module, configured to obtain the local index information of the first code template set of the SDK of the target function input in the index page;
[0048] A first determining module, configured to determine whether the first code template set has been loaded in the root directory of the engineering project according to the local index information;
[0049] A first display module, configured to display the code templates in the first code template set that has been loaded in the root directory of the engineering project when the first code template set has been loaded in the root directory of the engineering project. The code templates at least include: general function codes for developing the SDK of the target function and filling positions for personalized function codes of the SDK of the target function;
[0050] A second determining module, configured to determine whether the first code template set is stored in the cloud according to the local index information when the first code template set has not been loaded in the root directory of the engineering project. A second obtaining module, configured to obtain the first code template set from the cloud according to the local index information when the first code template set is stored in the cloud. A second display module, configured to display the code templates in the first code template set.
[0051] In an alternative implementation, the second determination module includes:
[0052] A first determination unit, configured to determine whether the local index information exists in the correspondence between the locally stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK;
[0053] A second determination unit, configured to determine that the first code template set is stored in the cloud when the local index information exists in the correspondence;
[0054] Or,
[0055] A third determination unit, configured to determine that the first code template set is not stored in the cloud when the local index information does not exist in the correspondence.
[0056] In an alternative implementation, the second acquisition module includes:
[0057] A first acquisition unit, configured to acquire the cloud index information of the first code template set according to the local index information;
[0058] A second acquisition unit, configured to acquire the first code template set from the cloud according to the cloud index information.
[0059] In an alternative implementation, the first acquisition unit is specifically configured to:
[0060] Determine the cloud index information corresponding to the local index information in the correspondence between the locally stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK.
[0061] In an alternative implementation, the local index information at least includes the first version information of the first code template set;
[0062] The apparatus further includes:
[0063] A third acquisition module, configured to acquire the second version information of the second code template set of the SDK of the target function in the cloud when the first code template set is not stored in the cloud; wherein, among the version information of each code template set of the SDK of the target function, the second version information is adjacent to the first version information;
[0064] A fourth acquisition module, configured to acquire the second code template set from the cloud according to the second version information;
[0065] A third display module, configured to display the code templates in the second code template set.
[0066] In an optional implementation, the third acquisition module includes:
[0067] A fourth determination unit, configured to determine local index information of a code template set of an SDK including a target function in a correspondence relationship between local index information of a code template set of the SDK stored in advance and cloud index information of the code template set of the SDK;
[0068] A third acquisition unit, configured to, when there is only one piece of local index information of the code template set of the SDK including the target function in the correspondence relationship, obtain the second version information according to the version information in the determined one piece of local index information in the correspondence relationship;
[0069] Or,
[0070] A fourth acquisition unit, configured to, when there are two or more pieces of local index information of the code template set of the SDK including the target function in the correspondence relationship, select the version information with the smallest distance from the first version information from the version information in the two or more pieces of local index information and use it as the second version information.
[0071] In an optional implementation, the apparatus further includes:
[0072] A first storage module, configured to store the first code template set in the root directory of the engineering project after obtaining the first code template set from the cloud.
[0073] In a fourth aspect, the present application discloses a data processing apparatus applied to an electronic device, the apparatus includes:
[0074] A fifth acquisition module, configured to acquire an old code template set of an SDK of a target function; a sixth acquisition module, configured to acquire a modification operation on the old code template set of the SDK of the target function to obtain a new code template set of the SDK of the target function; an upload module, configured to upload the new code template set of the SDK of the target function to the cloud, so that the cloud stores the new code template set of the SDK of the target function, allocates new cloud index information for the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device; a receiving module, configured to receive the new cloud index information returned by the cloud; a seventh acquisition module, configured to acquire new local index information of the new code template set of the SDK of the target function; a second storage module, configured to store a correspondence relationship between the new cloud index information and the new local index information.
[0075] In an optional implementation, a development environment exists in the electronic device, and an engineering project is created in the development environment;
[0076] The device further includes:
[0077] A third storage module, configured to store a new code template set of the SDK of the target function in the root directory of the engineering project.
[0078] In an optional implementation, the second storage module is specifically configured to: upload new cloud index information and new local index information to the PARSE platform, so that the PARSE platform stores the correspondence between the new cloud index information and the new local index information.
[0079] In a fifth aspect, the present application discloses an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the method described in any aspect.
[0080] In a sixth aspect, the present application discloses a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the method described in any aspect.
[0081] In a seventh aspect, the present application discloses a computer program product, when the instructions in the computer program product are executed by a processor of an electronic device, enabling the electronic device to execute the method described in any aspect.
[0082] The technical solution provided by the present application may include the following beneficial effects:
[0083] Regarding the beneficial effects of the first aspect and the third aspect:
[0084] In this application, when an insertion operation for inserting an SDK of a target function into an engineering project is received, an index page of the code template of the SDK is displayed. Local index information of the first code template set of the SDK of the target function entered on the index page is obtained. According to the local index information of the first code template set of the SDK of the target function, it is determined whether the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project. When the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project, the code templates in the first code template set of the SDK of the target function that have been loaded in the root directory of the engineering project are displayed. When the first code template set of the SDK of the target function has not been loaded in the root directory of the engineering project, it is determined according to the local index information of the first code template set of the SDK of the target function whether the first code template set of the SDK of the target function is stored in the cloud. When the first code template set of the SDK of the target function is stored in the cloud, the first code template set of the SDK of the target function is obtained from the cloud according to the local index information of the first code template set of the SDK of the target function, and the code templates in the first code template set of the SDK of the target function are displayed.
[0085] In this application, the above process can be executed by an electronic device based on a template plugin deployed in a development environment, that is, the template plugin deployed in the development environment has the function of executing the above logical process.
[0086] On the one hand, this application can obtain the code template set of the SDK from the cloud. In this way, it can support that the code template set of the SDK can be deployed in the cloud, and further support decoupling the template plugin deployed in the development environment from the code template set of the SDK.
[0087] On the other hand, this application can obtain the code template set of the SDK from the root directory of the engineering project. In this way, it can support deploying the code template set of the SDK obtained from the cloud in the root directory of the engineering project. In this way, it can support directly obtaining the code template set of the SDK in the root directory of the engineering project when using the code template set of the SDK in the engineering project later, without obtaining it from the cloud, thereby saving network resources and improving the efficiency of obtaining the code template set of the SDK. Secondly, the code template set of the SDK obtained from the cloud is cached in the root directory of the engineering project, and is still decoupled from the template plugin deployed in the development environment.
[0088] On the other hand, this application supports that developers can deploy the code template sets of their respective SDKs in the cloud. In this way, there will be many code template sets of SDKs in the cloud. Thus, it supports developers of engineering projects to search for the required code template sets of SDKs in the cloud by inputting local index information on the index page, avoiding developers of engineering projects from obtaining unnecessary code template sets of SDKs from the cloud.
[0089] Since it supports decoupling the template plug-ins deployed in the development environment from the code template sets of the SDK, and supports caching the code template sets of the SDK obtained from the cloud in the root directory of the engineering project, which is still decoupled from the template plug-ins deployed in the development environment. Thus, in the scenario of updating the code template sets of the SDK, it supports developers of engineering projects to update the code template sets of the SDK bypassing the template plug-ins (not based on the template plug-ins). This enables developers of engineering projects to update the code template sets of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in subsequent engineering projects.
[0090] Regarding the beneficial effects of the second aspect and the fourth aspect:
[0091] In this application, obtain the old code template set of the SDK for the target function. Obtain the modification operation on the old code template set of the SDK for the target function to obtain the new code template set of the SDK for the target function. Upload the new code template set of the SDK for the target function to the cloud so that the cloud stores the new code template set of the SDK for the target function, and assigns new cloud index information for the new code template set of the SDK for the target function, and returns the new cloud index information to the electronic device. Receive the new cloud index information of the new code template set of the SDK for the target function returned by the cloud. Obtain the new local index information of the new code template set of the SDK for the target function. Store the correspondence between the new local index information of the new code template set of the SDK for the target function and the new cloud index information of the new code template set of the SDK for the target function.
[0092] In this application, the above process can be executed by the electronic device based on the template plug-ins deployed in the development environment. That is, the template plug-ins deployed in the development environment have the function of executing the above logical process.
[0093] On the one hand, this application can support the code template sets of the SDK to be deployed in the cloud, and further support decoupling the template plug-ins deployed in the development environment from the code template sets of the SDK.
[0094] On the other hand, the present application supports that a large number of developers can deploy the code template sets of their respective SDKs in the cloud. In this way, there will be a large number of code template sets of SDKs in the cloud. Thus, the cloud can assign cloud index information to different code template sets of SDKs, so that developers of subsequent engineering projects can search for the required code template sets of SDKs in the cloud based on local index information, avoiding developers of engineering projects from obtaining unnecessary code template sets of SDKs from the cloud.
[0095] Since it supports decoupling the template plug-ins deployed in the development environment from the code template sets of the SDK, thus, in the scenario of updating the code template sets of the SDK, developers of engineering projects can bypass the template plug-ins (not based on the template plug-ins) to update the code template sets of the SDK. This enables developers of engineering projects to update the code template sets of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in subsequent engineering projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 is a flowchart of the steps of a data processing method of the present application.
[0097] Figure 2 is a flowchart of the steps of a data processing method of the present application.
[0098] Figure 3 is a flowchart of the steps of a data processing method of the present application.
[0099] Figure 4 is a block diagram of the structure of a data processing device of the present application.
[0100] Figure 5 is a block diagram of the structure of a data processing device of the present application.
[0101] Figure 6 is a block diagram of an electronic device of the present application.
[0102] Figure 7 is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0103] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0104] As the requirements of users for the functions in the application become more and more, the developers of engineering projects (i.e., the developers of the application) need to develop applications with multiple functions, so as to increase the stickiness of users to the application and so on.
[0105] However, as the functions required by the application become more and more, in the process of developing the application, the computer program code that the developers of engineering projects need to write for the application in the engineering project is also increasing.
[0106] Among them, after the inventor conducted a statistical analysis on the increasing amount of computer program code written for the application in the engineering project, it was found that there are many duplicate codes in the computer program code written for the application in the engineering project. For example, the application involves many services, and in some services, the permission to access the camera is required. Thus, in the computer program code of each of these services, the code for obtaining the camera permission needs to be written, and so on. In this way, the code for obtaining the camera permission is written multiple times in the engineering project.
[0107] In order to avoid having many duplicate codes in the computer program code written for the application in the engineering project and improve the development efficiency, the developers of engineering projects can encapsulate the codes that will repeatedly appear in the engineering project into an SDK (Software Development Kit), and the SDK can expose an interface externally for other objects to call.
[0108] However, after the inventor conducted a statistical analysis on the computer program code of the application with an SDK written in the engineering project, it was found that sometimes the number of SDKs in the computer program code written for the application in the engineering project is very large, especially when the functions involved in the application are very numerous, the number of SDKs is very large.
[0109] Thus, the inventor found that because the number of SDKs is very large, the efficiency of developing the SDKs in the application in the engineering project will affect the efficiency of developing the application.
[0110] Therefore, in order to improve the efficiency of developing the application, the need to improve the efficiency of developing the SDKs in the application in the engineering project is proposed.
[0111] In order to achieve the purpose of improving the efficiency of developing the SDKs for the application in the engineering project, the inventor conducted a statistical analysis on the SDKs developed for the application in the engineering project and found that:
[0112] The codes of some SDKs developed for the application in the engineering project are relatively similar.
[0113] For example, the code of the SDK for obtaining the camera permission, the code of the SDK for obtaining the storage permission, the code of the SDK for obtaining the microphone permission, etc. have code for obtaining permissions. Thus, there are many common parts among the codes of these SDKs.
[0114] In view of this, the inventor thought of developing a code template for these SDKs with similar codes in order to improve the efficiency of developing these SDKs in the engineering project. The code template may include: the same code (common code) among the codes of these SDKs, and filling positions corresponding to the different codes among the codes of these SDKs, etc. Some content corresponding to the functions to be implemented is filled in the filling positions, etc.
[0115] Thus, when subsequently developing the computer program code of the application in the engineering project, if it is necessary to develop a certain SDK for the application in the engineering project, the code template can be directly called, and then the corresponding content of the SDK can be filled in the filling positions in the code template, and then the SDK can be generated.
[0116] For example, the developer of the template plugin can develop the template plugin in advance and deploy the code template in the template plugin. The template plugin can be deployed in the development environment. In addition to the code template, the template plugin also has some functions of the logic process (see the subsequent description for details).
[0117] For example, when the developer of the engineering project creates an engineering project in the development environment and needs to develop an SDK for the application in the engineering project, the developer of the engineering project can call the template plugin in the development environment. Then the template plugin can obtain the code template in the template plugin and display the code template. In this way, the developer of the engineering project can fill in the corresponding content of the SDK in the filling positions in the code template. Then the template plugin can generate the SDK according to the code template with the filled content and deploy the SDK in the engineering project.
[0118] However, the inventor found that as the functions of the application continue to increase and be updated, during the process of developing the application, the SDKs that need to be developed for the application in the engineering project are not fixed. For example, the functions or attributes in some SDKs need to be updated, which leads to the need to update the code of the SDK. Among them, the code that needs to be updated in the SDK involves the common code in the code template of the SDK. In order to improve the efficiency of developing the SDK in the engineering project subsequently, it is often necessary to update the code template of the SDK.
[0119] However, in view of the above description, it is often the developers of engineering projects who have the need to update the code templates of the SDK. Thus, the need to update the code templates of the SDK is often initiated by the developers of engineering projects.
[0120] However, the inventor found that in many cases, the developers of the template plug-in tightened the modification permissions of the developed template plug-in. Thus, the developers of engineering projects do not have the permission to modify the template plug-in deployed in the development environment, and thus cannot update the code templates in the template plug-in.
[0121] Thus, the developers of engineering projects cannot update the code templates in the template plug-in deployed in the development environment according to actual needs. This cannot improve the efficiency of developing the SDK in subsequent engineering projects.
[0122] The inventor analyzed the reasons or logic for the above situation and found that:
[0123] The developers of engineering projects have the need to update the code templates of the SDK. The code templates of the SDK are located in the template plug-in. However, the developers of engineering projects only have the permission to use the template plug-in and do not have the permission to modify the template plug-in, resulting in the inability to update the code templates of the SDK.
[0124] For this reason, the inventor found that the main key point for the developers of engineering projects to be unable to update the code templates of the SDK is that "the code templates of the SDK are located in the template plug-in and the developers of engineering projects do not have the permission to modify the template plug-in".
[0125] In view of this, the inventor thought that: If in the scenario of updating the code templates of the SDK, the developers of engineering projects can bypass the template plug-in (not based on the template plug-in) to update the code templates of the SDK, then they can update the code templates of the SDK without being restricted by "the developers of engineering projects do not have the permission to modify the template plug-in".
[0126] Specifically, in order to enable the developers of engineering projects to bypass the template plug-in (not based on the template plug-in) to update the code templates of the SDK in the scenario of updating the code templates of the SDK, the inventor thought of a way to decouple the code templates of the SDK from the template plug-in, making the code templates of the SDK and the template plug-in independent of each other. For example, the code templates of the SDK are not located in the template plug-in. In this way, in the scenario of updating the code templates of the SDK, the developers of engineering projects can bypass the template plug-in (not based on the template plug-in) to update the code templates of the SDK.
[0127] Among them, in order to decouple the code template of the SDK from the template plug-in, the inventor thought of a way. The code template of the SDK can be deployed in the cloud, and the template plug-in deployed in the development environment can have the functions of a logic process. For example, the function of obtaining the code template from the cloud, the function of displaying the code template, the function of receiving the content filled in the filling position in the code template, the function of generating the SDK according to the code of the SDK, the function of uploading the code template to the cloud, and the function of deploying the code template in the engineering project, etc.
[0128] Specifically, referring to Figure 1 , a step flowchart of a data processing method of the present application is shown. This method is applied to an electronic device. The electronic device has a development environment, and an engineering project is created in the development environment. The engineering project may include an engineering project for developing an application program, etc. This method may specifically include the following steps:
[0129] In step S101, when an insertion operation of the SDK for inserting a target function in the engineering project is received, an index page of the code template of the SDK is displayed.
[0130] During the process of a developer of the engineering project writing code in the engineering project, if it is necessary to insert an SDK for a target function (such as functions including obtaining camera permissions, obtaining storage permissions, or obtaining microphone permissions, etc.) in the engineering project, the developer of the engineering project can input an insertion operation of the SDK for inserting a target function in the engineering project in the electronic device. When the electronic device receives the insertion operation of the SDK for inserting a target function in the engineering project, it can assist the developer of the engineering project in inserting the SDK for the target function in the engineering project.
[0131] For example, it supports the developer of the engineering project to obtain the code template of the SDK for the target function, so that the developer of the engineering project can quickly develop the SDK for the target function according to the code template of the SDK for the target function, and then can insert the SDK for the target function in the engineering project.
[0132] In order to support the developer of the engineering project to obtain the code template of the SDK for the target function, in an embodiment of the present application, it can support the developer of the engineering project to search for the developed code template of the SDK for the target function according to actual needs.
[0133] In order to support the developer of the engineering project to search for the developed code template of the SDK for the target function according to actual needs, an index page of the code template of the SDK can be displayed.
[0134] Among them, the index page includes a filling position for local index information, and the local index information of the code template set of the SDK is filled in the filling position.
[0135] Among them, for the first code template set of the SDK for the target function, the local index information of the first code template set of the SDK for the target function may include: the version information of the first code template set, etc., or may include: the version information of the first code template set and the name of the target function, etc.
[0136] The names of different functions are different. The functions include functions such as obtaining permissions and establishing network connections.
[0137] In this application, when the developer of the engineering project needs to search for the code template of the SDK for the target function, the developer of the engineering project can fill in the local index information of the first code template set of the SDK for the target function in the filling position of the local index information on the index page.
[0138] In step S102, obtain the local index information of the first code template set of the SDK for the target function input on the index page.
[0139] In step S103, according to the local index information of the first code template set of the SDK for the target function, determine whether the first code template set of the SDK for the target function has been loaded in the root directory of the engineering project.
[0140] In this application, the first code template set of the SDK for the target function may have been loaded in the root directory of the engineering project (for example, the first code template set of the SDK for the target function may have been loaded in the root directory of the engineering project according to actual needs before. In one example, the first code template set of the SDK for the target function was loaded in the root directory of the engineering project when an SDK for the target function needed to be inserted into the engineering project before), or the first code template set of the SDK for the target function may not have been loaded in the root directory of the engineering project yet.
[0141] In one embodiment, when the first code template set of the SDK for the target function has been loaded in the root directory of the engineering project, the code templates in the first code template set of the SDK for the target function that has been loaded in the root directory of the engineering project can be directly displayed, so that the developer of the engineering project can quickly develop the SDK for the target function according to the code templates in the code template set of the SDK for the target function and insert the SDK for the target function into the engineering project.
[0142] Alternatively, in another embodiment, when the first code template set of the SDK for the target function is not loaded in the root directory of the engineering project, there is no code template in the first code template set of the SDK for the target function available for display on the local electronic device at this time. If it is necessary to display the code templates in the first code template set of the SDK for the target function to the developers of the engineering project at this time, it is necessary to obtain the first code template set of the SDK for the target function from the cloud (the first code template set of the SDK for the target function in the cloud is developed and uploaded to the cloud storage in advance), and display the code templates in the first code template set of the SDK for the target function, so that the developers of the engineering project can quickly develop the SDK for the target function according to the code templates in the code template set of the SDK for the target function and insert the SDK for the target function into the engineering project.
[0143] In this way, in this application, after obtaining the local index information of the first code template set of the SDK for the target function, it is possible to determine whether the first code template set of the SDK for the target function has been loaded in the root directory of the engineering project according to the local index information of the first code template set of the SDK for the target function.
[0144] When the first code template set of the SDK for the target function has been loaded in the root directory of the engineering project, step S104 can be executed. Alternatively, when the first code template set of the SDK for the target function is not loaded in the root directory of the engineering project, step S105 can be executed.
[0145] When the first code template set of the SDK for the target function has been loaded in the root directory of the engineering project, in step S104, display the code templates in the first code template set of the SDK for the target function that has been loaded in the root directory of the engineering project.
[0146] The code template at least includes: general function codes for developing the SDK for the target function and filling positions for personalized function codes of the SDK for the target function.
[0147] After displaying the code templates in the first code template set of the SDK for the target function, the developers of the engineering project can see the code templates in the first code template set of the SDK for the target function on the screen of the electronic device. After that, they can select a code template in the first code template set of the SDK for the target function to develop the SDK for the target function. The developers of the engineering project can fill in the personalized function codes of the SDK for the target function according to actual needs in the filling positions of the personalized function codes of the SDK for the target function in the selected code template.
[0148] Correspondingly, the electronic device can receive the personalized function code of the SDK of the target function filled in the filling bit of the SDK of the target function in the selected code template by the developer of the engineering project, and then generate the SDK of the target function according to the general function code of the SDK of the target function in the code template of the SDK of the target function and the filled personalized function code; and insert the SDK of the target function into the engineering project.
[0149] In the case where the first code template set of the SDK of the target function is not loaded in the root directory of the engineering project, in step S105, it is determined whether the first code template set of the SDK of the target function is stored in the cloud according to the local index information of the first code template set of the SDK of the target function.
[0150] In an embodiment of the present application, when determining whether the first code template set of the SDK of the target function is stored in the cloud according to the local index information of the first code template set of the SDK of the target function, it can be implemented through the following process, including:
[0151] 1051. Determine whether there is the local index information of the first code template set of the SDK of the target function in the correspondence relationship between the pre-stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK.
[0152] In the present application, if the first code template set of the SDK of the target function is developed in advance based on the electronic device (for example, developed in advance by the developer of the engineering project, etc.) and the first code template set of the SDK of the target function is uploaded to the cloud, the cloud will store the first code template set of the SDK of the target function in the cloud and allocate the cloud index information of the first code template set of the SDK of the target function, and return the cloud index information of the first code template set of the SDK of the target function to the electronic device.
[0153] After the electronic device receives the cloud index information of the first code template set of the SDK of the target function returned by the cloud, it can obtain the local index information of the first code template set of the SDK of the target function (the local index information can be input by the developer of the engineering project in the electronic device, etc.), and store the correspondence relationship between the local index information of the first code template set of the SDK of the target function and the cloud index information of the first code template set of the SDK of the target function.
[0154] The correspondence relationship between the local index information of the first code template set of the SDK for the target function and the cloud index information of the first code template set of the SDK for the target function includes: forming a corresponding table entry with the local index information of the first code template set of the SDK for the target function and the cloud index information of the first code template set of the SDK for the target function, and storing it in the pre-stored correspondence relationship between the local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK.
[0155] In this way, it is possible to determine whether the first code template set of the SDK for the target function is stored in the cloud according to whether the local index information of the first code template set of the SDK for the target function exists in the above correspondence relationship.
[0156] In one embodiment, the correspondence relationship between the local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK can be located in the parse platform.
[0157] For example, it is possible to upload the local index information of the first code template set of the SDK for the target function and the cloud index information of the first code template set of the SDK for the target function to the PARSE platform, so that the PARSE platform stores the correspondence relationship between the local index information of the first code template set of the SDK for the target function and the cloud index information of the first code template set of the SDK for the target function.
[0158] Or, in another embodiment, the correspondence relationship between the local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK can be located in the engineering project.
[0159] 1052. When there is local index information of the first code template set of the SDK for the target function in the above correspondence relationship, it is determined that the first code template set of the SDK for the target function is stored in the cloud.
[0160] 1053. When there is no local index information of the first code template set of the SDK for the target function in the above correspondence relationship, it is determined that the first code template set of the SDK for the target function is not stored in the cloud.
[0161] The cloud index information of the code template set can include the URL (Uniform Resource Locator) of the code template set in the cloud, etc.
[0162] The local index information of the code template set of the SDK for a function can include: the name of the function and the version information (such as version number, etc.) of the code template set of the SDK for the function.
[0163] The version information can be specified manually or automatically incremented by the electronic device according to the historical version information of the code template set of the SDK for this function (such as automatically incrementing the version number, etc.).
[0164] Among them, the local index information of different code template sets of the SDK for the same function is different (such as different version information of the code template set, etc.), and the cloud index information of different code template sets of the SDK for the same function is different (such as different URLs of the code template set, etc.).
[0165] The local index information of the code template sets of the SDKs for different functions is different, and the cloud index information of the code template sets of the SDKs for different functions is different.
[0166] When the first code template set of the SDK for the target function is stored in the cloud, in step S106, the first code template set of the SDK for the target function is obtained from the cloud according to the local index information of the first code template set of the SDK for the target function, and the code templates in the first code template set of the SDK for the target function are displayed.
[0167] In an embodiment of the present application, when obtaining the first code template set of the SDK for the target function from the cloud according to the local index information of the first code template set of the SDK for the target function, it can be implemented through the following process, including:
[0168] 1061. Obtain the cloud index information of the first code template set of the SDK for the target function according to the local index information of the first code template set of the SDK for the target function.
[0169] For example, it is possible to determine the cloud index information corresponding to the local index information of the first code template set of the SDK for the target function in the correspondence relationship between the local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK stored in advance, and use it as the cloud index information of the first code template set of the SDK for the target function.
[0170] 1062. Obtain the first code template set of the SDK for the target function from the cloud according to the cloud index information of the first code template set of the SDK for the target function.
[0171] The electronic device can send a request for obtaining the cloud index information of the first code template set of the SDK for the target function to the cloud.
[0172] After receiving the acquisition request, the cloud can, according to the cloud index information of the first code template set of the SDK of the target function, index the first code template set of the SDK of the target function from the code template set stored in the cloud, and return the first code template set of the SDK of the target function to the electronic device.
[0173] The electronic device can receive the first code template set of the SDK of the target function returned by the cloud.
[0174] In this application, in the case of receiving an insertion operation for inserting the SDK of the target function into the engineering project, an index page for the code template of the SDK is displayed. The local index information of the first code template set of the SDK of the target function input on the index page is obtained. According to the local index information of the first code template set of the SDK of the target function, it is determined whether the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project. In the case where the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project, the code templates in the first code template set of the SDK of the target function that have been loaded in the root directory of the engineering project are displayed. In the case where the first code template set of the SDK of the target function has not been loaded in the root directory of the engineering project, it is determined whether the first code template set of the SDK of the target function is stored in the cloud according to the local index information of the first code template set of the SDK of the target function. In the case where the first code template set of the SDK of the target function is stored in the cloud, the first code template set of the SDK of the target function is obtained from the cloud according to the local index information of the first code template set of the SDK of the target function, and the code templates in the first code template set of the SDK of the target function are displayed.
[0175] In this application, the above process can be executed by the template plugin deployed in the development environment by the electronic device, that is, the template plugin deployed in the development environment has the function of executing the above logical process.
[0176] On the one hand, this application can obtain the code template set of the SDK from the cloud. In this way, it can support that the code template set of the SDK can be deployed in the cloud, and further support decoupling the template plugin deployed in the development environment from the code template set of the SDK.
[0177] On the other hand, the present application can obtain the code template set of the SDK from the root directory of the engineering project. In this way, it can support deploying the code template set of the SDK obtained from the cloud in the root directory of the engineering project. In this way, it can support directly obtaining the code template set of the SDK in the root directory of the engineering project when using the code template set of the SDK in the engineering project later, without obtaining it from the cloud, thereby saving network resources and improving the efficiency of obtaining the code template set of the SDK. Secondly, the code template set of the SDK obtained from the cloud is cached in the root directory of the engineering project and is still decoupled from the template plug-in deployed in the development environment.
[0178] On the other hand, the present application supports that a large number of developers can deploy their respective code template sets of the SDK in the cloud. In this way, there will be a lot of code template sets of the SDK in the cloud. In this way, it supports the developers of the engineering project to search for the required code template set of the SDK in the cloud by inputting local index information on the index page, avoiding the developers of the engineering project obtaining the unnecessary code template set of the SDK from the cloud.
[0179] Since it supports decoupling the template plug-in deployed in the development environment from the code template set of the SDK, and supports caching the code template set of the SDK obtained from the cloud in the root directory of the engineering project and still decoupling it from the template plug-in deployed in the development environment. In this way, it supports that in the scenario of updating the code template set of the SDK, the developers of the engineering project can bypass the template plug-in (not based on the template plug-in) to update the code template set of the SDK. In this way, the developers of the engineering project can update the code template set of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in the engineering project later.
[0180] Furthermore, after obtaining the first code template set of the SDK for the target function from the cloud, the first code template set of the SDK for the target function is also stored in the root directory of the engineering project. So that later when it is necessary to insert the SDK for the target function in the engineering project again (for example, this time it is necessary to insert the SDK for obtaining the microphone permission in obtaining permissions in the engineering project, and later it is necessary to insert the SDK for obtaining the storage permission in obtaining permissions in the engineering project, etc.), the electronic device can directly obtain the first code template set of the SDK for the target function from the root directory of the engineering project, and select a code template from the first code template set of the SDK for the target function to develop the SDK for the target function, instead of obtaining the first code template set of the SDK for the target function from the cloud, which can improve the speed of obtaining the first code template set of the SDK for the target function, and further improve the efficiency of inserting the SDK for the target function in the engineering project again, and can save network resources.
[0181] In another embodiment of the present application, the first code template set of the SDK of the target function may not be stored in the cloud at this time. Thus, when determining whether the first code template set of the SDK of the target function is stored in the cloud according to the local index information of the first code template set of the SDK of the target function in step S105, it will be concluded that the first code template set of the SDK of the target function is not stored in the cloud.
[0182] For example, the update of the code template set of the SDK of the target function has not been updated to the first code template set at this time. For example, the update of the code template set of the SDK of the target function is currently updated to the second code template set (the second code template set is the current latest code template set of the SDK of the target function). That is, for the code template set of the SDK of the target function, the second code template set of the SDK of the target function is currently available in the cloud, and the historical code template set of the SDK of the target function before the second code template set of the SDK of the target function is also available. The second code template set is the latest version of the code template set of the SDK of the target function, but the cloud does not have the first code template set of the SDK of the target function.
[0183] In this way, the first code template set of the SDK of the target function cannot be found in the cloud according to the local index information of the first code template set of the SDK of the target function.
[0184] For example, there is currently no cloud index information for the first code template set of the SDK of the target function. Thus, the cloud index information for the first code template set of the SDK of the target function cannot be obtained according to the local index information of the first code template set of the SDK of the target function, and thus the first code template set of the SDK of the target function cannot be indexed from the cloud based on the cloud index information of the first code template set of the SDK of the target function.
[0185] Under normal circumstances, if the update of the code template set of the SDK for the target function has not been updated to the first code template set, there is no first code template set of the SDK for the target function in the cloud. Thus, when developers of a project need to search for the code template set of the SDK for the target function, they often do not enter the local index information of the first code template set of the SDK for the target function on the index page. Instead, they often enter the local index information of the second code template set of the SDK for the target function or the local index information of the historical code template set of the SDK for the target function that is before the second code template set. The local index information of the first code template set of the SDK for the target function is different from the local index information of the second code template set of the SDK for the target function. The local index information of the first code template set of the SDK for the target function is different from the local index information of the historical code template set of the SDK for the target function that is before the second code template set.
[0186] Among them, if developers of a project enter the local index information of the code template set (such as the first code template set) of the SDK for the target function that has not been updated yet, in one case, it may be due to manual errors by the developers of the project, such as input errors. For example, the developers of the project originally intended to enter the local index information of the second code template set of the SDK for the target function or the local index information of the historical code template set of the SDK for the target function that is before the second code template set, but accidentally entered the local index information of the first code template set of the SDK for the target function manually.
[0187] Or, in another case, it may also be because the developers of the project are not particularly clear about what stage the code template set of the SDK for the target function has been updated to, and the developers of the project mistakenly believe that the code template set of the SDK for the target function has been updated to the first code template set that is after the second code template set of the SDK for the target function, thus entering the local index information of the first code template set of the SDK for the target function.
[0188] However, the electronic device cannot find the first code template set of the SDK for the target function in the cloud based on the local index information of the first code template set of the SDK for the target function. In this case, the developers of the project cannot obtain the code template of the SDK for the target function, and thus cannot enable the developers of the project to quickly develop the SDK for the target function according to the code template of the SDK for the target function and insert the SDK for the target function into the project.
[0189] In view of this, on the basis that the developers of the engineering project cannot obtain the code templates of the SDK of the target function because the first code template set of the SDK of the target function cannot be found in the cloud, it is possible to further assist the developers of the engineering project to quickly develop the SDK of the target function according to the code templates of the SDK of the target function and insert the SDK of the target function into the engineering project. In another embodiment of the present application, the local index information of the code template set at least includes: the version information (such as the version number) of the code template set, etc.
[0190] The version information of the code template set generated later in time can be greater than the version information of the code template set generated earlier in time.
[0191] In this way, the local index information of the first code template set of the SDK of the target function at least includes the first version information of the first code template set of the SDK of the target function.
[0192] Thus, referring to Figure 2 , the method further includes:
[0193] In the case where the first code template set of the SDK of the target function is not stored in the cloud, in step S201, obtain the second version information of the second code template set of the SDK of the target function in the cloud. Among the version information of each code template set of the SDK of the target function, the second version information is adjacent to the first version information.
[0194] Among them, the second code template set of the SDK of the target function and the first code template set of the SDK of the target function can be two code template sets with adjacent versions of the SDK of the target function. The moment when the second code template set of the SDK of the target function is developed is earlier than the moment when the first code template set of the SDK of the target function is developed.
[0195] In an embodiment of the present application, this step can be implemented through the following process, including:
[0196] 2011. Determine the local index information including the version information of the code template set of the SDK of the target function in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK.
[0197] In an embodiment of the present application, in addition to the version information of the code template set of the SDK of the target function, the local index information of the code template set of the SDK of the target function can also include the name of the target function, etc.
[0198] In this way, it is possible to determine the local index information including the name of the target function in the corresponding relationship between the locally stored local index information of the SDK's code template set and the cloud index information of the SDK's code template set, that is, it is possible to obtain the local index information of the version information of the SDK's code template set including the target function.
[0199] 2012. When there is only one piece of local index information of the version information of the SDK's code template set including the target function in the above corresponding relationship, obtain the second version information of the second code template set of the SDK for the target function according to the version information in this one piece of local index information determined in the above corresponding relationship.
[0200] For example, when there is only one piece of local index information of the version information of the SDK's code template set including the target function in the above corresponding relationship, the version information in this one piece of local index information determined in the above corresponding relationship can be used as the second version information of the second code template set of the SDK for the target function.
[0201] 2013. When there are two or more pieces of local index information of the version information of the SDK's code template set including the target function in the above corresponding relationship, select the version information with the smallest distance from the first version information from the version information in the two or more pieces of local index information, and use it as the second version information of the second code template set of the SDK for the target function.
[0202] In step S202, obtain the second code template set of the SDK for the target function from the cloud according to the second version information of the second code template set of the SDK for the target function, and display the code templates in the second code template set of the SDK for the target function.
[0203] In an embodiment of the present application, this step can be implemented through the following process, including:
[0204] 2021. According to the local index information including the second version information of the second code template set of the SDK for the target function, obtain the cloud index information of the second code template set of the SDK for the target function.
[0205] For example, it is possible to determine the cloud index information corresponding to the local index information including the second version information of the second code template set of the SDK for the target function in the corresponding relationship between the locally stored local index information of the SDK's code template set and the cloud index information of the SDK's code template set, and use it as the cloud index information of the second code template set of the SDK for the target function.
[0206] In 2022, obtain the second code template set of the SDK for the target function from the cloud according to the cloud index information of the second code template set of the SDK for the target function.
[0207] The electronic device can send a request for obtaining the cloud index information of the second code template set of the SDK for the target function to the cloud.
[0208] After receiving the request for obtaining, the cloud can, according to the cloud index information of the second code template set of the SDK for the target function, index out the second code template set of the SDK for the target function from the code template set stored in the cloud, and return the second code template set of the SDK for the target function to the electronic device.
[0209] The electronic device can receive the second code template set of the SDK for the target function returned by the cloud.
[0210] Refer to Figure 3 , which shows the step flowchart of a data processing method of the present application. This method is applied to an electronic device, and this method may specifically include the following steps:
[0211] In step S301, obtain the old code template set of the SDK for the target function.
[0212] In the present application, during the development of an application by a developer of an engineering project, sometimes it may be necessary to update the code template set of the SDK for the target function according to actual requirements.
[0213] For example, sometimes according to actual requirements, it is necessary to add a new code template to the old (existing) code template set of the SDK for the target function.
[0214] For example, the target function is the function of obtaining permissions. The code template set of the SDK for the target function currently includes the code template of the SDK for obtaining camera permissions and the code template of the SDK for obtaining storage permissions. Now it is necessary to add the code template of the SDK for obtaining microphone permissions to the code template set of the SDK for the target function.
[0215] Or, sometimes according to actual requirements, it is necessary to modify the existing code templates in the code template set of the SDK for the target function.
[0216] For example, the target function is the function of obtaining permissions. The code template set of the SDK for the target function currently includes the code template of the SDK for obtaining camera permissions and the code template of the SDK for obtaining storage permissions. Now it is necessary to modify the code template of the SDK for obtaining storage permissions and / or the code template of the SDK for obtaining camera permissions in the code template set of the SDK for the target function.
[0217] During the development process of an application by developers of an engineering project, if it is necessary to update the old (existing) code template set of the SDK for the target function, the developers of the engineering project can input an instruction in the electronic device. When the electronic device receives the instruction, it can obtain the old code template set of the SDK for the target function (for example, there is a development environment in the electronic device, an engineering project is created in the development environment, the engineering project can include an engineering project for developing an application, etc., and the old code template of the SDK for the target function exists in the root directory of the engineering project. Thus, the old code template of the SDK for the target function can be obtained from the root directory of the engineering project. Or, obtain the old code template of the SDK for the target function from the cloud, etc.), display the old code template set of the SDK for the target function, and the developers of the engineering project can modify the existing code templates in the old code template set of the SDK for the target function to obtain a new code template set of the SDK for the target function, and / or the developers of the engineering project can add new code templates to the old code template set of the SDK for the target function to obtain a new code template set of the SDK for the target function.
[0218] Specifically, the developers of the engineering project can input a modification operation on the old code template set of the SDK for the target function.
[0219] In step S302, obtain the modification operation on the old code template set of the SDK for the target function to obtain a new code template set of the SDK for the target function.
[0220] In step S303, upload the new code template set of the SDK for the target function to the cloud, so that the cloud stores the new code template set of the SDK for the target function, allocates new cloud index information for the new code template set of the SDK for the target function, and returns the new cloud index information to the electronic device.
[0221] In this application, the cloud previously stored the old code template set of the SDK for the target function. After the cloud stores the new code template set of the SDK for the target function, it can allocate new cloud index information for the new code template set of the SDK for the target function. The new cloud index information of the new code template set of the SDK for the target function includes the URL of the new code template set of the SDK for the target function, etc.
[0222] The new cloud index information of the new code template set of the SDK for the target function is different from the old cloud index information of the old code template set of the SDK for the target function. That is, the URL of the new code template set of the SDK for the target function is different from the URL of the old code template set of the SDK for the target function.
[0223] After that, the cloud can return to the electronic device the new cloud index information of the new code template set of the SDK of the assigned target function.
[0224] In step S304, receive the new cloud index information of the new code template set of the SDK of the target function returned by the cloud.
[0225] In step S305, obtain the new local index information of the new code template set of the SDK of the target function.
[0226] The new local index information of the new code template set of the SDK of the target function can be input by the developer of the engineering project, etc. Or, the new local index information of the new code template set of the SDK of the target function can be automatically obtained by the electronic device according to the existing information, etc.
[0227] For example, the local index information of the code template set of the SDK of a function may include: the name of the function and the version information (such as the version number, etc.) of the code template set of the SDK of the function.
[0228] The name of the target function remains unchanged (the names of different functions in this application are different). Thus, the name of the target function in the new local index information of the new code template set of the SDK of the target function can be obtained according to the name of the target function in the old local index information of the old code template set of the SDK of the target function.
[0229] The version information of the new code template set of the SDK of the target function can be specified manually, or can be obtained after the version information of the old code template set of the SDK of the target function is automatically incremented (such as automatically incrementing the version number, etc.) by the electronic device, etc.
[0230] In step S306, store the correspondence between the new local index information of the new code template set of the SDK of the target function and the new cloud index information of the new code template set of the SDK of the target function.
[0231] Storing the correspondence between the new local index information of the new code template set of the SDK of the target function and the new cloud index information of the new code template set of the SDK of the target function includes: forming a corresponding table entry with the new local index information of the new code template set of the SDK of the target function and the new cloud index information of the new code template set of the SDK of the target function, and storing it in the correspondence between the new local index information of the code template set of the SDK and the new cloud index information of the code template set of the SDK stored in advance.
[0232] In one embodiment, the correspondence between the new local index information of the SDK's code template set and the new cloud index information of the SDK's code template set can be located in the Parse platform.
[0233] Alternatively, in another embodiment, the correspondence between the new local index information of the SDK's code template set and the new cloud index information of the SDK's code template set can be located in the engineering project.
[0234] For example, the new local index information of the new code template set of the SDK for the target function and the new cloud index information of the new code template set of the SDK for the target function can be uploaded to the PARSE platform (in daily development, it is necessary to obtain background data through backend developers, which increases the communication cost. Parse provides a user-as-a-service capability, and the front end can skip backend personnel to obtain the data they want through Parse), so that the PARSE platform stores the correspondence between the new local index information of the new code template set of the SDK for the target function and the new cloud index information of the new code template set of the SDK for the target function.
[0235] Among them, the electronic device has a development environment, and an engineering project is created in the development environment. Further, the new code template set of the SDK for the target function can also be stored in the root directory of the engineering project.
[0236] So that later when it is necessary to insert the SDK for the target function into the engineering project again (afterwards, it is necessary to insert the SDK for obtaining the stored permission in obtaining permissions in the engineering project, etc.), the electronic device can directly obtain the new code template set of the SDK for the target function from the root directory of the engineering project, and select a code template from the new code template set of the SDK for the target function to develop the SDK for the target function, instead of obtaining the new code template set of the SDK for the target function from the cloud. This can improve the speed of obtaining the new code template set of the SDK for the target function, thereby improving the efficiency of inserting the SDK for the target function into the engineering project again, and can save network resources.
[0237] In this application, an old code template set of the SDK for the target function is obtained. A modification operation on the old code template set of the SDK for the target function is obtained to get a new code template set of the SDK for the target function. The new code template set of the SDK for the target function is uploaded to the cloud so that the cloud stores the new code template set of the SDK for the target function, assigns new cloud index information for the new code template set of the SDK for the target function, and returns the new cloud index information to the electronic device. The new cloud index information of the new code template set of the SDK for the target function returned by the cloud is received. The new local index information of the new code template set of the SDK for the target function is obtained. The correspondence between the new local index information of the new code template set of the SDK for the target function and the new cloud index information of the new code template set of the SDK for the target function is stored.
[0238] In this application, the above process may be executed by an electronic device based on a template plugin deployed in a development environment, that is, the template plugin deployed in the development environment has the function of executing the above logical process.
[0239] On the one hand, this application can support that the code template set of the SDK can be deployed in the cloud, and thus can support decoupling the template plugin deployed in the development environment from the code template set of the SDK.
[0240] On the other hand, this application supports that a large number of developers can deploy the code template sets of their respective SDKs in the cloud. In this way, there will be many code template sets of SDKs in the cloud. Thus, the cloud can assign cloud index information to different code template sets of SDKs so that developers of subsequent engineering projects can search for the required code template sets of SDKs in the cloud based on local index information, avoiding developers of engineering projects from obtaining unnecessary code template sets of SDKs from the cloud.
[0241] Since it supports decoupling the template plugin deployed in the development environment from the code template set of the SDK, thus, in the scenario of updating the code template set of the SDK, it supports that developers of engineering projects can bypass the template plugin (not based on the template plugin) to update the code template set of the SDK. This enables developers of engineering projects to update the code template set of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in subsequent engineering projects.
[0242] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily essential to the present application.
[0243] Referring to Figure 4 , a structural block diagram of a data processing device according to the present application is shown, which is applied to an electronic device. There is a development environment in the electronic device, and an engineering project is created in the development environment. The device includes:
[0244] A display module 11, configured to display an index page of the code template of the SDK when receiving an insertion operation for inserting the SDK for the target function into the engineering project;
[0245] A first acquisition module 12, configured to acquire local index information of a first code template set of the SDK for the target function input in the index page;
[0246] A first determination module 13, configured to determine whether the first code template set has been loaded in the root directory of the engineering project according to the local index information;
[0247] A first display module 14, configured to display the code templates in the first code template set that has been loaded in the root directory of the engineering project when the first code template set has been loaded in the root directory of the engineering project. The code templates at least include: general function codes for developing the SDK for the target function and filling positions for personalized function codes of the SDK for the target function;
[0248] A second determination module 15, configured to determine whether the first code template set is stored in the cloud according to the local index information when the first code template set has not been loaded in the root directory of the engineering project. A second acquisition module 16, configured to acquire the first code template set from the cloud according to the local index information when the first code template set is stored in the cloud. A second display module 17, configured to display the code templates in the first code template set.
[0249] In an optional implementation manner, the second determination module includes:
[0250] A first determination unit, configured to determine whether the local index information exists in the correspondence between the locally stored local index information of the code template set of the SDK and the cloud index information of the code template set of the SDK;
[0251] A second determination unit, configured to determine that the first code template set is stored in the cloud when the local index information exists in the corresponding relationship;
[0252] Or,
[0253] A third determination unit, configured to determine that the first code template set is not stored in the cloud when the local index information does not exist in the corresponding relationship.
[0254] In an optional implementation manner, the second obtaining module includes:
[0255] A first obtaining unit, configured to obtain the cloud index information of the first code template set according to the local index information;
[0256] A second obtaining unit, configured to obtain the first code template set from the cloud according to the cloud index information.
[0257] In an optional implementation manner, the first obtaining unit is specifically configured to:
[0258] Determine the cloud index information corresponding to the local index information in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK.
[0259] In an optional implementation manner, the local index information at least includes the first version information of the first code template set;
[0260] The apparatus further includes:
[0261] A third obtaining module, configured to obtain the second version information of the second code template set of the SDK of the target function in the cloud when the first code template set is not stored in the cloud; wherein, among the version information of each code template set of the SDK of the target function, the second version information is adjacent to the first version information;
[0262] A fourth obtaining module, configured to obtain the second code template set from the cloud according to the second version information;
[0263] A third display module, configured to display the code templates in the second code template set.
[0264] In an optional implementation manner, the third obtaining module includes:
[0265] A fourth determination unit, configured to determine the local index information including the version information of the code template set of the SDK of the target function in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK;
[0266] A third acquisition unit, configured to obtain the second version information according to the version information in the one piece of local index information determined in the corresponding relationship when the local index information of the code template set of the SDK including the target function in the corresponding relationship is one.
[0267] Or
[0268] A fourth acquisition unit, configured to select, as the second version information, the version information with the smallest distance from the first version information from the version information in two or more pieces of local index information when the local index information of the code template set of the SDK including the target function in the corresponding relationship is two or more.
[0269] In an optional implementation manner, the apparatus further includes:
[0270] A first storage module, configured to store the first code template set in the root directory of the engineering project after obtaining the first code template set from the cloud.
[0271] In this application, when an insertion operation for inserting an SDK of a target function into an engineering project is received, an index page of the code template of the SDK is displayed. The local index information of the first code template set of the SDK of the target function input on the index page is obtained. According to the local index information of the first code template set of the SDK of the target function, it is determined whether the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project. When the first code template set of the SDK of the target function has been loaded in the root directory of the engineering project, the code templates in the first code template set of the SDK of the target function that has been loaded in the root directory of the engineering project are displayed. When the first code template set of the SDK of the target function has not been loaded in the root directory of the engineering project, it is determined whether the first code template set of the SDK of the target function is stored in the cloud according to the local index information of the first code template set of the SDK of the target function. When the first code template set of the SDK of the target function is stored in the cloud, the first code template set of the SDK of the target function is obtained from the cloud according to the local index information of the first code template set of the SDK of the target function, and the code templates in the first code template set of the SDK of the target function are displayed.
[0272] In this application, the above process may be executed by a template plugin deployed in a development environment by an electronic device, that is, the template plugin deployed in the development environment has the function of executing the above logical process.
[0273] On the one hand, the present application can obtain the code template set of the SDK from the cloud. In this way, it can support that the code template set of the SDK is deployed in the cloud, and further support decoupling the template plug-in deployed in the development environment from the code template set of the SDK.
[0274] On the other hand, the present application can obtain the code template set of the SDK from the root directory of the engineering project. In this way, it can support deploying the code template set of the SDK obtained from the cloud in the root directory of the engineering project. In this way, it can support directly obtaining the code template set of the SDK in the root directory of the engineering project when using the code template set of the SDK in the engineering project subsequently, without obtaining it from the cloud, thereby saving network resources and improving the efficiency of obtaining the code template set of the SDK. Secondly, the code template set of the SDK obtained from the cloud is cached in the root directory of the engineering project, and is still decoupled from the template plug-in deployed in the development environment.
[0275] On the other hand, the present application supports that a large number of developers can deploy their respective code template sets of the SDK in the cloud. In this way, there will be many code template sets of the SDK in the cloud. In this way, it supports the developers of the engineering project to search for the required code template set of the SDK in the cloud by inputting local index information on the index page, avoiding the developers of the engineering project obtaining the unnecessary code template set of the SDK from the cloud.
[0276] Since it supports decoupling the template plug-in deployed in the development environment from the code template set of the SDK, and supports caching the code template set of the SDK obtained from the cloud in the root directory of the engineering project, which is still decoupled from the template plug-in deployed in the development environment. In this way, it supports that in the scenario of updating the code template set of the SDK, the developers of the engineering project can bypass the template plug-in (not based on the template plug-in) to update the code template set of the SDK. In this way, the developers of the engineering project can update the code template set of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in the engineering project subsequently.
[0277] Refer to Figure 5 , which shows the structural block diagram of a data processing device of the present application, applied to an electronic device. The device includes:
[0278] A fifth acquisition module 21, configured to acquire the old code template set of the SDK for the target function;
[0279] A sixth acquisition module 22, configured to acquire the modification operation on the old code template set of the SDK for the target function to obtain the new code template set of the SDK for the target function;
[0280] An upload module 23, configured to upload a new code template set of the SDK of the target function to the cloud, so that the cloud stores the new code template set of the SDK of the target function, assigns new cloud index information for the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device;
[0281] A receiving module 24, configured to receive the new cloud index information returned by the cloud;
[0282] A seventh obtaining module 25, configured to obtain new local index information for the new code template set of the SDK of the target function;
[0283] A second storage module 26, configured to store the correspondence between the new cloud index information and the new local index information.
[0284] In an optional implementation manner, a development environment exists in the electronic device, and an engineering project is created in the development environment;
[0285] The apparatus further includes:
[0286] A third storage module, configured to store the new code template set of the SDK of the target function in the root directory of the engineering project.
[0287] In an optional implementation manner, the second storage module is specifically configured to: upload the new cloud index information and the new local index information to the PARSE platform, so that the PARSE platform stores the correspondence between the new cloud index information and the new local index information.
[0288] In this application, obtain the old code template set of the SDK of the target function. Obtain the modification operation on the old code template set of the SDK of the target function to obtain the new code template set of the SDK of the target function. Upload the new code template set of the SDK of the target function to the cloud, so that the cloud stores the new code template set of the SDK of the target function, assigns new cloud index information for the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device. Receive the new cloud index information of the new code template set of the SDK of the target function returned by the cloud. Obtain the new local index information for the new code template set of the SDK of the target function. Store the correspondence between the new local index information of the new code template set of the SDK of the target function and the new cloud index information of the new code template set of the SDK of the target function.
[0289] In this application, the above process may be executed by the electronic device based on the template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has the function of executing the above logical process.
[0290] On the one hand, the code template set of the SDK supported by the present application can be deployed in the cloud, thereby supporting the decoupling of the template plug-in deployed in the development environment from the code template set of the SDK.
[0291] On the other hand, the present application supports that a large number of developers can deploy the code template sets of their respective SDKs in the cloud. In this way, there will be many code template sets of SDKs in the cloud. Thus, the cloud can allocate cloud index information to different code template sets of SDKs, so that developers of subsequent engineering projects can search for the required code template sets of SDKs in the cloud based on local index information, avoiding developers of engineering projects obtaining unnecessary code template sets of SDKs from the cloud.
[0292] Since it supports the decoupling of the template plug-in deployed in the development environment from the code template set of the SDK, in this way, it supports that in the scenario of updating the code template set of the SDK, developers of engineering projects can bypass the template plug-in (not based on the template plug-in) to update the code template set of the SDK. This enables developers of engineering projects to update the code template set of the SDK deployed in the cloud in a timely manner according to actual needs. This can improve the efficiency of developing the SDK in subsequent engineering projects.
[0293] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.
[0294] Optionally, the embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements each process of the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0295] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, it implements each process of the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0296] Figure 6FIG. 0 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0297] Referring Figure 6 to FIG. 0, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0298] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0299] The memory 804 is configured to store various types of data to support the operation of the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0300] The power component 806 provides power to various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0301] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0302] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
[0303] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0304] The sensor component 814 includes one or more sensors for providing a status assessment of various aspects of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0305] The communication component 816 is configured to facilitate communication, either wired or wirelessly, between the electronic device 800 and other devices. The electronic device 800 may access a communication standard-based wireless network, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0306] In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0307] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, is also provided. The above instructions may be executed by the processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
[0308] Figure 7 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
[0309] Referring to Figure 7 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by the memory 1932 for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0310] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0311] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0312] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0313] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0314] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0315] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0316] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0317] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0318] In addition, the functional units in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0319] If the function 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. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0320] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A data processing method, characterized in that, Applied to an electronic device, where there is a development environment in the electronic device, and an engineering project is created in the development environment. The method includes: When receiving an insertion operation for inserting an SDK of a target function into an engineering project, display an index page of the code template of the SDK; Obtain local index information of the first code template set of the SDK of the target function input on the index page; According to the local index information, determine whether the first code template set has been loaded in the root directory of the engineering project; When the first code template set has been loaded in the root directory of the engineering project, display the code templates in the first code template set that has been loaded in the root directory of the engineering project. The code templates at least include: a general function code for developing the SDK of the target function and a filling position for the personalized function code of the SDK of the target function; When the first code template set has not been loaded in the root directory of the engineering project, determine whether the first code template set is stored in the cloud according to the local index information. When the first code template set is stored in the cloud, obtain the first code template set from the cloud according to the local index information, and display the code templates in the first code template set; The local index information at least includes the first version information of the first code template set; The method further includes: When the first code template set is not stored in the cloud, obtain the second version information of the second code template set of the SDK of the target function in the cloud; wherein, among the version information of each code template set of the SDK of the target function, the second version information is adjacent to the first version information; Obtain the second code template set from the cloud according to the second version information; Display the code templates in the second code template set.
2. The method according to claim 1, wherein The determining whether the first code template set is stored in the cloud according to the local index information includes: Determine whether the local index information exists in the correspondence relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK; When the local index information exists in the correspondence relationship, determine that the first code template set is stored in the cloud; Or, When the local index information does not exist in the correspondence relationship, determine that the first code template set is not stored in the cloud.
3. The method according to claim 1, characterized in that The obtaining the first code template set from the cloud according to the local index information includes: According to the local index information, obtain the cloud index information of the first code template set; According to the cloud index information, obtain the first code template set from the cloud.
4. The method according to claim 3, wherein The obtaining the cloud index information of the first code template set according to the local index information includes: Determine the cloud index information corresponding to the local index information in the correspondence relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK.
5. The method according to claim 1, wherein The obtaining of the second version information of the second code template set of the SDK of the target function in the cloud includes: Determining the local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK; When there is only one piece of local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship, obtaining the second version information according to the version information in the determined one piece of local index information in the correspondence relationship; Or, When there are two or more pieces of local index information including the version information of the code template set of the SDK of the target function in the correspondence relationship, selecting the version information with the smallest distance from the first version information from the version information in the two or more pieces of local index information and using it as the second version information.
6. The method according to claim 1, wherein The method further includes: After obtaining the first code template set from the cloud, storing the first code template set in the root directory of the engineering project.
7. The method according to claim 1, characterized in that The method further includes: Obtaining the old code template set of the SDK of the target function; Obtaining the modification operation on the old code template set of the SDK of the target function to obtain the new code template set of the SDK of the target function; Uploading the new code template set of the SDK of the target function to the cloud so that the cloud stores the new code template set of the SDK of the target function, assigns new cloud index information to the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device; Receiving the new cloud index information returned by the cloud; Obtaining the new local index information of the new code template set of the SDK of the target function; Storing the correspondence relationship between the new cloud index information and the new local index information.
8. The method according to claim 7, characterized in that, There is a development environment in the electronic device, and an engineering project is created in the development environment; The method further includes: Storing the new code template set of the SDK of the target function in the root directory of the engineering project.
9. The method according to claim 7, wherein The storing of the correspondence relationship between the new cloud index information and the new local index information includes: Uploading the new cloud index information and the new local index information to the PARSE platform so that the PARSE platform stores the correspondence relationship between the new cloud index information and the new local index information.
10. A data processing device, characterized in that, Applied to an electronic device, there is a development environment in the electronic device, and an engineering project is created in the development environment. The device includes: A display module, configured to display an index page of the code template of the SDK when receiving an insertion operation for inserting the SDK of the target function in the engineering project; A first obtaining module, configured to obtain the local index information of the first code template set of the SDK of the target function input in the index page; A first determining module, configured to determine whether the first code template set has been loaded in the root directory of the engineering project according to the local index information; The first display module is used to display the code templates in the first code template set that has been loaded in the root directory of the engineering project when the first code template set has been loaded in the root directory of the engineering project. The code templates at least include: the general function code of the SDK for developing the target function and the filling positions for the personalized function code of the SDK for the target function. The second determination module is used to determine whether the first code template set is stored in the cloud according to the local index information when the first code template set has not been loaded in the root directory of the engineering project. The second acquisition module is used to acquire the first code template set from the cloud according to the local index information when the first code template set is stored in the cloud. The second display module is used to display the code templates in the first code template set. The local index information at least includes the first version information of the first code template set. The device further includes: The third acquisition module is used to acquire the second version information of the second code template set of the SDK for the target function in the cloud when the first code template set is not stored in the cloud. Among the version information of each code template set of the SDK for the target function, the second version information is adjacent to the first version information. The fourth acquisition module is used to acquire the second code template set from the cloud according to the second version information. The third display module is used to display the code templates in the second code template set.
11. The device according to claim 10, characterized in that, The second determination module includes: The first determination unit is used to determine whether the local index information exists in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK. The second determination unit is used to determine that the first code template set is stored in the cloud when the local index information exists in the corresponding relationship. Or, The third determination unit is used to determine that the first code template set is not stored in the cloud when the local index information does not exist in the corresponding relationship.
12. The device according to claim 10, characterized in that, The second acquisition module includes: The first acquisition unit is used to acquire the cloud index information of the first code template set according to the local index information. The second acquisition unit is used to acquire the first code template set from the cloud according to the cloud index information.
13. The device according to claim 12, characterized in that, The first acquisition unit is specifically used for: Determining the cloud index information corresponding to the local index information in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK.
14. The device according to claim 10, wherein The third acquisition module includes: The fourth determination unit is used to determine the local index information including the version information of the code template set of the SDK for the target function in the corresponding relationship between the local index information of the code template set of the SDK stored in advance and the cloud index information of the code template set of the SDK. A third acquisition unit, configured to, when there is only one piece of local index information including the version information of the code template set of the SDK with the target function in the corresponding relationship, acquire the second version information according to the version information in the one piece of local index information determined in the corresponding relationship; Or, A fourth acquisition unit, configured to, when there are two or more pieces of local index information including the version information of the code template set of the SDK with the target function in the corresponding relationship, select the version information with the smallest distance from the first version information from the version information in the two or more pieces of local index information, and use it as the second version information.
15. The device according to claim 10, characterized in that The apparatus further includes: A first storage module, configured to store the first code template set in the root directory of the engineering project after acquiring the first code template set from the cloud.
16. The device according to claim 10, characterized in that, The apparatus further includes: A fifth acquisition module, configured to acquire the old code template set of the SDK with the target function; A sixth acquisition module, configured to acquire the modification operation on the old code template set of the SDK with the target function to obtain the new code template set of the SDK with the target function; An upload module, configured to upload the new code template set of the SDK with the target function to the cloud, so that the cloud stores the new code template set of the SDK with the target function, allocates new cloud index information for the new code template set of the SDK with the target function, and returns the new cloud index information to the electronic device; A receiving module, configured to receive the new cloud index information returned by the cloud; A seventh acquisition module, configured to acquire the new local index information of the new code template set of the SDK with the target function; A second storage module, configured to store the corresponding relationship between the new cloud index information and the new local index information.
17. The device according to claim 16, characterized in that, The electronic device has a development environment, and an engineering project is created in the development environment; The apparatus further includes: A third storage module, configured to store the new code template set of the SDK with the target function in the root directory of the engineering project.
18. The device according to claim 16, characterized in that, The second storage module is specifically configured to: upload the new cloud index information and the new local index information to the PARSE platform, so that the PARSE platform stores the corresponding relationship between the new cloud index information and the new local index information.
19. An electronic device, characterized in that, Including: A processor, a memory, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.
20. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, where when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Code generation method, ERP system and readable storage medium
CN112306498A
Plug-in engineering method and device, computer system and medium
CN113805878A