Generation method, device and equipment of software development kit and development system
By using a layered software development kit (SDK) generation system, the problem of low SDK development efficiency caused by differences in the interactive interfaces of different electronic devices is solved, and the reuse of underlying services and the improvement of SDK development efficiency are realized.
Patent Information
- Application Number
- CN202411171916.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2026-03-03
AI Technical Summary
Due to the differences in the interactive interfaces of different types of electronic devices, existing technologies require developers to generate dedicated SDKs for each type of electronic device, resulting in low development efficiency.
The software development kit generation system adopts a layered design, including a development layer and a base layer. The development layer contains device modules and development interfaces, while the base layer stores general services. Developers only need to focus on developing device-specific interactive interfaces, and the base layer provides reuse of underlying services.
It enables the reuse of underlying services, improves SDK development efficiency, and reduces the time and resource waste in generating software development kits.
Smart Images

Figure CN121597202A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and development system for generating a software development kit. Background Technology
[0002] With the development of the internet, applications (APPs) are able to perform more and more functions, such as video playback. In related technologies, developers can obtain a video software development kit (SDK) that enables video playback and integrate it into their applications to give those applications video functionality.
[0003] Currently, applications with different functions (such as video, live streaming, and audio functions) can be installed on different types of electronic devices, such as in-vehicle systems, wearable devices, televisions, mobile phones, and computer devices. However, because the layout and interaction methods of the user interface (UI) of each type of electronic device are different, it is necessary to generate an SDK corresponding to each type of electronic device by the developers of the corresponding electronic device when implementing related functions for applications on different types of electronic devices, which is inefficient. Summary of the Invention
[0004] This application provides a method, apparatus, device, and development system for generating a software development kit (SDK), which can enable the reuse of underlying services and improve the development efficiency of the SDK.
[0005] In a first aspect, embodiments of this application provide a development system, including: a development layer and a base layer, wherein the development layer includes at least two device modules, each device module encapsulates each hardware device into a corresponding module based on the device type, and each device module includes a development interface and at least one interactive function unit;
[0006] The development layer is used to determine when the development interface in any target device module receives interface development information for any target interactive functional unit, obtain the target service from the base layer according to the interface development information, and generate the target software development kit according to the target service, so as to apply the target software development kit to the target device module.
[0007] The base layer is used to store the services to be used by each device module in the development layer, and to provide the corresponding target services to the development layer according to the service call instructions sent by the development layer.
[0008] Secondly, embodiments of this application provide a method for generating a software development kit, including:
[0009] When the development interface in any target device module receives interface development information for any target interactive function unit, the service identifier to be invoked is determined based on the interface development information.
[0010] The target service is invoked according to the service identifier to be invoked, and a target software development kit is generated so as to apply the target software development kit to the target device module.
[0011] Thirdly, embodiments of this application provide a software development kit (SDK) generation apparatus, comprising:
[0012] The identifier determination module is used to determine the identifier of the service to be called based on the interface development information when the development interface in any target device module receives interface development information for any target interactive functional unit.
[0013] The toolkit generation module is used to invoke the target service according to the service identifier to be invoked, generate the target software development kit, and apply the target software development kit to the target device module.
[0014] Fourthly, embodiments of this application provide an electronic device, including:
[0015] A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the software development kit generation method as described in the second aspect embodiment and various implementations above.
[0016] Fifthly, embodiments of this application provide a computer-readable storage medium for storing a computer program that causes a computer to execute the software development kit generation method as described in the second aspect embodiments and their implementations.
[0017] Sixthly, embodiments of this application provide a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the software development kit generation method as described in the second aspect embodiment and its various implementations.
[0018] The technical solution disclosed in this application involves a development layer in the development system that determines when the development interface of any target device module receives interface development information for any target interactive functional unit. Based on the interface development information, the development layer retrieves the target service from the services to be used in each device module stored in the base layer, and generates a target software development kit (SDK) based on the target service. The SSD is then applied to the target device module. By adopting a layered design for the SSD development system—that is, designing the development system as a multi-layered structure including a development layer and a base layer—the unique interactive functional units and development interfaces corresponding to the device modules of each type of electronic device can be set in the development layer of the development system. Simultaneously, the common services corresponding to each type of electronic device are set in the base layer. This allows developers of any type of electronic device to focus only on the development of the unique interactive interfaces of different types of electronic devices in the development layer when generating an SSD corresponding to that type of electronic device, without needing to focus on the basic services. This enables the reuse of underlying services and improves the development efficiency of the SDK. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This application provides a schematic diagram of the structure of a software development toolkit development system.
[0021] Figure 2a A schematic diagram of a development layer provided in an embodiment of this application;
[0022] Figure 2b A schematic diagram of another development layer provided in an embodiment of this application;
[0023] Figure 2c A schematic diagram of another development layer provided in the embodiments of this application;
[0024] Figure 3 A schematic diagram of the structure of a development system for another software development toolkit provided in this application embodiment;
[0025] Figure 4a A schematic diagram illustrating multiple first services to be used within a general service sublayer provided in this application embodiment;
[0026] Figure 4b A schematic diagram illustrating multiple second services to be used within an infrastructure sublayer, as provided in an embodiment of this application;
[0027] Figure 5 A schematic diagram of the structure of a development system for another software development toolkit provided in an embodiment of this application;
[0028] Figure 6 A flowchart illustrating a method for generating a software development kit provided in this application embodiment;
[0029] Figure 7 A schematic block diagram of a software development kit generation apparatus provided in this application embodiment;
[0030] Figure 8 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0033] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or solution described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0034] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more, that is, at least two. "At least one" means one or more. "Any" means any one or any several.
[0035] Typically, a Software Development Kit (SDK) provides the development tools, Application Programming Interfaces (APIs), documentation, sample code, and tutorials needed for application development. Therefore, developers can use the SDK to develop new applications or add new features to existing applications, which can simplify the application development process and improve development efficiency.
[0036] Given that applications with different functions (such as video, live streaming, and audio functions) can be installed on different types of electronic devices, such as in-vehicle systems, wearable devices, televisions, and mobile phones, the layout and interaction methods of the user interfaces differ for each type of electronic device. This means that implementing these functions (such as video, live streaming, and audio functions) for applications on different types of electronic devices requires developers of each type of electronic device to create their own SDKs, which is inefficient.
[0037] To address the aforementioned technical problems, this application provides a method, apparatus, device, and development system for generating software development kits, thereby solving the problem of low efficiency in related technologies where developers need to specifically generate SDKs corresponding to each type of electronic device.
[0038] The technical solutions provided by the embodiments of this application will be described in detail below through some examples. The embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0039] First, combine Figure 1 This application provides a detailed description of a development system provided in its embodiments. Figure 1 This is a schematic diagram of the structure of a development system provided in an embodiment of this application. Figure 1 As shown, the development system specifically refers to the software development kit development system, and the development system 100 includes: a development layer 101 and a base layer 102;
[0040] The development layer 101 includes at least two device modules 1011. Each device module 1011 encapsulates each hardware device into a corresponding module based on the device type, and each device module 1011 includes a development interface 1012 and at least one interactive functional unit 1013. This development layer 101 is used to determine when the development interface 1012 in any target device module 1011 receives interface development information for any target interactive functional unit 1013, to obtain the target service from the base layer 102 based on the interface development information, and to generate a target software development kit based on the target service, so as to apply the target software development kit to the target device module.
[0041] The base layer 102 is used to store the services to be used by each device module 1011 in the development layer 101, and to provide the corresponding target services to the development layer 101 according to the service call instructions sent by the development layer 101.
[0042] In this embodiment of the application, the development layer 101 includes at least two device modules 1011, which can refer to device modules corresponding to various types of electronic devices. For example, device module 1011 can be, but is not limited to: vehicle system module corresponding to vehicle system, wearable device module corresponding to wearable device, mobile phone module corresponding to mobile phone, and television module corresponding to television, etc.
[0043] It should be understood that applying the target software development kit to the target device module as described above refers to applying the target software development kit to any host application within the target device module.
[0044] The aforementioned vehicle infotainment system can be understood as an in-vehicle infotainment product.
[0045] The aforementioned wearable devices can be any wearable device, such as virtual reality (VR) devices, smart bracelets, smart glasses, etc.
[0046] Furthermore, when the number of device modules 1011 included in the development layer 101 is two or more, there is no dependency between each device module 1011, they are isolated from each other, and there is no data communication or data interaction between them.
[0047] Furthermore, the development interface 1012 included in each device module 1011 of this application can be optionally a visual interface interface. Thus, developers can use this visual interface interface to develop interactive interfaces for the interactive functional units in any device module, thereby obtaining a software development kit (SDK) that meets their development needs.
[0048] In some optional embodiments, when a developer develops an interactive interface for an interactive functional unit in any device module through a visual interface, the developer specifically inputs interface development information for any interactive functional unit in any device module into the visual interface, and then the development layer 101 in the development system 100 generates a target software development kit (SDK) based on the interface development information.
[0049] In some alternative embodiments, each device module 1011 includes at least one interactive functional unit, which can be understood as a functional module in each device module 1011 for implementing a certain function, such as a video functional module for implementing video function, a live streaming functional module for implementing live streaming function, or an audio functional module for implementing audio function, etc.
[0050] like Figure 2a As shown, when the development layer 101 includes three device modules 1011, namely a VR device module, a vehicle-mounted device module, and a mobile phone module, the development interface X1 of the VR device module can be located in the first access interface layer. This first access interface layer is specifically an access application programming interface (API) layer, which may also include: interface function API, logic function API, and data API. Furthermore, at least one interactive functional unit 1013 of the VR device module may include, but is not limited to, a video module, a comment module, a like module, and a personal page module. Thus, developers can develop the interactive interface of any interactive functional unit in the VR device module through the development interface X1 in the first access interface layer to obtain the corresponding function's software development kit (SDK). Furthermore, when any host application in the VR device module needs to integrate the corresponding function's SDK, it can access the corresponding function's SDK into the host application through an access interface other than the development interface X1 in the first access interface layer, thereby granting the host application the corresponding function.
[0051] Similarly, the development interface X2 included in the aforementioned vehicle infotainment module can be located in the second access interface layer, which is specifically the access application programming interface (API) layer. Considering that the SDK corresponding to the vehicle infotainment module can include two types: vehicle infotainment SDK and vehicle infotainment card SDK, the second interface access layer within the vehicle infotainment module can include two sub-interface access layers: vehicle infotainment sub-interface access layer X21 and vehicle infotainment card sub-interface access layer X22. Therefore, the development interface X2 can be located in both vehicle infotainment sub-interface access layer X21 and vehicle infotainment card sub-interface access layer X22. Furthermore, vehicle infotainment sub-interface access layer X21 and vehicle infotainment card sub-interface access layer X22 can respectively include: interface function API, logic function API, and data API. Moreover, at least one interactive function unit 1013 of the vehicle infotainment module may include, but is not limited to, a video module and a personal page module.
[0052] Furthermore, the development interface X3 included in the aforementioned mobile phone module may be located in the third access interface layer, which may also be an access application programming interface (API) layer. This third access interface layer may further include: access layer APIs, third-party dependency library management components and functions, and underlying capability extension interfaces, etc. The aforementioned access layer APIs may include, but are not limited to, service access layer APIs and data access layer APIs, etc. Moreover, at least one interactive functional unit 1013 of the mobile phone module may include, but is not limited to: a video module, a comment module, a personal page module, and a page and routing framework module, etc.
[0053] It should be noted that, in this application, the development interface of each device module can be located in the access interface layer of the corresponding device module, or optionally, it can be set independently in any position within the corresponding device module. This application does not impose specific restrictions on the setting position of the development interface of each device module.
[0054] Considering that the access interface layer of each device module is mainly used to connect the corresponding functional SDK of each device module to the host application, that is, to interact with the host application through the access interface layer, this application can optionally set the development interface independently within the corresponding device module to avoid interference when the corresponding functional SDK of each device module is connected to the host application. For details, please refer to [link to relevant documentation]. Figure 2b As shown.
[0055] In some alternative embodiments, each device module 1011 in the development layer 101 of this application, in addition to including a development interface and at least one interactive functional unit, may also include its own unique module. Figure 2aNot specifically shown in the text. Specifically, when the development layer 101 includes three device modules 1011, namely a VR device module, a vehicle infotainment device module, and a mobile phone or TV module, the unique modules within the VR device module may include, but are not limited to: a cross-module call module, a lifecycle module, a PlayGround&Mocker module, and a u3d module. Specifically, u3d refers to Unity3D, a cross-platform 2D / 3D game engine that helps developers create 3D video games, real-time 3D animations, and visualized architecture, serving as a real-time 3D interactive content creation and operation platform. In other words, u3d is developed for a cross-platform game engine. The unique modules within the vehicle infotainment device module may include, but are not limited to: a cross-module call module, a vehicle interface module, a vehicle adaptation module, and a day / night mode module. The unique modules within the mobile phone or TV module may include, but are not limited to: a general structure and interface definition module, a general interactive interface component module, and a general tool encapsulation module. The cross-module calling module is mainly used to realize the calling function between different unique modules within the same device module, so that different unique modules within the same device module can be decoupled.
[0056] Because each device module 1011 in the development layer 101 includes an interactive functional unit 1013 that may correspond to the specific business logic and interactive interface logic of its respective device module. The interactive interface logic is also known as UI interaction logic. Therefore, for Figure 2a The development layer 101 shown can obtain, based on the unique business logic and UI interaction logic corresponding to the interactive functional units in each device module 1011, the following: Figure 2c The structural diagram shown.
[0057] UI interaction logic can be understood as UI interaction code. Specific business logic can be understood as specific business logic code.
[0058] In some alternative embodiments, the base layer 102 of this application specifically provides all the underlying services that need to be called to the upper development layer 101.
[0059] In practical implementation, when an application hosted on any type of electronic device needs to implement a certain function, such as video functionality, the developer of that type of electronic device can select a target development interface corresponding to that type of electronic device from at least one development interface 1012 provided by the development layer 101 of the development system 100. Then, based on this target development interface, the developer can input interface development information for developing the interactive interface of the video function module.
[0060] Each development interface 1012 provided by the development layer 101 corresponds to a device module 1011. For example, when the device module is an in-vehicle infotainment system module, the development interface provided by the development layer 101 for that in-vehicle infotainment system module can be represented as the in-vehicle infotainment system module development interface. As another example, when the device modules are a VR device module and an in-vehicle infotainment system module, the development interfaces provided by the development layer 101 can be represented as the VR device module development interface and the in-vehicle infotainment system module development interface. In other words, the development interface 1012 provided by the development layer 101 can be determined according to the device module type set within the development layer 101.
[0061] When the development layer 101 in the development system 100 detects that any development interface 1012 has received interface development information for any interactive functional unit, the development layer 101 can determine the identification information of the development interface 1012, and based on the identification information of the development interface 1012, determine which target device module 1011 in the development layer 101 the developer is performing the interactive interface development operation for, and by parsing the interface development information, determine which target interactive functional unit in the target device module the developer is performing interactive interface development for. Then, based on the interface development information, determine which underlying services (i.e., target services) need to be called when developing the interactive interface for the target interactive functional unit (i.e., generating the target software development kit (SDK) based on the interface development information). Then, generate service call instructions for the target services to be called as needed, and send the service call instructions to the base layer 102, so that the base layer 102 can obtain the corresponding target service based on the target service identification information carried in the service call instructions, and provide the obtained target service to the development layer 101.
[0062] In this application, the identification information of the aforementioned development interface 1012 can be the unique information of the development interface, such as the development interface name, development interface serial number, etc. There are no specific restrictions on the identification information of the development interface here.
[0063] Furthermore, the aforementioned interface development information includes the identification information of the target interactive functional unit and the identification information of the underlying service to be called. Here, the underlying service to be called can be understood as the target service.
[0064] The identification information of the target interactive functional unit can be unique information of the target interactive functional unit, such as the name or ID of the target interactive functional unit. There are no restrictions on the identification information of the target interactive functional unit here.
[0065] Similarly, the target service identifier information mentioned above can be unique information about the target service, such as the target service's number, serial number, or name. There are no specific restrictions on the target service identifier here.
[0066] Furthermore, when the development layer 101 receives the target service provided by the base layer 102, it can add the target service to the corresponding position in the interface development information and encapsulate the updated interface development information to generate the target software development kit (SDK).
[0067] In this application, the target software development kit (SDK) can be determined based on the interactive functional unit developed by the developer. For example, when the interactive functional unit developed by the developer is a video module, the generated target software development kit is specifically a video software development kit (SDK), i.e., a video SDK. As another example, when the interactive functional unit developed by the developer is a live streaming module, the generated target software development kit is specifically a live streaming software development kit (SDK), i.e., a live streaming SDK.
[0068] In some optional embodiments, considering that the underlying services stored in the foundation layer 102 may include two categories: the first category is business services, i.e., business functions; the second category is basic services, such as basic frameworks, basic databases, and general components, etc., the foundation layer 102 in this application can be divided into a general service sublayer 1021 and an infrastructure sublayer 1022 according to the above two types of services. That is, the foundation layer 102 includes a general service sublayer 1021 and an infrastructure sublayer 1022, such as... Figure 3 As shown.
[0069] Among them, the general service sublayer 1021 is used to provide multiple first-use services to the development layer 101;
[0070] Infrastructure sublayer 1022 is used to provide multiple secondary services to the development layer.
[0071] In this application, the first service to be used and the second service to be used are different. The first service to be used can be understood as a business service to be used, and the second service to be used can be understood as a basic service to be used.
[0072] Optional, such as Figure 4a As shown, the first service to be used may include at least one of the following: interactive business functions, live streaming business functions, commenting business functions, personal page business functions, favorites business functions, and follow business functions; such as Figure 4b As shown, the second service to be used may include the basic framework, basic service APIs, general tools, and basic database. The general tools include task control tools and network tools, etc.
[0073] The aforementioned basic framework refers to a predefined structure, libraries, guidelines, and best practices provided for the development of applications and other software in software development, to help developers quickly build and maintain software projects. It should be understood that the basic framework in this application is a predefined code development structure.
[0074] The aforementioned basic services refer to the fundamental capabilities required in software development, such as network interface requests and other capabilities unrelated to specific business logic.
[0075] The aforementioned general tools refer to tools that can be used by various types of devices in software development.
[0076] It should be noted that the aforementioned general service sublayer 1021 can also support horizontal service scaling to cope with complex service logic changes.
[0077] The multiple second services to be used within the aforementioned infrastructure sublayer 1022 can be implemented by the infrastructure sublayer 1022 itself, or they can be injected by the host application or the development layer 101. This application does not impose any restrictions on this.
[0078] Furthermore, the infrastructure sublayer 1022 is also used to define the interface specifications of basic class services and provide some encapsulated functional classes, thereby facilitating the use of at least one of the general service sublayer 1021 and the development layer 101, and reducing the complexity of using the second service to be used by at least one of the general service sublayer 1021 and the development layer 101.
[0079] In some optional embodiments, when the development layer 101 of this application calls the target service from the general service sublayer 1021 and the infrastructure sublayer 1022, it may include the following two methods:
[0080] The first method is to directly call various underlying services provided by the general service sublayer 1021 and the infrastructure sublayer 1022, based on the type of the target service to be called, in order to obtain the target service from all underlying services.
[0081] The second approach is that the development layer 101 can first call the required target service from the general service sublayer 1021. If the target service cannot be called from the general service sublayer 1021, the target service that cannot be called from the general service sublayer 1022 can be obtained from the infrastructure sublayer 1022 through the general service sublayer 1021. Alternatively, if the target service in the general service sublayer 1021 depends on the basic class service in the infrastructure sublayer 1022, the general service sublayer 1021 can call the basic class service that the target service depends on from the infrastructure sublayer 1022 according to the target service to provide the target service to the development layer 101.
[0082] In other words, the infrastructure sublayer 1022 can serve as a service provider not only for the development layer 101, but also for the general service sublayer 1021.
[0083] As one possible approach, when the development interface 1012 in any target device module 1011 receives interface development information for any target interactive functional unit 1013, the development layer 101 can determine the target service to be called based on the interface development information. Then, according to the type of the target service, it calls the corresponding target service from the general business sublayer 1021 and / or infrastructure sublayer 1022 in the base layer 102 to generate the target software development kit (SDK) based on the target service. In this way, in addition to providing the underlying services required for interactive interface development to the development layer 101, the underlying services can also be classified and managed according to type, thereby reducing the problem of low SDK generation efficiency caused by storing different types of underlying services together, and thus improving the development efficiency of the SDK.
[0084] like Figure 5 As shown, the development layer 101 of this application also includes a creation component 1014.
[0085] Among them, component 1014 is used to create a target interactive function unit when it is determined that there is no target interactive function unit corresponding to the interface development information in the target device module.
[0086] Considering that when developers develop an interactive interface for any interactive functional unit in a certain type of electronic device, there may be instances where the corresponding device module 1011 in the development layer 101 does not contain the interactive functional unit 1013, when the development layer 101 detects that the development interface 1012 in any target device module 1011 receives interface development information for any target interactive functional unit 1013, it can first determine whether the target interactive functional unit 1013 exists in the target device module 1011. If it is determined that the target interactive functional unit 1013 corresponding to the interface development information does not exist in the target device module 1011, then the target interactive functional unit 1013 is created in the target device module 1011 by the creation component 1014. After the target interactive functional unit 1013 is created, the target service is obtained from the base layer 102 according to the interface development information, and then the target software development kit (SDK) is generated based on the target service. If it is determined that the target interactive function unit 1013 corresponding to the interface development information exists in the target device module 1011, then the target service is obtained from the base layer 102 according to the interface development information, and then the target software development kit (SDK) is generated according to the target service.
[0087] The implementation process of obtaining the target service from the base layer 102 based on the interface development information and generating the target software development kit (SDK) based on the target service can be found in the aforementioned embodiment section, and will not be elaborated further here.
[0088] This application embodiment adopts a layered design for the software development kit (SDK) development system, that is, designs the development system as a multi-layered structure including a development layer and a base layer. This allows the unique interactive functional units and development interfaces corresponding to the device modules of each type of electronic device to be set in the development layer of the development system, while the common services corresponding to each type of electronic device are set in the base layer. This enables developers of any type of electronic device to focus only on the development of the unique interactive interface of different types of electronic devices in the development layer when generating a software development kit corresponding to that type of electronic device, without having to worry about the basic services. This allows for the reuse of underlying services and improves the development efficiency of the SDK.
[0089] Based on the development system of the software development kit provided in the foregoing embodiments, the method for generating the software development kit provided in this application will be specifically described. For example... Figure 6 As shown, the method for generating this software development kit may include the following steps:
[0090] S601, when the development interface in any target device module receives interface development information for any target interactive function unit, determine the service identifier to be called based on the interface development information.
[0091] In some optional embodiments, when the development layer in the development system detects that a development interface in any target device module has received interface development information for any target interactive functional unit, it can first determine the identification information of the development interface, and then determine which target device module in the development layer the developer is performing the interactive interface development operation on based on the identification information of the development interface. Simultaneously, by parsing the interface development information, it can determine which target interactive functional unit in the target device module the developer is performing interactive interface development on. Furthermore, the development layer determines the identifier of the service to be invoked when developing the interactive interface for that target interactive functional unit based on the parsed interface development information.
[0092] The aforementioned service identifier to be invoked can be understood as the identification information of the target service.
[0093] The aforementioned target service identifier information can be unique information about the target service, such as the target service's number, serial number, or name. There are no specific restrictions on the target service identifier here.
[0094] In some optional embodiments, considering that the development layer of the software development kit development system disclosed in the foregoing embodiments may include at least two device modules, thereby achieving the generation of software development kits compatible with various types of electronic devices. However, considering that the software development kits for different types of electronic devices are developed separately and independently, in order to reduce the package size of the development system and improve the download efficiency of the development system, this application may prompt the developer to select the type of electronic device when downloading the development system, and then provide the user with a development system that only includes the device modules corresponding to that type of electronic device based on the type of electronic device selected by the developer. That is, when the developer actually uses the development system to generate the software development kit, they can obtain a development system that only includes the device modules corresponding to the target type of electronic device.
[0095] Correspondingly, when the developer is using a development system that only includes device modules corresponding to the target type of electronic device, when the development layer in the development system detects that the development interface has received interface development information for any target interactive functional unit, it can parse this interface development information to determine which target interactive functional unit in the target device module the developer is developing the interactive interface for. Furthermore, based on the parsed interface development information, the development layer determines the service identifier to be invoked when developing the interactive interface for that target interactive functional unit.
[0096] S602, invoke the target service according to the service identifier to be invoked, generate the target software development kit, and apply the target software development kit to the target device module.
[0097] Optionally, after the development layer determines the identifier of the service to be invoked, it can invoke the target service from the services to be used in each device module stored in the base layer according to the identifier of the service to be invoked, and then generate the target software development kit according to the target service.
[0098] In some optional implementations, the development layer of the development system can generate a service invocation instruction based on the identifier of the service to be invoked. This service invocation instruction carries the identifier of the service to be invoked, which is also the target service identifier.
[0099] Then, the development layer sends the service call instruction to the base layer in the development system, so that the base layer can parse the service call instruction to obtain the identifier of the service to be called from the service call instruction. Then, it can obtain the target service corresponding to the service identifier from the services to be used of all device modules stored in its own storage, and provide the obtained target service to the development layer, so that the development layer can add the received target service to the corresponding position in the interface development information, and encapsulate the updated interface development information to generate the target software development kit (SDK).
[0100] In some alternative embodiments, the aforementioned basic layer may include a general service sublayer and an infrastructure sublayer, such as Figure 3 As shown in the diagram. The general services sublayer provides multiple first-level services to the development layer; the infrastructure sublayer provides multiple second-level services to the development layer.
[0101] In this application, the first service to be used and the second service to be used are different. (Optional, such as...) Figure 4a As shown, the first service to be used may include at least one of the following: interactive business functions, live streaming business functions, commenting business functions, personal page business functions, favorites business functions, and follow business functions; such as Figure 4b As shown, the second service to be used may include the basic framework, basic service APIs, general tools, and basic database. The general tools include task control tools and network tools, etc.
[0102] Considering that when developers develop interactive interfaces for interactive functional units in a certain type of electronic device, there may be situations where the corresponding device module for that type of electronic device in the development layer does not have that interactive functional unit.
[0103] Therefore, when the development layer detects that the development interface of any target device module has received interface development information for any target interactive functional unit, it can first determine whether the target interactive functional unit exists in the target device module. If it is determined that the target device module does not have a target interactive functional unit corresponding to the interface development information, the development layer can create the target interactive functional unit in the target device module through its own creation component. After creating the target interactive functional unit, the development layer calls the target service from the base layer according to the interface development information, and then generates the target software development kit (SDK) based on the target service. If it is determined that the target device module contains a target interactive functional unit corresponding to the interface development information, the development layer calls the target service from the base layer according to the interface development information, and then generates the target software development kit (SDK) based on the target service.
[0104] This application provides a method for generating a software development kit (SDK). By adopting a layered design for the SSD development system, that is, designing the development system as a multi-layered structure including a development layer and a base layer, the unique interactive functional units and development interfaces corresponding to the device modules of each type of electronic device can be set in the development layer of the development system. At the same time, the common services corresponding to each type of electronic device are set in the base layer. This allows developers of any type of electronic device to focus only on the development of the unique interactive interface of different types of electronic devices in the development layer when generating a software development kit corresponding to that type of electronic device, without having to focus on the basic services. This enables the reuse of underlying services and improves the development efficiency of the SDK.
[0105] The following is a reference to the appendix. Figure 7 This application describes a software development kit (SDK) generation apparatus based on an embodiment. Figure 7 As shown, the software development kit generation apparatus 700 includes: an identifier determination module 710 and a kit generation module 720.
[0106] The identifier determination module 710 is used to determine the identifier of the service to be called based on the interface development information when the development interface in any target device module receives interface development information for any target interactive function unit.
[0107] The toolkit generation module 720 is used to call the target service according to the service identifier to be called, generate the target software development kit, and apply the target software development kit to the target device module.
[0108] In one optional implementation of this application embodiment, the toolkit generation module 720 is specifically used for:
[0109] Based on the service identifier to be invoked, the target service is obtained from the services to be used of each device module stored in the base layer;
[0110] Based on the target service, generate the target software development kit.
[0111] In an optional implementation of this application embodiment, the software development kit generation apparatus 700 further includes:
[0112] A creation module is used to create a target interaction function unit when it is determined that there is no target interaction function unit corresponding to the interface development information in the target device module.
[0113] It should be understood that the device embodiments and the foregoing method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 7 The device 700 shown can perform Figure 6 The corresponding method embodiments, and the foregoing and other operations and / or functions of each module in device 700 are respectively implemented to achieve Figure 6 For the sake of brevity, the corresponding processes in each method are not described in detail here.
[0114] The apparatus 700 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the second aspect method embodiment in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the second aspect method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above-described second aspect method embodiment.
[0115] Figure 8 This is a schematic block diagram of an electronic device provided as an embodiment of this application. Figure 8 As shown, the electronic device 800 may include a memory 810 and a processor 820. The memory 810 stores computer programs and transmits the program code to the processor 820. In other words, the processor 820 can call and run the computer program from the memory 810 to implement the software development kit generation method described in the second aspect of this application embodiment.
[0116] For example, the processor 820 can be used to execute the above-described software development kit generation method according to instructions in the computer program.
[0117] In some embodiments of this application, the processor 820 may include, but is not limited to:
[0118] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0119] In some embodiments of this application, the memory 810 includes, but is not limited to:
[0120] Volatile memory and / or non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Memory Bus RAM (DR RAM).
[0121] In some embodiments of this application, the computer program can be divided into one or more modules, which are stored in the memory 810 and executed by the processor 820 to complete the software development kit generation method provided in this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.
[0122] like Figure 8 As shown, the electronic device 800 may further include:
[0123] Transceiver 830, which can be connected to processor 820 or memory 810.
[0124] The processor 820 can control the transceiver 830 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include antennas, and the number of antennas may be one or more.
[0125] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0126] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the software development kit generation method described in the second aspect above.
[0127] This application also provides a computer program product containing program instructions that, when run on an electronic device, cause the electronic device to execute the software development kit generation method described in the second aspect above.
[0128] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs, DVDs), or semiconductor media (e.g., solid-state drives, SSDs), etc.
[0129] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0131] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0132] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0133] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A development system, characterized in that, include: The development layer and the base layer, wherein the development layer includes at least two device modules, each device module encapsulates each hardware device into a corresponding module based on the device type, and each device module includes a development interface and at least one interactive function unit; The development layer is used to determine when the development interface in any target device module receives interface development information for any target interactive functional unit, obtain the target service from the base layer according to the interface development information, and generate the target software development kit according to the target service, so as to apply the target software development kit to the target device module. The base layer is used to store the services to be used by each device module in the development layer, and to provide the corresponding target services to the development layer according to the service call instructions sent by the development layer.
2. The development system according to claim 1, characterized in that, The basic layer includes: a general services sublayer and an infrastructure sublayer; The general service sublayer is used to provide the development layer with multiple first services to be used; The infrastructure sublayer is used to provide multiple second services to be used to the development layer.
3. The development system according to claim 1, characterized in that, The development layer also includes: creating components; The creation component is used to create a target interactive function unit when it is determined that there is no target interactive function unit corresponding to the interface development information in the target device module.
4. The development system according to claim 1, characterized in that, The development interface is a visual interface.
5. A method for generating a software development kit based on the development system according to any one of claims 1-4, characterized in that, include: When the development interface in any target device module receives interface development information for any target interactive function unit, the service identifier to be invoked is determined based on the interface development information. The target service is invoked according to the service identifier to be invoked, and a target software development kit is generated so as to apply the target software development kit to the target device module.
6. The software development kit generation method according to claim 5, characterized in that, The step of invoking the target service based on the service identifier to be invoked and generating the target software development kit includes: Based on the service identifier to be invoked, the target service is obtained from the services to be used of each device module stored in the base layer; Based on the target service, generate the target software development kit.
7. The software development kit generation method according to claim 5, characterized in that, Also includes: When it is determined that there is no target interactive function unit corresponding to the interface development information in the target device module, the target interactive function unit is created.
8. A software development kit generation apparatus based on the development system according to any one of claims 1-4, characterized in that, include: The identifier determination module is used to determine the identifier of the service to be called based on the interface development information when the development interface in any target device module receives interface development information for any target interactive functional unit. The toolkit generation module is used to invoke the target service according to the service identifier to be invoked, generate the target software development kit, and apply the target software development kit to the target device module.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the software development kit generation method as described in any one of claims 5 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to execute the software development kit generation method as described in any one of claims 5 to 7.
11. A computer program product containing program instructions, characterized in that, When the program instructions are executed on an electronic device, the electronic device causes the electronic device to perform the software development kit generation method as described in any one of claims 5 to 7.