CN112230945B - Method and device for improving equipment compatibility, electronic equipment and storage medium - Google Patents

Method and device for improving equipment compatibility, electronic equipment and storage medium Download PDF

Info

Publication number
CN112230945B
CN112230945B CN202011281713.1A CN202011281713A CN112230945B CN 112230945 B CN112230945 B CN 112230945B CN 202011281713 A CN202011281713 A CN 202011281713A CN 112230945 B CN112230945 B CN 112230945B
Authority
CN
China
Prior art keywords
function
function list
supported
software development
equipment
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.)
Active
Application number
CN202011281713.1A
Other languages
Chinese (zh)
Other versions
CN112230945A (en
Inventor
廖超民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yealink Network Technology Co Ltd filed Critical Xiamen Yealink Network Technology Co Ltd
Priority to CN202011281713.1A priority Critical patent/CN112230945B/en
Publication of CN112230945A publication Critical patent/CN112230945A/en
Application granted granted Critical
Publication of CN112230945B publication Critical patent/CN112230945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application provides a method and a device for improving equipment compatibility, electronic equipment and a storage medium, and relates to the technical field of data communication. The method comprises the following steps: if the software development kit monitors the insertion signal, inquiring a to-be-used function list of the inserted equipment through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list; interacting with the inserted device according to the target function. According to the scheme, the target functions supported by the insertion equipment in the software development kit are obtained through the to-be-used function list of the insertion equipment and the supported function list of the software development kit, interaction with the insertion equipment is carried out by utilizing the target functions, the condition that the equipment cannot be identified by the software development kit after the USB equipment type is upgraded when the equipment is divided according to the equipment type is avoided, the compatibility of the software development kit for the USB equipment is improved, and the code reuse rate is improved.

Description

Method and device for improving equipment compatibility, electronic equipment and storage medium
Technical Field
The present application relates to the field of data communication technologies, and in particular, to a method and an apparatus for improving device compatibility, an electronic device, and a storage medium.
Background
Software Development Kit (SDK) is generally a collection of Development tools used by Software engineers to create application Software for a particular Software package, Software framework, hardware platform, operating system, etc. Universal Serial Bus (USB) is an emerging data communication approach that is gradually replacing other interface standards. The USB SDK is an SDK that provides an operation for USB devices, and provides an Application Programming Interface (API) for operating USB devices, including functions of controlling USB devices and obtaining information from a device side.
The existing USB SDK generally uses a device class to package a function service common to all devices, such as obtaining a device name, upgrading the device, and the like. Each type of USB equipment has a corresponding class, when the insertion of the equipment of the corresponding class is monitored, a corresponding object is created according to the type of the inserted equipment, and the equipment is controlled by the object subsequently.
The existing control mode has poor compatibility with new USB equipment and low code reuse rate.
Disclosure of Invention
In order to solve the problems in the prior art, the application provides a method and a device for improving the compatibility of equipment, electronic equipment and a storage medium.
In order to achieve the purpose, the technical scheme adopted by the application is as follows:
a first aspect of the present application provides a method for improving device compatibility, including:
if the software development kit monitors an insertion signal, inquiring a to-be-used function list of the inserted device through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list, wherein the supported function list comprises: all functions currently supported;
and interacting with the inserted equipment according to the target function.
Optionally, after the software development kit monitors the insertion signal, querying a to-be-used function list of the inserted device through a supported function list of the software development kit, and acquiring a target function in the to-be-used function list, which is matched with the supported function list, includes:
if the software development kit monitors the insertion signal, a corresponding equipment class object is created;
Acquiring the function list to be used according to the equipment class object;
and traversing the supported function list according to the function list to be used to acquire the target function.
Optionally, after traversing the supported function list according to the to-be-used function list and obtaining the target function, the method further includes:
and creating a function object corresponding to the target function, and storing the function object in the equipment class object.
Optionally, the method further comprises:
packaging the target function to obtain a packaging packet;
and writing the packaging package into the software development tool package.
Optionally, the method further comprises:
acquiring all the currently supported functions and generating the supported function list;
and pre-storing the supported function list in the software development kit.
A second aspect of the present application provides an apparatus for improving device compatibility, including: an acquisition unit and an interaction unit;
the obtaining unit is configured to, if the software development kit monitors an insertion signal, query a to-be-used function list of the inserted device through a supported function list of the software development kit, and obtain a target function in the to-be-used function list, where the target function is matched with the supported function list, where the supported function list includes: all functions currently supported;
And the interaction unit is used for interacting with the inserted equipment according to the target function.
Optionally, the obtaining unit is configured to create a corresponding device class object if the software development kit monitors an insertion signal;
acquiring the list of the functions to be used according to the equipment class object;
and traversing the supported function list according to the function list to be used to acquire the target function.
Optionally, the apparatus further comprises: a storage unit;
the storage unit is configured to create a function object corresponding to the target function, and store the function object in the device class object.
Optionally, the apparatus further comprises: a write unit;
the obtaining unit is used for packaging the target function to obtain a packaging packet;
the writing unit is used for writing the packaging package into the software development tool package.
Optionally, the obtaining unit is configured to obtain all currently supported functions and generate the supported function list;
the storage unit is used for pre-storing the supported function list in the software development kit.
A third aspect of the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is operated, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method according to the first aspect.
A fourth aspect of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first aspect.
The application provides a method and a device for improving equipment compatibility, electronic equipment and a storage medium. The method for improving the compatibility of the equipment comprises the following steps: if the software development kit monitors an insertion signal, inquiring a to-be-used function list of the inserted equipment through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list, wherein the supported function list comprises: all functions currently supported; and interacting with the inserted equipment according to the target function. In the embodiment of the application, the equipment is divided according to functions, after the equipment is inserted, the to-be-used function list of the inserted equipment is inquired through the software development kit, the target function supported by the inserted equipment in the software development kit is obtained through the to-be-used function list of the inserted equipment and the supported function list of the software development kit, the target function is used for interacting with the inserted equipment, the condition that the equipment cannot be identified completely by the software development kit after the USB equipment is upgraded according to the equipment type during division is avoided, and the compatibility of the software development kit for the equipment is improved. In addition, according to the device function division, when different USB devices have the same function, the target function of the USB device can be obtained by directly utilizing the software development kit, the code does not need to be written repeatedly, and the code reuse rate is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a method for improving device compatibility according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for improving device compatibility according to another embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a method for improving device compatibility according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a method for improving device compatibility according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for improving device compatibility according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for improving device compatibility according to another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an apparatus for improving device compatibility according to another embodiment of the present application;
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Further, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
Furthermore, the terms "first," "second," and the like in the description and in the claims, as well as in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In order to clearly illustrate the method for improving the compatibility of the device provided by the embodiment of the present application, a part of standard terms appearing in the method are explained as follows:
universal Serial Bus (USB) is an emerging data communication method that gradually replaces other interface standards. The USB bus is used as a high-speed serial bus, the application environment requirement of high-speed data transmission can be met due to the extremely high transmission speed, and the USB bus also has the advantages of simple power supply (bus power supply), convenience in installation and configuration (plug and play and hot plug support), simplicity in expansion ports (127 peripheral devices can be expanded at most through a concentrator), diversity in transmission modes (4 transmission modes), good compatibility (downward compatibility after product upgrading), and the like.
Software Development Kit (SDK) is generally a collection of Development tools that are used by Software engineers to create application Software for a particular Software package, Software framework, hardware platform, operating system, etc. The USB SDK is an SDK providing an operation for the USB device, and provides an Application Programming Interface (API) Interface for operating the USB device, including functions of controlling the USB device and obtaining information from the device side.
In the field of communications, USB SDKs need to support all types of USB devices released by the same vendor or brand. In order to make the USB SDK better compatible with all USB devices of a certain manufacturer, two technical problems need to be solved when designing the USB SDK:
1. there are instances where the functionality of each type of device is not consistent. For example, the USB device supports functions of power reporting, restarting, factory restoration, call control, busy indicator lights, and the like. Different types of USB devices may choose to support some of these functions. For example, the device a supports the power reporting and restarting function, and the device B supports the restarting and factory restoration functions.
2. There are cases where a USB device issues after the USB SDK issues. For example, the USB SDK is released in January, and Junuary produces a new USB product.
In the implementation scheme of the prior art, a device class is used to encapsulate a function service common to all devices, for example, obtain a device name, upgrade the device, and the like. Each specific USB device has a corresponding class, for example, device a has a corresponding ADevice for encapsulating the functional services supported by device a but not in the CDeviceBase class. When the insertion of the corresponding type of equipment is monitored, the corresponding object is created according to the type of the inserted equipment. The device is subsequently controlled by the created object. For example, when the device a is inserted, an ADevice object is created inside the SDK, and then the device a is operated through the ADevice object.
The above implementation has the following two technical problems:
1. the code reuse rate is low. Assume that there is a function a, supported by device B, and not supported by device C. Since not all devices support the a function, it cannot be implemented in the device class, but needs to be implemented in each of the device a and the device B. The same function needs to be implemented on two devices respectively, and subsequently, if the function is modified, codes at two positions need to be modified, so that the maintenance cost is high.
2. New USB devices cannot be made compatible. The new USB device is the device that was released after the USB SDK was released. Because the USB SDK is not yet aware of the existence of the new USB device at the time of development, the corresponding object cannot be created according to the device type because there is no corresponding USB class corresponding to the new USB device. At this time, the USB SDK cannot identify the new USB device, and cannot apply the functions of the new USB device, including the old functions existing therein.
In order to solve the technical problems in the prior art, the present application provides an inventive concept: the method comprises the steps of dividing the equipment according to functions, inquiring a to-be-used function list of the inserted equipment through a software development kit after the equipment is inserted, acquiring a target function supported by the inserted equipment in the software development kit through the to-be-used function list of the inserted equipment and a supported function list of the software development kit, and interacting with the inserted equipment by using the target function, so that the condition that the equipment cannot be identified completely by the software development kit after the USB equipment is upgraded according to the equipment type during division is avoided, and the compatibility of the software development kit for the equipment is improved. In addition, according to the device function division, when different USB devices have the same function, the target function of the USB device can be obtained by directly utilizing the software development kit, the code does not need to be written repeatedly, and the code reuse rate is improved.
The following describes specific embodiments provided in the present application through possible implementations.
Fig. 1 is a schematic flowchart of a method for improving device compatibility according to an embodiment of the present disclosure, where an execution subject of the method may be a processing device such as an intelligent mobile device, a computer, or a server. As shown in fig. 1, the method includes:
s101, after the software development kit monitors the insertion signal, inquiring a to-be-used function list of the inserted equipment through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list.
When a software development kit monitors an insertion signal of a device, a to-be-used function list of the inserted device is queried through a supported function list of the software development kit, where the to-be-used function list may be, for example, a FeatureList corresponding to the inserted device, and the to-be-used function list may be a function attribute list pre-stored in the device before the device leaves a factory, where the function attribute list represents which functions the device can support, and each attribute in the function attribute list corresponds to a function class. The supported functions list includes: all functional classes currently supported.
In one implementation, the software development kit may compare the to-be-used function list with a pre-stored supported function list inside the software development kit to obtain a target function supported by the plug-in device.
In another implementation manner, the software development kit may further interact with other databases in which the supported function lists are pre-stored, and compare the interaction with the to-be-used function list of the insertion device to obtain the target function supported by the insertion device in the software development kit.
And S102, interacting with the inserted equipment according to the supported target function.
And the software development kit interacts with the inserted equipment according to the obtained target function. For example: the target function has functions of electric quantity reporting, restarting and factory restoration, and the plug-in device can realize the functions by interacting with the software development kit, for example, a UI interface corresponding to the functions can be popped up.
It should be noted that, in the present application example, after a new USB device is released, the software development kit is not updated, and the new USB device has a part of functions that can be supported by the existing software development kit.
The application provides a method for improving equipment compatibility, which comprises the following steps: if the software development kit monitors an insertion signal, inquiring a to-be-used function list of the inserted device through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list, wherein the supported function list comprises: all functions currently supported; and interacting with the inserted equipment according to the target function. In the embodiment of the application, the equipment is divided according to functions, after the equipment is inserted, the to-be-used function list of the inserted equipment is inquired through the software development kit, the target function supported by the inserted equipment in the software development kit is obtained through the to-be-used function list of the inserted equipment and the supported function list of the software development kit, the target function is used for interacting with the inserted equipment, the condition that the equipment cannot be identified completely by the software development kit after the USB equipment is upgraded according to the equipment type during division is avoided, and the compatibility of the software development kit for the equipment is improved. In addition, according to the device function division, when different USB devices have the same function, the target function of the USB device can be obtained by directly utilizing the software development kit, the code does not need to be written repeatedly, and the code reuse rate is improved.
Fig. 2 is a flowchart illustrating a method for improving device compatibility according to another embodiment of the present application, and as shown in fig. 2, step S101 may specifically include:
s201, if the software development kit monitors the insertion signal, a corresponding equipment class object is created.
S202, acquiring a function list to be used according to the equipment class object.
S203, traversing the supported function list according to the function list to be used, and acquiring the target function.
In the embodiment of the application, after the software development kit monitors the insertion signal of the device, a device class object corresponding to the inserted device is created first. The device class object is utilized to obtain the to-be-used function list stored in the inserted device from the inserted device, and it should be noted that the to-be-used function list is all functions that can be supported by the inserted device. And traversing each function in the supported function list of the inserting equipment according to the function list to be used to obtain the functions supported by the current software development kit and obtain the target function.
Optionally, in this embodiment of the present application, the target function is a function that can be supported by the software development kit and is currently used by the plug-in device.
Optionally, according to the to-be-used function list, traversing the supported function list, and after the target function is obtained, the method further includes:
and creating a function object corresponding to the target function, and storing the function object in the equipment class object.
Optionally, in this embodiment of the present application, the target function is a target class and cannot be used for directly communicating with the software development kit. And generating a corresponding function object for the target function through a software development kit, and storing the function object in the equipment class object corresponding to the inserting equipment.
In the embodiment of the application, a target function and a corresponding function object which can be supported by the software development kit to be used by the current insertion equipment are finally obtained by creating the equipment class object corresponding to the insertion equipment and traversing the list of functions to be used of the insertion equipment, and are stored in the equipment class object. By utilizing the equipment class object to interact with the insertion equipment, each function in the target function can be realized. The situation that the equipment is completely unavailable when the equipment is interacted with the software development kit after being upgraded is avoided.
Fig. 3 is a schematic flowchart of a method for improving device compatibility according to another embodiment of the present application, where as shown in fig. 3, the method further includes:
S301, packaging the target function to obtain a packaging packet.
And S302, writing the packaging package into a software development tool package.
In the embodiment of the application, in order to facilitate the software development kit to acquire the function capable of interacting with the insertion device, the situation that the function is unavailable when a user of the software development kit calls a certain function inserted into the insertion device is avoided, the target function is packaged to obtain the packaging kit, and the packaging kit is written into the software development kit. When a user of the software development kit needs to use a certain function of the plug-in device, whether the software development kit supports the function of the plug-in device or not can be obtained through the packaging kit, so that the subsequent developer can use the software development kit conveniently.
In the first mode, when all functions supported by all current devices are pre-stored in the databases of other devices, the software development kit communicates with the relevant databases to obtain a supported function list. In the second mode, the list of functions supported by all the current devices is pre-stored in the device class of the software development kit, so as to obtain the supported function list. The processing procedure of the second embodiment will be described below.
Fig. 4 is a flowchart illustrating a method for improving device compatibility according to another embodiment of the present application, where as shown in fig. 4, the method further includes:
S401, all the functions supported currently are obtained, and a supported function list is generated.
S402, pre-storing the supported function list in the software development kit.
In the embodiment of the application, all functions of the software development kit which can support the plug-in device can be obtained in advance, and a supported function list is obtained. And pre-store the supported function list in the software development kit.
By utilizing the pre-stored supported function list, the functions which can be interactively used with the software development kit by the equipment can be inquired to obtain the target functions. The software development kit interacts with the plug-in device by using the target function to realize the function of the plug-in device.
Illustratively, in the embodiment of the present application, the supported function list stores functions of 1 to 800, and when the to-be-used function list of the plug-in device has functions of 1, 3, and 4, the obtained target functions include 1, 3, and 4, that is, all functions of the plug-in device can be interactively used with the software development kit. When the inserted device is a new USB device and the function list thereof has the functions of 30, 60, and 801, the obtained target function includes 30 and 60. That is, the 801 function of the plug-in device cannot be used interactively with the software development kit, and the functions 30 and 60 can be used continuously and interactively, so that compared with the prior art, part of functions can be used, and the compatibility is improved.
By the method for improving the compatibility of the equipment, the direct writing of the function code of each equipment is avoided, the dynamic expansion of the function of the equipment cannot be realized, the corresponding target function can be directly generated for each equipment, and the code reuse rate is improved. In addition, when new USB equipment exists, the situation that the software development kit cannot identify the new USB equipment to cause that the functions of the new USB equipment are completely unavailable is avoided, and the compatibility of the software development kit for the equipment is improved.
The following describes apparatuses, storage media, and the like corresponding to the method for improving device compatibility provided in the present application, and reference is made to the above for specific implementation processes and technical effects, which are not described in detail below.
Fig. 5 is a schematic diagram of an apparatus for improving compatibility of a device according to an embodiment of the present disclosure, and as shown in fig. 5, the apparatus may include: an acquisition unit 501 and an interaction unit 502;
an obtaining unit 501, configured to query, through a supported function list of a software development kit, a to-be-used function list of an inserted device and obtain a target function in the to-be-used function list, where the target function is matched with the supported function list, after the software development kit monitors an insertion signal, where the supported function list includes: all functions currently supported;
An interaction unit 502, configured to interact with the inserted device according to the target function.
Optionally, the obtaining unit 501 is configured to create a corresponding device class object if the software development kit monitors an insertion signal;
acquiring a function list to be used according to the equipment class object;
and traversing the supported function list according to the function list to be used to acquire the target function.
Fig. 6 is a schematic view of an apparatus for improving compatibility of a device according to another embodiment of the present application, and as shown in fig. 6, the apparatus further includes: a storage unit 503;
a storage unit 503, configured to create a function object corresponding to the target function, and store the function object in the device class object.
Fig. 7 is a schematic view of an apparatus for improving compatibility of a device according to another embodiment of the present application, and as shown in fig. 7, the apparatus further includes: a write unit 504;
an obtaining unit 501, configured to encapsulate a target function, and obtain an encapsulation packet;
and a writing unit 504, configured to write the encapsulation package into the software development kit.
Optionally, the obtaining unit is configured to obtain all currently supported functions and generate a supported function list;
the storage unit 503 is configured to pre-store the supported function list in the software development kit.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, including: a processor 710, a storage medium 720 and a bus 730, the storage medium 720 storing machine-readable instructions executable by the processor 710, the processor 710 communicating with the storage medium 720 via the bus 730 when the electronic device is operating, the processor 710 executing the machine-readable instructions to perform the steps of the above-described method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method is performed.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A method for improving device compatibility, comprising:
if the software development kit monitors an insertion signal, inquiring a to-be-used function list of the inserted equipment through a supported function list of the software development kit, and acquiring a target function matched with the supported function list in the to-be-used function list, wherein the supported function list comprises: all functions currently supported;
interacting with the inserted equipment according to the target function;
after monitoring the insertion signal, the software development kit queries a to-be-used function list of the inserted device through a supported function list of the software development kit, and acquires a target function matched with the supported function list in the to-be-used function list, including:
If the software development kit monitors the insertion signal, a corresponding equipment class object is created;
acquiring the list of the functions to be used according to the equipment class object;
and traversing the supported function list according to the function list to be used to acquire the target function.
2. The method according to claim 1, wherein, after traversing the supported function list according to the to-be-used function list and acquiring the target function, the method further comprises:
and creating a function object corresponding to the target function, and storing the function object in the equipment class object.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
packaging the target function to obtain a packaging packet;
and writing the packaging package into the software development tool package.
4. The method of claim 1, further comprising:
acquiring all the currently supported functions and generating the supported function list;
and pre-storing the supported function list in the software development kit.
5. An apparatus for improving device compatibility, comprising: an acquisition unit and an interaction unit;
The obtaining unit is configured to, if the software development kit monitors an insertion signal, query a to-be-used function list of the inserted device through a supported function list of the software development kit, and obtain a target function in the to-be-used function list, where the target function is matched with the supported function list, where the supported function list includes: all functions currently supported;
the interaction unit is used for interacting with the inserted equipment according to the target function;
the acquisition unit is used for creating a corresponding equipment class object if the software development kit monitors the insertion signal; acquiring the function list to be used according to the equipment class object; and traversing the supported function list according to the function list to be used to acquire the target function.
6. The apparatus of claim 5, further comprising: a storage unit;
the storage unit is configured to create a function object corresponding to the target function, and store the function object in the device class object.
7. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method according to any one of claims 1-4.
8. A storage medium, characterized in that a computer program is stored on the storage medium, which computer program, when being executed by a processor, performs the steps of the method according to any one of claims 1-4.
CN202011281713.1A 2020-11-16 2020-11-16 Method and device for improving equipment compatibility, electronic equipment and storage medium Active CN112230945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011281713.1A CN112230945B (en) 2020-11-16 2020-11-16 Method and device for improving equipment compatibility, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011281713.1A CN112230945B (en) 2020-11-16 2020-11-16 Method and device for improving equipment compatibility, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112230945A CN112230945A (en) 2021-01-15
CN112230945B true CN112230945B (en) 2022-06-28

Family

ID=74124400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011281713.1A Active CN112230945B (en) 2020-11-16 2020-11-16 Method and device for improving equipment compatibility, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112230945B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220275A (en) * 2021-05-25 2021-08-06 北京小米移动软件有限公司 Software acquisition method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362364A (en) * 2019-07-23 2019-10-22 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110399181A (en) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110855750A (en) * 2019-10-21 2020-02-28 深圳市元征科技股份有限公司 Downloading method of software development kit and related equipment
CN111443907A (en) * 2020-03-12 2020-07-24 厦门网宿有限公司 Method and device for calling SDK function

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5282677B2 (en) * 2009-06-25 2013-09-04 株式会社リコー Compatibility evaluation apparatus, compatibility evaluation method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362364A (en) * 2019-07-23 2019-10-22 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110399181A (en) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110855750A (en) * 2019-10-21 2020-02-28 深圳市元征科技股份有限公司 Downloading method of software development kit and related equipment
CN111443907A (en) * 2020-03-12 2020-07-24 厦门网宿有限公司 Method and device for calling SDK function

Also Published As

Publication number Publication date
CN112230945A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN103902265B (en) One kind applies implementation method and relevant apparatus
EP2608585B1 (en) Method, device and system for triggering terminal operation
CN106230977B (en) A kind of client functionality loading method, system, client and server-side
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN105848135A (en) Multi-operator application customization control method and multi-operator application customization control system based on mobile terminal
CN105653326A (en) System and method for batch Linux system installation and detection
CN112230945B (en) Method and device for improving equipment compatibility, electronic equipment and storage medium
CN102905000B (en) Address book synchronization method and device
CN107526584B (en) Data access method and device
CN101901157B (en) Management software self-starting installation method and system
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
EP3091435A1 (en) Resource management method and device for terminal system
CN104363325A (en) Terminal calling method and system
CN104092661A (en) Serial port communication method and apparatus of virtual machines
CN103514003A (en) Program installation method and device
CN108234174B (en) Management method and device of virtual network function
CN104581695A (en) Mobile terminal configuration method and system
CN109753293A (en) A kind of processing method and relevant device of plug-in unit
CN110442059A (en) Controlled device expanding method, device and control equipment
CN103593201B (en) A kind of plug-in display method, device and terminal
CN113360379B (en) Program test environment creation method and program test environment creation apparatus
CN108307286B (en) Method and system for realizing communication between android devices based on NFC
CN109800229B (en) Data access method and related equipment
CN108009084B (en) Testing method, device and system for hybrid mobile application
CN109413714B (en) User agent information processing method, device, storage medium and terminal

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
GR01 Patent grant
GR01 Patent grant