A method for automatically updating NPAPI plugins in a Xinchuang system
Through the collaborative work of upgrading service components and upgrading programs, the automation problem of NPAPI plug-in update under the Innovative Innovation Platform is solved, and automatic updates are realized under multiple platforms and multiple browsers are achieved, which improves maintenance efficiency and convenience.
Patent Information
- Application Number
- CN202111273248.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2041-10-29
AI Technical Summary
Under the Innovative Innovation Platform, the update of NPAPI plug-in has difficulty in automatic updates on multiple browsers and multiple Innovative Innovation Platforms, resulting in high maintenance costs and low efficiency.
Through the collaboration between the upgrade service components and the upgrade program, JQUERY and AJAX technologies are used to realize the communication between the browser and the upgrade service components, the shared memory is used to pass parameters, the upgrade program executes sudo commands with root permissions, automatically downloads and installs plug-in upgrade packages, and supports a variety of information innovation platforms and browsers.
It realizes automatic update of NPAPI plug-ins under various information innovation platforms and browsers, reducing manual intervention, improving project implementation and maintenance efficiency, and reducing operating costs.
Smart Images

Figure HDA0003523826450000011 
Figure HDA0003523826450000021 
Figure HDA0003523826450000022
Abstract
Description
Technical Field:
[0001] The present invention relates to a method for automatically updating NPAPI plugins in a Xinchuang system, a method for automatically updating NPAPI plugins in a Xinchuang system Background Art:
[0002] Currently, under the Xinchuang platform, business system manufacturers need to integrate streaming or layout document plugins based on NPAPI technology in web pages to solve operations such as online reading, editing, and saving of streaming / layout documents during the office process of customers. Since the Xinchuang platform is transformed based on the Linux system, the convenience of desktop office is far less than that of the Windows operating system. At the same time, there are a variety of Xinchuang platforms. Once the NPAPI plugin is installed in the Xinchuang system, when the plugin needs to be updated or even updated multiple times later, professional maintenance personnel are required to perform manual installations one by one on each device. For business system manufacturers, only the maintenance cost of the NPAPI plugin will become time-consuming and laborious.
[0003] In response to the existing problems, we start an upgrade program by upgrading the service component to interact with the upgrade server. When the upgrade program detects that the version in the upgrade server is higher than the local plugin version, the upgrade program automatically downloads the corresponding upgrade package to the local client by judging different Xinchuang platforms. The upgrade program will uninstall the previous plugin on the client and then install the downloaded upgrade package to complete the upgrade operation of the plugin. In the process of plugin upgrade, only one manual operation of inputting the password is required. For business system manufacturers, this is not only simple and convenient to deploy, but also greatly reduces the later maintenance and operation costs.
[0004] The main disadvantages of the existing technical solutions are:
[0005] 1. This upgrade method is only applicable to Firefox browsers. For 360 Security Browser, Red Lotus Browser, and QiAnXin Browser based on the chrome kernel, the plugin cannot be normally uninstalled and updated due to permission issues and the inability to execute the sudo command;
[0006] 2. This upgrade solution currently only supports a single Xinchuang platform, and if users have multiple Xinchuang platforms, the plugin cannot be updated;
[0007] Summary: The current technical solution cannot well achieve automatic update of NPAPI plugins in the Xinchuang platform and cannot improve the low efficiency problem in the implementation process of the project.
[0008] The present invention mainly solves the problem that NPAPI plugins under the Xinchuang platform can be automatically updated in all browsers that support NPAPI plugins, improving the work efficiency and convenience of the project:
[0009] 1. Support automatic update of plugins for browsers based on the chrome kernel
[0010] 2. Support various Xinchuang platforms, and customers do not need to judge the Xinchuang platform corresponding to the plugin upgrade package: Since there are generally two to three or more Xinchuang platforms in the real customer environment, and the corresponding plugin upgrade packages are also different. Without professional knowledge, customers cannot judge which Xinchuang platform each upgrade package corresponds to, resulting in difficulties in plugin upgrade and update.
[0011] 3. Improve the project upgrade efficiency, and upgrade implementers do not need to manually update the upgrade package on each computer one by one: When there is a new upgrade package that needs to be updated on the client, the upgrade service component will automatically start the upgrade program to download the upgrade package to the client local, and then execute the upgrade operation without manual intervention, greatly improving the upgrade efficiency.
[0012] 4. Simple and convenient deployment: Just deploy the corresponding plugin upgrade package to the specified upgrade server centrally, and the client NPAPI plugin can complete the upgrade operation according to the version information of the upgrade server. Summary of the Invention:
[0013] The present invention overcomes the deficiencies of the prior art and provides a method for automatically updating the NPAPI plugin in a Xinchuang system.
[0014] A method for automatically updating the NPAPI plugin in a Xinchuang system, characterized in that the method comprises the following steps:
[0015] S1: The business system loads AJAX technology by introducing JQUERY through the browser and sends a POST request through AJAX.
[0016] S2: AJAX calls the UpdateControl interface of the upgrade service component and passes parameters such as the upgrade server URL address.
[0017] S3: After receiving the upgrade request, the upgrade component service program starts the upgrade program and passes the parameters passed by the JS program to the upgrade program through the shared memory method.
[0018] S4: After the upgrade program starts, it obtains the upgrade server URL address through the shared memory technology, sends a request to the upgrade server through the HTTP protocol to obtain the upgrade configuration file Update.ini, which contains the plugin version number of this upgrade, as well as the flag information of each Xinchuang platform and the placement path of the upgrade package.
[0019] S5: The upgrade program obtains the version V1 in the server, then obtains the plugin version number V2 installed in the current Xinchuang computer and compares it with V1, and performs corresponding operations according to the comparison result.
[0020] S6: When V2 is greater than or equal to V1, the upgrade program exits directly without performing any upgrade actions;
[0021] S7: When V2 is less than V1, the upgrade program will obtain the logo of the Xinchuang platform (operating system + chip combination) F1, and compare it cyclically with the Xinchuang platform logo F2 obtained from the configuration file Update.ini downloaded from the upgrade server. When F1 is equal to F2, it obtains the download path of the plugin upgrade package, and sends a request to the upgrade server through the HTTP protocol to download the upgrade package;
[0022] S8: After the upgrade package is downloaded, the upgrade program pops up a window to prompt the user to enter the sudo password. The upgrade program in the present invention will uninstall the plugin in the current Xinchuang computer, and then install the downloaded upgrade package for update;
[0023] S9: After the installation is completed, the upgrade program will obtain the version number V3 of the plugin in the current Xinchuang computer again, and compare it with V2. When V3 is equal to V2, it indicates that the plugin update fails, and the upgrade program prompts that the update fails and exits. The update operation will be performed when the browser loads the plugin next time. When V3 is greater than V2, it indicates that the plugin update is successful. The upgrade program in the present invention prompts that the update is successful, and the program in the present invention exits.
[0024] Among them, the browser loads JQUERY to provide AJAX services. The local upgrade service group includes an upgrade service component and an upgrade program. When the upgrade service component runs, it runs with root privileges. By starting the upgrade program through the upgrade service component, sudo privileges can be obtained. The upgrade program can execute sudo commands to uninstall and install plugins. The upgrade service component connects the network communication between the browser and the upgrade program and the IPC inter-process communication. The upgrade service component parses the AJAX POST request sent by the browser to obtain the upgrade server address parameter passed by the business system, starts the upgrade program, and passes the upgrade server address to the upgrade program through the shared memory method;
[0025] Among them, the business system introduces the AJAX module by loading JQUERY through the browser. The business system forms JSON format data with parameters such as the upgrade server address. The business system sends a POST request through AJAX, calls the UpdateControl interface of the upgrade service component to pass the JSON data. The upgrade service component parses the HTTP request command, starts the upgrade program, and passes the upgrade server URL address to the upgrade program.
[0026] After the upgrade program is started by the upgrade service component, it obtains the upgrade server URL address through shared memory technology, sends an HTTP request to the upgrade server, downloads the upgrade configuration file Update.ini, parses the Update.ini file to obtain the upgrade version number, and compares it with the version number of the locally installed plugin. If an upgrade is required, the upgrade program in the present invention obtains the flags of the operating system + CPU of the Xinchuang computer and compares them with the Flag in the configuration file in a loop to obtain the download address of the plugin upgrade package. The upgrade program in the present invention sends an HTTP request to the upgrade server again to download the upgrade installation package for plugin update operations.
[0027] Among them, the upgrade program communicates with the upgrade server, uninstalls the configuration file Update.ini in the upgrade server to obtain the upgrade version number and downloads the upgrade package; the upgrade program obtains the version number of the locally installed plugin and compares it with the version number obtained from the upgrade server; the upgrade program uninstalls the old version of the plugin installed in the current computer and installs the upgrade installation package downloaded from the upgrade server. The upgrade server can be deployed in the server of the business system or deployed separately to a server, and includes the Update.ini configuration file and various upgrade installation packages under the Xinchuang platform. The configuration items in the Update.ini configuration file include the plugin version number of this upgrade, the number of upgrade packages, and the flags of each Xinchuang platform and the storage path of the plugin upgrade package under this flag, for the upgrade program to compare the plugin version and download the upgrade installation package. The flags of the Xinchuang platform include operating system and CPU information.
[0028] The beneficial effects of the present invention are as follows
[0029] 1. More applicable operating system platforms: Compared with the prior art that only supports a single Xinchuang platform, the present invention also supports various Xinchuang platforms (Kylin system, UOS, Zhongke Fangde, etc.). At the same time, if there is a new Xinchuang platform, it can quickly support the new platform;
[0030] 2. The implementation method is more general: In the prior art, the update package is directly executed by the plugin itself, but in the Xinchuang system, the browser based on the Chromium kernel cannot execute the update package due to permission issues, resulting in plugin update failure; while the present invention starts the upgrade program in the form of a local background service to update the plugin, solving the sudo permission problem.
[0031] 3. Greatly improve the efficiency of project implementation and maintenance: Due to the limitations of existing technologies, it is impossible to automatically update plugins under browsers that support NPAPI plugins arbitrarily on all Xinchuang platforms. Therefore, professional maintenance personnel need to install update packages on each computer according to different Xinchuang platforms. However, the present invention avoids this situation. The plugin installs itself on each client according to the situation of the update package. Except for entering the password once, the whole process does not require the participation of professional maintenance personnel, greatly improving the implementation and maintenance efficiency and the probability of errors. BRIEF DESCRIPTION OF THE DRAWINGS:
[0032] Figure 1 is the system structure diagram of the present invention;
[0033] Figure 2 is the relationship diagram between the browser of the present invention and the local upgrade service group;
[0034] Figure 3 is the relationship diagram between the local upgrade service group of the present invention and the upgrade server;
[0035] Figure 4 is the workflow diagram of the present invention DETAILED DESCRIPTION OF THE INVENTION:
[0036] Refer to Figure 2
[0037] This figure is the system structure diagram of the present invention, which includes a browser, a local upgrade service group, and an upgrade server. The browser is the carrier of the business system, loading JQUERY to provide AJAX services. The local upgrade service group is the core component in the present invention, which includes an upgrade service component and an upgrade program, solving the problem that 360 Security Browser, Red Lotus Browser, and other Xinchuang browsers based on the Chromium kernel under the Xinchuang platform cannot execute the sudo command to uninstall and upgrade operations. The local upgrade service group is installed together with the plugin. When making the installation package, the upgrade service component will be set to run automatically and at startup through a shell script. In this way, when the upgrade service component runs, it runs with root privileges. By starting the upgrade program through the upgrade service component, sudo privileges can be obtained, and the upgrade program can execute the sudo command to uninstall and install the plugin. The upgrade service component is the intermediate bridge in the system of the present invention, connecting the network communication between the browser and the upgrade program and the IPC inter-process communication. The upgrade service component parses the AJAX POST request sent by the browser to obtain the upgrade server address parameter passed by the business system, starts the upgrade program, and passes the upgrade server address to the upgrade program through the shared memory method. The upgrade program is mainly responsible for three aspects of work. One is to communicate with the upgrade server, uninstall the configuration file Update.ini in the upgrade server to obtain the upgrade version number and download the upgrade package. The second is to obtain the version number of the plugin installed locally and compare it with the version number obtained from the upgrade server. The third is to uninstall the old version of the plugin installed on the current computer and install the upgrade installation package downloaded from the upgrade server. The upgrade server can be deployed in the server of the business system or separately deployed to a server, including the Update.ini configuration file and various upgrade installation packages under the Xinchuang platform. The configuration items in the Update.ini configuration file include the plugin version number of this upgrade, the number of upgrade packages, and the flags of each Xinchuang platform (operating system + CPU combination) and the storage path of the plugin upgrade package under this flag, for the upgrade program to compare the plugin version and download the upgrade installation package.
[0038] See Figure 3
[0039] This figure is the relationship diagram between the browser and the local service group in the present invention. The business system loads JQUERY through the browser to introduce the AJAX module. The business system composes parameters such as the upgrade server address into JSON format data. The business system sends a POST request through AJAX, calls the UpdateControl interface of the upgrade service component to pass the JSON data. The upgrade service component parses the HTTP request command, starts the upgrade program, and passes the upgrade server URL address to the upgrade program.
[0040] See Figure 4
[0041] This figure is a relationship diagram of the local upgrade service group and the upgrade server in the present invention. After the upgrade program is started by the upgrade service component, it obtains the upgrade server URL address through shared memory technology, sends an HTTP request to the upgrade server, downloads the upgrade configuration file Update.ini, parses the Update.ini file to obtain the upgrade version number, and compares it with the version number of the locally installed plugin obtained. If an upgrade is required, the upgrade program in the present invention obtains the flag of the operating system + CPU of the Xinchuang computer to loop and compare with the Flag in the configuration file, and obtains the download address of the plugin upgrade package. The upgrade program in the present invention sends an HTTP request to the upgrade server again to download the upgrade installation package for plugin update operations.
[0042] Refer to Figure 1
[0043] S1: The business system loads AJAX technology by introducing JQUERY through the browser and sends a POST request through AJAX.
[0044] S2: AJAX calls the UpdateControl interface of the upgrade service component and passes parameters such as the upgrade server URL address.
[0045] S3: After the upgrade component service program receives the upgrade request, it starts the upgrade program and passes the parameters passed by the JS program to the upgrade program through shared memory.
[0046] S4: After the upgrade program is started, it obtains the upgrade server URL address through shared memory technology, sends a request to the upgrade server through the HTTP protocol to obtain the upgrade configuration file Update.ini. This file contains the plugin version number of this upgrade, as well as the flag information of each Xinchuang platform and the placement path of the upgrade package.
[0047] S5: The upgrade program obtains the version V1 in the server, then obtains the version number V2 of the plugin installed in the current Xinchuang computer and compares it with V1, and performs corresponding operations according to the comparison result.
[0048] S6: When V2 is greater than or equal to V1, the upgrade program exits directly without performing any upgrade actions.
[0049] S7: When V2 is less than V1, the upgrade program will obtain the flag of the Xinchuang platform (operating system + chip combination) F1 and loop and compare it with the Xinchuang platform flag F2 obtained from the downloaded configuration file Update.ini in the upgrade server. When F1 is equal to F2, it obtains the download path of the plugin upgrade package and sends a request to the upgrade server through the HTTP protocol to download the upgrade package.
[0050] S8: After the upgrade package is downloaded, the upgrade program pops up a window asking the user to enter the sudo password. The upgrade program in the present invention will uninstall the plug-in in the current IT-created computer, and then install the downloaded upgrade package for update;
[0051] S9: After the installation is completed, the upgrade program will obtain the version number V3 of the plug-in in the current IT-created computer again and compare it with V2. When V3 is equal to V2, it means that the plug-in update fails. The upgrade program prompts that the update fails and exits. The update operation will be performed when the browser loads the plug-in next time. When V3 is greater than V2, it means that the plug-in update is successful. The upgrade program in the present invention prompts that the update is successful, and the program in the present invention exits.
Claims
1. A method for automatically updating NPAPI plugins in an information technology application innovation system, characterized in that: The method includes the following steps: S1: The business system loads AJAX technology by introducing JQUERY through the browser and sends a POST request through AJAX; the business system includes a browser, a local upgrade service group, and an upgrade server; S2: AJAX calls the UpdateControl interface of the upgrade service component and passes the upgrade server URL address parameter; S3: After the upgrade component service program receives the upgrade request, it starts the upgrade program and passes the parameters sent by the JS program to the upgrade program through the shared memory; S4: After the upgrade program starts, it obtains the upgrade server URL address through the shared memory technology, sends a request to the upgrade server through the HTTP protocol to obtain the upgrade configuration file Update.ini, which contains the plugin version number of this upgrade, as well as the logo information of each Xinchuang platform and the upgrade package placement path; S5: The upgrade program obtains the version V1 in the server, then obtains the plugin version number V2 installed in the current Xinchuang computer and compares it with V1, and performs corresponding operations according to the comparison result; S6: When V2 is greater than or equal to V1, the upgrade program exits directly without performing any upgrade actions; S7: When V2 is less than V1, the upgrade program obtains the Xinchuang platform logo F1, which refers to the operating system + chip combination, and compares it cyclically with the Xinchuang platform logo F2 obtained from the configuration file Update.ini downloaded from the upgrade server. When F1 is equal to F2, it obtains the download path of the plugin upgrade package and sends a request to the upgrade server through the HTTP protocol to download the upgrade package; S8: After the upgrade package is downloaded, the upgrade program pops up a window to prompt the user to enter the sudo password. The upgrade program uninstalls the plugin in the current Xinchuang computer, and then installs the downloaded upgrade package for update; S9: After the installation is completed, the upgrade program obtains the plugin version number V3 in the current Xinchuang computer again and compares it with V2. When V3 is equal to V2, it indicates that the plugin update fails. The upgrade program prompts that the update fails and exits. The update operation will be performed when the browser loads the plugin next time. When V3 is greater than V2, it indicates that the plugin update is successful. The upgrade program prompts that the update is successful and exits.
2. The method for automatically updating NPAPI plugins in an information technology application innovation system according to claim 1, characterized in that: The browser loads JQUERY to provide AJAX services. The local upgrade service group includes an upgrade service component and an upgrade program. The upgrade service component runs with root privileges. The upgrade program is started through the upgrade service component to obtain sudo privileges. The upgrade program executes the sudo command to uninstall and install the plugin. The upgrade service component connects the browser and the upgrade program for network communication and IPC inter-process communication. The upgrade service component parses the AJAX POST request sent by the browser to obtain the upgrade server address parameter passed by the business system, starts the upgrade program, and passes the upgrade server address to the upgrade program through the shared memory.
3. The method for automatically updating NPAPI plugins in an information technology application innovation system according to claim 1, characterized in that: The business system loads the AJAX module by introducing JQUERY through the browser. The business system composes the upgrade server address parameter into JSON format data, and the business system sends a POST request through AJAX to call the UpdateControl interface of the upgrade service component to transfer the JSON data. The upgrade service component parses the HTTP request command, starts the upgrade program, and passes the upgrade server URL address to the upgrade program.
4. The method for automatically updating NPAPI plugins in an information technology application innovation system according to claim 2, characterized in that: After the upgrade program is started by the upgrade service component, it obtains the upgrade server URL address through shared memory technology, sends an HTTP request to the upgrade server, downloads the upgrade configuration file Update.ini, parses the Update.ini file to obtain the upgrade version number, and compares it with the version number of the locally installed plugin. If an upgrade is required, the upgrade program obtains the operating system + CPU flag of the Xinchuang computer and loops to compare it with the Flag in the configuration file to obtain the download address of the plugin upgrade package. The upgrade program sends an HTTP request to the upgrade server again to download the upgrade installation package for plugin update operations.
5. The method for automatically updating NPAPI plugins in an information technology application innovation system according to claim 2, characterized in that: The upgrade program communicates with the upgrade server, uninstalls the configuration file Update.ini in the upgrade server to obtain the upgrade version number and downloads the upgrade package; The upgrade program obtains the version number of the locally installed plugin and compares it with the version number obtained from the upgrade server; The upgrade program uninstalls the old version of the plugin installed on the current computer and installs the upgrade installation package downloaded from the upgrade server; The upgrade server is deployed in the server of the business system or separately deployed to a server, and contains the Update.ini configuration file and various upgrade installation packages under the Xinchuang platform. The configuration items in the Update.ini configuration file include the plugin version number of this upgrade, the number of upgrade packages, and the flag of each Xinchuang platform and the storage path of the plugin upgrade package under this flag, which are used for the upgrade program to compare the plugin version and download the upgrade installation package. The flag of the Xinchuang platform includes operating system and CPU information.
Citation Information
Patent Citations
Method for upgrading plug-in and electronic terminal
CN108681460A
Uninterrupted service upgrading method and system
CN112596771A