CN107766232B - Plug-in management method and device - Google Patents

Plug-in management method and device Download PDF

Info

Publication number
CN107766232B
CN107766232B CN201610712834.4A CN201610712834A CN107766232B CN 107766232 B CN107766232 B CN 107766232B CN 201610712834 A CN201610712834 A CN 201610712834A CN 107766232 B CN107766232 B CN 107766232B
Authority
CN
China
Prior art keywords
plug
target
equipment
information
request information
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
CN201610712834.4A
Other languages
Chinese (zh)
Other versions
CN107766232A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201610712834.4A priority Critical patent/CN107766232B/en
Publication of CN107766232A publication Critical patent/CN107766232A/en
Application granted granted Critical
Publication of CN107766232B publication Critical patent/CN107766232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Abstract

The embodiment of the invention provides a plug-in management method and a plug-in management device, which are applied to electronic equipment, wherein the electronic equipment is provided with a plug-in, the plug-in corresponds to a plurality of pieces of equipment, and the method comprises the following steps: receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in; and calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment. The embodiment of the invention can reduce the complexity of plug-in management and improve the performance of the electronic equipment.

Description

Plug-in management method and device
Technical Field
The present invention relates to the field of plug-in management technologies, and in particular, to a plug-in management method and device.
Background
A plug-in is a program written in an application program interface that conforms to a specification. The plug-in is used for realizing functions which are not possessed by the original pure system platform, and can only run under the system platform specified by a program, but can not run independently from a specified platform. Since the plug-in needs to call the function library or data provided by the original clean system.
Specifically, the plug-in can be applied to software, a browser and other application programs. For example, after installing the relevant plug-in the browser, the browser can directly call the plug-in to process the specific type of file. E.g., a video in a particular format may be presented, etc.
In some cases, a plurality of cards may be installed in the electronic apparatus. For example, in the security industry, in order to view surveillance videos collected by a plurality of video surveillance devices or surveillance videos stored in a plurality of storage servers, a plurality of plug-ins are generally installed in an electronic device. One plug-in corresponds to one video monitoring device or one storage server. In this case, the electronic device may obtain the monitoring videos in different video capturing devices or different storage servers by calling different plug-ins.
However, in the existing plug-in management method, usually, one plug-in provides one interface, and one plug-in controls one video monitoring device or one storage server. As shown in fig. 1, in the system architecture, a plug-in 1 corresponds to a video monitoring apparatus 1 through an interface a; the plug-in 2 corresponds to the video monitoring equipment 2 through an interface B; the plug-in 3 corresponds to the storage server through the interface C. When the electronic equipment acquires the monitoring video in the video monitoring equipment 1, the plug-in 1 can be called through the interface A; when the electronic equipment acquires the monitoring video in the video monitoring equipment 2, the plug-in 2 can be called through the interface B for realization; when the electronic device obtains the monitoring video in the storage server, the plug-in 3 can be called through the interface C.
Therefore, when there are more video monitoring devices or storage servers, the number of plug-ins to be installed in the electronic device is large. In addition, when the electronic device acquires the monitoring videos in different video acquisition devices or storage servers, different plug-ins need to be called to implement the acquisition. This results in complex plug-in management, which occupies more resources of the electronic device, thereby reducing the performance of the electronic device.
Disclosure of Invention
The embodiment of the invention aims to provide a plug-in management method and device so as to reduce the complexity of plug-in management and improve the performance of electronic equipment. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a plug-in management method, which is applied to an electronic device, where a plug-in is installed on the electronic device, and the plug-in corresponds to multiple devices, and the method includes:
receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in;
and calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment.
Optionally, the electronic device calls each plug-in through an interface, and the calling the target plug-in and sending the request information to the target device includes:
and calling the target plug-in through the interface, and sending request information to the target equipment.
Optionally, the electronic device locally stores state information of each plug-in, where the state information includes: the calling the target plug-in and sending request information to the target device comprises:
judging whether the target plug-in is connected or not according to the state information of each locally stored plug-in;
when the state information of the target plug-in is in connection, periodically detecting whether the target plug-in is in connection;
and when the target plug-in is judged to be not connected or the target plug-in is detected to be not connected periodically, calling the target plug-in and sending request information to the target equipment.
Optionally, when it is determined that the target plug-in is not being connected or it is periodically detected that the target plug-in is not being connected, invoking the target plug-in, and sending request information to the target device includes:
when the target plug-in is judged to be not connected or the target plug-in is detected to be not connected periodically, judging whether the state of the target plug-in is connected or not;
when the state of the target plug-in is connected, calling the target plug-in and sending request information to the target equipment;
and when the state of the target plug-in is not connected, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment.
Optionally, when the state of the target plug-in is connected, invoking the target plug-in, and sending request information to the target device includes:
when the state of the target plug-in is connected, judging whether the connected equipment is the target equipment;
if so, calling the target plug-in and sending request information to the target equipment;
if not, interrupting the current connection, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment.
Optionally, the request information further includes validity check information, so that the target device sends corresponding data to the electronic device after determining that the electronic device passes validity check according to the validity check information.
Optionally, when the electronic device is provided with a plurality of plug-ins, at least one plug-in corresponds to a plurality of devices.
In a second aspect, an embodiment of the present invention provides a plug-in management apparatus, which is applied to an electronic device, where a plug-in is installed on the electronic device, and the plug-in corresponds to multiple devices, where the apparatus includes:
the execution module is used for receiving an instruction input by a user, determining one of the devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in;
and the processing module is used for calling the target plug-in and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment.
Optionally, the electronic device calls each plug-in through an interface, and the processing module is specifically configured to call the target plug-in through the interface and send request information to the target device.
Optionally, the electronic device locally stores state information of each plug-in, where the state information includes: unconnected, connecting, or connected, the processing module comprising:
the judging unit is used for judging whether the target plug-in is connected or not according to the state information of each locally stored plug-in;
the detection unit is used for periodically detecting whether the target plug-in is connected or not when the judgment unit judges that the state information of the target plug-in is connected;
and the processing unit is used for calling the target plug-in unit and sending request information to the target equipment when the judging unit judges that the target plug-in unit is not connected or the detecting unit periodically detects that the target plug-in unit is not connected.
Optionally, the processing unit comprises:
the judging subunit is used for judging whether the state of the target plug-in is connected or not;
the execution subunit is configured to, when the judging subunit judges that the state of the target plug-in is connected, invoke the target plug-in and send request information to the target device;
and the processing subunit is configured to, when the judging subunit judges that the state of the target plug-in is not connected, invoke the target plug-in, establish connection with the target device, and send request information to the target device.
Optionally, the execution subunit is specifically configured to determine whether the connected device is the target device; if so, calling the target plug-in and sending request information to the target equipment; if not, interrupting the current connection, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment.
Optionally, the request information further includes validity check information, so that the target device sends corresponding data to the electronic device after determining that the electronic device passes validity check according to the validity check information.
Optionally, when the electronic device is provided with a plurality of plug-ins, at least one plug-in corresponds to a plurality of devices.
The embodiment of the invention provides a plug-in management method and a plug-in management device, which are applied to electronic equipment, wherein the electronic equipment is provided with a plug-in, the plug-in corresponds to a plurality of pieces of equipment, and the method comprises the following steps: receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in; and calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment.
In the embodiment of the invention, one plug-in unit in the plug-in units installed in the electronic equipment can correspond to a plurality of pieces of equipment. Therefore, the number of the plug-ins installed in the electronic equipment is small, the electronic equipment can realize the unified management of the plug-ins, the complexity of plug-in management can be reduced, and the performance of the electronic equipment is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating a relationship between a plug-in and a device;
fig. 2 is a flowchart of a plug-in management method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a relationship between plug-ins and devices according to an embodiment of the present invention;
FIG. 4 is another flowchart of a plug-in management method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a plug-in management device according to an embodiment of the present invention;
fig. 6 is another schematic structural diagram of a plug-in management device according to an embodiment of the present invention.
Detailed Description
In order to reduce complexity of plug-in management and improve performance of electronic equipment, embodiments of the present invention provide a plug-in management method and apparatus.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to reduce the complexity of plug-in management and improve the performance of electronic devices, an embodiment of the present invention provides a plug-in management method, which may include the following steps, as shown in fig. 2:
s101, receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in.
The method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a desktop computer, a portable computer, an intelligent mobile terminal, and the like.
Generally, a plurality of plug-ins may be installed in an electronic device. In the embodiment of the invention, in order to reduce the complexity of plug-in management and improve the performance of the electronic equipment, one plug-in the plug-ins installed in the electronic equipment can correspond to a plurality of pieces of equipment. The device can be a video acquisition device, or a storage server, etc. Moreover, the corresponding relation between each plug-in identification and each equipment identification can be stored in the electronic equipment.
In the embodiment of the present invention, when a plurality of plug-ins are installed in an electronic device, at least one plug-in corresponds to a plurality of devices. That is, some of the plurality of plug-ins installed in the electronic device may correspond to a plurality of devices, and some of the plug-ins may correspond to one device; or each plug-in corresponds to a plurality of devices, which is not limited in the embodiment of the present invention.
For example, in the embodiment of the present invention, the correspondence between the plug-in installed in the electronic device and each device may be shown in the following table:
plug-in identification Device identification
Insert 1 Video monitoring device 1
Insert 1 Video monitoring device 2
Plug-in component 2 Storage server
That is to say, two plug-ins, namely a plug-in 1 and a plug-in 2, are installed in the electronic device, wherein the plug-in 1 corresponds to a plurality of devices, namely the video monitoring device 1 and the video monitoring device 2; the plug-in 2 corresponds to a device, i.e., a storage server.
When the electronic equipment accesses the video monitoring equipment 1 or the video monitoring equipment 2, the electronic equipment can call the plug-in 1 for access; when the electronic device accesses the storage server, it may invoke plug-in 2 access.
When the same plug-in corresponds to a plurality of devices, the plurality of devices may be of the same type or of different types. For example, in the above example, the plug-in 1 may correspond to the video monitoring apparatus 1, and the plug-in 2 may correspond to the video monitoring apparatus 2 and the storage server.
It can be understood that the monitoring video obtained by the plug-in the electronic device can be stored in a plurality of devices corresponding to the plug-in the electronic device. For example, the video monitoring device may store therein the monitoring video collected by the video monitoring device, and the storage server may store therein the monitoring video received by the video monitoring device. The user may select to view the surveillance video stored in one or more of the devices through an application or browser, as desired.
For example, a user may input an instruction in the electronic device, where the instruction may include attribute information of a device that the user wants to access, such as a device identifier, a keyword, an access address, and the like, and attribute information of a plug-in to be called, such as a plug-in identifier, and the like. In this case, after receiving the instruction input by the user, the electronic device may determine the target device and the target plug-in corresponding to the instruction according to the instruction.
It should be noted that, when the user inputs an instruction, the user may input an instruction, where the instruction includes attribute information of a device that the user wants to access and attribute information of a plug-in to be called at the same time; or, the user may also input two instructions, where one instruction includes attribute information of a device that the user wants to access, and the other instruction includes attribute information of a to-be-called plug-in, which is not limited in the embodiment of the present invention.
For example, when a user wants the electronic device to call the plug-in 1 to access the monitoring video stored in the video monitoring device 2, the input instruction may include the identification information of the plug-in 1 and the identification information of the video monitoring device 2, and after receiving the instruction input by the user, the electronic device may determine that the target device is the video monitoring device 1 and determine that the target plug-in is the plug-in 1.
S102, calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment.
The electronic device determines a target device and a target plug-in, which may be invoked to send request information to the target device. For example, when the electronic device determines that the target device is the video monitoring device 2 and the target plug-in is the plug-in 1, it may call the plug-in 1, and then send the request information to the video monitoring device 2.
The request information may include attribute information of data to be requested. The attribute information may be time information of a surveillance video to be requested, or the like.
Optionally, in order to further reduce complexity of plug-in management and improve performance of the electronic device, in the embodiment of the present invention, the electronic device may call each plug-in through one interface. As shown in fig. 3, when the plug-ins 1 and 2 are installed in the electronic device, the electronic device may call each plug-in through the interface a. The correspondence between the plug-ins 1 and 2, the video monitoring device 1, the video monitoring device 2, and the storage server may be as shown in the above table.
And after receiving the request information sent by the electronic equipment, the target equipment can send corresponding data to the electronic equipment. For example, when the request information sent by the electronic device includes time information, the target device may send, to the electronic device, a monitoring video that satisfies the time information in a locally stored monitoring video.
Optionally, in order to ensure the security of the monitoring video, the request information sent by the electronic device to the target device may further include validity check information. E.g. may include a home device identification, a predetermined key, etc. The local device identifier may be an IP address, a device number, or the like, and the predetermined key may be a key negotiated in advance between the electronic device and the target device. The process of negotiating the key between the electronic device and the target device in advance may adopt any existing method, and this process is not described in detail in the embodiments of the present invention.
In this case, after the target device receives the request information sent by the electronic device, it may determine whether the electronic device can pass the validity check according to the validity check information in the request information. For example, the target device may locally store a validity check information list, and after receiving validity check information sent by the electronic device, the target device may identify whether the validity check information is included in the local validity check information list, and if so, determine that the electronic device can pass validity check. Only after the electronic equipment is determined to pass the validity check, the target equipment can send corresponding data to the electronic equipment, so that the data is prevented from being sent to the electronic equipment without the acquisition authority, and the safety of the data stored in the target equipment is ensured.
After the electronic device receives the data, namely the monitoring video, sent by the target device, the monitoring video can be displayed for the user to watch.
It should be noted that, in the embodiment of the present invention, at the same time, the electronic device may call a plug-in, access a device, and display the obtained monitoring video. Or, in order to improve user experience, the electronic device may also call multiple plug-ins simultaneously according to a user instruction, access multiple devices, and simultaneously display the surveillance videos acquired from the multiple devices.
The embodiment of the invention provides a plug-in management method, which is applied to electronic equipment, wherein the electronic equipment is provided with a plug-in, the plug-in corresponds to a plurality of pieces of equipment, and the method comprises the following steps: receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in; and calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment. In the embodiment of the invention, one plug-in unit in the plug-in units installed in the electronic equipment can correspond to a plurality of pieces of equipment. Therefore, the number of the plug-ins installed in the electronic equipment is small, the electronic equipment can realize the unified management of the plug-ins, the complexity of plug-in management can be reduced, and the performance of the electronic equipment is improved.
It can be understood that when an electronic device calls a plug-in to connect to a corresponding device, a certain time is often required, especially when the network status is not good or the device is initialized. If a plug-in is called again during the process of calling the plug-in to connect the device, some conflicts or exceptions may result. E.g., causing the browser to crash, etc., resulting in a poor user experience.
As an implementation manner of the embodiment of the present invention, as shown in fig. 4, a process of a plug-in management method provided in the embodiment of the present invention may include the following steps:
s201, receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in.
Step S201 is substantially the same as step S101 in the foregoing embodiment, and this embodiment does not describe this process again.
S202, judging whether the target plug-in is connected or not according to the state information of each locally stored plug-in.
In this embodiment of the present invention, the electronic device may locally store state information of each plug-in, where the state information may include: unconnected, connected, or connected. The unconnected state means that the electronic equipment does not call the plug-in to establish connection with any equipment at present; the connection is that the electronic equipment calls the plug-in currently to establish connection with certain equipment, and the connection is not completed; the connected plug-in is called by the electronic equipment to establish connection with the equipment. The current use state of each plug-in can be identified through the state information of each plug-in.
In the embodiment of the invention, in order to avoid some conflicts or abnormalities caused by calling the target plug-in again in the process of calling the target plug-in to connect the device, the electronic device can judge whether the target plug-in is connected or not after determining the target plug-in. Specifically, the electronic device may search for state information corresponding to the target plug-in from state information of each locally stored plug-in, and determine whether the target plug-in is being connected according to the state information corresponding to the target plug-in.
When the target plug-in is being connected, the electronic equipment can not call the target plug-in again, but periodically detect whether the target plug-in is being connected, so as to ensure that the target plug-in is called again when the target plug-in is not being connected.
S203, judging whether the state of the target plug-in is connected.
When the target plug-in is judged not to be connected, the target plug-in can be called. In this case, the state of the target plug-in may still be two, connected or unconnected. The electronic device may further determine whether the target plug-in is connected to determine whether a connection with the target device is required. For example, whether the target plug-in is connected or not may be determined according to the state information of the target plug-in.
And S204, judging whether the connected equipment is the target equipment.
When the electronic device determines that the target plug-in is connected, it may further determine whether the connected device is the target device, so as to further determine whether a connection needs to be established with the target device before sending the request information to the target device.
In the embodiment of the present invention, when the electronic device stores the state information of each plug-in, for a plug-in whose state information is already connected, the electronic device may simultaneously store the identifier of the device already connected through the plug-in. In this case, when the electronic device determines that the target plug-in is connected, it may further determine whether the connected device is the target device according to the locally stored information.
S205, calling the target plug-in, and sending request information to the target device, wherein the request information at least comprises attribute information of data to be requested, so that the target device sends corresponding data to the electronic device.
When the electronic device determines that the connected device is the target device, it may perform this step to directly send the request information to the target device.
Step S205 is substantially the same as step S102 in the foregoing embodiment, and this embodiment does not describe this process again.
S206, the current connection is interrupted.
When the electronic device determines that the calling target plug-in is connected with a target device, the electronic device may interrupt the current connection to establish a connection with the target device, and may send request information to the target device.
And S207, establishing connection with the target equipment.
When the state information of the target plug-in is not connected or the connected state information is not the target device, the electronic device can establish connection with the target device after the current connection is interrupted. Further, step S205 may be performed to transmit the request information to the target device.
In this embodiment, before the electronic device calls the target plug-in to send the request information to the target device, the use state of the target plug-in may be determined, and the target plug-in is called only when the target plug-in is not being connected, thereby avoiding some conflicts or abnormalities caused by calling the target plug-in again in the device connection process.
Moreover, the target plug-in can be further judged to be unconnected or connected, and when the target plug-in is unconnected, the target plug-in can be connected with the target equipment; or when the target device is connected and is not connected through the target plug-in, the current connection can be interrupted and the connection with the target device can be established, so that the request information can be accurately sent to the target device.
Corresponding to the above method embodiment, the embodiment of the present invention also provides a corresponding device embodiment.
Fig. 5 is a diagram of a plug-in management apparatus according to an embodiment of the present invention, where the plug-in management apparatus is applied to an electronic device, where the electronic device is provided with a plug-in, and the plug-in corresponds to multiple devices, and the apparatus includes:
an execution module 510, configured to receive an instruction input by a user, determine, according to the instruction, one of the multiple devices as a target device, and determine, from the plug-ins, one of the plug-ins as a target plug-in;
the processing module 520 is configured to invoke the target plug-in, and send request information to the target device, where the request information at least includes attribute information of data to be requested, so that the target device sends corresponding data to the electronic device.
The embodiment of the invention provides a plug-in management device, wherein one plug-in a plug-in installed in electronic equipment can correspond to a plurality of pieces of equipment. Therefore, the number of the plug-ins installed in the electronic equipment is small, the electronic equipment can realize the unified management of the plug-ins, the complexity of plug-in management can be reduced, and the performance of the electronic equipment is improved.
As an implementation manner of the embodiment of the present invention, the electronic device calls each plug-in through an interface, and the processing module 520 is specifically configured to call the target plug-in through the interface and send request information to the target device.
As an implementation manner of the embodiment of the present invention, the electronic device locally stores state information of each plug-in, where the state information includes: unconnected, connecting, or connected; as shown in fig. 6, in an embodiment of the present invention, a processing module 520 includes:
a judging unit 521, configured to judge whether the target plug-in is connected according to state information of each locally stored plug-in;
a detecting unit 522, configured to periodically detect whether the target plug-in is connected when the determining unit determines that the state information of the target plug-in is connected;
a processing unit 523, configured to, when the determining unit determines that the target plugin is not being connected, or the detecting unit periodically detects that the target plugin is not being connected, invoke the target plugin, and send request information to the target device.
As an implementation manner of the embodiment of the present invention, the processing unit 523 includes:
a judgment subunit 5231, configured to judge whether the state of the target plug-in is connected;
an execution subunit 5232, configured to, when the determining subunit determines that the state of the target plug-in is connected, invoke the target plug-in and send request information to the target device;
the processing subunit 5233 is configured to, when the determining subunit determines that the state of the target plug-in is not connected, invoke the target plug-in, establish a connection with the target device, and send request information to the target device.
As an implementation manner of the embodiment of the present invention, the execution subunit 5232 is specifically configured to determine whether the connected device is the target device; if so, calling the target plug-in and sending request information to the target equipment; if not, interrupting the current connection, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment.
As an implementation manner of the embodiment of the present invention, the request information further includes validity check information, so that the target device sends corresponding data to the electronic device after determining that the electronic device passes validity check according to the validity check information.
As an implementation manner of the embodiment of the present invention, when the electronic device is installed with a plurality of plug-ins, at least one plug-in corresponds to a plurality of devices.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A plug-in management method is applied to electronic equipment, the electronic equipment is provided with plug-ins, at least one plug-in corresponds to a plurality of equipment, and one plug-in accesses one equipment at the same time, and the method comprises the following steps:
receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in, wherein the target plug-in corresponds to the plurality of devices including the target device;
judging whether the target plug-in is connected or not according to locally stored state information of each plug-in, wherein the state information of each plug-in is locally stored in the electronic equipment, and the state information comprises: unconnected, connecting, or connected;
when the state information of the target plug-in is in connection, periodically detecting whether the target plug-in is in connection;
when the target plug-in is judged to be not connected or the target plug-in is detected to be not connected periodically, judging whether the state of the target plug-in is connected or not;
when the state of the target plug-in is connected, judging whether the connected equipment is the target equipment;
if so, calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment;
if not, interrupting the current connection, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment;
and when the state of the target plug-in is not connected, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment.
2. The method of claim 1, wherein the electronic device invokes each plug-in through an interface, and wherein invoking the target plug-in and sending the request message to the target device comprises:
and calling the target plug-in through the interface, and sending request information to the target equipment.
3. The method according to any one of claims 1-2, wherein the request information further includes validity check information, so that the target device sends corresponding data to the electronic device after determining that the electronic device passes validity check according to the validity check information.
4. The method of any of claims 1-2, wherein when multiple cards are installed on the electronic device, at least one card corresponds to multiple devices.
5. A plug-in management device is applied to electronic equipment, the electronic equipment is provided with plug-ins, at least one plug-in corresponds to a plurality of equipment, and one plug-in accesses one equipment at the same time, the device comprises:
the system comprises an execution module, a storage module and a control module, wherein the execution module is used for receiving an instruction input by a user, determining one of a plurality of devices as a target device according to the instruction, and determining one of the plug-ins as a target plug-in, wherein the target plug-in corresponds to the plurality of devices including the target device;
a processing module, the processing module comprising: a determining unit, configured to determine whether the target plug-in is being connected according to locally stored state information of each plug-in, where the state information of each plug-in is locally stored in the electronic device, and the state information includes: unconnected, connecting, or connected;
the detection unit is used for periodically detecting whether the target plug-in is connected or not when the judgment unit judges that the state information of the target plug-in is connected;
a processing unit, the processing unit comprising:
the judging subunit is used for judging whether the state of the target plug-in is connected or not;
an execution subunit, configured to determine whether the connected device is the target device; if so, calling the target plug-in, and sending request information to the target equipment, wherein the request information at least comprises attribute information of data to be requested, so that the target equipment sends corresponding data to the electronic equipment; if not, interrupting the current connection, calling the target plug-in, establishing connection with the target equipment, and sending request information to the target equipment;
and the processing subunit is configured to, when the judging subunit judges that the state of the target plug-in is not connected, invoke the target plug-in, establish connection with the target device, and send request information to the target device.
6. The apparatus according to claim 5, wherein the electronic device invokes each plug-in via an interface, and the processing module is specifically configured to invoke the target plug-in via the interface and send the request message to the target device.
7. The apparatus according to any one of claims 5 to 6, wherein the request information further includes validity check information, so that the target device sends corresponding data to the electronic device after determining that the electronic device passes validity check according to the validity check information.
8. The apparatus of any of claims 5-6, wherein when multiple cards are installed in the electronic device, at least one card corresponds to multiple devices.
CN201610712834.4A 2016-08-23 2016-08-23 Plug-in management method and device Active CN107766232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610712834.4A CN107766232B (en) 2016-08-23 2016-08-23 Plug-in management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610712834.4A CN107766232B (en) 2016-08-23 2016-08-23 Plug-in management method and device

Publications (2)

Publication Number Publication Date
CN107766232A CN107766232A (en) 2018-03-06
CN107766232B true CN107766232B (en) 2020-12-25

Family

ID=61264751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610712834.4A Active CN107766232B (en) 2016-08-23 2016-08-23 Plug-in management method and device

Country Status (1)

Country Link
CN (1) CN107766232B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020228042A1 (en) * 2019-05-16 2020-11-19 深圳市欢太科技有限公司 Device operation method and apparatus, and gateway, electronic device and computer-readable medium
CN114268653B (en) * 2021-12-22 2024-04-09 中国建设银行股份有限公司 Equipment calling method, device, equipment, medium and product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7546610B2 (en) * 2003-07-16 2009-06-09 International Business Machines Corporation Method for managing multi-tier application complexes
CN101997909A (en) * 2009-08-24 2011-03-30 三星电子株式会社 Method for providing control widget and device using the same
CN104038536A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Plug-in communication method and device
CN104951322A (en) * 2014-03-27 2015-09-30 腾讯科技(深圳)有限公司 Plug-in management method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7546610B2 (en) * 2003-07-16 2009-06-09 International Business Machines Corporation Method for managing multi-tier application complexes
CN101997909A (en) * 2009-08-24 2011-03-30 三星电子株式会社 Method for providing control widget and device using the same
CN104951322A (en) * 2014-03-27 2015-09-30 腾讯科技(深圳)有限公司 Plug-in management method, device and system
CN104038536A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Plug-in communication method and device

Also Published As

Publication number Publication date
CN107766232A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
US11068964B2 (en) Method and device for processing service request
CN102739663A (en) Detection method and scanning engine of web pages
CN109618174B (en) Live broadcast data transmission method, device, system and storage medium
CN106790291B (en) Intrusion detection prompting method and device
CN109426510B (en) Software processing method and device, electronic equipment and computer readable storage medium
CN103618945A (en) Remote maintenance method and equipment for terminal
CN111597065B (en) Method and device for collecting equipment information
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN104182683A (en) Method, device and system for monitoring online transactions
CN111159269B (en) Data processing method, device and system
CN107766232B (en) Plug-in management method and device
CN103716230A (en) Message sending method, device and server
CN106897185B (en) Method and device for outputting abnormity
CN112087455B (en) WAF site protection rule generation method, system, equipment and medium
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN111930542A (en) Data acquisition method and device, electronic equipment and computer readable storage medium
CN110969417A (en) Government affair item synchronization method, device, system, computer equipment and storage medium
CN110908881A (en) Method and device for sending buried point data, electronic equipment and computer readable storage medium
CN110087232B (en) Call processing method and device based on intelligent equipment and server
CN113296911B (en) Cluster calling method, cluster calling device, electronic equipment and readable storage medium
CN105163335B (en) A kind of network access management method, server, mobile terminal and system
CN107294800B (en) Network data access control method and system based on mobile operating system
CN109543398B (en) Application program account migration method and device and electronic equipment
CN115729727A (en) Fault repairing method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant