CN111611025A - Equipment access method and device - Google Patents
Equipment access method and device Download PDFInfo
- Publication number
- CN111611025A CN111611025A CN202010432723.4A CN202010432723A CN111611025A CN 111611025 A CN111611025 A CN 111611025A CN 202010432723 A CN202010432723 A CN 202010432723A CN 111611025 A CN111611025 A CN 111611025A
- Authority
- CN
- China
- Prior art keywords
- sdk
- access
- api function
- input parameter
- parameter type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000006870 function Effects 0.000 claims description 27
- 238000005516 engineering process Methods 0.000 abstract description 2
- 239000000463 material Substances 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present disclosure relates to the field of device connection technologies, and in particular, to a device access method and apparatus. The method comprises the following steps: the access of the target equipment is completed by acquiring the SDK of the target equipment and analyzing the object access mode of the SDK, so that the access efficiency of the equipment can be improved.
Description
Technical Field
The present disclosure relates to the field of device connection technologies, and in particular, to a device access method and apparatus.
Background
At present, in common security and protection integrated management platform software, security and protection devices of different manufacturers are required to be connected into a platform for unified management. When security devices of different manufacturers are accessed to the security integrated management platform, the source program code of the security integrated management platform access service Software is modified according to a device SDK (Software Development Kit) provided by the manufacturer, so as to adapt to the access of a new device. The source program codes of the security integrated management platform access service software need to be modified for each newly accessed device, so that the problems of time waste and low efficiency exist.
Disclosure of Invention
In order to improve the access efficiency of the device, the disclosure provides a device access method and device.
In one aspect, an embodiment of the present disclosure provides a device access method, where the method includes:
obtaining the SDK of the target equipment;
and analyzing the object access mode of the SDK to complete the access of the target equipment.
Optionally, the access object of the SDK includes an access rule, data exchange logic, and state management of the SDK.
Optionally, the analyzing the object access manner of the SDK includes:
acquiring the API function name, the input parameter type and quantity and the output parameter type and quantity of the SDK;
analyzing the input parameter type, and matching the analyzed input parameter type;
calling the SDK to search an entry address of the API function according to the name of the API function, the number of the input parameters and the number of the output parameters;
calling a dynamic library of the SDK according to the entry address of the API function and the input parameter;
and matching and logically processing the output parameters.
In another aspect, an embodiment of the present disclosure provides an apparatus for accessing a device, where the apparatus includes:
an acquisition module configured to acquire an SDK of a target device;
and the equipment access module is configured to analyze the object access mode of the SDK and complete the access of the target equipment.
Optionally, the access object of the SDK includes an access rule, data exchange logic, and state management of the SDK.
Optionally, the device access module includes:
a first obtaining submodule configured to obtain an API function name, an input parameter type and number, and an output parameter type and number of the SDK;
the analysis submodule is configured to analyze the input parameter types and match the analyzed input parameter types;
a first calling submodule configured to call the SDK to find an entry address of the API function according to the API function name, the number of the input parameters, and the number of the output parameters;
a second calling submodule configured to call a dynamic library of the SDK according to an entry address of the API function and the input parameter;
a processing sub-module configured to match and logically process the output parameters.
In another aspect, an embodiment of the present disclosure provides an apparatus for accessing a device, where the apparatus includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to cause the device access apparatus to perform the device access method described above when executing the executable instructions.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the access of the target equipment is completed by acquiring the SDK of the target equipment and analyzing the object access mode of the SDK, so that the access efficiency of the equipment can be improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a device access method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a device access apparatus provided in an embodiment of the present disclosure.
Detailed Description
The present disclosure will be described in further detail with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not to be construed as limitations of the present disclosure. It should be further noted that, for the convenience of description, only the portions relevant to the present disclosure are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In the prior art, when a new device is added to a security integrated management platform, a source program code of access service software of the security integrated management platform is required to be modified so as to call a corresponding code of an SDK of the new device. The source program codes of the security integrated management platform access service software need to be modified for each newly accessed device, so that the problems of time waste and low efficiency exist. Therefore, a method or apparatus for improving the access efficiency of the device is needed.
The embodiment of the disclosure provides a device access method, which can be applied to a central control platform such as a security and protection integrated management platform which needs to access a plurality of devices. As shown in fig. 1, the method includes:
step S101, obtaining the SDK of the target device.
The target device refers to a new device to be accessed into the central control platform. The target device provider will often attach the SDK of the target device when providing the target device, so the target device SDK can be directly invoked when accessing the target device to the central control platform.
And step S102, analyzing the object access mode of the target device SDK to complete the access of the target device.
And after the SDK of the target equipment is obtained, the access of the target equipment is completed by analyzing the object access mode of the SDK of the target equipment. The access object of the target device SDK comprises the access rule, the data exchange logic and the state management of the SDK.
In a possible implementation manner, resolving an object access manner of the target device SDK includes:
analyzing the API function name, the input parameter type and quantity and the output parameter type and quantity of the SDK;
analyzing the input parameter type of the SDK, and matching the analyzed input parameter type;
calling the SDK to search the API function symbol to acquire the entry address of the API function according to the API function name, the number of input parameters and the number of output parameters of the SDK;
calling an SDK dynamic library according to the entry address and the input parameters of the API function;
and matching and logically processing the output parameters.
In this embodiment, the access of the target device is completed by acquiring the SDK of the target device and analyzing the object access mode of the SDK, so that the access efficiency of the device can be improved.
An embodiment of the present disclosure further provides an apparatus for accessing a device, as shown in fig. 2, the apparatus includes:
an obtaining module 201 configured to obtain an SDK of a target device;
a device access module 202, configured to analyze an object access manner of the SDK, and complete access of the target device.
Optionally, the access object of the SDK includes an access rule, data exchange logic, and state management of the SDK.
Optionally, the device access module includes:
a first obtaining submodule configured to obtain an API function name, an input parameter type and number, and an output parameter type and number of the SDK;
the analysis submodule is configured to analyze the input parameter types and match the analyzed input parameter types;
a first calling submodule configured to call the SDK to find an entry address of the API function according to the API function name, the number of the input parameters, and the number of the output parameters;
a second calling submodule configured to call a dynamic library of the SDK according to an entry address of the API function and the input parameter;
a processing sub-module configured to match and logically process the output parameters.
In this embodiment, the access of the target device is completed by acquiring the SDK of the target device and analyzing the object access mode of the SDK, so that the access efficiency of the device can be improved.
It should be noted that, when the device access apparatus provided in the foregoing embodiment is used to access a device, the division of the functional modules is merely used as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure or program of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the device access apparatus and the device access method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The embodiment of the present disclosure further provides an apparatus for accessing a device, where the apparatus includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to cause the device access apparatus to perform the device access method when executing the executable instructions.
In the description herein, reference to the description of the terms "one embodiment/mode," "some embodiments/modes," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment/mode or example is included in at least one embodiment/mode or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to be the same embodiment/mode or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments/modes or examples. Furthermore, the various embodiments/aspects or examples and features of the various embodiments/aspects or examples described in this specification can be combined and combined by one skilled in the art without conflicting therewith.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
It will be understood by those skilled in the art that the foregoing embodiments are merely for clarity of illustration of the disclosure and are not intended to limit the scope of the disclosure. Other variations or modifications may occur to those skilled in the art, based on the foregoing disclosure, and are still within the scope of the present disclosure.
Claims (7)
1. A device access method, the method comprising:
obtaining the SDK of the target equipment;
and analyzing the object access mode of the SDK to complete the access of the target equipment.
2. The method of claim 1, wherein the access object of the SDK comprises access rules, data exchange logic, and state management of the SDK.
3. The method of claim 2, wherein resolving the object access pattern of the SDK comprises:
acquiring the API function name, the input parameter type and quantity and the output parameter type and quantity of the SDK;
analyzing the input parameter type, and matching the analyzed input parameter type;
calling the SDK to search an entry address of the API function according to the name of the API function, the number of the input parameters and the number of the output parameters;
calling a dynamic library of the SDK according to the entry address of the API function and the input parameter;
and matching and logically processing the output parameters.
4. An apparatus for device access, the apparatus comprising:
an acquisition module configured to acquire an SDK of a target device;
and the equipment access module is configured to analyze the object access mode of the SDK and complete the access of the target equipment.
5. The apparatus of claim 4, wherein the access object of the SDK comprises access rules, data exchange logic, and state management of the SDK.
6. The apparatus of claim 5, wherein the device access module comprises:
a first obtaining submodule configured to obtain an API function name, an input parameter type and number, and an output parameter type and number of the SDK;
the analysis submodule is configured to analyze the input parameter types and match the analyzed input parameter types;
a first calling submodule configured to call the SDK to find an entry address of the API function according to the API function name, the number of the input parameters, and the number of the output parameters;
a second calling submodule configured to call a dynamic library of the SDK according to an entry address of the API function and the input parameter;
a processing sub-module configured to match and logically process the output parameters.
7. An apparatus for device access, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to, upon execution of the executable instructions, cause the device access apparatus to perform the device access method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010432723.4A CN111611025A (en) | 2020-05-20 | 2020-05-20 | Equipment access method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010432723.4A CN111611025A (en) | 2020-05-20 | 2020-05-20 | Equipment access method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111611025A true CN111611025A (en) | 2020-09-01 |
Family
ID=72200802
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010432723.4A Pending CN111611025A (en) | 2020-05-20 | 2020-05-20 | Equipment access method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111611025A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035163A (en) * | 2020-09-03 | 2020-12-04 | 北京字节跳动网络技术有限公司 | Software development kit configuration method, device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101272481A (en) * | 2008-04-02 | 2008-09-24 | 武汉大学 | Video monitoring front end equipment access method |
CN103713896A (en) * | 2013-12-17 | 2014-04-09 | 北京京东尚科信息技术有限公司 | Software development kit generation method and device used for accessing server |
US20140372963A1 (en) * | 2013-06-18 | 2014-12-18 | Ciambella Ltd. | Method and apparatus for customized software development kit (sdk) generation |
CN105491337A (en) * | 2015-12-10 | 2016-04-13 | 公安部交通管理科学研究所 | Universal network video monitoring equipment access method and apparatus based on SDK abstract layer |
CN109769010A (en) * | 2018-12-04 | 2019-05-17 | 平安科技(深圳)有限公司 | Method, apparatus, equipment and storage medium based on SDK access CloudStack server |
CN110022307A (en) * | 2019-03-08 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of control method of monitoring device and monitoring access server |
-
2020
- 2020-05-20 CN CN202010432723.4A patent/CN111611025A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101272481A (en) * | 2008-04-02 | 2008-09-24 | 武汉大学 | Video monitoring front end equipment access method |
US20140372963A1 (en) * | 2013-06-18 | 2014-12-18 | Ciambella Ltd. | Method and apparatus for customized software development kit (sdk) generation |
CN103713896A (en) * | 2013-12-17 | 2014-04-09 | 北京京东尚科信息技术有限公司 | Software development kit generation method and device used for accessing server |
CN105491337A (en) * | 2015-12-10 | 2016-04-13 | 公安部交通管理科学研究所 | Universal network video monitoring equipment access method and apparatus based on SDK abstract layer |
CN109769010A (en) * | 2018-12-04 | 2019-05-17 | 平安科技(深圳)有限公司 | Method, apparatus, equipment and storage medium based on SDK access CloudStack server |
CN110022307A (en) * | 2019-03-08 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of control method of monitoring device and monitoring access server |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035163A (en) * | 2020-09-03 | 2020-12-04 | 北京字节跳动网络技术有限公司 | Software development kit configuration method, device and storage medium |
CN112035163B (en) * | 2020-09-03 | 2023-08-22 | 抖音视界有限公司 | Software development kit configuration method, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101924656B (en) | Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration | |
US20090138847A1 (en) | Optimized code generation by eliminating unused virtual function | |
CN111399840B (en) | Module development method and device | |
CN110308999B (en) | Method for dynamically sharing dependency package between applications, storage medium and mobile terminal | |
CN111324396A (en) | Block chain intelligent contract execution method, device and equipment | |
CN111767056A (en) | Source code compiling method, executable file running method and terminal equipment | |
CN116680015B (en) | Function calling method, function calling device, electronic equipment and readable storage medium | |
CN110543427A (en) | Test case storage method and device, electronic equipment and storage medium | |
CN111611025A (en) | Equipment access method and device | |
CN111026670A (en) | Test case generation method, test case generation device, and storage medium | |
CN114840427A (en) | Code testing and test case generating method and device | |
CN111488286A (en) | Method and device for independently developing Android module | |
CN109299960B (en) | Method and device for monitoring advertisement, computer readable storage medium and terminal equipment | |
CN106951236B (en) | Plug-in development method and device | |
CN114791884A (en) | Test environment construction method and device, storage medium and electronic equipment | |
CN113778451B (en) | File loading method, file loading device, computer system and computer readable storage medium | |
CN113656009A (en) | Macro processing method and device, electronic equipment and storage medium | |
CN110688430B (en) | Method and device for obtaining data bypass and electronic equipment | |
CN110309000B (en) | Application update prompting method and terminal equipment | |
CN110990137B (en) | Application program function module scheduling method, scheduling information processing method and device | |
CN110333870B (en) | Simulink model variable distribution processing method, device and equipment | |
CN112965697A (en) | Code file generation method and device and electronic equipment | |
CN114090625A (en) | Data processing method, device, equipment and computer readable storage medium | |
CN110780864A (en) | Control method and device for class method replacement, storage medium and electronic equipment | |
CN113190456B (en) | Test method, test device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200901 |