Multi-client package upgrade method and device based on electron

By using the electron-based multi-customer packaging upgrade method in the financial industry, and using the CID entry platform to obtain and update customer configuration information, the cumbersome problem of maintaining multi-customer configuration and automatic upgrade solutions in traditional methods is solved, and automated and efficient client upgrades are achieved.

CN119127242BActive Publication Date: 2025-05-16SHANGHAI LIANGTOU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410928345.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-05-16
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

In the financial industry, traditional web applications are difficult to meet the needs of security, stability and compatibility, especially in a multi-customer environment, maintaining configurations and automatic upgrade solutions for different customers is very cumbersome, prone to errors, and affecting the user experience.

Method used

Provide an electron-based multi-customer packaging upgrade method, obtain the latest customer configuration information through the CID entry platform, and store and update this information locally on the client, realizing automatic reading and real-time update of customer configurations, reducing manual maintenance.

Benefits of technology

This method can automatically read and update customer configuration information, reduce labor maintenance costs, optimize code management, reduce the probability of upgrade errors, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127242B_ABST
    Figure CN119127242B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of software upgrade, and provides a multi-client package upgrade method and device based on electron. The method includes: the CID entry platform obtains the latest client configuration information corresponding to the client CID number and stores it; when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information, and stored locally on the client; the client application renders and displays the client application page based on the local current client configuration information or based on the latest client configuration information corresponding to the client CID number obtained from the CID entry platform through the rendering process. The multi-client package upgrade method described in this article can greatly reduce the manpower maintenance cost, optimize code management, reduce the probability of upgrade errors, optimize user experience, and when upgrading different customers, there is no need to manually maintain a large number of configurations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software upgrade, and in particular to an electron-based multi-client package upgrade method and device. Background Art

[0002] Based on the characteristics of the financial industry, most systems need to obtain terminal data such as user MAC for security, stability and compatibility considerations. Therefore, traditional web applications cannot meet the needs.

[0003] Therefore, most people currently choose electron for client development. When the application has multiple versions and multiple customers, it is very troublesome to maintain. The traditional approach is to modify the appId, site, image and other configurations of different customers when packaging for different customers and repackage them into the application. Once there is a configuration change, it needs to be repackaged, and the configurations of different customers are difficult to maintain. Alternatively, a code branch is created for the customer, but when the version fixes defects, multiple branches need to be synchronized, which is also difficult to maintain.

[0004] As a third-party system provider in the financial industry, a mature product will inevitably connect to multiple customers. In addition to maintaining its own normal version iterations, the product also needs to maintain customer-related configurations and automatic upgrade solutions. Manually maintaining a large number of customer configurations is quite cumbersome and prone to errors. In addition, when users modify the configuration, they need to repackage it and ask the customer to re-upgrade the client, which affects the user experience. Summary of the invention

[0005] The purpose of the present invention is to provide a multi-client package upgrade method and device based on electron.

[0006] In order to solve the above problems, the present invention provides a multi-client package upgrade method based on electron, comprising:

[0007] Step S1, the CID entry platform obtains the latest customer configuration information corresponding to the customer CID number and stores it;

[0008] Step S2, when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client;

[0009] Step S3, the client application renders and displays the client application page based on the local current client configuration information or based on the latest client configuration information corresponding to the client CID number obtained from the CID entry platform through the rendering process.

[0010] Furthermore, in the above method, the latest customer configuration information includes: customer CID number, at least one service site address, customer logo, customized image resources, client upgrade address and whether the client is automatically upgraded.

[0011] Furthermore, in the above method, step S2, taking the latest client configuration information obtained as the current client configuration information and storing it locally on the client, includes:

[0012] The client dynamically writes the customer CID number, client upgrade address and service site address into package.json from the CID entry platform; and stores package.json, service site address, customer logo and customized image resources as the current customer configuration information locally on the client.

[0013] Furthermore, in the above method, when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client, including:

[0014] When the client is packaged, the packaging script is used to obtain the customer CID number. Based on the obtained customer CID number, the corresponding latest customer configuration information is obtained from the CID entry platform.

[0015] Compare the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the updated current client configuration information and stores it locally on the client.

[0016] Furthermore, in the above method, in step S3, the client application renders and displays the client application page based on the local current client configuration information or the latest client configuration information corresponding to the client CID number obtained from the CID entry platform through the rendering process, including:

[0017] When the client application is opened, a message is sent to the main process through the rendering process, and the main process requests the latest customer configuration information corresponding to the customer CID number from the CID entry platform;

[0018] If the request is successful and the feedback time of the latest customer configuration information is within the preset time, the main process compares the latest customer configuration information with the current customer configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest customer configuration information as the updated current customer configuration information and stores it locally on the client; and the main process returns the latest customer configuration information to the rendering process, and the rendering process renders and displays the client application page based on the latest customer configuration information.

[0019] Furthermore, in the above method, during the process of opening the client application, after the rendering process sends a message to the main process and the main process requests the CID entry platform for the latest client configuration information corresponding to the client CID number, the method further includes:

[0020] If the request is successful, but the feedback time of the latest client configuration information exceeds the preset time, the rendering process renders and displays the client application page based on the client's local current client configuration information; the main process compares the latest client configuration information with the current client configuration information for consistency. If they are inconsistent, the latest client configuration is used as the updated current client configuration information and stored locally on the client.

[0021] Furthermore, in the above method, during the process of opening the client application, after the rendering process sends a message to the main process and the main process requests the CID entry platform for the latest client configuration information corresponding to the client CID number, the method further includes:

[0022] If the request fails, the rendering process uses the client's local current client configuration information to render and display the client application page.

[0023] Furthermore, in the above method, if the automatic upgrade of the client in the latest client configuration information is set to automatic upgrade, then after rendering and displaying the client application page in step S3, the method further includes:

[0024] The main process of the client uses the electron-updater plug-in, and each time obtains the lastest.yml file containing the client version number from the server where the client is deployed;

[0025] Compare the client version number of the lastest.yml file obtained this time with the client version number of the lastest.yml file obtained last time to see if they are consistent;

[0026] If they are inconsistent, the corresponding client upgrade file is obtained from the server where the client is deployed to upgrade the client.

[0027] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to execute the method described in any of the above embodiments.

[0028] According to another aspect of the present invention, there is also provided a computer device, comprising:

[0029] Processor; and

[0030] A memory arranged to store computer executable instructions, which, when executed, cause the processor to: execute the method described in any one of the above embodiments.

[0031] Compared with the prior art, the customer configuration information packaging optimization process provided by the present invention can automatically read the configuration information of the CID entry platform, and can update the customer configuration information in real time without a large amount of manual maintenance, which can greatly reduce the manpower maintenance cost, optimize code management, reduce the probability of upgrade errors, and optimize user experience.

[0032] The present invention is applicable to client applications built on electron. It only needs to modify the customer configuration information of the CID input platform to make the configuration file changes for a certain customer effective in real time. Now, the configuration modified by the customer, rather than the upgrade of the system function, does not need to re-upgrade the client, and when upgrading for different customers, there is no need to manually maintain a large number of configurations. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of a multi-client package upgrade method based on electron according to an embodiment of the present invention;

[0034] Figure 2 It is a schematic diagram of packaging the latest client configuration information to the local client according to an embodiment of the present invention;

[0035] Figure 3 is a flowchart of a rendering process opened by a client application according to an embodiment of the present invention;

[0036] Figure 4 The flowchart of detecting whether an upgrade is required according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0038] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0039] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0040] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0041] like Figure 1 As shown, the present invention provides a multi-client package upgrade method based on electron, and the method includes: steps S1 to S3.

[0042] Step S1, the CID entry platform obtains the latest customer configuration information corresponding to the customer CID number (custom ID) and stores it;

[0043] Here, each customer's configuration can be assigned an ID, which we will refer to as CID number below.

[0044] Preferably, a platform for entering customer configuration information can be built using web technology. Customer configuration information may include but is not limited to: customer CID number, service site address, customer logo, customized image resources, client upgrade address, and whether the client is automatically upgraded;

[0045] Step S2, when the client is packaged (from the original code to the application), the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client;

[0046] Specifically, the transformation of the upgrade process in this application is divided into two processes, one is the packaging process, and the other is the rendering process of the application opening.

[0047] The packaging process is as follows:

[0048] In the electron application, the final source of the latest customer configuration information is the CID entry platform, which can be entered into the CID entry platform by the implementation personnel.

[0049] Preferably, Figure 2 As shown, during the packaging process, the client can dynamically write the customer CID number, the client upgrade address and at least one service site address into package.json from the CID entry platform according to the customer CID number entered by the implementer; and store package.json, the service site address, the customer logo and the customized image resources as the current customer configuration information locally on the client;

[0050] Here, there may be multiple service site addresses, so that the rendering process of opening the application can switch between multiple site addresses.

[0051] Preferably, in step S2, when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client, including:

[0052] When the client is packaged, the packaging script is used to obtain the customer CID number. Based on the obtained customer CID number, the corresponding latest customer configuration information is obtained from the CID entry platform.

[0053] Compare the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the updated current client configuration information and stores it locally on the client.

[0054] Step S3, the client application renders and displays the client application page based on the local current customer configuration information or the latest customer configuration information corresponding to the customer CID number (custom ID) obtained from the CID entry platform through the rendering process.

[0055] The solution of this embodiment is applicable to client applications built on electron. By simply modifying the customer configuration information of the CID input platform, the configuration file related changes for a certain customer can be effective in real time. Now the configuration modified by the customer, rather than the upgrade of the system function, does not need to re-upgrade the client, and when upgrading for different customers, there is no need to manually maintain a large number of configurations.

[0056] Preferably, Figure 3 As shown, step S3, the client application renders and displays the client application page through a rendering process based on the local current customer configuration information, or based on the latest customer configuration information corresponding to the customer CID number (custom ID) obtained from the CID entry platform, including: steps S31 to S34.

[0057] Step S31, during the process of opening the client application, a message is sent to the main process through the rendering process, and the main process requests the latest customer configuration information corresponding to the customer CID number (custom ID) from the CID entry platform;

[0058] Step S32: If the request is successful and the feedback time of the latest client configuration information is within the preset time, the main process compares the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the updated current client configuration information and stores it locally on the client; and the main process returns the latest client configuration information to the rendering process, and the rendering process renders and displays the client application page based on the latest client configuration information;

[0059] Step S33, if the request is successful, but the feedback time of the latest client configuration information exceeds the preset time, the rendering process renders and displays the client application page based on the local current client configuration information of the client; the main process compares whether the latest client configuration information is consistent with the current client configuration information. If they are inconsistent, the latest client configuration is used as the updated current client configuration information and stored locally on the client;

[0060] Step S34: If the request fails, the rendering process uses the client's local current client configuration information to render and display the client application page.

[0061] Specifically, during the rendering process of the client application, the rendering process sends a message to the main process, and the main process requests the latest customer configuration information list from the CID entry platform. To ensure user experience, the request feedback time can be limited to 1 second (configurable). During the site request process, the user can be prohibited from logging in. There will be the following situations:

[0062] If the request is successful and the feedback time of the latest client configuration information is within 1 second, the main process compares the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the current client configuration information and stores it locally on the client. The main process returns the latest client configuration information to the rendering process, allowing the client to log in. The rendering process can then render and log in based on the latest client configuration information, for example, based on the latest service site address in the latest client configuration information.

[0063] If the request is successful but the feedback time of the latest client configuration information times out, the rendering process renders and displays the client application page based on the client's local current client configuration information; the main process compares the latest client configuration information with the current client configuration information to see if they are consistent. If they are not consistent, the latest client configuration information is used as the updated current client configuration information and stored locally on the client; for example, the rendering process can use the current client configuration information to obtain the old service site address for rendering and login, and then the main process uses the latest client configuration as the updated current client configuration information and stores it locally on the client; the next time the client is opened, the rendering process can use the new site in the updated current client configuration information to log in, preventing users from being unable to log in due to network jams. Under normal circumstances, the request can be successful within tens of milliseconds, and the configuration time can be appropriately extended under specific circumstances.

[0064] If the request fails, no operation is performed and the rendering process uses the client's local current client configuration information to render and display the client application page. This is generally a network error and the relevant network conditions need to be checked.

[0065] Step S4, if the automatic upgrade of the client in the latest client configuration information is set to automatic upgrade, then after rendering and displaying the client application page in step S3, the following is further included:

[0066] The main process of the client uses the electron-updater plug-in, and each time obtains the lastest.yml file containing the client version number from the server where the client is deployed;

[0067] Compare the client version number of the lastest.yml file obtained this time with the client version number of the lastest.yml file obtained last time to see if they are consistent;

[0068] If they are inconsistent, the corresponding client upgrade file is obtained from the server where the client is deployed to upgrade the client.

[0069] Here, the client system functional upgrade process flow is as follows Figure 4 As shown, you can use the electron-updater plug-in. After packaging, the plug-in will generate a lastest.yml file. By monitoring the client version number in the lastest.yml file, you can detect whether an upgrade is needed. Through the content upgrade package, the client upgrade address is dynamically written to determine whether to monitor the lastest.yml file. This can implement the customer's customized upgrade plan and obtain the corresponding client upgrade file from the server where the client is deployed to upgrade the client.

[0070] In addition, as a further improvement of this implementation method, the Jenkins continuous integration tool can be combined to automate the packaging, publishing, and deployment processes. By selecting the customer and product version to be packaged on Jenkins, there is no need to enter the packaging command. At the same time, the packaged package is automatically deployed to the server, which will further reduce maintenance costs, achieve one-click upgrade deployment, and automate the entire process.

[0071] In addition, as a further improvement of this implementation, the kernel upgrade package and the content upgrade package can be distinguished when upgrading the electron function, and the client version number identification can be added to the content upgrade package. This can avoid unnecessary upgrades of the browser kernel and node components each time, reduce the size of the upgrade package, avoid reinstallation, and further optimize the user experience.

[0072] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to execute the method described in any of the above embodiments.

[0073] According to another aspect of the present invention, there is also provided a computer device, comprising:

[0074] Processor; and

[0075] A memory arranged to store computer executable instructions, which, when executed, cause the processor to: execute the method described in any one of the above embodiments.

[0076] In summary, the customer configuration information packaging optimization process provided by the present invention automatically reads the configuration information of the CID entry platform, which can update the customer configuration information in real time without a large amount of manual maintenance, thereby greatly reducing the manpower maintenance cost, optimizing code management, reducing the probability of upgrade errors, and optimizing user experience.

[0077] The detailed contents of the device embodiments of the present invention can be found in the corresponding parts of the method embodiments, which will not be described in detail here.

[0078] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0079] It should be noted that the present invention can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including related data structures) can be stored in a computer readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and the like. In addition, some steps or functions of the present invention can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0080] In addition, a part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instruction for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present invention, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments of the present invention.

[0081] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A multi-client package upgrade method based on electron, characterized in that: include: Step S1, the CID entry platform obtains the latest customer configuration information corresponding to the customer CID number and stores it; Step S2, when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client; Step S3, the client application renders and displays the client application page based on the local current client configuration information or based on the latest client configuration information corresponding to the client CID number obtained from the CID entry platform through the rendering process; Step S3, the client application renders and displays the client application page based on the local current client configuration information or the latest client configuration information corresponding to the client CID number obtained from the CID entry platform through the rendering process, including: When the client application is opened, a message is sent to the main process through the rendering process, and the main process requests the latest customer configuration information corresponding to the customer CID number from the CID entry platform; If the request is successful and the feedback time of the latest client configuration information is within the preset time, the main process compares the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the updated current client configuration information and stores it locally on the client; the main process returns the latest client configuration information to the rendering process, and the rendering process renders and displays the client application page based on the latest client configuration information; If the request is successful, but the feedback time of the latest client configuration information exceeds the preset time, the rendering process renders and displays the client application page based on the client's local current client configuration information; the main process compares whether the latest client configuration information is consistent with the current client configuration information. If they are inconsistent, the latest client configuration is used as the updated current client configuration information and stored locally on the client; If the request fails, the rendering process uses the client's local current client configuration information to render and display the client application page.

2. The electron-based multi-client package upgrade method according to claim 1, characterized in that: The latest customer configuration information includes: customer CID number, at least one service site address, customer logo, customized image resources, client upgrade address, and whether the client is automatically upgraded.

3. The electron-based multi-client package upgrade method according to claim 2, characterized in that: Step S2, taking the latest client configuration information obtained as the current client configuration information and storing it locally on the client, includes: The client dynamically writes the customer CID number, client upgrade address and service site address into package.json from the CID entry platform; and stores package.json, service site address, customer logo and customized image resources as the current customer configuration information locally on the client.

4. The electron-based multi-client package upgrade method according to claim 2, characterized in that: Step S2, when the client is packaged, the client CID number is obtained through the packaging script, and based on the obtained client CID number, the corresponding latest client configuration information is obtained from the CID entry platform, and the obtained latest client configuration information is used as the current client configuration information and stored locally on the client, including: When the client is packaged, the packaging script is used to obtain the customer CID number. Based on the obtained customer CID number, the corresponding latest customer configuration information is obtained from the CID entry platform. Compare the latest client configuration information with the current client configuration information to see if they are consistent. If they are inconsistent, the main process uses the latest client configuration information as the updated current client configuration information and stores it locally on the client.

5. The electron-based multi-client package upgrade method according to claim 1, characterized in that: If the client automatic upgrade in the latest client configuration information is set to automatic upgrade, then after rendering and displaying the client application page in step S3, the following steps are further included: The main process of the client uses the electron-updater plug-in, and each time obtains the lastest.yml file containing the client version number from the server where the client is deployed; Compare the client version number of the lastest.yml file obtained this time with the client version number of the lastest.yml file obtained last time to see if they are consistent; If they are inconsistent, the corresponding client upgrade file is obtained from the server where the client is deployed to upgrade the client.

6. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: When the computer executable instructions are executed by a processor, the processor is caused to: perform the method according to any one of claims 1 to 5.

7. A computer device, wherein: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to: perform a method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Configuration updating method and related product

    CN109857427A

  • Updating method and system based on Electron

    CN112463198A