A localized plug-in service method, device, electronic device and storage medium

By finding and encapsulating light service plug-ins in the local plug-in library, the compatibility issues between plug-ins and browser versions and host running environments in the existing technology are solved, and efficient and reliable plug-in usage is achieved.

CN111966422BActive Publication Date: 2025-04-04BEIJING AGILESTAR TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010681509.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-15
Publication Date
2025-04-04
Estimated Expiration
2040-07-15

AI Technical Summary

Technical Problem

In the prior art, since the startup of the plug-in depends on the IE browser, there may be compatibility problems such as the browser version and the plug-in version required or the host running environment, resulting in the device being unable to use normally.

Method used

Provides a localized plug-in service method, which determines the light service plug-in to be called by receiving the target object's call plug-in request, and looks for the plug-in in the local plug-in library. If the plugin is available, it is encapsulated as a light service for use by the target object.

Benefits of technology

By obtaining plug-ins locally, conflicts between the plug-ins and the three-party software operating environment can be avoided, and the plug-ins can be ensured in combination with operating environment information, solving compatibility problems and achieving the effect of high cohesion and low coupling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111966422B_ABST
    Figure CN111966422B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a localized plug-in service method, device, electronic device and storage medium. The embodiments of the present application receive a plug-in call request entered by a target object; determine the light service plug-in to be called according to the plug-in call request; if the light service plug-in is found in the local plug-in library, obtain the operating environment information, and determine whether the light service plug-in is available according to the operating environment information; if it is determined that the light service plug-in is available, call the light service plug-in to encapsulate the light service plug-in into a light service for the target object to use the request. By obtaining the plug-in locally, the probability of conflict between the plug-in and the operating environment of the third-party software can be reduced, and combined with the operating environment information, it can further ensure that the called plug-in is available. Even in a one-to-many scenario, the effect of high cohesion and low coupling can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of plug-in services, and in particular, relates to a localized plug-in service method, device, electronic device and storage medium. Background Art

[0002] With the development of Internet of Things technology, the types of external devices are constantly updated, bringing convenience to people. In the actual application of business entry, a client generally connects to a variety of external devices, such as: ID card recognition equipment, handwriting screen equipment, high-definition scanner equipment, scanning equipment, and fingerprint recording equipment, etc. At present, it is mainly provided by the manufacturer of the external device to call the device plug-in (dynamic library dll file), and the developer conducts secondary development, calls the device plug-in provided by the manufacturer, generates Activex control, and the user accesses the plug-in (Activex control) obtained by secondary development through the IE browser to call the device to realize the collection of user information.

[0003] However, in the process of calling the external device, since the startup of the plug-in depends on the browser, there may be compatibility issues such as the browser version being different from the plug-in required version or the host operating environment, so that the device cannot be used normally. Summary of the invention

[0004] In order to solve the technical problem in the above-mentioned prior art that the startup of the plug-in depends on the IE browser, which may cause compatibility issues such as the browser version being different from the plug-in required version or the host operating environment, so that the device cannot be used normally, the present application provides a localized plug-in service method, device, electronic device and storage medium.

[0005] In a first aspect, an embodiment of the present application provides a localized plug-in service method, which is applied to a host side, and the method includes:

[0006] Receive the plug-in call request entered by the target object;

[0007] Determine the light service plug-in to be called according to the plug-in calling request;

[0008] If the light service plug-in is found in the local plug-in library, the operating environment information is obtained, and whether the light service plug-in is available is determined according to the operating environment information;

[0009] If it is determined that the light service plug-in is available, the light service plug-in is packaged into a light service for use by the target object.

[0010] Optionally, the operating environment information includes: a plug-in dependency and a validity period and / or plug-in information of the light service plug-in, and the step of determining whether the light service plug-in is available according to the operating environment information includes:

[0011] Determine the target plug-in that the light service plug-in depends on according to the dependency relationship, and determine whether the target plug-in is stored in the local plug-in library;

[0012] If the target plug-in is stored in the local plug-in library, it is determined whether the validity period of the light service plug-in is after the current time, and / or it is determined whether the plug-in information is consistent with preset reference information.

[0013] Optionally, it also includes:

[0014] Determine, according to the operating environment information, a plurality of operating objects that the light service plug-in depends on;

[0015] For each running object that is not found in the multiple running objects, determining a target plug-in used to generate the running object, and judging whether a device identifier corresponding to the target plug-in is in a permission list;

[0016] If the device identification corresponding to the target plug-in is in the permission list, the target plug-in is run to obtain the running object generated by the target plug-in.

[0017] Optionally, before the step of receiving the plug-in calling request entered by the target object, the step further includes:

[0018] Obtaining device identifications of multiple devices connected to the host end;

[0019] According to the operation of selecting the device identification of the target object, the device to be controlled is determined;

[0020] If the device identification of the device to be controlled is in the permission list, generating a plug-in calling request according to the device identification of the device to be controlled;

[0021] Alternatively, if the device identifier of the device to be controlled is not in the permission list, obtaining configuration information of the device to be controlled;

[0022] If the configuration information meets the preset registration condition, the device identification of the device to be controlled is written into the permission list.

[0023] Optionally, the process of creating the local plug-in library includes:

[0024] Obtaining multiple light service plug-ins and plug-in information of each light service plug-in;

[0025] Determine the running object, access address and configuration information that the light service plug-in depends on according to the plug-in information;

[0026] Performing security verification on the configuration information;

[0027] If the configuration information passes the security verification, the running object is found in the local plug-in library;

[0028] If the running object is not found in the local plug-in library, the running object is obtained from a preset information library and stored in the local plug-in library;

[0029] The light service plug-in is stored in the local plug-in library, and a calling interface of the light service plug-in is generated according to the access address.

[0030] Optionally, it also includes:

[0031] Determine the device identification, authorization information and dependent plug-in information according to the configuration information;

[0032] Determining whether the device identification is in the permission list;

[0033] If the device identification is in the permission list, determining whether the authorization information meets the preset authorization conditions;

[0034] If the authorization information meets the preset authorization condition, the dependent plug-in is determined according to the dependent plug-in information, and if the dependent plug-in is located in the local plug-in library, it is determined that the configuration information passes the security check.

[0035] Optionally, it also includes:

[0036] Traversing the plurality of light services in the host side;

[0037] When it is determined that the light service fails, re-execute the step of packaging the light service plug-in into a light service to restart the light service;

[0038] When it is determined that the light service is online, performing update detection on the light service;

[0039] If it is determined to update the light service plug-in, an installation component corresponding to the light service plug-in is obtained from an update database, and the light service is updated using the installation component.

[0040] In a second aspect, an embodiment of the present application provides a localized plug-in service device, including:

[0041] A receiving module, used to receive a plug-in calling request entered by a target object;

[0042] A determination module, used to determine the light service plug-in to be called according to the plug-in calling request;

[0043] A judgment module, used for obtaining the operating environment information if the light service plug-in is found in the local plug-in library, and judging whether the light service plug-in is available according to the operating environment information;

[0044] The encapsulation module is used to call the light service plug-in to encapsulate the light service plug-in into a light service for use by the target object if it is determined that the light service plug-in is available.

[0045] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.

[0046] According to a fourth aspect, a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute any method according to the first aspect.

[0047] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages compared with the prior art: the embodiment of the present application receives a plug-in calling request entered by the target object; determines the light service plug-in to be called according to the plug-in calling request; if the light service plug-in is found in the local plug-in library, obtains the operating environment information, and determines whether the light service plug-in is available according to the operating environment information; if it is determined that the light service plug-in is available, calls the light service plug-in to encapsulate the light service plug-in into a light service for the target object to use according to the request. By obtaining the plug-in locally, the conflict between the plug-in and the third-party software operating environment can be avoided, and combined with the operating environment information, it can further ensure that the called plug-in is available, even in a one-to-many scenario, the effect of high cohesion and low coupling can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0049] Figure 1 is a flow chart of a localized plug-in service method provided by an embodiment of the present application;

[0050] Figure 2 This is a diagram of the dependency relationship of the light service plug-in provided in the embodiment of the present application;

[0051] Figure 3 is a flowchart of the authentication steps of the target plug-in provided in an embodiment of the present application;

[0052] Figure 4 is a flowchart of another localization plug-in service method provided by an embodiment of the present application;

[0053] Figure 5 is a flow chart of device authentication steps provided in an embodiment of the present application;

[0054] Figure 6 is a flow chart of the local plug-in library creation process provided by an embodiment of the present application;

[0055] Figure 7 is a local resource access control flow chart provided in an embodiment of the present application;

[0056] Figure 8 is a flowchart of another localization plug-in service method provided by an embodiment of the present application;

[0057] Fig. 9 This is a flowchart of the steps for light service plug-in authentication provided by an embodiment of the present application;

[0058] Fig.10 It is a flowchart of the steps of updating and managing the light service plug-in provided in an embodiment of the present application;

[0059] Fig.11 This is a flowchart of the light service plug-in fault handling steps provided in an embodiment of the present application;

[0060] Fig.12 This is a flowchart of the steps for updating a light service plug-in provided in an embodiment of the present application;

[0061] Fig.13 A schematic diagram of a module of a localized plug-in service device provided in an embodiment of the present application;

[0062] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specific embodiments

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] At present, with the development of Internet technology, cloud services combined with edge computing are gradually forming a new scale trend. In terms of centralized processing of cloud computing, the front end has higher requirements for convenience and immediate operation response. At the same time, the complexity and variability of the network environment and local PCs also put forward higher requirements for the security of the desktop. In order to meet the development of high-real-time and low-latency software systems, improve system response time and system stability, and improve the security of local operation and use, most of them currently meet user business needs by adopting plug-in integrated management. For example, in actual application scenarios, a client terminal generally connects to a variety of external devices (ID card reading devices, handwriting screen devices, high-speed scanner devices, scanning devices, and fingerprint recording devices, etc.). At present, it is mainly provided by the manufacturer of the external device to call the device plug-in (dynamic library dll file), and the developer conducts secondary development, calls the device plug-in provided by the manufacturer, generates Activex controls, and users access the plug-in (Activex control) obtained by secondary development through the IE browser to call the device to collect user information. However, in the process of calling the external device, since the startup of the plug-in depends on the IE browser, there may be compatibility issues such as the browser version being different from the plug-in required version or the host operating environment, so that the device cannot be used normally. Based on this, the embodiment of the present application first provides a localized plug-in service method, which is applied to the host side, such as Figure 1 As shown, the method includes:

[0065] Step S101, receiving a plug-in calling request entered by a target object;

[0066] In this step, the target object may be an administrator on the host side or an object of a business service, depending on the actual situation, and the embodiment of the present application does not specifically limit this.

[0067] In an embodiment of the present application, the plug-in request is called according to the business needs of the target object. For example, in an actual application, the user needs to start a printer connected to the host side. At this time, the printer plug-in needs to be called, that is, a printer plug-in request is generated.

[0068] In addition, the plug-in corresponding to the plug-in call request can also be an application plug-in. For example, in actual applications, when an administrator operates the host side (or an ordinary user), he needs to call application A, that is, generate a call request for the application A plug-in. The specific content of the plug-in call request can be determined according to the actual situation.

[0069] Step S102, determining the light service plug-in to be called according to the plug-in calling request;

[0070] In actual applications, the plug-in calling request includes a plug-in identifier, and the light service plug-in that the target object needs to call can be determined by identifying the plug-in identifier.

[0071] In this step, the light service plug-in can be a PE (installation plug-in), a dll (dynamic library) file or an exe (executable program).

[0072] Step S103: if the light service plug-in is found in the local plug-in library, the operating environment information is obtained, and whether the light service plug-in is available is determined according to the operating environment information;

[0073] In an embodiment of the present application, it is first determined whether the light service plug-in that the target object needs to call is in the local plug-in library, wherein the local plug-in library can be a storage area in the host side for storing light service plug-ins. Then, if the light service plug-in is found in the local plug-in library, the current operating environment information is obtained, wherein the operating environment information may include the application system of the host side (such as Windows) and the operating objects required by the plug-in (such as C++ objects). Finally, it is determined whether the light service plug-in is available based on the operating environment information, that is, whether the operating environment information is consistent with the configuration information of the light service plug-in, so as to ensure that the light service plug-in can be used in the current operating environment. In addition, the embodiment of the present application can reduce the probability of conflict between the plug-in and the operating environment of the third-party software by obtaining the plug-in locally.

[0074] Step S104: If it is determined that the light service plug-in is available, the light service plug-in is packaged into a light service for use by the target object.

[0075] In this step, when it is determined that the light service plug-in is available, the light service plug-in is encapsulated into a light service. In actual applications, after the light service plug-in is encapsulated into a light service, the light service can be used as a target object in the host side for business support, or the light service can be arranged to go online to serve the remote target object. The embodiments of the present application do not make specific limitations on this.

[0076] Among them, the light service plug-in can be packaged into a light service when the user needs to call it, or the light service can be pre-packaged for the user to select and use. The specific situation can be determined according to actual conditions.

[0077] The embodiment of the present application receives a plug-in call request entered by the target object, determines the light service plug-in to be called according to the plug-in call request, and first determines the light service plug-in required by the target object; if the light service plug-in is found in the local plug-in library, obtains the current operating environment information, and determines whether the light service plug-in is available according to the operating environment information, so as to ensure that the plug-in to be called can be started in the current operating environment, and by obtaining the light service plug-in locally, it can also avoid the problem of conflict between the light service plug-in and the third-party software operating environment, and realize cross-browser, ActiveX control (ocx control)-free compatible running of the light service plug-in; if it is determined that the light service plug-in is available, call the light service plug-in to encapsulate the light service plug-in into a light service for the target object to use according to the request, even in the face of a one-to-many scenario (for example, there are many external devices in the desk or the desk is installed with devices), the effect of high cohesion and low coupling can be achieved.

[0078] Furthermore, the light service plug-in in the local plug-in library can be downloaded by the administrator or provided by the manufacturer of the device, so security issues will be involved. In view of this, in another embodiment provided in the present application, the operating environment information includes: the plug-in dependency and validity period and / or plug-in information of the light service plug-in. In step S103, the step of determining whether the light service plug-in is available according to the operating environment information includes:

[0079] First, determine the target plug-in that the light service plug-in depends on according to the dependency relationship, and determine whether the target plug-in is stored in the local plug-in library;

[0080] In the embodiment of the present application, it is necessary to determine whether the target plug-in that the light service plug-in depends on stores the target plug-in. In actual applications, the dependency relationship between light service plug-ins can be a calling relationship of C++ objects, such as Figure 2 As shown, assuming that there are plug-in A and plug-in B on the host side, the C++ objects generated during the activation of plug-in A are service A and service B, and during the operation of plug-in B, service B needs to be called to generate service C, that is, plug-in B depends on plug-in A, and plug-in A also needs to call service C generated by plug-in B, so plug-in A also depends on plug-in B. The embodiment of the present application first determines whether the target plug-in is stored in the local plug-in library through the dependency relationship, which can ensure that the light service plug-in can be enabled.

[0081] Secondly, if the target plug-in is stored in the local plug-in library, it is determined whether the validity period of the light service plug-in is at the current time;

[0082] In an embodiment of the present application, the life cycle of the light service plug-in can also be combined to determine whether the light service plug-in is within the validity period. Specifically, by obtaining the current time and comparing it with the validity period of the light service plug-in, the judgment result of whether the light service plug-in is valid can be determined to avoid calling an unavailable light service plug-in.

[0083] In addition, it is determined whether the plug-in information is consistent with the preset reference information.

[0084] In an embodiment of the present application, the plug-in information may include the light service plug-in name, version number, calculated MD5 value, dependent files, the light service plug-in accessible directory and the light service plug-in storage directory and other plug-in-related information. Specifically, the preset reference information is consistent with the authentication item contained in the plug-in information. The open source information can be obtained in advance from the manufacturer or entered by the administrator. The embodiment of the present application does not make specific limitations on this. When the plug-in information is consistent with the preset reference information, the security of the light service plug-in can be determined to provide users with a safe light service plug-in.

[0085] Further, in the embodiment of the present application, the authentication process of the light service plug-in in the local plug-in library on the host side may also include the authentication process of the target plug-in that the light service plug-in depends on, such as Figure 3 As shown, including:

[0086] Step S301, determining a plurality of running objects that the light service plug-in depends on according to the running environment information;

[0087] In this step, the running environment information includes the running object information that the light service plug-in depends on, and the multiple running objects (C++ objects) that the light service plug-in depends on can be directly determined through the running environment information.

[0088] In actual applications, the running object may refer to an object obtained by encapsulating the target file that the light service plug-in depends on. For example, in the case of background registration, the multiple plug-ins that the light service plug-in depends on may be multiple dll files. In this case, the dll is called a running object. In the embodiment of the present application, the running object may not necessarily run independently. The file that depends on when running the light service plug-in is the running object.

[0089] Step S302, for each running object that is not found in the multiple running objects, determining a target plug-in for generating the running object;

[0090] In this step, the multiple running objects that the service plug-in depends on may be generated by the same target plug-in or by different target plug-ins. In this case, for each running object that is not found in the multiple running objects, it is necessary to determine the target plug-in used to generate the running object.

[0091] Step S303, determining whether the device identifier corresponding to the target plug-in is in the permission list;

[0092] In this step, by determining whether the device identification corresponding to the target plug-in is in the permission list, unregistered devices can be screened out, thereby reducing the possibility of the host being invaded.

[0093] Step S304: If the device identifier corresponding to the target plug-in is in the permission list, the target plug-in is run to obtain the running object generated by the target plug-in.

[0094] In actual applications, the dependency relationship between light service plug-ins can be a calling relationship of C++ objects. As in the above embodiment, assuming that there are plug-in A and plug-in B on the host side, the C++ objects generated during the activation of plug-in A are service A and service B, and during the operation of plug-in B, service B needs to be called to generate service C, that is, plug-in B depends on plug-in A, and plug-in A also needs to call service C generated by plug-in B, so plug-in A also depends on plug-in B. The embodiment of the present application first determines all the running objects required for the operation of the light service plug-in through the dependency relationship, and then determines the target plug-in corresponding to the running object to determine whether there is a target plug-in in the local plug-in library. Only when the target plug-in has been stored in the local plug-in library can the light service plug-in be enabled.

[0095] In addition, if the device identification corresponding to the target plug-in is not in the permission list, it means that the device to which the target plug-in belongs may have unsafe factors. In order to protect the host from malicious attacks by the device, the target plug-in is not allowed to be called.

[0096] With the development of Internet of Things technology, the types of external devices are constantly changing, bringing convenience to people. In the actual application of business entry, a client generally connects to multiple external devices, such as: ID card reading device, handwriting screen device, high-speed scanner device, scanning device, and fingerprint recording device, etc. Therefore, in the embodiment of the present application, a process of first authenticating and managing the device when an external device is detected is also provided. Step S101, before receiving the call plug-in request for target object entry, such as Figure 4 As shown, it also includes:

[0097] Step S410, obtaining device identifications of multiple devices connected to the host end;

[0098] In this step, in view of the actual situation that a host may be connected to multiple devices, the embodiment of the present application first determines the device identifications of the multiple devices connected to the host, and then performs authentication detection on the devices to improve the security of the host.

[0099] Step S420, determining the device to be controlled according to the operation of selecting the device identification of the target object;

[0100] In an embodiment of the present application, an interface for selecting a device may be provided to the user, and the operation of selecting the device by the user is mapped to a device identifier, and finally the device that the user needs to operate is determined.

[0101] Step S421: if the device identification of the device to be controlled is in the permission list, a plug-in calling request is generated according to the device identification of the device to be controlled;

[0102] In an embodiment of the present application, the permission list can be a permission list automatically generated after the light service plug-in and device information are registered in the background. Only the devices entered into the permission list are considered to be safe and available, and a plug-in call request corresponding to the device identifier of the device to be controlled is generated.

[0103] In addition, in step S422, if the device identification of the device to be controlled is not in the permission list, obtaining the configuration information of the device to be controlled;

[0104] In this step, the configuration information of the device to be controlled may include: input device type, device model, manufacturer information, vendor identification code VID (Vender ID) and product identification code PID (Product ID) and other information, but is not limited to this. The specific content may be determined according to actual conditions.

[0105] Step S423: If the configuration information meets the preset registration condition, the device identification of the device to be controlled is written into the permission list.

[0106] In an embodiment of the present application, the preset registration conditions may include multiple sub-conditions that correspond one by one to the information items in the configuration information. For example, in an actual situation, the preset registration conditions include: input device type adaptation, device model adaptation, manufacturer information adaptation, vendor identification code VID adaptation, and product identification code PID adaptation. The specific content included in the preset registration conditions may be determined according to the actual situation.

[0107] In practical applications, such as Figure 5 As shown in the figure, when a new external device D needs to be connected to the desk host for use, first, the external device information needs to be registered in the management background, and the device type, device model, manufacturer information, vendor identification code VID (Vender ID) and product identification code PID (Product ID) and other information need to be entered and stored in the background database. Then, when the desk host calls the external device D, the main process is as follows Figure 2As shown, the external device information M2 of the local seat host is obtained through the maintenance service module in the localized desktop light service, and M2 is encrypted to obtain the encrypted information M2′. Secondly, the user sends the encrypted information to the background service by running the maintenance service in the supporting middleware service in the background business system. Thirdly, the background maintenance module decrypts the M2′ information to obtain the decrypted plaintext information M2. Finally, the registered device information in the database is traversed and checked. If the device D information exists in the database, the device D is a safe device in normal use. Otherwise, the device is recorded as an unregistered device and is not used.

[0108] In the embodiment of the present application, a specific embodiment of the process of creating a local plug-in library is also provided, such as Figure 6 As shown, including:

[0109] Step S601, obtaining a plurality of the light service plug-ins and plug-in information of each of the light service plug-ins;

[0110] In this step, the plug-in information may include the running object and access address and configuration information that the light service plug-in depends on, but is not limited to this. The specific settings can be determined according to actual conditions.

[0111] Step S602: determining the running object, access address and configuration information that the light service plug-in depends on according to the plug-in information;

[0112] In this step, based on the content in the plug-in information, the running object, access address and configuration information that the light service plug-in depends on can be determined to perform comprehensive security authentication on the plug-in information.

[0113] Step S603, performing security verification on the configuration information;

[0114] Step S604: if the configuration information passes the security verification, the running object is found in the local plug-in library;

[0115] In this step, the step of performing security verification on the configuration information can specifically adopt a method of traversing a preset whitelist to determine whether the light service plug-in is a registered security plug-in to prevent malicious attacks by the plug-in.

[0116] Among them, the configuration information may include: version number, calculated MD5 value, dependent files, the light service plug-in accessible directory and the light service plug-in storage directory and other information. Correspondingly, the whitelist stores content corresponding to each item of information in the configuration information for comparison and verification of the configuration information content.

[0117] Step S605: if the running object is not found in the local plug-in library, the running object is obtained from a preset information library and stored in the local plug-in library;

[0118] In an embodiment of the present application, if the running object does not exist, the running object can be obtained from a preset information library, wherein the preset information library can be set on the host side, or it can be an information library in the cloud for storing target objects. The running object refers to the dependent file (such as a C++ object) that the microservice plug-in depends on. After obtaining the running object, the running object is stored in the local client storage space. The stored data cannot be modified or deleted by ordinary users, and the administrator user can directly organize and process the data.

[0119] Step S606: store the light service plug-in in the local plug-in library, and generate a calling interface of the light service plug-in according to the access address.

[0120] In actual applications, the acquisition process of the light service plug-in can be achieved through address resolution. In order to ensure data security, it can also be achieved through protocol resolution. The specific implementation process can be selected according to actual conditions.

[0121] In the embodiment of the present application, in order to protect the security of the light service plug-in and the locally stored data and to control the access to the data, a new storage space (i.e., a local plug-in library) is created on the local client, and the local plug-in library is used to store the light service plug-in and the plug-in information (such as the data related to the localized middleware and.)

[0122] In practical applications, such as Figure 7As shown, during the background registration process, the plug-in information of the light service plug-in to be registered is input. If the running object determined according to the plug-in information is not in the local plug-in library, the running object is obtained from the preset information library and stored in the local plug-in library (i.e., the database). In addition, the plug-in information can also be saved in the local plug-in library to facilitate viewing the running objects that the light service plug-in depends on, or the plug-in information can be saved in other storage areas on the host side. The specific details can be determined according to the actual situation. When the local client of the light service plug-in is updated, the whitelist can be traversed first to obtain the dependent plug-in information of the microservice plug-in to be called, whether the dependent files of the microservice plug-in to be updated exist locally, and if If it does not exist, after obtaining the running object from the information library, the running object will be stored in the local client storage space. This stored data cannot be modified or deleted by ordinary users. Administrator users can directly organize and process the data. In the actual application scenario of the above-mentioned background registration process, the directory that the plug-in needs to access is entered. During the control loading process, the directory security control is performed. Specifically, the authorized local directory information can be directly accessed through the calling interface of the light service plug-in. If the access address is not obtained from the plug-in information in the actual application, the default local directory information can be accessed. On the one hand, access security is guaranteed, and on the other hand, attacks by malicious plug-ins are prevented.

[0123] Furthermore, if Figure 8 As shown, the embodiment of the present application also provides a method for determining whether the configuration information passes the security check, including:

[0124] Step S801, determining the device identification, authorization information and dependent plug-in information according to the configuration information;

[0125] Step S802, determining whether the device identification is in the permission list;

[0126] Step S803, if the device identification is in the permission list, determining whether the authorization information meets the preset authorization conditions;

[0127] Step S804: if the authorization information meets the preset authorization condition, the dependent plug-in is determined according to the dependent plug-in information; if the dependent plug-in is located in the local plug-in library, it is determined that the configuration information passes the security check.

[0128] In an embodiment of the present application, the configuration information includes a device identifier, authorization information, and dependent plug-in information. First, it is determined whether the device identifier is in the permission list. If the device identifier is in the permission list, it proves that the device is a device that has been registered on the host side. Then, it is determined whether the authorization information meets the preset authorization conditions. If the authorization information meets the preset authorization conditions, it proves that the light service plug-in has passed the trust authorization of the manufacturer or the host side. Finally, the dependent plug-in is determined based on the dependent plug-in information. If the dependent plug-in is located in the local plug-in library, it proves that the light service plug-in can run on the host side. Finally, it is determined that the configuration information passes the security check.

[0129] Step S805: store the light service plug-in in the local plug-in library.

[0130] In actual application, you first need to register the new light service plug-in in the management background, enter the light service plug-in name, version number, digital signature, calculate the MD5 value, dependent files, the light service plug-in accessible directory and light service plug-in storage directory and other information, and store them in the background database. Or generate a whitelist list to prepare for the light service plug-in authentication part later. This process includes the authentication management part of the light service plug-in, such as Fig. 9 As shown, the specific description is as follows: the maintenance service accesses the local-side specific storage area in real time to find the local plug-in to be called. Among them, the local-side specific storage area refers to the storage area accessed and stored by the localized light service (localized middleware). The maintenance service obtains information related to the plug-in, such as the light service plug-in name, version number, file MD5 value, light service plug-in digital signature and other information. The plug-in information is uploaded to the background. Or the whitelist list is downloaded from the background. Traverse the stored plug-in list (or traverse the whitelist list downloaded to the local) to see if it is in the registered plug-in information list. If the light service plug-in has been registered, then the light service plug-in is allowed to be called by the local side. Otherwise, it is prompted that the service plug-in is an unregistered plug-in and will not be called.

[0131] In another embodiment provided by the present application, a light service plug-in update management method is also provided, such as Fig.10 As shown, including:

[0132] Step S1001, traversing a plurality of light services in the host side;

[0133] Step S1002, when it is determined that the light service fails, re-execute the step of packaging the light service plug-in into a light service to restart the light service;

[0134] In this step, the specific implementation of determining the minor service failure may be determined according to actual conditions. Fig.11As shown, when the light service plug-in in the host side fails (it may fail during the use of the device or during the plug-in update process), the front end sends a host side fault help request, the request message is in json data format, encrypted using encryption algorithm A, the management service receives the request message, decrypts the encrypted message, obtains the decrypted message, and parses the request message; the management service sends a request to the maintenance service, encrypts the message using encryption algorithm B, and notifies the maintenance service to respond to the request sent by the business system front end; the maintenance service receives the request message, decrypts the encrypted message, obtains the decrypted message, and parses the request message; the maintenance service responds to the request, first, the maintenance service instantly captures the local system information (for example: system error information, CPU usage, memory usage, etc.) and screen resource information and uploads it to the background, where the screen resource information refers to the screen recording information of the host side when the problem occurs, realizing remote access to the host side. At the same time, the log service pushes the service and plug-in call and operation logs to the background in real time; the background analyzes the log, and can view the real-time information of the local client screen error at any time; to achieve rapid problem finding and efficient problem location and solution.

[0135] Step S1003, when it is determined that the light service is online, update detection is performed on the light service;

[0136] In actual applications, during the background registration process, input the dependency plug-in information of the light service plug-in to be registered, and store the dependency information in the database. When the local client of the light service plug-in is updated, first traverse the whitelist to obtain the dependency plug-in information of the microservice plug-in to be called, and check whether the dependency file of the light service plug-in to be updated exists locally. If not, update, download, and store it in the local client local plug-in library. This stored part of the data cannot be modified or deleted by ordinary users, and the administrator user can directly organize and process the data. During the background registration process, input the directory that the plug-in needs to access. During the process of loading the control, perform security control of the directory to ensure access security on the one hand and prevent attacks by malicious plug-ins on the other.

[0137] Step S1004: if it is determined to update the light service plug-in, an installation component corresponding to the light service plug-in is obtained from an update database, and the light service is updated using the installation component.

[0138] In actual applications, based on the authentication operation for the update part of the light service plug-in, the update service detects in real time whether the local light service plug-in is the latest light service plug-in to be called, such as Fig.12As shown, the specific description is as follows: the update service obtains the relevant information of the local light service plug-in and service in real time, such as version number, MD5 value, digital signature and other information; the update service accesses the whitelist list generated in the background during the download registration process to the local in real time; the update service traverses the whitelist list to check whether the local light service plug-in (or service) is the latest version, and whether the update flag needs to be updated. If an update is required, the update service sends a request to download the plug-in (such as a C++ plug-in) or service to download it. At the same time, check the dependent files of the light service plug-in (or service) in the whitelist, and traverse whether there are dependent files locally. If not, the update service continues to send requests to download dependent files to download and update dependent files.

[0139] In another embodiment provided by the present application, a localized plug-in service device is also provided, such as Fig.13 As shown, including:

[0140] Receiving module 01, used to receive a plug-in calling request entered by a target object;

[0141] Determining module 02, used to determine the light service plug-in to be called according to the plug-in calling request;

[0142] The judgment module 03 is used to obtain the operating environment information if the light service plug-in is found in the local plug-in library, and judge whether the light service plug-in is available according to the operating environment information;

[0143] The encapsulation module 04 is used to, if it is determined that the light service plug-in is available, call the light service plug-in to encapsulate the light service plug-in into a light service for use by the target object.

[0144] In another embodiment of the present application, an electronic device is provided, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0145] Memory, used to store computer programs;

[0146] The processor is used to implement the localized plug-in service method described in the method embodiment when executing the program stored in the memory.

[0147] In the electronic device provided by the embodiment of the present application, the processor implements the call plug-in request entered by receiving the target object by executing the program stored in the memory; determines the light service plug-in to be called according to the call plug-in request; if the light service plug-in is found in the local plug-in library, obtains the operating environment information, and determines whether the light service plug-in is available according to the operating environment information; if it is determined that the light service plug-in is available, calls the light service plug-in to encapsulate the light service plug-in into a light service for the target object to use. According to the request, by obtaining the plug-in locally, the probability of conflict between the plug-in and the third-party software operating environment can be reduced, and combined with the operating environment information, it can further ensure that the called plug-in is available, even in the face of a one-to-many scenario, it can also achieve the effect of high cohesion and low coupling. The communication bus 1140 mentioned in the above electronic device can be a peripheral component interconnect standard (Peripheral Component Interconnect, referred to as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, referred to as EISA) bus, etc. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0148] The communication interface 1120 is used for communication between the above electronic device and other devices.

[0149] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

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

[0151] In another embodiment of the present application, a computer-readable storage medium is provided, on which a program of the information transmission method is stored. When the program of the information transmission method is executed by a processor, the steps of the localized plug-in service described in the method embodiment are implemented.

[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk (SSD)), etc.

[0153] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A localized plug-in service method, applied to a host, characterized in that: The host side is provided with a local plug-in library, and the local plug-in library is used to store the light service plug-in of the host side, so as to obtain the light service plug-in locally from the host side to reduce the conflict between the light service plug-in and the third-party software running environment; the method comprises: Receive the plug-in call request entered by the target object; Determine the light service plug-in to be called according to the plug-in calling request; If the light service plug-in to be called is found in the local plug-in library, the operating environment information is obtained, the operating environment information includes the dependency relationship and validity period of the light service plug-in to be called, and whether the light service plug-in to be called is available is determined according to the operating environment information, including: determining the target plug-in on which the light service plug-in to be called depends according to the dependency relationship, and determining whether the target plug-in is stored in the local plug-in library; if the target plug-in is already stored in the local plug-in library and the validity period of the light service plug-in to be called is after the current time, determining that the light service plug-in to be called is available; If it is determined that the light service plug-in to be called is available, encapsulating the light service plug-in to be called into a light service for use by the target object; The operating environment information further includes: operating object information that the light service plug-in to be called depends on, and the method further includes: an authentication process for the target plug-in, the authentication process including: According to the running object information on which the light service plug-in to be called depends, determine multiple running objects on which the light service plug-in to be called depends, where the multiple running objects are generated by one target plug-in or different target plug-ins; For each running object that is not found among the multiple running objects, determining a target plug-in among the target plug-ins for generating each running object that is not found; Determine whether a device identifier corresponding to a target plug-in for generating each of the running objects that are not found is located in a permission list, wherein the device identifier is a device identifier of multiple devices connected to the host end; if the device identifier is located in the permission list, run the target plug-in for generating each of the running objects that are not found to generate each of the running objects that are not found.

2. The localization plug-in service method according to claim 1, characterized in that: The operating environment information also includes: plug-in information, and the step of determining whether the light service plug-in to be called is available according to the operating environment information also includes: If the target plug-in is stored in the local plug-in library, it is determined whether the plug-in information is consistent with preset reference information.

3. The localization plug-in service method according to claim 1, characterized in that: Before the step of receiving the call plug-in request entered by the target object, the step further includes: Obtaining device identifications of multiple devices connected to the host end; According to the operation of selecting the device identification of the target object, the device to be controlled is determined; If the device identification of the device to be controlled is in the permission list, generating a plug-in calling request according to the device identification of the device to be controlled; Alternatively, if the device identifier of the device to be controlled is not in the permission list, obtaining configuration information of the device to be controlled; If the configuration information meets the preset registration condition, the device identification of the device to be controlled is written into the permission list.

4. The localization plug-in service method according to claim 1, characterized in that: The process of creating the local plug-in library includes: Obtaining multiple light service plug-ins and plug-in information of each light service plug-in; Determine the running object, access address and configuration information that the light service plug-in depends on according to the plug-in information; Performing security verification on the configuration information; If the configuration information passes the security verification, the running object is found in the local plug-in library; If the running object is not found in the local plug-in library, the running object is obtained from a preset information library and stored in the local plug-in library; The light service plug-in is stored in the local plug-in library, and a calling interface of the light service plug-in is generated according to the access address.

5. The localization plug-in service method according to claim 4, characterized in that: Also includes: Determine the device identification, authorization information and dependent plug-in information according to the configuration information; Determining whether the device identification is in the permission list; If the device identification is in the permission list, determining whether the authorization information meets the preset authorization conditions; If the authorization information meets the preset authorization condition, the dependent plug-in is determined according to the dependent plug-in information, and if the dependent plug-in is located in the local plug-in library, it is determined that the configuration information passes the security check.

6. The localization plug-in service method according to claim 1, characterized in that: Also includes: Traversing the plurality of light services in the host side; When it is determined that the light service fails, re-execute the step of encapsulating the light service plug-in to be called into the light service to restart the light service; When it is determined that the light service is online, performing update detection on the light service; If it is determined to update the light service plug-in to be called, an installation component corresponding to the light service plug-in to be called is obtained from an update database, and the light service is updated using the installation component.

7. A localized plug-in service device, characterized in that: include: The host side is provided with a local plug-in library, and the local plug-in library is used to store the light service plug-in of the host side, so as to obtain the light service plug-in locally from the host side to reduce the conflict between the light service plug-in and the third-party software running environment; as well as A receiving module, used to receive a plug-in calling request entered by a target object; A determination module, used to determine the light service plug-in to be called according to the plug-in calling request; A judgment module, used for obtaining operating environment information if the light service plug-in to be called is found in the local plug-in library, the operating environment information including the dependency relationship and validity period of the light service plug-in to be called, and judging whether the light service plug-in to be called is available according to the operating environment information, including: determining the target plug-in on which the light service plug-in to be called depends according to the dependency relationship, and judging whether the target plug-in is stored in the local plug-in library; if the target plug-in is already stored in the local plug-in library and the validity period of the light service plug-in to be called is after the current time, determining that the light service plug-in to be called is available; A packaging module, for, if it is determined that the light service plug-in to be called is available, calling the light service plug-in to be called to package the light service plug-in to be called into a light service for use by the target object; The operating environment information also includes: the operating object information on which the light service plug-in to be called depends; the judgment module is also used to: authenticate the target plug-in; when authenticating the target plug-in, specifically to: According to the running object information on which the light service plug-in to be called depends, determine multiple running objects on which the light service plug-in to be called depends, where the multiple running objects are generated by one target plug-in or different target plug-ins; For each running object that is not found among the multiple running objects, determining a target plug-in among the target plug-ins for generating each running object that is not found; Determine whether a device identifier corresponding to a target plug-in for generating each of the running objects that are not found is located in a permission list, wherein the device identifier is a device identifier of multiple devices connected to the host end; if the device identifier is located in the permission list, run the target plug-in for generating each of the running objects that are not found to generate each of the running objects that are not found.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and is characterized in that the processor implements the steps of the method described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and apparatus for installing application plugins

    CN105138352A

  • Service framework system

    CN106657265A

  • Cross-platform browser peripheral calling method

    CN110457145A

  • Information processing system, information processing apparatus, and information processing method

    US20150271348A1