CN115809054A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115809054A
CN115809054A CN202211501644.XA CN202211501644A CN115809054A CN 115809054 A CN115809054 A CN 115809054A CN 202211501644 A CN202211501644 A CN 202211501644A CN 115809054 A CN115809054 A CN 115809054A
Authority
CN
China
Prior art keywords
sdk
code template
template set
index information
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211501644.XA
Other languages
Chinese (zh)
Inventor
王佳旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
58tongcheng Information Technology Co ltd
Original Assignee
58tongcheng Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 58tongcheng Information Technology Co ltd filed Critical 58tongcheng Information Technology Co ltd
Priority to CN202211501644.XA priority Critical patent/CN115809054A/en
Publication of CN115809054A publication Critical patent/CN115809054A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data processing method, a data processing device, electronic equipment and a storage medium. The code template set of the SDK can be acquired from the cloud, so that the code template set capable of supporting the SDK can be deployed in the cloud, and further the template plug-in deployed in a development environment and the code template set of the SDK can be decoupled. Because the template plug-ins supporting deployment in the development environment are decoupled from the code template set of the SDK, developers supporting the project in the context of updating the code template set of the SDK can bypass the template plug-ins (not based on the template plug-ins) to update the code template set of the SDK. Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of the technology, the application program is more important in life and work, and developers of manufacturers can develop the application program for wide users to use so as to achieve the purpose of providing services for the wide users based on the application program.
Currently, a developer may develop an application program and the like using a computer program language, for example, the developer may run a development environment in a terminal and create a project in the development environment, then may write a computer program code in the project, and then may compile the computer program code written in the project to obtain the application program.
Disclosure of Invention
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium.
In a first aspect, the present application shows a data processing method applied to an electronic device, where the electronic device has a development environment, and an engineering project is created in the development environment, and the method includes:
displaying an index page of a code template of the SDK under the condition of receiving an inserting operation of the SDK for inserting a target function in the engineering project;
acquiring local index information of a first code template set of the SDK of the target function input in an index page;
determining whether a first code template set is loaded in a root directory of an engineering project or not according to the local index information;
displaying the code templates in the first code template set loaded in the root directory of the engineering project under the condition that the first code template set is loaded in the root directory of the engineering project, wherein the code templates at least comprise: the filling bits of the general function codes of the SDK for developing the target function and the personalized function codes of the SDK for the target function;
and under the condition that the first code template set is not loaded in a root directory of an engineering project, determining whether the first code template set is stored in a cloud end or not according to the local index information, and under the condition that the first code template set is stored in the cloud end, acquiring the first code template set from the cloud end according to the local index information and displaying code templates in the first code template set.
In an optional implementation manner, the determining whether the first code template set is stored in the cloud according to the local index information includes:
determining whether the local index information exists in a correspondence relationship between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance;
determining that the first code template set is stored in a cloud under the condition that the local index information exists in the corresponding relation;
alternatively, the first and second liquid crystal display panels may be,
and under the condition that the local index information does not exist in the corresponding relation, determining that the first code template set is not stored in the cloud.
In an optional implementation manner, the obtaining the first code template set from a cloud according to the local index information includes:
acquiring cloud index information of the first code template set according to the local index information;
and acquiring the first code template set from the cloud according to the cloud index information.
In an optional implementation manner, the obtaining, according to the local index information, cloud index information of the first code template set includes:
and determining cloud index information corresponding to the local index information in a corresponding relation between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance.
In an optional implementation manner, the local index information at least includes first version information of the first code template set;
the method further comprises the following steps:
under the condition that the first code template set is not stored in the cloud, acquiring second version information of a second code template set of the SDK of the target function in the cloud; the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function;
acquiring the second code template set from a cloud according to the second version information;
and displaying the code templates in the second code template set.
In an optional implementation manner, the obtaining second version information of the second code template set of the SDK of the target function in the cloud includes:
determining local index information of version information of the code template set of the SDK with the target function in a corresponding relation between the local index information of the code template set of the SDK and cloud index information of the code template set of the SDK, which is stored in advance;
under the condition that one piece of local index information of the version information of the code template set of the SDK with the target function is included in the corresponding relation, acquiring the second version information according to the version information in the local index information determined in the corresponding relation;
alternatively, the first and second electrodes may be,
and when the local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship is two or more, selecting the version information having the smallest distance from the first version information from the version information of the two or more local index information, and using the version information as the second version information.
In an optional implementation, the method further includes:
after the first code template set is obtained from a cloud, the first code template set is stored in a root directory of an engineering project.
In a second aspect, the present application shows a data processing method applied to an electronic device, the method including:
acquiring an old code template set of the SDK of the target function;
acquiring modification operation on an 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;
uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributing new cloud end index information of the new code template set of the SDK of the target function, and returning the new cloud end index information to the electronic equipment;
receiving new cloud index information returned by a cloud;
acquiring new local index information of a new code template set of the SDK of the target function;
and storing the corresponding relation between the new cloud index information and the new local index information.
In an optional implementation manner, the electronic device is provided with a development environment, and an engineering project is created in the development environment;
the method further comprises the following steps:
storing a new set of code templates for the SDK of the target function in a root directory in the engineering project.
In an optional implementation manner, the storing the correspondence between the new cloud index information and the new local index information includes:
and uploading new cloud index information and 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.
In a third aspect, the present application shows a data processing apparatus applied to an electronic device, where the electronic device has a development environment, and an engineering project is created in the development environment, the apparatus includes:
the display module is used for displaying an index page of a code template of the SDK under the condition of receiving an inserting operation of the SDK for inserting the target function in the engineering project;
the first acquisition module is used for acquiring local index information of a first code template set of the SDK of the target function input in the index page;
the first determining module is used for determining whether a first code template set is loaded in a root directory of the engineering project or not according to the local index information;
a first presentation module, configured to present, when the first set of code templates has been loaded in a root directory of an engineering project, code templates in the first set of code templates that have been loaded in the root directory of the engineering project, where the code templates at least include: filling bits of general function codes of the SDK for developing the target function and personalized function codes of the SDK for the target function;
the system comprises a first determining module, a second obtaining module and a second displaying module, wherein the first determining module is used for determining whether the first code template set is stored in a cloud end according to the local index information under the condition that the first code template set is not loaded in a root directory of an engineering project, the second obtaining module is used for obtaining the first code template set from the cloud end according to the local index information under the condition that the first code template set is stored in the cloud end, and the second displaying module is used for displaying the code templates in the first code template set.
In an optional implementation manner, the second determining module includes:
the system comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining whether the local index information exists in the correspondence between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance;
a second determining 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;
alternatively, the first and second electrodes may be,
a third determining 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.
In an optional implementation manner, the second obtaining module includes:
the first obtaining unit is used for obtaining cloud index information of the first code template set according to the local index information;
and the second acquisition unit is used for acquiring the first code template set from a cloud according to the cloud index information.
In an optional implementation manner, the first obtaining unit is specifically configured to:
and determining cloud index information corresponding to the local index information in a correspondence relationship between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance.
In an optional implementation manner, the local index information at least includes first version information of the first code template set;
the device further comprises:
the third obtaining module is used for obtaining second version information of a second code template set of the SDK of the target function in the cloud under the condition that the first code template set is not stored in the cloud; the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function;
a fourth obtaining module, configured to obtain the second code template set from a cloud according to the second version information;
and the third display module is used for displaying the code templates in the second code template set.
In an optional implementation manner, the third obtaining module includes:
a fourth determining unit, configured to determine local index information including version information of the code template set of the SDK of the target function in a correspondence relationship between the local index information of the code template set of the SDK and cloud index information of the code template set of the SDK, which is stored in advance;
a third obtaining unit, configured to obtain, when there is one piece of local index information of version information of a code template set including an SDK of a target function in the correspondence, the second version information according to the version information in the piece of local index information determined in the correspondence;
alternatively, the first and second electrodes may be,
and a fourth obtaining unit, configured to, when there are two or more pieces of local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship, select, from the version information of the two or more pieces of local index information, the version information having the smallest distance from the first version information, and use the version information as the second version information.
In an optional implementation, the apparatus further comprises:
the first storage module is used for storing the first code template set in a root directory of an engineering project after the first code template set is acquired from a cloud.
In a fourth aspect, the present application shows a data processing apparatus applied to an electronic device, the apparatus comprising:
a fifth obtaining module, configured to obtain an old code template set of the SDK of the target function;
a sixth obtaining module, configured to obtain a modification operation on an 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;
the uploading module is used for uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributes new cloud end index information of the new code template set of the SDK of the target function, and returns the new cloud end index information to the electronic equipment;
the receiving module is used for receiving new cloud index information returned by the cloud;
a seventh obtaining module, configured to obtain new local index information of a new code template set of the SDK of the target function;
and the second storage module is used for storing the corresponding relation between the new cloud index information and the new local index information.
In an optional implementation manner, the electronic device is provided with a development environment, and an engineering project is created in the development environment;
the device further comprises:
and the third storage module is used for storing a new code template set of the SDK of the target function in a root directory in the engineering project.
In an optional implementation manner, the second storage module is specifically configured to: and uploading new cloud index information and 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.
In a fifth aspect, the present application illustrates an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method of any aspect.
In a sixth aspect, the present application illustrates a non-transitory computer readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform a method as in any aspect.
In a seventh aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method according to any one of the aspects.
The technical scheme provided by the application can comprise the following beneficial effects:
with respect to the beneficial effects of the first aspect and the third aspect:
in the present application, in a case where an insertion operation of an SDK for inserting a target function in an engineering project is received, an index page of a code template of the SDK is displayed. And acquiring local index information of the first code template set of the SDK of the target function input in the index page. And determining whether the first code template set of the SDK of the target function is loaded in the root directory of the engineering project or not according to the local index information of the first code template set of the SDK of the target function. And under the condition that the first code template set of the SDK of the target function is loaded in the root directory of the engineering project, showing the code templates in the first code template set of the SDK of the target function loaded in the root directory of the engineering project. And under the condition that the first code template set of the SDK of the target function is not loaded in the root directory of the engineering project, determining whether the first code template set of the SDK of the target function is stored in the cloud end according to the local index information of the first code template set of the SDK of the target function. Under the condition that 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On the one hand, the code template set of the SDK can be obtained from the cloud, so that the code template set of the SDK can be deployed in the cloud, and further the decoupling of the template plug-in deployed in the development environment and the code template set of the SDK can be supported.
On the other hand, the method and the device can acquire the code template set of the SDK from the root directory of the engineering project, so that the code template set of the SDK acquired from the cloud can be deployed in the root directory of the engineering project, and the code template set of the SDK can be acquired directly from the root directory of the engineering project when used in the engineering project subsequently and can not be acquired from the cloud, so that network resources can be saved, and the efficiency of acquiring the code template set of the SDK is improved. Secondly, the code template set acquired from the cloud to the SDK is cached in a root directory of the engineering project and is still decoupled from the template plug-ins deployed in the development environment.
In another aspect, the method and the system support that a great number of developers can deploy the code template sets of the respective SDKs in the cloud, so that the code template sets of the SDKs in the cloud are numerous, the developers supporting the engineering project search the code template sets of the needed SDKs in the cloud by inputting the local index information in the index page, and the developers of the engineering project are prevented from acquiring the code template sets of the unnecessary SDKs from the cloud.
The template plug-in deployed in the development environment is decoupled from the code template set of the SDK, and the code template set acquired 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, so that 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 the scene of updating the code template set of the SDK. Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
With respect to the advantageous effects of the second and fourth aspects:
in the present application, an old code template set of the target function's SDK is obtained. And acquiring the 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. And uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributing new cloud end index information of the new code template set of the SDK of the target function, and returning the new cloud end index information to the electronic equipment. And receiving new cloud index information of the new code template set of the SDK of the target function returned by the cloud. And acquiring new local index information of the new code template set of the SDK of the target function. And storing the corresponding relation 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On the one hand, the code template set capable of supporting the SDK can be deployed in the cloud, and further the decoupling of the template plug-in deployed in the development environment and the code template set of the SDK can be supported.
In another aspect, the method supports that a large number of developers can deploy the code template sets of the respective SDKs in the cloud, so that the code template sets of the SDKs in the cloud are numerous, and the cloud can distribute cloud index information for the code template sets of the different SDKs, so that developers of subsequent engineering projects can search the code template sets of the required SDKs in the cloud based on the local index information, and the developers of the engineering projects are prevented from acquiring the code template sets of the unnecessary SDKs from the cloud.
Because the template plug-ins supporting deployment in the development environment are decoupled from the code template set of the SDK, developers supporting the project in the context of updating the code template set of the SDK can bypass the template plug-ins (not based on the template plug-ins) to update the code template set of the SDK. Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
Drawings
FIG. 1 is a flow chart of the steps of a data processing method of the present application.
FIG. 2 is a flow chart of the steps of a data processing method of the present application.
FIG. 3 is a flow chart of steps of a data processing method of the present application.
Fig. 4 is a block diagram of a data processing apparatus according to the present application.
Fig. 5 is a block diagram of a data processing apparatus according to the present application.
FIG. 6 is a block diagram of an electronic device of the present application.
FIG. 7 is a block diagram of an electronic device of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
As the requirement of the user on the function in the application program increases, the developer of the engineering project (i.e. the developer of the application program) needs to develop the application program with multiple functions, so as to increase the stickiness of the user on the application program.
However, as applications require more and more functionality, developers of engineering projects need more and more computer program code written for the applications in the engineering projects during the development of the applications.
The inventor finds more and more computer program codes written for application programs in engineering projects after statistical analysis; in the engineering project, there are many repeated codes in the computer program code written for the application program, for example, many services are involved in the application program, and some services all need to acquire the authority of the camera, so that in the computer program code of each of these services, a code for acquiring the authority of the camera needs to be written, and in the engineering project, a code for acquiring the authority of the camera is written for many times.
In order to avoid many repeated codes in the computer program codes written for the application programs in the engineering project so as to improve the Development efficiency, a developer of the engineering project can package the repeated codes in the engineering project into an SDK (Software Development Kit), and the SDK can expose an interface to the outside for other objects to call.
However, the inventors have further statistically analyzed the computer program code of an application with an SDK written in an engineering project to find: sometimes the number of SDKs in the computer program code written for an application in an engineering project is large, especially if the functions involved in the application are very large.
Thus, the inventors found that: because the number of SDKs is large, the efficiency of developing SDKs in an application in an engineering project affects the efficiency of developing the application.
In order to improve the efficiency of developing an application program in this manner, there is a demand for improving the efficiency of developing an SDK in an application program in an engineering project.
In order to achieve the purpose of improving the efficiency of developing an SDK for an application in an engineering project, the inventors have found, after performing statistical analysis on the SDK developed for the application in the engineering project:
some SDKs developed for applications in engineering projects are similar in their code.
For example, there are codes regarding acquisition rights between a code of an SDK acquiring camera rights, a code of an SDK acquiring storage rights, and a code of an SDK acquiring microphone rights, and the like, and thus there are many common parts among the codes of these SDKs.
In view of this, the inventor thinks of the SDKs with similar codes, and in order to improve the efficiency of developing the SDKs with similar codes in engineering projects, a code template for developing the SDKs can be developed in advance. The code template can comprise: the same code (common code) between the codes of the SDKs, and a filling-in place or the like corresponding to a different code between the codes of the SDKs, some content on the filling-in place corresponding to a function to be implemented, and the like.
In this way, when computer program codes of an application program are subsequently developed in an engineering project, if a certain SDK needs to be developed for the application program in the engineering project, a code template may be directly called, then corresponding contents of the SDK are filled in filling bits in the code template, and then the SDK may be generated.
For example, a developer of the template plug-in may develop the template plug-in advance and deploy the code template in the template plug-in, which may be deployed in a development environment. The template plug-in has some logic flow functionality (see in particular the description below) in addition to the code template.
For example, when a developer of an engineering project creates the engineering project in a development environment and needs to develop an SDK of an application in the engineering project, the developer of the engineering project may call a template plug-in the development environment, and then the template plug-in may obtain a code template in the template plug-in and display the code template, so that the developer of the engineering project may fill in filling bits in the code template with content corresponding to the SDK, and then the template plug-in may generate the SDK according to the code template with the filled content, and deploy the SDK in the engineering project.
However, the inventor finds that with the increasing and updating of the functions of the application program, the SDK that needs to be developed for the application program in the engineering project is not invariable in the process of developing the application program, for example, functions or attributes in some SDKs need to be updated, which results in that the code of the SDK needs to be updated, wherein the code that needs to be updated in the SDK relates to the general code in the code template of the SDK, and the code template of the SDK often needs to be updated in order to improve the efficiency of subsequently developing the SDK in the engineering project.
However, in view of the above description, it is often the developer of the engineering project that has a need for code template updates of the SDK, and as such, the need for code template updates of the SDK is often initiated by the developer of the engineering project.
However, the inventor finds that in many cases, developers of the template plug-in tighten the modification authority of the developed template plug-in, so that developers of engineering projects do not have the authority to modify the template plug-in deployed in the development environment, and thus cannot update the code template in the template plug-in.
Therefore, developers of engineering projects cannot update the code templates in the template plug-ins deployed in the development environment in time according to actual requirements. This does not improve the efficiency of subsequent development of SDKs in engineering projects.
The inventors have analyzed the causes or logics of the above-described cases and found that:
the developer of the engineering project has the requirement for updating the code template of the SDK, the code template of the SDK is positioned in the template plug-in, but the developer of the engineering project only has the authority of using the template plug-in and does not have the authority of modifying the template plug-in, so that the code template of the SDK cannot be updated.
For this reason, the inventors discovered that the main key point for the failure of developers of engineering projects to update code templates of an SDK is "the code templates of the SDK are located in template plugins and the developers of engineering projects do not have the right to modify template plugins".
In view of this, the inventors thought of: if the developer of the engineering project can bypass the template plug-in (not based on the template plug-in) to update the code template of the SDK in the scene of updating the code template of the SDK, the developer of the engineering project can update the code template of the SDK without being limited by the permission that the developer of the engineering project does not modify the template plug-in.
Specifically, in order that a developer of a project may bypass a template plug-in (not based on the template plug-in) to update a code template of the SDK in a scenario of updating the code template of the SDK, the inventors conceived a way to decouple the code template of the SDK from the template plug-in, the code template of the SDK and the template plug-in being independent of each other, for example, the code template of the SDK is not located in the template plug-in, so that the developer of the project may bypass the template plug-in (not based on the template plug-in) to update the code template of the SDK in a scenario of updating the code template of the SDK.
In order to decouple the code template of the SDK from the template plug-in, the inventor thinks of a manner in which the code template of the SDK may be deployed in the cloud, and the template plug-in deployed in the development environment may have a function of a logic flow, for example, a function of acquiring the code template from the cloud, a function of displaying the code template, a function of receiving filling bits in the code template, a function of generating the SDK according to the code of the SDK, a function of uploading the code template to the cloud, a function of deploying the code template in the engineering project, and the like.
Specifically, referring to fig. 1, a flowchart of steps of a data processing method according to the present application is shown, where the method is applied to an electronic device, the electronic device has a development environment, an engineering project is created in the development environment, the engineering project may include an engineering project for developing an application, and the method specifically includes the following steps:
in step S101, in a case where an insertion operation of the SDK for inserting the target function in the engineering project is received, an index page of a code template of the SDK is displayed.
In the process of writing codes in the engineering project by the engineering project developer, if the SDK of the target function (for example, a function of acquiring camera authority, acquiring storage authority, acquiring microphone authority, or the like) needs to be inserted into the engineering project, the engineering project developer may input an insertion operation of the SDK for inserting the target function into the engineering project into the electronic device, and may assist the engineering project developer to insert the SDK of the target function into the engineering project when the electronic device receives the insertion operation of the SDK for inserting the target function into the engineering project.
For example, a developer supporting the engineering project obtains a code template of the SDK of the target function, so that the developer of the engineering project can quickly develop the SDK of the target function according to the code template of the SDK of the target function, and then can insert the SDK of the target function into the engineering project.
In order to support the developer of the engineering project to obtain the code template of the SDK with the target function, in an embodiment of the application, the developer of the engineering project may search the code template of the SDK with the developed target function according to actual requirements.
In order to support the developer of the engineering project to search the developed code template of the SDK with the target function according to the actual requirement, an index page of the code template of the SDK can be displayed.
The index page comprises filling bits of local index information, and the filling bits are used for filling the local index information of the code template set of the SDK.
For the first code template set of the SDK of the target function, the local index information of the first code template set of the SDK of the target function may include: version information of the first set of code templates, etc., or may include: version information of the first set of code templates, a name of the target function, and the like.
The names of the different functions are different. The functions include a function of acquiring the authority, a function of establishing network connection, and the like.
In this application, when the developer of the engineering project needs to search the code template of the SDK of the target function, the developer of the engineering project may fill the local index information of the first code template set of the SDK of the target function in the filling bits of the local index information of the index page.
In step S102, local index information of the first code template set of the SDK of the target function input in the index page is acquired.
In step S103, it is determined whether the first code template set of the SDK of the target function is loaded in the root directory of the engineering project according to the local index information of the first code template set of the SDK of the target function.
In the present application, the first code template set of the SDK of 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 of the target function may have been loaded in the root directory of the engineering project according to actual requirements, and in one example, the first code template set of the SDK of the target function may have been loaded in the root directory of the engineering project when one SDK of the target function needs to be inserted in the engineering project), or the first code template set of the SDK of the target function may not have been loaded in the root directory of the engineering project.
In one embodiment, under the condition that the first code template set of the SDK of the target function is 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 loaded in the root directory of the engineering project can be directly displayed, so that developers of the engineering project can quickly develop the SDK of the target function according to the code templates in the code template set of the SDK of the target function and insert the SDK of the target function into the engineering project.
Or, in another embodiment, under the condition that the first code template set of the SDK with the target function is not loaded in the root directory of the engineering project, the electronic device does not locally have the code template in the first code template set of the SDK with the target function for display at this time, if the code template in the first code template set of the SDK with the target function needs to be displayed for the developer of the engineering project at this time, the first code template set of the SDK with the target function needs to be acquired from the cloud (the first code template set of the SDK with the target function in the cloud is developed in advance and uploaded to the cloud for storage), and the code template in the first code template set of the SDK with the target function needs to be displayed, so that the developer of the engineering project can quickly develop the SDK with the target function according to the code template in the code template set of the SDK with the target function, and insert the SDK with the target function into the engineering project.
Thus, in the present application, after the local index information of the first code template set of the SDK of the target function is obtained, whether the first code template set of the SDK of the target function is loaded in the root directory of the engineering project may be determined according to the local index information of the first code template set of the SDK of the target function.
Step S104 may be performed in the case where the first set of code templates of the SDK of the target function has been loaded in the root directory of the engineering project. Alternatively, in a 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, step S105 may be performed.
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, in step S104, 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 exposed.
The code template at least comprises: the general function code of the SDK for developing the target function and the filling position of the personalized function code of the SDK for the target function.
After the code templates in the first code template set of the SDK of the target function are displayed, a developer of the engineering project may view the code templates in the first code template set of the SDK of the target function on a screen of the electronic device, and then may select one code template in the first code template set of the SDK of the target function to develop the SDK of the target function, and the developer of the engineering project may fill the personalized function codes of the SDK of the target function in the filling bits of the personalized function codes of the SDK of the target function in the selected code template according to actual requirements.
Correspondingly, the electronic equipment can receive the personalized function codes of the SDK of the target function, which are filled in the filling bits of the personalized function codes 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 codes of the SDK of the target function and the filled personalized function codes in the code template of the SDK of the target function; and inserting the SDK of the target function into the engineering project.
In the case that 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.
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, the following process may be performed, including:
1051. and determining whether the local index information of the first code template set of the SDK of the target function exists in the corresponding relation 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, which is stored in advance.
In the 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, the first code template set of the SDK of the engineering project is developed in advance by a developer of the engineering project), and the first code template set of the SDK of the target function is uploaded to the cloud, the cloud stores, in the cloud, cloud index information of the first code template set of the SDK of the target function and the first code template set of the SDK of the allocated target function, and returns cloud index information of the first code template set of the SDK of the target function to the electronic device.
After receiving cloud index information of the first code template set of the SDK of the target function returned by the cloud, the electronic device may obtain local index information of the first code template set of the SDK of the target function (the local index information may be input by a developer of an engineering project in the electronic device, and the like), and store a correspondence 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.
The correspondence between the local index information of the first code template set of the SDK of the storage target function and the cloud index information of the first code template set of the SDK of the storage target function includes: and forming a corresponding table entry by using 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, and storing the corresponding table entry in a corresponding relation, which is stored in advance, 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.
In this way, whether the first code template set of the SDK of the target function is stored in the cloud can be determined according to whether the local index information of the first code template set of the SDK of the target function exists in the correspondence.
In one embodiment, the correspondence 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 may be located in a parse platform.
For example, 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 may be uploaded to the paree platform, so that the paree platform stores the correspondence 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.
Or, in another embodiment, the correspondence 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 may be located in the engineering project.
1052. And under the condition that the local index information of the first code template set of the SDK of the target function exists in the corresponding relation, determining the first code template set of the SDK of the target function stored in the cloud.
1053. And under the condition that the local index information of the first code template set of the SDK of the target function does not exist in the corresponding relation, determining the first code template set of the SDK of the target function which is not stored in the cloud.
The cloud index information of the code template set may include a URL (Uniform Resource Locator) of the code template set in the cloud, and the like.
The local index information for the set of code templates for a functional SDK may include: the name of the function and version information (e.g., version number, etc.) of the set of code templates for the SDK of the function.
The version information may be manually specified, or may be automatically incremented (e.g., automatically increment a version number, etc.) by the electronic device according to historical version information of the set of code templates of the SDK of the function.
The local index information of different code template sets of the SDK with the same function is different (for example, the version information of the code template set is different), and the cloud index information of different code template sets of the SDK with the same function is different (for example, the URLs of the code template sets are different).
The code template sets of the SDKs with different functions have different local index information, and the code template sets of the SDKs with different functions have different cloud index information.
In the case that the first code template set of the SDK of the target function is stored in the cloud, in step S106, 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.
In an embodiment of the present application, when 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, the following processes may be implemented, including:
1061. and acquiring the cloud index information of the first code template set of the SDK of the target function according to the local index information of the first code template set of the SDK of the target function.
For example, cloud index information corresponding to the local index information of the first 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, which is stored in advance, may be determined and used as the cloud index information of the first code template set of the SDK of the target function.
1062. And acquiring the first code template set of the SDK of the target function from the cloud according to the cloud index information of the first code template set of the SDK of the target function.
The electronic device can send a request for obtaining cloud index information of the first code template set of the SDK with the target function to the cloud.
After receiving the acquisition request, the cloud may index the first code template set of the SDK of the target function from the code template sets stored in the cloud according to cloud index information of the first code template set of the SDK of the target function, and return the first code template set of the SDK of the target function to the electronic device.
The electronic device can receive a first code template set of the SDK of the target function returned by the cloud.
In the present application, in a case where an insertion operation of an SDK for inserting a target function in an engineering project is received, an index page of a code template of the SDK is displayed. And acquiring local index information of the first code template set of the SDK of the target function input in the index page. And determining whether the first code template set of the SDK of the target function is loaded in the root directory of the engineering project or not according to the local index information of the first code template set of the SDK of the target function. And under the condition that the first code template set of the SDK of the target function is loaded in the root directory of the engineering project, showing the code templates in the first code template set of the SDK of the target function loaded in the root directory of the engineering project. And under the condition that the first code template set of the SDK of the target function is not loaded in the root directory of the engineering project, determining whether the first code template set of the SDK of the target function is stored in the cloud end according to the local index information of the first code template set of the SDK of the target function. Under the condition that 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On one hand, the code template set of the SDK can be obtained from the cloud, so that the code template set capable of supporting the SDK can be deployed in the cloud, and further the decoupling of the template plug-in unit deployed in the development environment and the code template set of the SDK can be supported.
On the other hand, the method and the device can obtain the code template set of the SDK from the root directory of the engineering project, and thus can support the code template set of the SDK obtained from the cloud to be deployed in the root directory of the engineering project, and can support the subsequent direct obtaining in the root directory of the engineering project when the code template set of the SDK is used in the engineering project without obtaining 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 acquired from the cloud to the SDK is cached in a root directory of the engineering project and is still decoupled from the template plug-ins deployed in the development environment.
In another aspect, the method and the system support that a great number of developers can deploy the code template sets of the respective SDKs in the cloud, so that the code template sets of the SDKs in the cloud are numerous, the developers supporting the engineering project search the code template sets of the needed SDKs in the cloud by inputting the local index information in the index page, and the developers of the engineering project are prevented from acquiring the code template sets of the unnecessary SDKs from the cloud.
The template plug-in deployed in the development environment is decoupled from the code template set of the SDK, and the code template set 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, so that developers of the engineering project in the scene of updating the code template set of the SDK can update the code template set of the SDK by bypassing the template plug-in (not based on the template plug-in). Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
Further, after the first code template set of the target function SDK is obtained from the cloud, the first code template set of the target function SDK is also stored in the root directory of the engineering project. Therefore, the electronic device can directly acquire the first code template set of the SDK of the target function from the root directory of the engineering project, and select one code template from the first code template set of the SDK of the target function to develop the SDK of the target function without acquiring the first code template set of the SDK of the target function from the cloud, so that the speed of acquiring the first code template set of the SDK of the target function can be increased, the efficiency of reinserting the SDK of the target function into the engineering project can be increased, and network resources can be saved.
In another embodiment of the present application, the first set of code templates of the SDK of the target function may not be stored in the cloud at this time. In step S105, when 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, a conclusion that the first code template set of the SDK of the target function is not stored in the cloud is obtained.
For example, at this time, the update to the code template set of the SDK of the target function has not been updated to the first code template set, for example, the update to 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 currently latest code template set of the SDK of the target function), that is, the code template set of the SDK of the target function, the second code template set of the SDK of the target function currently in the cloud, and the historical code template set of the SDKs of the target function located before the second code template set of the SDK of the target function, and the like, the second code template set is the code template set of the latest version of the SDK of the target function, but the first code template set of the SDK of the target function is not yet updated.
In this way, the first code template set of the SDK of the target function cannot be found from the cloud according to the local index information of the first code template set of the SDK of the target function.
For example, the cloud index information of the first code template set of the SDK with the target function is not available at present, so that the cloud index information of the first code template set of the SDK with the target function is not obtained according to the local index information of the first code template set of the SDK with the target function, and the first code template set of the SDK with the target function cannot be retrieved from the cloud based on the cloud index information of the first code template set of the SDK with the target function.
In general, if the update of the code template set of the SDK of the target function is not updated to the first code template set, the cloud does not have the first code template set of the SDK of the target function yet, and thus, when a developer of an engineering project needs to search the code template set of the SDK of the target function, the developer of the engineering project often does not input the local index information of the first code template set of the SDK of the target function in the index page, and often inputs the local index information of the second code template set of the SDK of the target function or the local index information of the historical code template set of the SDK of the target function before the second code template set in the index page. The local index information for the first set of code templates for the SDK of the target function is different from the local index information for the second set of code templates for the SDK of the target function. The local index information for the first set of code templates for the SDK of the target function is different from the local index information for the set of historical code templates for the SDK of the target function that precede the second set of code templates.
However, if the developer of the engineering project inputs the local index information of the code template set (for example, the first code template set) to which the SDK of the target function has not been updated, in one case, an input error may be caused by a manual error of the developer of the engineering project, for example, the developer of the engineering project may input the local index information of the second code template set of the SDK of the target function or the local index information of the historical code template set of the SDK of the target function located before the second code template set, but input the local index information of the first code template set of the SDK of the target function by a manual error.
Or, in another case, it may be that the developer of the engineering project does not particularly know to what stage the code template set of the SDK of the target function is updated to at present, and the developer of the engineering project mistakenly believes that the code template set of the SDK of the target function is updated to the first code template set of the SDK of the target function located after the second code template set, thereby inputting the local index information of the first code template set of the SDK of the target function.
However, the electronic device cannot find the first code template set of the SDK of the target function from the cloud according to the local index information of the first code template set of the SDK of the target function. In this case, the developer of the engineering project cannot obtain the code template of the SDK of the target function, so that the developer of the engineering project cannot rapidly develop the SDK of the target function according to the code template of the SDK of the target function, and insert the SDK of the target function into the engineering project.
In view of this, in order to further assist the developer of the engineering project to quickly develop the SDK of the target function according to the code template of the SDK of the target function and insert the SDK of the target function into the engineering project on the basis that the developer of the engineering project cannot obtain the code template of the SDK of the target function because the developer of the engineering project cannot find the first code template set of the SDK of the target function in the cloud, in another embodiment of the present application, the local index information of the code template set at least includes: version information (e.g., version number) of the code template set, and the like.
The version information of the set of code templates generated later in time may be greater than the version information of the set of code templates generated earlier in time.
Thus, the local index information for the first set of code templates for the target function's SDK includes at least first version information for the first set of code templates for the target function's SDK.
As such, referring to fig. 2, the method further comprises:
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, second version information of the second code template set of the SDK of the target function in the cloud is acquired. And the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function.
Wherein the second set of code templates of the SDK of the target function and the first set of code templates of the SDK of the target function may be two sets of code templates adjacent to the version of the SDK of the target function. The second set of code templates of the SDK of the target function is developed at a time earlier than the first set of code templates of the SDK of the target function.
In an embodiment of the present application, the step may be implemented by the following process, including:
2011. and determining local index information of the version information of the code template set of the SDK of the target function in the correspondence 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, which is stored in advance.
In an embodiment of the present application, the local index information of the code template set of the SDK of the target function may include, in addition to the version information of the code template set of the SDK of the target function, a name of the target function, and the like.
Thus, the local index information including the name 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, which is stored in advance, can be determined, that is, the local index information including the version information of the code template set of the SDK of the target function can be obtained.
2012. And under the condition that the local index information of the version information of the code template set of the SDK with the target function in the corresponding relation is one, acquiring the second version information of the second code template set of the SDK with the target function according to the version information in the local index information determined in the corresponding relation.
For example, when there is one piece of local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship, the version information in the one piece of local index information determined in the correspondence relationship may be used as the second version information of the second code template set of the SDK of the target function.
2013. When the local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship is two or more, the version information having the smallest distance from the first version information is selected from the version information of the two or more local index information and is used as the second version information of the second code template set of the SDK of the target function.
In step S202, the second code template set of the SDK of the target function is obtained from the cloud according to the second version information of the second code template set of the SDK of the target function, and the code templates in the second code template set of the SDK of the target function are displayed.
In an embodiment of the present application, the step may be implemented by the following process, including:
2021. and acquiring the cloud index information of the second code template set of the SDK of the target function according to the local index information of the second version information of the second code template set of the SDK of the target function.
For example, cloud index information corresponding to local index information of second version information of the second code template set including the SDK of the target function, in correspondence between local index information of the code template set of the SDK and cloud index information of the code template set of the SDK, which is stored in advance, may be determined and used as the cloud index information of the second code template set of the SDK of the target function.
2022. And acquiring the second code template set of the SDK of the target function from the cloud according to the cloud index information of the second code template set of the SDK of the target function.
The electronic device can send an acquisition request of cloud index information of the second code template set of the SDK carrying the target function to the cloud.
After receiving the acquisition request, the cloud may index the second code template set of the SDK of the target function from the code template sets stored in the cloud according to the cloud index information of the second code template set of the SDK of the target function, and return the second code template set of the SDK of the target function to the electronic device.
The electronic device can receive a second set of code templates of the SDK of the target function returned by the cloud.
Referring to fig. 3, a flowchart illustrating steps of a data processing method according to the present application is shown, where the method is applied to an electronic device, and the method may specifically include the following steps:
in step S301, an old code template set of the SDK of the target function is acquired.
In the application, in the process of developing an application program by a developer of an engineering project, sometimes the code template set of the SDK of the target function may need to be updated according to actual requirements.
For example, sometimes a new code template needs to be added to the old (existing) code template set of the SDK of the target function according to actual needs.
For example, the target function is a function of acquiring a right, a code template of the SDK of the target function currently includes a code template of the SDK of acquiring a camera right and a code template of the SDK of acquiring a storage right, and a code template of the SDK of acquiring a microphone right now needs to be added to the code template set of the SDK of the target function.
Or, sometimes, according to the actual requirement, the existing code template in the code template set of the target function SDK needs to be modified.
For example, the target function is a function of acquiring the authority, a code template of the SDK of the target function currently includes a code template of the SDK of acquiring the camera authority and a code template of the SDK of acquiring the storage authority, and the code template of the SDK of acquiring the storage authority and/or the code template of the SDK of acquiring the camera authority in the code template set of the SDK of the target function currently needs to be modified.
In the process of developing an application program, if an old (existing) code template set of the SDK of the target function needs to be updated, the developer of the engineering project may input an instruction in the electronic device, and the electronic device may obtain the old code template set of the SDK of the target function when receiving the instruction (for example, the electronic device has a development environment in which the engineering project is created, and the engineering project may include an engineering project for developing the application program, and the like, and the old code template of the SDK of the target function is in a root directory in the engineering project, so that the old code template of the SDK of the target function may be obtained from the root directory in the engineering project.
Specifically, a developer of an engineering project may enter a modify operation on an old set of code templates of the SDK for the target function.
In step S302, a modification operation on the old code template set of the SDK of the target function is obtained, and a new code template set of the SDK of the target function is obtained.
In step S303, the new code template set of the SDK of the target function is uploaded 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 of the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device.
In the application, the old code template set of the SDK of the target function is stored in the cloud, and after the new code template set of the SDK of the target function is stored in the cloud, new cloud index information of the new code template set of the SDK of the target function may be allocated, where the new cloud index information of the new code template set of the SDK of the target function includes a URL of the new code template set of the SDK of the target function, and the like.
The new cloud index information of the new code template set of the SDK of the target function is different from the old cloud index information of the old code template set of the SDK of the target function, i.e., the URL of the new code template set of the SDK of the target function is different from the URL of the old code template set of the SDK of the target function.
The cloud may then return to the electronic device new cloud index information for the new set of code templates for the SDK of the assigned target function.
In step S304, new cloud index information of the new code template set of the SDK of the target function returned by the cloud is received.
In step S305, new local index information of a new code template set of the SDK of the target function is acquired.
The new local index information for the new set of code templates for the SDK of the target function may be entered by a developer of the engineering project, etc. Alternatively, the new local index information of the new code template set of the SDK of the target function may be automatically obtained by the electronic device according to existing information, and the like.
For example, the local index information for the set of code templates for a functional SDK may include: the name of the function and version information (e.g., version number, etc.) of the set of code templates for the SDK of the function.
The name of the target function is not changed (different names of different functions in the present application), so that 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.
The version information of the new code template set of the SDK of the target function may be manually specified, or may be obtained by automatically incrementing (for example, automatically incrementing the version number) the version information of the old code template set of the SDK of the target function by the electronic device.
In step S306, a 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 is stored.
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: and forming a corresponding table entry by using 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 the corresponding table entry in a corresponding relation 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, which are stored in advance.
In one embodiment, 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 may be located in the parse platform.
Or, in another embodiment, 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 may be located in the engineering project.
For example, 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 may be uploaded to the PARSE platform (in daily development, backend developers need to take background data, which increases communication cost, PARSE provides a user-as-a-service capability, and the front end may skip the backend developers to provide desired data for itself by the PARSE), so that the PARSE platform stores 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.
The electronic equipment is provided with a development environment, an engineering project is created in the development environment, and furthermore, a new code template set of the SDK of the target function can be stored in a root directory in the engineering project.
Therefore, the electronic device can directly acquire a new code template set of the SDK of the target function from the root directory of the engineering project, and select one code template from the new code template set of the SDK of the target function to develop the SDK of the target function, but can not acquire the new code template set of the SDK of the target function from the cloud, so that the speed of acquiring the new code template set of the SDK of the target function can be increased, the efficiency of reinserting the SDK of the target function in the engineering project is increased, and network resources can be saved.
In the present application, an old code template set of the target function's SDK is obtained. And acquiring the 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. And uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributing new cloud end index information of the new code template set of the SDK of the target function, and returning the new cloud end index information to the electronic equipment. And receiving new cloud index information of the new code template set of the SDK of the target function returned by the cloud. And acquiring new local index information of the new code template set of the SDK of the target function. And storing the corresponding relation 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On the one hand, the code template set capable of supporting the SDK can be deployed in the cloud, and further the decoupling of the template plug-in deployed in the development environment and the code template set of the SDK can be supported.
In another aspect, the method supports that a great number of developers can deploy the respective SDK code template sets in the cloud, so that the SDK code template sets in the cloud are numerous, and the cloud can distribute cloud index information for different SDK code template sets, so that developers of subsequent engineering projects can search the needed SDK code template sets in the cloud based on the local index information, and the developers of the engineering projects are prevented from acquiring the code template sets of the unnecessary SDK from the cloud.
Because the template plug-ins supporting deployment in the development environment are decoupled from the code template set of the SDK, developers supporting project in the scenario of updating the code template set of the SDK can bypass the updating of the code template set of the SDK by the template plug-ins (not based on the template plug-ins). Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those of skill in the art will also appreciate that the embodiments described in the specification are exemplary of alternative embodiments and that the acts involved are not necessarily required of the application.
Referring to fig. 4, a block diagram of a data processing apparatus according to the present application is shown, and is applied to an electronic device, where the electronic device has a development environment, and an engineering project is created in the development environment, and the apparatus includes:
the display module 11 is configured to display an index page of a code template of the SDK when receiving an insertion operation of the SDK for inserting the target function in the engineering project;
a first obtaining module 12, configured to obtain local index information of a first code template set of the SDK of the target function input in the index page;
a first determining module 13, configured to determine whether a first code template set is loaded in a root directory of an engineering project according to the local index information;
a first presentation module 14, configured to present, in a case that the first set of code templates has been loaded in the root directory of the engineering project, code templates in the first set of code templates that have been loaded in the root directory of the engineering project, where the code templates at least include: filling bits of general function codes of the SDK for developing the target function and personalized function codes of the SDK for the target function;
a second determining module 15, configured to determine whether the first code template set is stored in a cloud according to the local index information when the first code template set is not loaded in a root directory of an engineering project, a second obtaining module 16, 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, and a second displaying module 17, configured to display code templates in the first code template set.
In an optional implementation manner, the second determining module includes:
the system comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining whether the local index information exists in the correspondence between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance;
a second determining 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;
alternatively, the first and second electrodes may be,
a third determining 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.
In an optional implementation manner, the second obtaining module includes:
the first obtaining unit is used for obtaining cloud index information of the first code template set according to the local index information;
and the second acquisition unit is used for acquiring the first code template set from a cloud according to the cloud index information.
In an optional implementation manner, the first obtaining unit is specifically configured to:
and determining cloud index information corresponding to the local index information in a correspondence relationship between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance.
In an optional implementation manner, the local index information at least includes first version information of the first code template set;
the device further comprises:
the third obtaining module is used for obtaining second version information of a second code template set of the SDK of the target function in the cloud under the condition that the first code template set is not stored in the cloud; the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function;
a fourth obtaining module, configured to obtain the second code template set from a cloud according to the second version information;
and the third display module is used for displaying the code templates in the second code template set.
In an optional implementation manner, the third obtaining module includes:
a fourth determining unit, configured to determine local index information including version information of the code template set of the SDK of the target function in a correspondence relationship between the local index information of the code template set of the SDK and cloud index information of the code template set of the SDK, which is stored in advance;
a third obtaining unit, configured to, when there is one local index information of the version information of the code template set including the SDK of the target function in the corresponding relationship, obtain the second version information according to the version information in the one local index information determined in the corresponding relationship;
alternatively, the first and second electrodes may be,
and a fourth obtaining unit, configured to, when there are two or more pieces of local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship, select, from the version information of the two or more pieces of local index information, the version information having the smallest distance from the first version information, and use the version information as the second version information.
In an optional implementation, the apparatus further comprises:
the first storage module is used for storing the first code template set in a root directory of an engineering project after the first code template set is acquired from a cloud.
In the present application, in a case where an insertion operation of an SDK for inserting a target function in an engineering project is received, an index page of a code template of the SDK is displayed. And acquiring local index information of the first code template set of the SDK of the target function input in the index page. And determining whether the first code template set of the SDK of the target function is loaded in the root directory of the engineering project or not according to the local index information of the first code template set of the SDK of the target function. And under the condition that the first code template set of the SDK of the target function is loaded in the root directory of the engineering project, showing the code templates in the first code template set of the SDK of the target function loaded in the root directory of the engineering project. And under the condition that the first code template set of the SDK of the target function is not loaded in the root directory of the engineering project, determining whether the first code template set of the SDK of the target function is stored in the cloud end according to the local index information of the first code template set of the SDK of the target function. Under the condition that 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On the one hand, the code template set of the SDK can be obtained from the cloud, so that the code template set of the SDK can be deployed in the cloud, and further the decoupling of the template plug-in deployed in the development environment and the code template set of the SDK can be supported.
On the other hand, the method and the device can acquire the code template set of the SDK from the root directory of the engineering project, so that the code template set of the SDK acquired from the cloud can be deployed in the root directory of the engineering project, and the code template set of the SDK can be acquired directly from the root directory of the engineering project when used in the engineering project subsequently and can not be acquired from the cloud, so that network resources can be saved, and the efficiency of acquiring the code template set of the SDK is improved. Secondly, the code template set acquired from the cloud to the SDK is cached in a root directory of the engineering project and is still decoupled from the template plug-ins deployed in the development environment.
In another aspect, the method and the system support that a great number of developers can deploy the code template sets of the respective SDKs in the cloud, so that the code template sets of the SDKs in the cloud are numerous, the developers supporting the engineering project search the code template sets of the needed SDKs in the cloud by inputting the local index information in the index page, and the developers of the engineering project are prevented from acquiring the code template sets of the unnecessary SDKs from the cloud.
The template plug-in deployed in the development environment is decoupled from the code template set of the SDK, and the code template set acquired 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, so that 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 the scene of updating the code template set of the SDK. Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
Referring to fig. 5, a block diagram of a data processing apparatus of the present application is shown, applied to an electronic device, the apparatus including:
a fifth obtaining module 21, configured to obtain an old code template set of the SDK of the target function;
a sixth obtaining module 22, configured to obtain a modification operation on an 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;
the uploading module 23 is 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 of the new code template set of the SDK of the target function, and returns the new cloud index information to the electronic device;
the receiving module 24 is configured to receive new cloud index information returned by the cloud;
a seventh obtaining module 25, configured to obtain new local index information of a new code template set of the SDK of the target function;
the second storage module 26 is configured to store a corresponding relationship between the new cloud index information and the new local index information.
In an optional implementation manner, the electronic device is provided with a development environment, and an engineering project is created in the development environment;
the device further comprises:
and the third storage module is used for storing a new code template set of the SDK of the target function in a root directory in the engineering project.
In an optional implementation manner, the second storage module is specifically configured to: and uploading new cloud index information and 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.
In the present application, an old code template set of the SDK of the target function is obtained. And acquiring the 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. And uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributing new cloud end index information of the new code template set of the SDK of the target function, and returning the new cloud end index information to the electronic equipment. And receiving new cloud index information of the new code template set of the SDK of the target function returned by the cloud. And acquiring new local index information of the new code template set of the SDK of the target function. And storing the corresponding relation 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.
In this application, the above-mentioned flow may be executed by the electronic device based on a template plug-in deployed in the development environment, that is, the template plug-in deployed in the development environment has a function of executing the above-mentioned logic flow.
On the one hand, the code template set capable of supporting the SDK can be deployed in the cloud, and further the decoupling of the template plug-in deployed in the development environment and the code template set of the SDK can be supported.
In another aspect, the method supports that a large number of developers can deploy the code template sets of the respective SDKs in the cloud, so that the code template sets of the SDKs in the cloud are numerous, and the cloud can distribute cloud index information for the code template sets of the different SDKs, so that developers of subsequent engineering projects can search the code template sets of the required SDKs in the cloud based on the local index information, and the developers of the engineering projects are prevented from acquiring the code template sets of the unnecessary SDKs from the cloud.
Because the template plug-ins supporting deployment in the development environment are decoupled from the code template set of the SDK, developers supporting the project in the context of updating the code template set of the SDK can bypass the template plug-ins (not based on the template plug-ins) to update the code template set of the SDK. Therefore, developers of the engineering project can update the code template set of the SDK deployed in the cloud in time according to actual requirements. This can improve the efficiency of subsequent development of SDKs in engineering projects.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
Optionally, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the above method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the processes of the foregoing method embodiments, and can achieve the same technical effects, and is not described herein again to avoid repetition. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 6 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, 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, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 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.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a 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 may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 can also detect a change in 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, orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, 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 broadcast signals 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 communications. 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.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 7 is a block diagram of one type of electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 7, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power 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 memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (22)

1. A data processing method is applied to an electronic device, the electronic device is provided with a development environment, an engineering project is created in the development environment, and the method comprises the following steps:
displaying an index page of a code template of the SDK under the condition of receiving an inserting operation of the SDK for inserting a target function in the engineering project;
acquiring local index information of a first code template set of the SDK of the target function input in an index page;
determining whether a first code template set is loaded in a root directory of an engineering project or not according to the local index information;
in the case that the first code template set is loaded in the root directory of the engineering project, showing the code templates in the first code template set loaded in the root directory of the engineering project, wherein the code templates at least comprise: filling bits of general function codes of the SDK for developing the target function and personalized function codes of the SDK for the target function;
and under the condition that the first code template set is not loaded in a root directory of an engineering project, determining whether the first code template set is stored in a cloud end or not according to the local index information, and under the condition that the first code template set is stored in the cloud end, acquiring the first code template set from the cloud end according to the local index information and displaying code templates in the first code template set.
2. The method of claim 1, wherein the determining whether the first set of code templates is stored in a cloud according to the local index information comprises:
determining whether the local index information exists in a correspondence relationship between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance;
determining that the first code template set is stored in a cloud under the condition that the local index information exists in the corresponding relation;
alternatively, the first and second electrodes may be,
and under the condition that the local index information does not exist in the corresponding relation, determining that the first code template set is not stored in the cloud.
3. The method of claim 1, wherein obtaining the first set of code templates from a cloud according to the local index information comprises:
acquiring cloud index information of the first code template set according to the local index information;
and acquiring the first code template set from the cloud according to the cloud index information.
4. The method of claim 3, wherein obtaining the cloud index information of the first set of code templates according to the local index information comprises:
and determining cloud index information corresponding to the local index information in a correspondence relationship between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance.
5. The method of claim 1, wherein the local index information comprises at least a first version information of the first set of code templates;
the method further comprises the following steps:
under the condition that the first code template set is not stored in the cloud, acquiring second version information of a second code template set of the SDK of the target function in the cloud; the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function;
acquiring the second code template set from a cloud according to the second version information;
and displaying the code templates in the second code template set.
6. The method of claim 5, wherein obtaining the second version information of the second set of code templates of the SDK of the target function in the cloud comprises:
determining local index information of version information of the SDK code template set comprising a target function in a corresponding relation between the local index information of the SDK code template set and cloud index information of the SDK code template set, which is stored in advance;
under the condition that the corresponding relation comprises one local index information of the version information of the code template set of the SDK with the target function, acquiring the second version information according to the version information in the local index information determined in the corresponding relation;
alternatively, the first and second electrodes may be,
and when the local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship is two or more, selecting the version information having the smallest distance from the first version information from the version information of the two or more local index information, and using the version information as the second version information.
7. The method of claim 1, further comprising:
after the first code template set is obtained from a cloud, the first code template set is stored in a root directory of an engineering project.
8. A data processing method is applied to an electronic device, and the method comprises the following steps:
acquiring an old code template set of the SDK of the target function;
acquiring modification operation on an 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;
uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributing new cloud end index information of the new code template set of the SDK of the target function, and returning the new cloud end index information to the electronic equipment;
receiving new cloud index information returned by a cloud;
acquiring new local index information of a new code template set of the SDK of the target function;
and storing the corresponding relation between the new cloud index information and the new local index information.
9. The method of claim 8, wherein the electronic device has a development environment therein, wherein an engineering project is created in the development environment;
the method further comprises the following steps:
storing a new set of code templates for the SDK of the target function in a root directory in the engineering project.
10. The method of claim 8, wherein storing the correspondence between the new cloud index information and the new local index information comprises:
and uploading new cloud index information and 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.
11. A data processing apparatus applied to an electronic device having a development environment in which an engineering project is created, the apparatus comprising:
the display module is used for displaying an index page of a code template of the SDK under the condition of receiving an inserting operation of the SDK for inserting the target function in the engineering project;
the first acquisition module is used for acquiring local index information of a first code template set of the SDK of the target function input in the index page;
the first determining module is used for determining whether a first code template set is loaded in a root directory of the engineering project or not according to the local index information;
a first showing module, configured to show, when the first code template set is loaded in a root directory of an engineering project, code templates in the first code template set loaded in the root directory of the engineering project, where the code templates at least include: filling bits of general function codes of the SDK for developing the target function and personalized function codes of the SDK for the target function;
the system comprises a first determining module, a second obtaining module and a second displaying module, wherein the first determining module is used for determining whether the first code template set is stored in a cloud end according to the local index information under the condition that the first code template set is not loaded in a root directory of an engineering project, the second obtaining module is used for obtaining the first code template set from the cloud end according to the local index information under the condition that the first code template set is stored in the cloud end, and the second displaying module is used for displaying the code templates in the first code template set.
12. The apparatus of claim 11, wherein the second determining module comprises:
the system comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining whether the local index information exists in the correspondence between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance;
a second determining 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;
alternatively, the first and second electrodes may be,
a third determining 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.
13. The apparatus of claim 11, wherein the second obtaining module comprises:
the first acquisition unit is used for acquiring cloud index information of the first code template set according to the local index information;
and the second acquisition unit is used for acquiring the first code template set from a cloud according to the cloud index information.
14. The apparatus according to claim 13, wherein the first obtaining unit is specifically configured to:
and determining cloud index information corresponding to the local index information in a corresponding relation between the local index information of the SDK code template set and the cloud index information of the SDK code template set, which is stored in advance.
15. The apparatus of claim 11, wherein the local index information comprises at least a first version information of the first set of code templates;
the device further comprises:
the third obtaining module is used for obtaining second version information of a second code template set of the SDK of the target function in the cloud under the condition that the first code template set is not stored in the cloud; the second version information is adjacent to the first version information in the version information of each code template set of the SDK of the target function;
a fourth obtaining module, configured to obtain the second code template set from a cloud according to the second version information;
and the third display module is used for displaying the code templates in the second code template set.
16. The apparatus of claim 15, wherein the third obtaining module comprises:
a fourth determining unit, configured to determine local index information including version information of the code template set of the SDK of the target function in a correspondence relationship between the local index information of the code template set of the SDK and cloud index information of the code template set of the SDK, which is stored in advance;
a third obtaining unit, configured to, when there is one local index information of the version information of the code template set including the SDK of the target function in the corresponding relationship, obtain the second version information according to the version information in the one local index information determined in the corresponding relationship;
alternatively, the first and second electrodes may be,
and a fourth obtaining unit, configured to, when there are two or more pieces of local index information of the version information of the code template set including the SDK of the target function in the correspondence relationship, select, from the version information of the two or more pieces of local index information, the version information having the smallest distance from the first version information, and use the version information as the second version information.
17. The apparatus of claim 11, further comprising:
the first storage module is used for storing the first code template set in a root directory of an engineering project after the first code template set is acquired from a cloud.
18. A data processing apparatus, applied to an electronic device, the apparatus comprising:
a fifth obtaining module, configured to obtain an old code template set of the SDK of the target function;
a sixth obtaining module, configured to obtain a modification operation on an 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;
the uploading module is used for uploading the new code template set of the SDK of the target function to the cloud end so that the cloud end stores the new code template set of the SDK of the target function, distributes new cloud end index information of the new code template set of the SDK of the target function, and returns the new cloud end index information to the electronic equipment;
the receiving module is used for receiving new cloud index information returned by the cloud;
a seventh obtaining module, configured to obtain new local index information of a new code template set of the SDK of the target function;
and the second storage module is used for storing the corresponding relation between the new cloud index information and the new local index information.
19. The apparatus of claim 18, wherein the electronic device has a development environment therein, wherein an engineering project is created in the development environment;
the device further comprises:
and the third storage module is used for storing a new code template set of the SDK of the target function in a root directory in the engineering project.
20. The apparatus of claim 18, wherein the second storage module is specifically configured to: and uploading new cloud index information and 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.
21. An electronic device, comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the method steps of any one of claims 1 to 10.
22. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method according to any one of claims 1 to 10.
CN202211501644.XA 2022-11-28 2022-11-28 Data processing method and device, electronic equipment and storage medium Pending CN115809054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211501644.XA CN115809054A (en) 2022-11-28 2022-11-28 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211501644.XA CN115809054A (en) 2022-11-28 2022-11-28 Data processing method and device, electronic equipment and storage medium

Publications (1)

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

Family

ID=85484700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211501644.XA Pending CN115809054A (en) 2022-11-28 2022-11-28 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115809054A (en)

Similar Documents

Publication Publication Date Title
CN109032606B (en) Native application compiling method and device and terminal
CN105808305B (en) Static resource loading method and device
CN107463372B (en) Data-driven page updating method and device
CN107450912B (en) Page layout method, device and terminal
CN111209195A (en) Method and device for generating test case
CN111221593A (en) Dynamic loading method and device
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN110457084B (en) Loading method and device
CN113590091A (en) Data processing method and device, electronic equipment and storage medium
CN115809054A (en) Data processing method and device, electronic equipment and storage medium
CN110989987B (en) Portal webpage generation method and device, client, server and storage medium
CN111597106A (en) Point burying management method and device
CN107463414B (en) Application installation method and device
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN114416218B (en) Data processing method and device, electronic equipment and storage medium
CN114020504B (en) Data processing method and device, electronic equipment and storage medium
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN114489641B (en) Data processing method and device, electronic equipment and storage medium
CN114416084B (en) Data processing method and device, electronic equipment and storage medium
CN113934452B (en) Data processing method and device, electronic equipment and storage medium
CN114020505B (en) Data processing method and device, electronic equipment and storage medium
CN114416033A (en) Data processing method and device, electronic equipment and storage medium
CN111596949B (en) Method and device for developing application program
CN115098200B (en) Language switching method and device, electronic equipment and storage medium
CN113590128A (en) Method and device for acquiring intermediate file, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination