Software development kit design method and device, equipment and storage medium

By automatically matching and storing the function and protocol interface information of the target device, generating a software development toolkit, and processing function and data conversion requests, the problem of time-consuming design of software development toolkits and low efficiency in obtaining call results in the prior art is solved, and efficient automated design and result acquisition is achieved.

CN120144094APending Publication Date: 2025-06-13SHENZHEN XINGSHAN YUEDONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510101244.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The design of the software development toolkit in the prior art consumes a lot of manpower and time, and obtaining the call results requires manual intervention, which is inefficient.

Method used

By obtaining the preset function type and protocol type of the target device, matching and storing the corresponding interface information, generating a software development toolkit, and automatically processing function requests and data conversion requests to obtain the call result.

Benefits of technology

Automatic design and generation of software development toolkits is realized, reducing design time, improving efficiency, and automatically obtaining call results, reducing the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144094A_ABST
    Figure CN120144094A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software development, and discloses a software development kit design method and device, equipment and a storage medium. The method comprises the steps that a plurality of preset function types, a plurality of preset protocol types, a preset function interface corresponding to each preset function type and a preset protocol interface corresponding to each preset protocol type are stored in a file, and a software development kit is generated; selecting a preset function interface corresponding to the successfully matched preset function type as a target function interface, and selecting a preset protocol interface corresponding to the successfully matched preset protocol type as a target protocol interface; processing the function request through the target function interface to obtain a function execution result, processing the data conversion request through the target protocol interface to obtain a data conversion result, forming a calling result by the function execution result and the data conversion result, and returning the calling result to the application program. The method is beneficial for improving the design efficiency of the software development kit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and particularly to a method, device, equipment and storage medium for designing a software development kit. Background Art

[0002] A software development kit (SDK) is a collection of development tools provided by a software provider or other organization. The software development kit is designed to help users create applications more quickly and conveniently.

[0003] The prior art mainly adopts the way of manual design to design the software development kit, and the way of manual design will consume a large amount of human resources and time resources. Therefore, how to design the software development kit is a technical problem that needs to be solved urgently. In addition, the call results of the existing software development kit need to be obtained manually, which is time-consuming and laborious. Therefore, obtaining the call results of the software development kit is also a technical problem that needs to be solved urgently. Summary of the Invention

[0004] The present invention provides a method, device, computer equipment and storage medium for designing a software development kit to solve the technical problems of how to design the software development kit and how to obtain the call results of the software development kit.

[0005] In a first aspect, a method for designing a software development kit is provided, including: Obtaining a plurality of preset function types and a plurality of preset protocol types of a target device; Obtaining a preset function interface corresponding to each preset function type, and obtaining a preset protocol interface corresponding to each preset protocol type; Storing the plurality of preset function types, the plurality of preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type in a file, and packaging the file to generate a software development kit of the target device; Obtaining development information of an application program of the target device, reading the current function type and the current protocol type in the development information, matching the current function type with the plurality of preset function types, matching the current protocol type with the plurality of preset protocol types, selecting the preset function interface corresponding to the successfully matched preset function type as the target function interface, and selecting the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; When receiving a function request and a data conversion request sent by the application program, submitting the function request to the target function interface and submitting the data conversion request to the target protocol interface; Process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit with the function execution result and the data conversion result, and return the call result to the application program.

[0006] Further, the obtaining of the preset function interface corresponding to each preset function type and the preset protocol interface corresponding to each preset protocol type includes: Obtain a first list, and in the first list, obtain the preset function interface corresponding to each preset function type; Obtain a second list, and in the second list, obtain the preset protocol interface corresponding to each preset protocol type.

[0007] Further, the storing of the multiple preset function types, the multiple preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type in a file and packing the file to generate a software development kit for the target device includes: Store the multiple preset function types, the multiple preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type in a file; Obtain a packing instruction, execute the packing instruction, and pack the file to generate a software development kit for the target device.

[0008] Further, the obtaining of the development information of the application program of the target device, reading the current function type and the current protocol type in the development information, matching the current function type with the multiple preset function types, matching the current protocol type with the multiple preset protocol types, and selecting the preset function interface corresponding to the successfully matched preset function type as the target function interface and selecting the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface includes: Obtain the development information of the application program of the target device, and read the current function type and the current protocol type in the development information; Obtain a first matching instruction, execute the first matching instruction, match the current function type with the multiple preset function types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, obtain a second matching instruction, execute the second matching instruction, match the current protocol type with the multiple preset protocol types, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface.

[0009] Further, when receiving the function request and data conversion request sent by the application program, submitting the function request to the target function interface and submitting the data conversion request to the target protocol interface includes: Establish a first mapping relationship between the application program and the target function interface, establish a second mapping relationship between the application program and the target protocol interface, obtain a save instruction, execute the save instruction, and save the first mapping relationship and the second mapping relationship; When receiving the function request and data conversion request sent by the application program, submit the function request to the target function interface according to the first mapping relationship, and submit the data conversion request to the target protocol interface according to the second mapping relationship.

[0010] Further, processing the function request through the target function interface to obtain a function execution result, processing the data conversion request through the target protocol interface to obtain a data conversion result, forming the call result of the software development kit by combining the function execution result and the data conversion result, and returning the call result to the application program includes: Process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, and form the call result of the software development kit by combining the function execution result and the data conversion result; Obtain the network connection status between the application program and the transmission interface, and when the network connection status is the connected state, return the call result to the application program through the transmission interface.

[0011] Further, the preset function interface is an interface for data acquisition, an interface for data monitoring, a sending interface, an execution interface, and the preset protocol interface is an interface for converting a serial communication protocol to an Ethernet protocol, an interface for converting an Ethernet protocol to a serial communication protocol, an interface for converting an industrial field bus protocol to an Ethernet protocol, and an interface for converting an Ethernet protocol to an industrial field bus protocol.

[0012] In a second aspect, a software development kit design device is provided, including: A first acquisition module, configured to acquire a plurality of preset function types and a plurality of preset protocol types of a target device; A second acquisition module, configured to acquire a preset function interface corresponding to each preset function type, and acquire a preset protocol interface corresponding to each preset protocol type; A generation module, configured to store a plurality of preset function types, a plurality of preset protocol types, a preset function interface corresponding to each preset function type, and a preset protocol interface corresponding to each preset protocol type in a file, package the file, and generate a software development kit for the target device; A third acquisition module, configured to acquire the development information of the application program of the target device, read the current function type and the current protocol type in the development information, match the current function type with multiple preset function types, match the current protocol type with multiple preset protocol types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; A submission module, configured to, when receiving the function request and the data conversion request sent by the application program, submit the function request to the target function interface and submit the data conversion request to the target protocol interface; A return module, configured to process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit by combining the function execution result and the data conversion result, and return the call result to the application program.

[0013] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above software development kit design method are implemented.

[0014] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above software development kit design method are implemented.

[0015] This application provides a software development kit design method, device, computer device, and storage medium. The beneficial effects are in two aspects. On the one hand, multiple preset function types, multiple preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type are stored in a file, and the file is packaged to generate the software development kit of the target device. Since the software development kit is automatically generated, the technical problem of how to design the software development kit is solved, and the design time of the software development kit is reduced, which is beneficial to improving the design efficiency of the software development kit. On the other hand, the function request is processed through the target function interface to obtain a function execution result, the data conversion request is processed through the target protocol interface to obtain a data conversion result, the call result of the software development kit is formed by combining the function execution result and the data conversion result, and the call result is returned to the application program. Since the call result of the software development kit is automatically obtained, the technical problem of how to obtain the call result of the software development kit is solved, and the acquisition time of the call result is reduced, which is beneficial to improving the acquisition efficiency of the call result. Brief Description of the Drawings

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 is a schematic diagram of an application environment of a software development kit design method in an embodiment of the present invention; Figure 2 is a schematic flowchart of a software development kit design method provided by an embodiment of the present invention; Figure 3 is Figure 2 a schematic flowchart of a specific implementation manner of step S23 in Figure 4 is Figure 2 a schematic flowchart of a specific implementation manner of step S25 in Figure 5 is Figure 2 a schematic flowchart of a specific implementation manner of step S26 in Figure 6 is a schematic structural diagram of a software development kit design device in an embodiment of the present invention; Figure 7 is a schematic structural diagram of a computer device in an embodiment of the present invention. Detailed Embodiments

[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0019] Please refer to Figure 1 , Figure 1 which is a schematic diagram of an application environment of a software development kit design method in an embodiment of the present invention. The software development kit design method provided by the embodiment of the present invention can be applied in an application environment such as Figure 1 , where the client communicates with the server through a network.

[0020] The server obtains multiple preset function types and multiple preset protocol types of the target device through the client; Obtain the preset function interfaces corresponding to each preset function type, and obtain the preset protocol interfaces corresponding to each preset protocol type; Store multiple preset function types, multiple preset protocol types, the preset function interfaces corresponding to each preset function type, and the preset protocol interfaces corresponding to each preset protocol type in a file, and package the file to generate a software development kit for the target device; Obtain the development information of the application program of the target device, read the current function type and the current protocol type in the development information, match the current function type with multiple preset function types, match the current protocol type with multiple preset protocol types, and select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; When receiving the function request and the data conversion request sent by the application program, submit the function request to the target function interface and submit the data conversion request to the target protocol interface; Process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit with the function execution result and the data conversion result, and return the call result to the application program.

[0021] In the solution implemented by the above software development kit design method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, store multiple preset function types, multiple preset protocol types, the preset function interfaces corresponding to each preset function type, and the preset protocol interfaces corresponding to each preset protocol type in a file, and package the file to generate a software development kit for the target device. Since the software development kit is automatically generated, the technical problem of how to design the software development kit is solved, and the design time of the software development kit is reduced, which is beneficial to improving the design efficiency of the software development kit. On the other hand, process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit with the function execution result and the data conversion result, and return the call result to the application program. Since the call result of the software development kit is automatically obtained, the technical problem of how to obtain the call result of the software development kit is solved, and the acquisition time of the call result is reduced, which is beneficial to improving the acquisition efficiency of the call result.

[0022] Among them, the device running the client is simply referred to as: client device.

[0023] Among them, the device running the server is simply referred to as: server device.

[0024] Among them, the client device includes but is not limited to smart phones, personal computers, vehicle networking terminals, tablet computers, and portable wearable devices.

[0025] Among them, the server device can be implemented by an independent server or a server cluster composed of multiple servers. The present invention will be described in detail below through specific embodiments. Please refer to Figure 2 , Figure 2 FIG. S21, obtaining a plurality of preset function types and a plurality of preset protocol types of a target device; Exemplarily, obtaining a plurality of preset function types and a plurality of preset protocol types of a target device includes: Selecting a host computer or a slave computer as the target device, and obtaining a plurality of preset function types and a plurality of preset protocol types of the target device.

[0026] Among them, the host computer usually has powerful data processing capabilities and a user interface, and is responsible for receiving data from the slave computer, processing, analyzing, and storing these data, and making control decisions based on the processing results.

[0027] Among them, the main task of the slave computer is to receive control instructions from the host computer and control the operation of physical devices according to these instructions. At the same time, the slave computer is also responsible for reading the status data of physical devices and feeding back these data to the host computer for further processing and analysis. S22, obtaining a preset function interface corresponding to each preset function type, and obtaining a preset protocol interface corresponding to each preset protocol type; Among them, the preset function interface is a preset function interface.

[0028] Among them, the preset protocol interface is a preset protocol interface.

[0029] Among them, the obtaining a preset function interface corresponding to each preset function type and obtaining a preset protocol interface corresponding to each preset protocol type includes: Obtaining a first list, and in the first list, obtaining a preset function interface corresponding to each preset function type; Obtaining a second list, and in the second list, obtaining a preset protocol interface corresponding to each preset protocol type.

[0030] Exemplarily, obtaining a first list, and in the first list, obtaining a preset function interface corresponding to each preset function type includes: Obtain a first list. In the first list, according to the pre-established correspondence between preset function types and preset function interfaces, obtain the preset function interface corresponding to each preset function type.

[0031] Exemplarily, obtain a second list. In the second list, obtain the preset protocol interface corresponding to each preset protocol type, including: Obtain a second list. In the second list, according to the pre-established correspondence between preset protocol types and preset protocol interfaces, obtain the preset function interface corresponding to each preset function type.

[0032] Among them, the first list and the second list are different lists. The first list includes multiple preset function interfaces. The second list includes multiple preset protocol interfaces.

[0033] Among them, one preset function type corresponds to one preset function interface, and different preset function types correspond to different preset function interfaces.

[0034] Among them, one preset protocol type corresponds to one preset protocol interface, and different preset protocol types correspond to different preset protocol interfaces.

[0035] S23. Store multiple preset function types, multiple preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type in a file, and package the file to generate a software development kit for the target device; Among them, the software development kit can be compatible with different protocols of the target device, becomes more concise during use, greatly improves the flexibility of the protocol, can effectively meet various needs of users, and at the same time shortens the development cycle of the application program of the target device and reduces the development difficulty and maintenance cost of the application program.

[0036] S24. Obtain the development information of the application program of the target device, read the current function type and the current protocol type in the development information, match the current function type with multiple preset function types, match the current protocol type with multiple preset protocol types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; Among them, the obtaining the development information of the application program of the target device, reading the current function type and the current protocol type in the development information, matching the current function type with multiple preset function types, matching the current protocol type with multiple preset protocol types, selecting the preset function interface corresponding to the successfully matched preset function type as the target function interface, and selecting the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface includes: Obtain the development information of the application program of the target device, and read the current function type and the current protocol type in the development information; Obtain the first matching instruction, execute the first matching instruction, match the current function type with multiple preset function types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, obtain the second matching instruction, execute the second matching instruction, match the current protocol type with multiple preset protocol types, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface.

[0037] Among them, the first matching instruction and the second matching instruction are different matching instructions.

[0038] Among them, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface. In this way, the application program can directly utilize the existing target function interface and target protocol interface without having to re-develop the target function interface and target protocol interface of the application program, reducing the development time of the application program and being conducive to improving the development efficiency of the application program.

[0039] S25, when receiving the function request and the data conversion request sent by the application program, submit the function request to the target function interface and submit the data conversion request to the target protocol interface; Among them, since the target function interface and the target protocol interface are verified interfaces, when receiving the function request and the data conversion request sent by the application program, the function request can be submitted to the target function interface and the data conversion request can be submitted to the target protocol interface without having to perform a major reconstruction of the entire system, which can reduce the overall maintenance cost of the project.

[0040] S26, process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit with the function execution result and the data conversion result, and return the call result to the application program.

[0041] Among them, the function execution result is the result obtained by the target function interface executing the function request.

[0042] Among them, the data conversion result is the result obtained by the target protocol interface processing the data conversion request.

[0043] Among them, the preset function interfaces are interfaces for data acquisition, data monitoring, sending, and execution, and the preset protocol interfaces are interfaces for converting the serial communication protocol to the Ethernet protocol, converting the Ethernet protocol to the serial communication protocol, converting the industrial fieldbus protocol to the Ethernet protocol, and converting the Ethernet protocol to the industrial fieldbus protocol.

[0044] The lower computer calls the interface of the data acquisition function. Through the interface of the data acquisition function, it collects temperature data and pressure data from the sensors and transmits them to the upper computer.

[0045] The upper computer calls the interface of the data monitoring. Through the interface of the data monitoring, it receives the temperature data and pressure data and displays the temperature data and pressure data in real time through the user interface.

[0046] The upper computer calls the sending interface. Through the sending interface, it sends control commands to the lower computer; The lower computer calls the execution interface. Through the execution interface, it executes the control commands sent by the upper computer.

[0047] For the convenience of explanation, the following is an example: For example, when the control command is a lighting control command, the upper computer sends a lighting control command to the lower computer.

[0048] The lower computer calls the execution interface. Through the execution interface, it executes the lighting control command sent by the upper computer. The lighting control command has time parameters. Among them, the time parameters are 0, 1, and 3.

[0049] Among them, 0 means never sleep, 1 means sleep after 1 minute, and 3 means sleep after 3 minutes. When the user uses the lower computer in a low-light environment, through the lighting control command, it can provide a personalized experience for the user.

[0050] Among them, the serial communication protocol, the industrial fieldbus protocol, and the Ethernet protocol are different network communication protocols.

[0051] For the convenience of explanation, the following is an example: For example, when the lower computer is the target device, the target device uses the serial communication protocol, and the upper computer uses the Ethernet protocol. The target device can complete communication with the upper computer by calling the interface for converting the serial communication protocol to the Ethernet protocol.

[0052] For example, when the lower computer is the target device, the target device uses the industrial fieldbus protocol, and the upper computer uses the Ethernet protocol. The target device can complete communication with the upper computer by calling the interface for converting the industrial fieldbus protocol to the Ethernet protocol.

[0053] For example, the host computer is the target device. The target device uses the Ethernet protocol, and the slave computer uses the industrial serial communication protocol. The target device can complete communication with the slave computer through an interface that converts the Ethernet protocol into the industrial serial communication protocol.

[0054] For example, the host computer is the target device. The target device uses the Ethernet protocol, and the slave computer uses the industrial fieldbus protocol. The target device can complete communication with the slave computer through an interface that converts the Ethernet protocol into the industrial fieldbus protocol.

[0055] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, multiple preset function types, multiple preset protocol types, the preset function interfaces corresponding to each preset function type, and the preset protocol interfaces corresponding to each preset protocol type are stored in a file, and the file is packaged to generate a software development kit for the target device. Since the software development kit is automatically generated, the technical problem of how to design the software development kit is solved, and the design time of the software development kit is reduced, which is beneficial to improving the design efficiency of the software development kit. On the other hand, the function request is processed through the target function interface to obtain a function execution result, and the data conversion request is processed through the target protocol interface to obtain a data conversion result. The function execution result and the data conversion result are combined into a call result of the software development kit, and the call result is returned to the application program. Since the call result of the software development kit is automatically obtained, the technical problem of how to obtain the call result of the software development kit is solved, and the acquisition time of the call result is reduced, which is beneficial to improving the acquisition efficiency of the call result.

[0056] Please refer to Figure 3 , Figure 3 is Figure 2 a schematic flowchart of a specific implementation manner of step S23 in S31, store multiple preset function types, multiple preset protocol types, the preset function interfaces corresponding to each preset function type, and the preset protocol interfaces corresponding to each preset protocol type in a file; S32, obtain a packaging instruction, execute the packaging instruction, and package the file to generate a software development kit for the target device.

[0057] In the embodiment of the present invention, obtain a packaging instruction, execute the packaging instruction, and package the file to generate a software development kit for the target device. Since the software development kit is automatically generated, the technical problem of how to design the software development kit is solved, and the design time of the software development kit is reduced, which is beneficial to improving the design efficiency of the software development kit.

[0058] Please refer to Figure 4 ,Figure 4 Yes Figure 2 It is a schematic flowchart of a specific implementation manner of step S25 in S41. Establish a first mapping relationship between the application program and the target function interface, establish a second mapping relationship between the application program and the target protocol interface, obtain a save instruction, execute the save instruction, and save the first mapping relationship and the second mapping relationship; S42. When receiving a function request and a data conversion request sent by the application program, submit the function request to the target function interface according to the first mapping relationship, and submit the data conversion request to the target protocol interface according to the second mapping relationship.

[0059] In the embodiment of the present invention, by establishing a first mapping relationship between the application program and the target function interface and a second mapping relationship between the application program and the target protocol interface, the first mapping relationship ensures that the application program can call the corresponding target function interface, and the second mapping relationship ensures that the application program can call the corresponding target protocol interface. In this way, there is no need to re-develop the target function interface and target protocol interface of the application program, reducing the development time of the application program and being beneficial to improving the development efficiency of the application program.

[0060] Please refer to Figure 5 , Figure 5 Yes Figure 2 It is a schematic flowchart of a specific implementation manner of step S26 in S51. Process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, and form the call result of the software development kit with the function execution result and the data conversion result; Exemplarily, processing the function request through the target function interface to obtain a function execution result, processing the data conversion request through the target protocol interface to obtain a data conversion result, and forming the call result of the software development kit with the function execution result and the data conversion result includes: Obtain the current state of the target function interface and obtain the current state of the target protocol interface; When the current state of the target function interface is the active state, process the function request through the target function interface to obtain a function execution result. When the current state of the target protocol interface is the active state, process the data conversion request through the target protocol interface to obtain a data conversion result, and form the call result of the software development kit with the function execution result and the data conversion result.

[0061] Among them, when the current state of the target function interface is the active state, it means that the target function interface can immediately process function requests, and the target function interface does not require additional initialization or waiting time. This reduces the processing time of function requests and is beneficial to improving the processing efficiency of function requests.

[0062] Among them, when the current state of the target protocol interface is the active state, it means that the target protocol interface can immediately process data conversion requests, and the target protocol interface does not require additional initialization or waiting time. This reduces the processing time of data conversion requests and is beneficial to improving the processing efficiency of data conversion requests.

[0063] S52. Obtain the network connection status between the application and the transmission interface. When the network connection status is the connected state, return the call result to the application through the transmission interface.

[0064] In the embodiment of the present invention, the function execution result and the data conversion result are combined into the call result of the software development kit. Since the call result of the software development kit is automatically obtained, the technical problem of how to obtain the call result of the software development kit is solved, and the acquisition time of the call result is reduced, which is beneficial to improving the acquisition efficiency of the call result.

[0065] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a software development kit design device in an embodiment of the present invention. As Figure 6 shown, the software development kit design device includes a first acquisition module 101, a second acquisition module 102, a generation module 103, a third acquisition module 104, a submission module 105, and a return module 106. The detailed descriptions of each functional module are as follows: The first acquisition module 101 is used to acquire a plurality of preset function types and a plurality of preset protocol types of the target device; The second acquisition module 102 is used to acquire the preset function interfaces corresponding to each preset function type and the preset protocol interfaces corresponding to each preset protocol type; The generation module 103 is used to store a plurality of preset function types, a plurality of preset protocol types, the preset function interfaces corresponding to each preset function type, and the preset protocol interfaces corresponding to each preset protocol type in a file, and package the file to generate a software development kit for the target device; A third acquisition module 104 is configured to acquire the development information of the application program of the target device, read the current function type and the current protocol type in the development information, match the current function type with multiple preset function types, match the current protocol type with multiple preset protocol types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; A submission module 105 is configured to, when receiving the function request and the data conversion request sent by the application program, submit the function request to the target function interface and submit the data conversion request to the target protocol interface; A return module 106 is configured to process the function request through the target function interface to obtain a function execution result, process the data conversion request through the target protocol interface to obtain a data conversion result, form the call result of the software development kit by combining the function execution result and the data conversion result, and return the call result to the application program.

[0066] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, multiple preset function types, multiple preset protocol types, the preset function interface corresponding to each preset function type, and the preset protocol interface corresponding to each preset protocol type are stored in a file, and the file is packaged to generate a software development kit for the target device. Since the software development kit is automatically generated, the technical problem of how to design the software development kit is solved, and the design time of the software development kit is reduced, which is beneficial to improving the design efficiency of the software development kit. On the other hand, the function request is processed through the target function interface to obtain a function execution result, the data conversion request is processed through the target protocol interface to obtain a data conversion result, the function execution result and the data conversion result are combined to form the call result of the software development kit, and the call result is returned to the application program. Since the call result of the software development kit is automatically obtained, the technical problem of how to obtain the call result of the software development kit is solved, and the acquisition time of the call result is reduced, which is beneficial to improving the acquisition efficiency of the call result.

[0067] For the specific limitations of the software development kit design device, reference can be made to the limitations on the software development kit design method in the above text, which will not be elaborated here.

[0068] Each module in the above software development kit design device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to the above respective modules.

[0069] Please refer to Figure 7 , Figure 7 which is another structural schematic diagram of a computer device in an embodiment of the present invention. In one embodiment, a computer device is provided. The computer device is a server device or a client device, and its internal structure diagram can be as shown in Figure 7 . The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with external devices. When the computer program is executed by the processor, it can implement the functions or steps of a software development kit design method.

[0070] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor.

[0071] It should be noted that for the functions or steps that the above computer-readable storage medium or computer device can achieve, reference can be made to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0072] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU for short), a graphics processing unit (GPU for short), and a network processor (NP for short); it can also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0073] The above description and the drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. Here, each embodiment may focus on the differences from other embodiments, and the same or similar parts among the embodiments can be referred to each other. For the methods and products disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts can be referred to the description of the method part.

[0074] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner can depend on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

Claims

1. A software development kit design method, characterized in that: include: Obtain multiple preset function types and multiple preset protocol types of the target device; Get the preset function interface corresponding to each preset function type, and get the preset protocol interface corresponding to each preset protocol type; storing a plurality of preset function types and a plurality of preset protocol types, a preset function interface corresponding to each preset function type, and a preset protocol interface corresponding to each preset protocol type in one file, and packaging the file to generate a software development kit for a target device; Acquire development information of the application of the target device, read the current function type and the current protocol type in the development information, match the current function type with multiple preset function types, match the current protocol type with multiple preset protocol types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface; When receiving the function request and data conversion request sent by the application, submitting the function request to the target function interface and submitting the data conversion request to the target protocol interface; The function request is processed through the target function interface to obtain a function execution result, the data conversion request is processed through the target protocol interface to obtain a data conversion result, the function execution result and the data conversion result are combined into a calling result of the software development kit, and the calling result is returned to the application.

2. The software development kit design method according to claim 1, characterized in that: The step of obtaining a preset function interface corresponding to each preset function type and obtaining a preset protocol interface corresponding to each preset protocol type includes: Get a first list, and in the first list, get a preset function interface corresponding to each preset function type; A second list is obtained, and in the second list, a preset protocol interface corresponding to each preset protocol type is obtained.

3. The software development kit design method according to claim 1, characterized in that: The method comprises storing a plurality of preset function types and a plurality of preset protocol types, a preset function interface corresponding to each preset function type, and a preset protocol interface corresponding to each preset protocol type in one file, packaging the file, and generating a software development kit for a target device, including: storing a plurality of preset function types and a plurality of preset protocol types, a preset function interface corresponding to each preset function type, and a preset protocol interface corresponding to each preset protocol type in one file; Obtain a packaging instruction, execute the packaging instruction, package the files, and generate a software development kit for the target device.

4. The software development kit design method according to claim 1, characterized in that: The step of obtaining development information of an application of a target device, reading a current function type and a current protocol type in the development information, matching the current function type with a plurality of preset function types, matching the current protocol type with a plurality of preset protocol types, selecting a preset function interface corresponding to a successfully matched preset function type as a target function interface, and selecting a preset protocol interface corresponding to a successfully matched preset protocol type as a target protocol interface includes: Obtain the development information of the application of the target device, and read the current function type and current protocol type in the development information; Obtain a first matching instruction, execute the first matching instruction, match the current function type with multiple preset function types, select the preset function interface corresponding to the successfully matched preset function type as the target function interface, obtain a second matching instruction, execute the second matching instruction, match the current protocol type with multiple preset protocol types, and select the preset protocol interface corresponding to the successfully matched preset protocol type as the target protocol interface.

5. The software development kit design method according to claim 1, characterized in that: When receiving the function request and the data conversion request sent by the application, submitting the function request to the target function interface and submitting the data conversion request to the target protocol interface includes: Establishing a first mapping relationship between an application and a target functional interface, establishing a second mapping relationship between the application and a target protocol interface, obtaining a save instruction, executing the save instruction, and saving the first mapping relationship and the second mapping relationship; When receiving the function request and data conversion request sent by the application, the function request is submitted to the target function interface according to the first mapping relationship, and the data conversion request is submitted to the target protocol interface according to the second mapping relationship.

6. The software development kit design method according to claim 1, characterized in that: The step of processing the function request through the target function interface to obtain a function execution result, processing the data conversion request through the target protocol interface to obtain a data conversion result, combining the function execution result and the data conversion result into a call result of the software development kit, and returning the call result to the application program includes: Processing the function request through the target function interface to obtain a function execution result, processing the data conversion request through the target protocol interface to obtain a data conversion result, and combining the function execution result and the data conversion result to form a calling result of the software development kit; The network connection status between the application and the transmission interface is obtained, and when the network connection status is a connected state, the call result is returned to the application through the transmission interface.

7. The software development kit design method according to claim 1, characterized in that: The preset functional interfaces are a data acquisition interface, a data monitoring interface, a sending interface, and an execution interface; the preset protocol interfaces are an interface for converting a serial communication protocol into an Ethernet protocol, an interface for converting an Ethernet protocol into a serial communication protocol, an interface for converting an industrial field bus protocol into an Ethernet protocol, and an interface for converting an Ethernet protocol into an industrial field bus protocol.

8. A software development kit design device, characterized in that: include: A first acquisition module, used to acquire multiple preset function types and multiple preset protocol types of a target device; A second acquisition module is used to acquire a preset function interface corresponding to each preset function type, and acquire a preset protocol interface corresponding to each preset protocol type; A generation module, used for storing a plurality of preset function types and a plurality of preset protocol types, a preset function interface corresponding to each preset function type, and a preset protocol interface corresponding to each preset protocol type in one file, packaging the files, and generating a software development kit for a target device; A third acquisition module is used to acquire development information of an application of a target device, read a current function type and a current protocol type in the development information, match the current function type with a plurality of preset function types, match the current protocol type with a plurality of preset protocol types, select a preset function interface corresponding to a successfully matched preset function type as a target function interface, and select a preset protocol interface corresponding to a successfully matched preset protocol type as a target protocol interface; A submission module, configured to submit the function request to a target function interface and submit the data conversion request to a target protocol interface when receiving the function request and the data conversion request sent by the application; A return module is used to process the function request through the target function interface to obtain the function execution result, process the data conversion request through the target protocol interface to obtain the data conversion result, combine the function execution result and the data conversion result into a calling result of the software development kit, and return the calling result to the application.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the software development kit design method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the software development kit design method according to any one of claims 1 to 7 are implemented.