CN116069467A - Implementation method and system for starting and closing multiple local application programs based on electronics - Google Patents

Implementation method and system for starting and closing multiple local application programs based on electronics Download PDF

Info

Publication number
CN116069467A
CN116069467A CN202211715825.2A CN202211715825A CN116069467A CN 116069467 A CN116069467 A CN 116069467A CN 202211715825 A CN202211715825 A CN 202211715825A CN 116069467 A CN116069467 A CN 116069467A
Authority
CN
China
Prior art keywords
application program
main process
user
local
starting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211715825.2A
Other languages
Chinese (zh)
Inventor
唐超宇
李迎新
王薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shuli Intelligent Technology Co ltd
Original Assignee
Shanghai Shuli Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shuli Intelligent Technology Co ltd filed Critical Shanghai Shuli Intelligent Technology Co ltd
Priority to CN202211715825.2A priority Critical patent/CN116069467A/en
Publication of CN116069467A publication Critical patent/CN116069467A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method and a system for realizing the startup and shutdown of a plurality of local application programs based on an electron. The invention uses the child process module to communicate with the main process and the rendering process, can well solve the problems of common use of one user data for verification and serial interface device adjustment, can continuously use another application program in cooperation with the serial interface device after the initial adjustment, does not need to adjust the serial interface device again, and saves a great deal of repeated work and unnecessary waste of time.

Description

Implementation method and system for starting and closing multiple local application programs based on electronics
Technical Field
The invention relates to the technical field of electronics and the technical field of application program use management, in particular to a method and a system for realizing starting and closing of a plurality of local application programs based on electronics.
Background
Because of the advent of the web2.0 era, internet technology has tended to be more in browser-server architecture mode, abandoned the former client-server architecture mode, enhanced the lightweight, and convenient many, users only need to request to meet their own needs, but relative to the client-server architecture, based on the security policy of the browser, the browser cannot directly access all local sensitive data of the user machine, which requires using some shell script and other modes to operate the local data; for example, the mode of managing the local application program is that the browser operates script running and then modifies the computer registry to start/close the local application; the implementation mode is excessively large and messy in project, is not beneficial to expansion and maintenance of the project, is higher in requirement for developers, and is more complicated in project packaging due to the fact that some binary compiled files are packaged.
Disclosure of Invention
In order to solve the defects existing in the prior art, the invention aims to provide a realization method and a system for starting and closing a plurality of local application programs based on electronics, and a child process is used for achieving the purposes of managing the application programs by using a child process module, operating a rendering process by a user and managing the local application programs and communicating with a main process through the rendering process; the system package uses an electron-builder, and in the advantage of automatically updating plug-ins, some compiled files do not need to be packaged again.
In order to achieve the purpose of the invention, the technical scheme adopted by the invention is as follows:
an implementation system for starting and closing a plurality of local application programs based on an electron adopts electron-builder packaging, and aggregates a plurality of local application programs in the same series, wherein the local application programs comprise a main process and a plurality of rendering processes, and when a single or a plurality of application programs are used, each page creates a rendering process;
when the local application program is used, the user operation logic triggers the rendering process to communicate with the main process, informs the main process of creating the subprocess, is used for starting the local application program, stores subprocess information in the main process, and controls the starting and the closing of a plurality of local application programs.
Further, when the local application program is operated, the rendering process and the main process are communicated, and a child process is created by using a child process module of the main process to operate the local application program; and using the child_process module to manage the application program by communicating the rendering process with the main process to manage the sub-process on the basis of managing the local application program by the user operating the rendering process.
Further, the user operation only involves the rendering process, and the data which can be contacted by the user is concentrated in the rendering process; all system-related operations are performed in the main process; some critical user operations may also be put into the main process.
An implementation method for starting and closing a plurality of local application programs based on electronics comprises the following steps:
(1) Starting the system, starting the main process and the rendering process to run, and performing login operation according to the unique identifier and the password of each user to enter the system;
(2) Initializing an application program, and downloading, installing or upgrading the application program;
(3) Setting related configuration parameters in a mode of communicating a main process and a rendering process according to an application program to be used, and inserting a serial interface channel of the device; initializing serial interface equipment and application programs;
(4) Performing adjustment of serial interface equipment to ensure the availability of the equipment for transmitting back data through a serial interface;
(5) Starting an application program, communicating with a main process through a rendering process, creating a subprocess to run a local application program by using a child_process module of the main process, starting the subprocess, storing the subprocess in an array, and starting the application program; the user interacts with the remote server and stores the data generated by the local application program;
(6) When the application program is started, the rendering process informs the main process to re-create the subprocess so as to run a plurality of local application programs;
(7) When closing the application program, the main process is informed to close the sub-process application program, and the main process calls the stored application program array to close the kill () function of the process of a certain application program so as to achieve the purpose of closing the application program.
Further, in step (1), a plurality of product applications in the same series are aggregated in the system, and different applications and interfaces are presented according to the user use authority, including installed and uninstalled applications.
Further, in the step (2),
(2.1) installing an uninstalled application program, transmitting an http download request by a rendering process, downloading an application program installation package, waiting for a system main process to execute installation, automatically configuring an application use environment and environment variables, and waiting for the completion of the installation;
(2.2) when a certain application program is upgraded, the rendering process communicates with the main process, and the main process executes the operation of unloading the old version application program; and the rendering process sends an http downloading request, re-downloads the latest application program installation package, waits for the system main process to execute installation, and waits for the installation to be completed.
Further, in step (5), an application program starting path dictionary is added, the path dictionary and the software installation path have default installation paths, the user can also customize the installation positions and modify the default installation paths, and the corresponding starting path dictionary can also be synchronized.
Further, in step (6), when the user uses the same-series application program, the user can continue to use another application program with the serial interface device after the initial calibration, without re-calibrating the user identity, the user data server request and the serial interface device;
the number of the sub-processes is the same as the number of the application programs, when the sub-processes are created each time, the sub-process information is stored, and when the sub-processes are closed, the sub-processes or the service thereof can be closed and other operations are performed.
Further, in step (7), when the main process is closed, the sub-process created by the main process is closed once the main process is closed, whether or not the closing operation is performed.
Compared with the prior art, the system has the beneficial effects that a plurality of local application programs in the same series are aggregated, and when a single application program or a plurality of application programs are used, the problem that the child_process module is communicated with the main process and the rendering process to share one user data for verification and serial interface equipment adjustment can be well solved. When the method is oriented to the user, the user is used as a manager, the starting is more convenient, the user does not need to pay attention to the complicated problems of application installation and configuration and a series of problems of installation paths, and the focus of attention of the user is transferred to the use and management of the application program. When facing the developer, based on the system of the invention, the developer can concentrate on the function of the system to develop, is more modularized, iterates the data of the user and the adjustment before use as a module, and saves the research and development cost. In the product operation and upgrading maintenance stage, research personnel can locate, solve the problem and obtain the optimal scheme more quickly, and a large number of renaturation works are reduced.
The system provided by the invention well avoids the access of multiple user data, the server request and the adjustment of serial interface equipment, and ensures the use cost of the system; at present, no proper method or system is available for solving the problems of repeated user data, function modules and operation flow and overlarge cost for installation, management, upgrading maintenance, development, test and use when the same-series local application is used, and the invention well solves the problems.
Drawings
Fig. 1 is a schematic diagram of an implementation method for closing a plurality of local applications based on an electronic startup according to the present invention.
Detailed Description
The technical scheme of the invention is further described below with reference to the accompanying drawings and examples. The following examples are only for more clearly illustrating the technical solutions of the present invention and are not intended to limit the scope of protection of the present application.
According to the implementation system for closing a plurality of local application programs based on the electronic startup, a plurality of local application programs in the same series are aggregated, the application programs comprise a main process and a rendering process, only one main process is needed, and when a single or a plurality of application programs are used, each page can create one rendering process.
The system packages and uses the electron-builder, and on the advantage of automatically updating plug-ins, some compiled files do not need to be packaged again, and even if serial interface equipment used in the system uses a serviaport, a compiled binary file is generated, the compiled binary file can be packaged by a few simple lines of codes in the electron-builder installation configuration.
The user operation only involves the rendering process, and the data which can be contacted by the user is well concentrated in the rendering process. All system-related operations, such as process creation termination management, use of serial interfaces, etc., are performed in the host process. Some critical user operations may also be put into the main process.
After the system is operated, the main process is operated, the rendering process which is created in the main process starts to operate, a user operates at the layer of the rendering process, manages the local application program (downloading, installing, upgrading, unloading, adjusting the serial interface device and the like), and requests the remote server data to operate in the process of carrying out some operations related to external data interaction, such as downloading, upgrading, user authority verification and the like.
When the local application program is used, user operation logic triggers the rendering process to send information to the main process, informs the main process to create a sub-process for starting the local application program, stores the sub-process information, such as a process number, in the main process, and controls the starting and the closing of a plurality of local application programs.
When the local application program is operated, the rendering process is communicated with the main process, and a child process is created to operate the local application program by using a child process module of the main process. And the child process is managed by communicating the rendering process with the main process on the basis of managing the local application program by the user operating rendering process by using the child process module, so that the purpose of managing the application program is achieved.
The system is constructed by adopting a modularized thought, so that the code coupling degree is reduced as much as possible; packaging the API of some plug-ins elementui and vuejs authorities again, grasping the key, and ensuring that codes are more concise and clear, cleaner and more interesting and are more integrated into projects; for some constant or codes which cannot be associated with the item by readers, for example, some enumeration classes are created for sixteen mechanism hex data sent by serial interface equipment, when the enumeration classes are called, corresponding value can be obtained through custom popular and easily understood keys, and code readability is improved.
As shown in fig. 1, the implementation method for closing a plurality of local application programs based on the electronic startup according to the present invention includes the steps of:
step one: starting the system, starting the main process and the rendering process to run, and performing login operation according to the unique identifier and the password of each user to enter the system; the system aggregates a plurality of product application programs in the same series, presents different applications and interfaces according to the user use authority, and comprises installed and uninstalled application programs;
the design mainly considers two aspects of user permission and user selection, not only can control the permission of the user to use the application program, but also can avoid the user to install some dead application programs which are not used for a long time, vacate more storage space and also can enable the user to know the ecological diversity of the system.
After the user logs in successfully, user data loading, remote server data management, http interface call and the like can be performed.
Step two: initializing an application program, and downloading, installing or upgrading the application program (the installation is not carried out in the third step;
step three: installing an uninstalled application program to be used, sending an http download request by a rendering process, downloading an application program installation package, waiting for a system main process to execute installation, automatically configuring an application use environment and environment variables, and waiting for the completion of the installation;
the automatic configuration of the use environment and the environment variables can greatly improve the experience of the user, does not need to be entangled in complicated environment configuration, and reduces the labor and time cost.
Step four: when upgrading a certain application program to be used, the rendering process communicates with the main process, and the main process executes the operation of unloading the old version application program; the rendering process sends an http downloading request, downloads the latest application program installation package again, waits for the system main process to execute installation, waits for the installation to be completed, and the operation is similar to the principle of the third step;
step five: setting relevant configuration parameters and inserting a serial interface channel of the equipment according to an application program to be used; the configuration of parameters and the information interaction of serial interface data are carried out in a mode of communication between the main process and the rendering process;
initializing serial interface equipment and application programs, and enabling instruction data, encryption information and the like of the serial interface equipment to be used in the system, so that the safety and application uniqueness of the data are ensured;
step six: the serial interface equipment is calibrated, so that the availability of the equipment for transmitting back data through the serial interface is ensured, and the step is to eliminate some errors caused by some operations on the serial interface equipment, so that the reliability of the data is ensured;
step seven: starting to start an application program, communicating with a main process through a rendering process, creating a subprocess to run a local application program by using a child_process module of the main process, adding an application program starting path dictionary, starting the subprocess, storing the subprocess in an array, and starting the application program; the user interacts with the remote server and stores the data generated by the local application program;
the path dictionary and the software installation path have default installation paths, a user can also customize the installation positions and modify the installation positions, and the corresponding starting path dictionary can also be synchronized.
Step eight: at the same time of starting the application program, another application program can be started again by using the same logic; that is, the rendering process notifies the main process to re-create the sub-process, thereby running the plurality of local applications;
the number of the sub-processes is the same as the number of the application programs, when the sub-processes are created each time, the sub-process information is stored, and when the sub-processes are closed, the sub-processes or the service thereof can be closed and other operations are performed.
The child_process module is communicated with the main process and the rendering process, so that the problems of authentication and serial interface equipment adjustment by sharing one user data between the processes can be well solved. When the user uses the same-series application program, the user identity, the user data server request and the most complicated serial interface equipment do not need to be subjected to re-adjustment, and the serial interface equipment can be matched with the serial interface equipment to use another application program after the initial adjustment is finished, so that a great deal of repeated work and unnecessary waste of time are saved.
Step nine: closing the application program, namely closing the application program by the application program itself, and closing the application program by the system; notifying the main process to close the sub-process application program, and calling the process closing kill () function of a certain application program of the application program array stored in the seventh step by the main process to achieve the purpose of closing the application program;
when the main process is closed, the created sub-process is closed no matter whether the closing operation is executed or not, and once the main process is closed, the sub-process is closed, so that the safety of user data is ensured.
Compared with the prior art, the system has the advantages that a plurality of local application programs in the same series are aggregated, when a single or a plurality of application programs are used, the problem that one user data is shared between processes for verification and serial interface equipment adjustment can be well solved by communication between the child process module and the main process and the rendering process, when the system is oriented to a user, the user is used as a manager, the starting is more convenient, the user does not need to pay attention to the complicated application installation configuration problem and a series of installation paths, and the focus of attention of the user is transferred to the use and management of the application programs. When facing the developer, based on the system of the invention, the developer can concentrate on the function of the system to develop, is more modularized, iterates the data of the user and the adjustment before use as a module, and saves the research and development cost. In the product operation and upgrading maintenance stage, research personnel can locate, solve the problem and obtain the optimal scheme more quickly, and a large number of renaturation works are reduced.
The system provided by the invention well avoids the access of multiple user data, the server request and the adjustment of serial interface equipment, and ensures the use cost of the system; at present, no proper method or system is available for solving the problems of repeated user data, function modules and operation flow and overlarge cost for installation, management, upgrading maintenance, development, test and use when the same-series local application is used, and the invention well solves the problems.
While the applicant has described and illustrated the embodiments of the present invention in detail with reference to the drawings, it should be understood by those skilled in the art that the above embodiments are only preferred embodiments of the present invention, and the detailed description is only for the purpose of helping the reader to better understand the spirit of the present invention, and not to limit the scope of the present invention, but any improvements or modifications based on the spirit of the present invention should fall within the scope of the present invention.

Claims (9)

1. An implementation system for starting and closing a plurality of local application programs based on an electron is characterized in that the system adopts electron-builder packaging, a plurality of local application programs in the same series are aggregated, the system comprises a main process and a plurality of rendering processes, and when a single or a plurality of application programs are used, a rendering process is created for each page;
when the local application program is used, the user operation logic triggers the rendering process to communicate with the main process, informs the main process of creating the subprocess, is used for starting the local application program, stores subprocess information in the main process, and controls the starting and the closing of a plurality of local application programs.
2. The system for implementing the shutdown of the plurality of local applications based on the electronic startup of claim 1, wherein when the local application is run, the rendering process and the main process communicate with each other to create a sub-process to run the local application using a child process module of the main process; and using the child_process module to manage the application program by communicating the rendering process with the main process to manage the sub-process on the basis of managing the local application program by the user operating the rendering process.
3. The system for implementing the electronic startup-based closing of a plurality of local applications according to claim 1, wherein the user's operation involves only a rendering process, and the data accessible to the user is collected in the rendering process; all system-related operations are performed in the main process; some critical user operations may also be put into the main process.
4. An implementation method for closing a plurality of local application programs based on an electron start, based on the implementation system for closing a plurality of local application programs based on an electron start as set forth in any one of claims 1 to 3, comprising the steps of:
(1) Starting the system, starting the main process and the rendering process to run, and performing login operation according to the unique identifier and the password of each user to enter the system;
(2) Initializing an application program, and downloading, installing or upgrading the application program;
(3) Setting related configuration parameters in a mode of communicating a main process and a rendering process according to an application program to be used, and inserting a serial interface channel of the device; initializing serial interface equipment and application programs;
(4) Performing adjustment of serial interface equipment to ensure the availability of the equipment for transmitting back data through a serial interface;
(5) Starting an application program, communicating with a main process through a rendering process, creating a subprocess to run a local application program by using a child_process module of the main process, starting the subprocess, storing the subprocess in an array, and starting the application program; the user interacts with the remote server and stores the data generated by the local application program;
(6) When the application program is started, the rendering process informs the main process to re-create the subprocess so as to run a plurality of local application programs;
(7) When closing the application program, the main process is informed to close the sub-process application program, and the main process calls the stored application program array to close the kill () function of the process of a certain application program so as to achieve the purpose of closing the application program.
5. The method for implementing the electronic startup-based closing of a plurality of local applications according to claim 4, wherein in step (1), a plurality of product applications in the same family are aggregated in the system, and different applications and interfaces including installed and uninstalled applications are presented according to the user's usage rights.
6. The method for implementing the shutdown of a plurality of local applications based on the electronic startup of claim 4, wherein in the step (2),
(2.1) installing an uninstalled application program, transmitting an http download request by a rendering process, downloading an application program installation package, waiting for a system main process to execute installation, automatically configuring an application use environment and environment variables, and waiting for the completion of the installation;
(2.2) when a certain application program is upgraded, the rendering process communicates with the main process, and the main process executes the operation of unloading the old version application program; and the rendering process sends an http downloading request, re-downloads the latest application program installation package, waits for the system main process to execute installation, and waits for the installation to be completed.
7. The method for implementing the electronic startup and shutdown of the plurality of local applications according to claim 4, wherein in the step (5), an application startup path dictionary is added, the path dictionary and the software installation path have default installation paths, a user can customize the installation positions and modify the default installation paths, and the corresponding startup path dictionary is synchronized.
8. The method for implementing the shutdown of the plurality of local applications based on the electronic startup of claim 4, wherein in the step (6), when the user uses the same series of applications, the user can continue to use another application with the serial interface device after the initial calibration, without requiring the user identity and the user data server request and the serial interface device to be calibrated again;
the number of the sub-processes is the same as the number of the application programs, when the sub-processes are created each time, the sub-process information is stored, and when the sub-processes are closed, the sub-processes or the service thereof can be closed and other operations are performed.
9. The method of claim 4, wherein in step (7), when the main process is turned off, the created sub-process is turned off once the main process is turned off, regardless of whether the main process performs the turn-off operation.
CN202211715825.2A 2022-12-29 2022-12-29 Implementation method and system for starting and closing multiple local application programs based on electronics Pending CN116069467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211715825.2A CN116069467A (en) 2022-12-29 2022-12-29 Implementation method and system for starting and closing multiple local application programs based on electronics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211715825.2A CN116069467A (en) 2022-12-29 2022-12-29 Implementation method and system for starting and closing multiple local application programs based on electronics

Publications (1)

Publication Number Publication Date
CN116069467A true CN116069467A (en) 2023-05-05

Family

ID=86169284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211715825.2A Pending CN116069467A (en) 2022-12-29 2022-12-29 Implementation method and system for starting and closing multiple local application programs based on electronics

Country Status (1)

Country Link
CN (1) CN116069467A (en)

Similar Documents

Publication Publication Date Title
CN1302381C (en) Method and appts for automatic matching, setting and spreading small microsoft windows applied program for calculating equipment
CN108475217B (en) System and method for auditing virtual machines
CN101196974B (en) Method and system for auto-configuratoin of software application program
US6754828B1 (en) Algorithm for non-volatile memory updates
US6871223B2 (en) System and method for agent reporting in to server
US20020188941A1 (en) Efficient installation of software packages
CN100596055C (en) System for invoking a privileged function in a device
US20120110574A1 (en) Methods and systems to clone a virtual machine instance
US8418169B2 (en) Management method for managing software module and information processor
CN101382904B (en) Method and system for implementing automatic installation of intelligent cipher key equipment
US20180129794A1 (en) Method for Protecting Dex File from Decompilation in Android System
CN110764846B (en) Method for realizing cross-browser calling of computer external equipment based on local proxy service
CN110390184B (en) Method, apparatus and computer program product for executing applications in the cloud
US11468158B2 (en) Authentication for functions as a service
CN102707971A (en) Method for automatically acquiring and installing software in virtual machine
CN101369302B (en) Method and system for controlling access authority of information safety equipment
CN112199208B (en) Method and terminal for providing additional function interface on android system
CN114021141A (en) Electronic equipment, trusted application calling method, device, equipment and medium
CN112199151B (en) Application program running method and device
CN113031957A (en) Application program installation method, client, terminal, server and storage medium
CN105701406A (en) Method of Android platform for running traditional payment application
CN116069467A (en) Implementation method and system for starting and closing multiple local application programs based on electronics
CN101382903B (en) Method and system for implementing automatic installation of intelligent cipher key equipment
CN114327781A (en) Virtual terminal control method, device, system, electronic equipment and storage medium
CN113722011B (en) Application interface starting method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination