Domestic environment-oriented cross-platform application market desktop software system implementation method
By adopting the combination of Electron technology, Golang client daemon and Shell dynamic script library in the cross-platform application market desktop software, the problem of insufficient application distribution accuracy and compatibility challenges in the domestic environment is solved, and the application's password-free installation and more accurate distribution strategies are realized, reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202411771901.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
AI Technical Summary
The existing cross-platform application market desktop software has problems such as insufficient distribution accuracy, compatibility challenges and version dependency risks in the domestic environment, which limits its stability and wide applicability in different environments.
The client interface is built using Electron technology, combined with the Golang client daemon and the Shell dynamic script library, and integrated into a unified installation package. By obtaining root permissions and collecting key information for matching and issuing applications, a more accurate and flexible distribution strategy is achieved.
It realizes password-free installation of applications, more accurate application matching and distribution, reduces software operation and maintenance costs, and is suitable for software companies that widely adopt JavaWeb technology systems.
Smart Images

Figure CN119690464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application management, and in particular to a method for realizing a cross-platform application market desktop software system for a localized environment. Background Art
[0002] Currently, there is a lack of open-source, cross-platform application market desktop software solutions designed for localized environments. Most of the existing application market software is provided by operating system developers, which limits the innovation and expansion of third-party developers in this field. Technical analysis reveals that some manufacturers have adopted a composite technology stack that combines Python, pyQt, JavaWeb and Shell scripts to build desktop clients. Among them, Shell scripts are used to read and parse the basic information of the operating system and distribute applications by approximately matching the names of the operating system and processor. However, this matching mechanism has the problem of insufficient accuracy, which may lead to distribution errors. At the same time, because its architecture is deeply bound to the Python environment, it may not only face compatibility challenges, but also potential version dependency risks, which limits its stability and wide applicability in different environments. Many Python and Shell scripts are also not maintained to the backend services, and problems need to be updated in the client. Therefore, seeking a more accurate, flexible and adaptable distribution strategy that can adapt to the changing technical environment has become the key to optimizing such application market software. Summary of the invention
[0003] The technical problem solved by the present invention is to provide a method for realizing a desktop software system of a cross-platform application market in a localized environment, and to provide a distribution strategy that is more accurate, more flexible and adaptable to a changing technical environment.
[0004] The basic solution provided by the present invention is a method for implementing a cross-platform application market desktop software system for a localized environment, comprising the following steps:
[0005] S1. Integrate the Electron-based client interface, Golang client daemon, and Shell dynamic script library into a unified installation package;
[0006] S2. Obtain user root privileges for installation;
[0007] S3. Create and start a systemd-based daemon self-starting service through Elecron's installation script daemon;
[0008] S4. When the Electron client is opened, it checks whether the user has root privileges. If not, it calls the Golang daemon.
[0009] S5. Collect four key information: operating system manufacturer, operating system version, processor manufacturer, and processor version for matching and issuing applications.
[0010] Furthermore, the Golang client daemon process and the Electron client interface exchange data via HTTP and WebSocket protocols. The communication process is encrypted using the national encryption standard algorithm. The client daemon process provides application market self-upgrade, patch reception and installation, command execution, and multi-server detection functions.
[0011] Furthermore, the applications listed in the application market support the selection of an adaptation environment, which includes the operating system manufacturer and version, processor manufacturer and version, and the installation command, uninstallation command, package name, and version number. The package name is used as the unique identifier of the application. When the Electron client interface queries the application list, it queries the most recently submitted version that meets the adaptation environment.
[0012] Furthermore, when designing an application upgrade strategy, the system checks whether the currently installed software version is the same as the latest version to determine whether an update is required.
[0013] Furthermore, the Shell dynamic script library includes package manager detection, key information detection, installed application detection, client UUID generation, application installation status detection, and system information detection functions.
[0014] Further, the package manager detects: first detects whether deb and rpm package management tools exist, and when both exist, selects one according to the manufacturer;
[0015] The key information detection: detect the operating system manufacturer and operating system version through / etc / os-release, detect the processor manufacturer, processor version, and host serial number through dmidecode, detect the application market version number through the package manager, and detect the local area network IP and MAC address set through "ip a";
[0016] Installed application detection: obtain a list of installed application package names through a package manager, then scan the corresponding .desktop file through the package name to identify whether it is a displayable application, and obtain the application name, application icon, application version, application description, and application opening command through the .desktop file;
[0017] Client UUID generation: Generate UUID through host serial number and MAC address;
[0018] The application installation status detection: directly query the application installation status through the package installation tool, and scan the corresponding .desktop file through the package name to obtain the open command;
[0019] The system information detection: obtains information such as the operating system, processor, disk, memory, and network card through files or commands such as / etc / os-version, / etc / os-release, demidecode, and ip.
[0020] The principles and advantages of the present invention are:
[0021] 1. Obtain root permissions to install apps without passwords
[0022] 2. Through the collection of four key information such as operating system manufacturer, operating system version, processor manufacturer and processor version, matching and issuing applications can be more accurate.
[0023] 3. Decide whether to update the application by comparing the version numbers. Only query the latest uploaded version that matches, solving the problem of whether the application is upgraded or downgraded.
[0024] 4. Use dynamic script libraries to separate functions that are prone to adaptation problems into scripts as much as possible, effectively reducing software operation and maintenance costs
[0025] 5. More suitable for software companies that use JavaWeb technology system for development. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Schematic diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following is further described in detail through specific implementation methods:
[0028] The embodiment is basically as shown in the attached Figure 1 As shown:
[0029] A method for implementing a cross-platform application market desktop software system for a localized environment includes the following steps:
[0030] S1. Integrate the Electron-based client interface, Golang client daemon, and Shell dynamic script library into a unified installation package;
[0031] S2. Obtain user root privileges for installation;
[0032] S3. Create and start a systemd-based daemon self-starting service through Elecron's installation script daemon;
[0033] S4. When the Electron client is opened, it checks whether the user has root privileges. If not, it calls the Golang daemon.
[0034] S5. Collect four key information: operating system manufacturer, operating system version, processor manufacturer, and processor version for matching and issuing applications.
[0035] The Golang client daemon process and the Electron client interface exchange data via HTTP and WebSocket protocols. The communication process is encrypted using the national encryption standard algorithm. The client daemon process provides application market self-upgrade, patch reception and installation, command execution, and multi-server detection functions.
[0036] Applications listed in the application market support the selection of an adaptation environment, which includes the operating system manufacturer and version, processor manufacturer and version, and the installation command, uninstallation command, package name, and version number. The package name is used as the unique identifier of the application. When querying the application list in the Electron client interface, the most recently submitted version that meets the adaptation environment is queried.
[0037] When designing an application upgrade strategy, the system checks whether the currently installed software version is the same as the latest version to determine whether an update is required.
[0038] The Shell dynamic script library includes package manager detection, key information detection, installed application detection, client UUID generation, application installation status detection, and system information detection functions.
[0039] The package manager detection: first detect whether the deb and rpm package management tools exist, and if both exist, select one according to the manufacturer;
[0040] The key information detection: detect the operating system manufacturer and operating system version through / etc / os-release, detect the processor manufacturer, processor version, and host serial number through dmidecode, detect the application market version number through the package manager, and detect the local area network IP and MAC address set through "ip a";
[0041] Installed application detection: obtain a list of installed application package names through a package manager, then scan the corresponding .desktop file through the package name to identify whether it is a displayable application, and obtain the application name, application icon, application version, application description, and application opening command through the .desktop file;
[0042] Client UUID generation: Generate UUID through host serial number and MAC address;
[0043] The application installation status detection: directly query the application installation status through the package installation tool, and scan the corresponding .desktop file through the package name to obtain the open command;
[0044] The system information detection: obtains information such as the operating system, processor, disk, memory, and network card through files or commands such as / etc / os-version, / etc / os-release, demidecode, and ip.
[0045] The advantages of the present invention are:
[0046] 1. Obtain root permissions to install apps without passwords
[0047] 2. Through the collection of four key information such as operating system manufacturer, operating system version, processor manufacturer and processor version, matching and issuing applications can be more accurate.
[0048] 3. Decide whether to update the application by comparing the version numbers. Only query the latest uploaded version that matches, solving the problem of whether the application is upgraded or downgraded.
[0049] 4. Use dynamic script libraries to separate functions that are prone to adaptation problems into scripts as much as possible, effectively reducing software operation and maintenance costs
[0050] 5. More suitable for software companies that use JavaWeb technology system for development.
[0051] The above are only embodiments of the present invention. Common knowledge such as the known specific structures and characteristics in the scheme is not described in detail here. Ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply conventional experimental means before that date. Ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the scope of protection of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for implementing a cross-platform application market desktop software system for a localized environment, characterized in that: The following steps are involved: S1. Integrate the Electron-based client interface, Golang client daemon, and Shell dynamic script library into a unified installation package; S2. Obtain user root privileges for installation; S3. Create and start a systemd-based daemon self-starting service through Elecron's installation script daemon; S4. When the Electron client is opened, it checks whether the user has root privileges. If not, it calls the Golang daemon. S5. Collect four key information: operating system manufacturer, operating system version, processor manufacturer, and processor version for matching and issuing applications.
2. The method for implementing a cross-platform application market desktop software system for a localized environment according to claim 1, characterized in that: The Golang client daemon process and the Electron client interface exchange data via HTTP and WebSocket protocols. The communication process is encrypted using the national encryption standard algorithm. The client daemon process provides application market self-upgrade, patch reception and installation, command execution, and multi-server detection functions.
3. The method for implementing a cross-platform application market desktop software system for a localized environment according to claim 2, characterized in that: Applications listed in the application market support the selection of an adaptation environment, which includes the operating system manufacturer and version, processor manufacturer and version, and the installation command, uninstallation command, package name, and version number. The package name is used as the unique identifier of the application. When querying the application list in the Electron client interface, the most recently submitted version that meets the adaptation environment is queried.
4. The method for implementing a cross-platform application market desktop software system for a localized environment according to claim 3, characterized in that: When designing an application upgrade strategy, the system checks whether the currently installed software version is the same as the latest version to determine whether an update is required.
5. The method for implementing a cross-platform application market desktop software system for a localized environment according to claim 4, characterized in that: The Shell dynamic script library includes package manager detection, key information detection, installed application detection, client UUID generation, application installation status detection, and system information detection functions.
6. The method for implementing a cross-platform application market desktop software system for a localized environment according to claim 5, characterized in that: The package manager detection: first detect whether the deb and rpm package management tools exist, and if both exist, select one according to the manufacturer; The key information detection: detect the operating system manufacturer and operating system version through / etc / os-release, detect the processor manufacturer, processor version, and host serial number through dmidecode, detect the application market version number through the package manager, and detect the local area network IP and MAC address set through "ip a"; Installed application detection: obtain a list of installed application package names through a package manager, then scan the corresponding .desktop file through the package name to identify whether it is a displayable application, and obtain the application name, application icon, application version, application description, and application opening command through the .desktop file; Client UUID generation: Generate UUID through host serial number and MAC address; The application installation status detection: directly query the application installation status through the package installation tool, and scan the corresponding .desktop file through the package name to obtain the open command; The system information detection: obtains information such as the operating system, processor, disk, memory, and network card through files or commands such as / etc / os-version, / etc / os-release, demidecode, and ip.