Update prompt method, device, electronic device and storage medium for NPM installation package

By obtaining communication information of NPM software package users and actively sending detailed update information, the problem of not being able to promptly and in detail in the existing technology is solved, and the purpose of users to efficiently obtain detailed update information of software packages is achieved.

CN112083945BActive Publication Date: 2024-11-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010963242.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-14
Publication Date
2024-11-05
Estimated Expiration
2040-09-14

AI Technical Summary

Technical Problem

The existing NPM software package update prompt method cannot notify users of the software package update information in a timely and detailed manner, especially when the user does not actively query the official website update information, it is impossible to know whether the software package has an update.

Method used

By obtaining communication information of the users of the NPM software package, and actively sending update information when the software package is updated, including updating content, and passing detailed information to the user using email or text messages.

Benefits of technology

It realizes the timely and detailed update information of the NPM software package to users, avoiding users missing update information due to not proactive query, and provides more detailed update information, including update version number, advantages, problem solving and new additions. Functions, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112083945B_ABST
    Figure CN112083945B_ABST
Patent Text Reader

Abstract

The present application relates to the field of software technology, and discloses an update prompt method, device, electronic device and storage medium for an NPM software package, wherein the update prompt method for the NPM software package includes: obtaining the communication information of the user of the NPM software package; wherein obtaining the communication information of the user of the NPM software package includes: receiving the communication information sent by the user end of the NPM software package, and the communication information is obtained by the user end in the following manner: obtaining the description file information corresponding to the NPM software package; obtaining the communication information of the user of the NPM software package according to the description file information; when the NPM software package is updated, sending the update information of the NPM software package to the user according to the communication information. The present application obtains the communication information of the user of the NPM software package so as to inform the user of the update information of the NPM software package in a timely manner, which can better meet the user's usage needs, effectively improve the user's usage experience, and facilitate the user to manage the NPM software package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology. Specifically, the present application relates to an update prompt method, device, electronic device and storage medium for an NPM installation package. Background Art

[0002] There are two general methods for updating NPM software packages in existing node package managers: one is to check the latest version number in the background when the software is running, and then display the version number to the user, prompting the user to upgrade the software in the form of a pop-up window. The prompt interface can be as follows: Figure 1 As shown in the figure, the NPM software can be upgraded to version 0.1.6. However, this method can only inform users of the latest version number of the software, and cannot list the detailed update content. The detailed operation mechanism is as follows Figure 2 As shown: When running for the first time, in addition to obtaining the core functions of the software, the latest version number information of the software is also asynchronously obtained and stored; when running next time, the latest version number information obtained will be compared with the locally installed version. If they are inconsistent, an update prompt will be displayed.

[0003] Another method is to publish update information on the official website after the NPM software package releases a new version. Users can query the detailed information of the software update on the official website. However, if the user does not actively go to the official website to query the version update information, it is impossible to know whether there is an updated version of the software. This method causes users to be unable to obtain the update information of the NPM software package in a timely manner. Summary of the invention

[0004] The purpose of this application is to solve at least one of the above technical defects, and the following technical solutions are proposed:

[0005] In one aspect of the present application, a method for prompting an update of a node package manager NPM software package is provided, comprising:

[0006] Get the communication information of the user of the NPM package;

[0007] When the NPM software package is updated, the update information of the NPM software package is sent to the user according to the communication information, and the update information includes the update content;

[0008] Among them, obtaining the communication information of the user of the NPM software package includes:

[0009] Receive the communication information sent by the user of the NPM package. The communication information is obtained by the user in the following ways:

[0010] Get the description file information corresponding to the NPM software package;

[0011] Get the communication information of the user of the NPM package based on the description file information.

[0012] Another aspect of the present application provides an update prompt device for a node package manager NPM software package, the device comprising:

[0013] A communication information acquisition module is used to acquire the communication information of the user of the NPM software package;

[0014] The update information sending module is used to send the update information of the NPM software package to the user according to the communication information when the NPM software package is updated, and the update information includes the update content;

[0015] The communication information acquisition module includes a communication information receiving unit, and the communication information receiving unit is used to:

[0016] Receive the communication information sent by the user of the NPM software package. The communication information is obtained by the sender in the following ways:

[0017] Obtain the description file information corresponding to the NPM software package; obtain the communication information of the user of the NPM software package according to the description file information.

[0018] In another aspect of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the update prompt method for the node package manager NPM software package shown in the first aspect of the present application is implemented.

[0019] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the update prompt method for the node package manager NPM software package shown in the first aspect of the present application.

[0020] The beneficial effects of the technical solution provided by this application are:

[0021] The update notification method for the node package manager NPM software package provided by the present application can actively and timely transmit the update information of the NPM software package to the user by obtaining the communication information of the user of the NPM software package in advance. Moreover, the update information provided by the present application includes the update content. Compared with the existing update information that only provides the update version number, the update information provided by the present application is more detailed, which is beneficial for the users of the NPM software package to obtain the detailed update information of the NPM software package through the update information.

[0022] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0024] Figure 1 This is a schematic diagram of a prompt interface for prompting a user that an NPM software package has been updated in the prior art;

[0025] Figure 2 A flowchart of the operation mechanism of prompting a user of a software package update in the form of a pop-up window in the prior art;

[0026] Figure 3 A flowchart of a method for updating a node package manager NPM software package provided by an embodiment of the present application;

[0027] Figure 4 A schematic diagram of a process for obtaining user communication information by running a script provided in one embodiment of the present application;

[0028] Figure 5 A flowchart of obtaining user communication information by running a cli tool to obtain description file information provided in one embodiment of the present application;

[0029] Figure 6 A flowchart of obtaining user's communication information by using a preset hook function provided in one embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of an update prompt device for a node package manager NPM software package provided in an embodiment of the present application;

[0031] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0033] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0034] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0035] NPM: Node package manager, a package management tool in the JavaScript language.

[0036] Hook function: When an event is triggered, the triggering of the event is captured at the system level, and then some operations are performed. It is generally used to process system messages.

[0037] cli tool: command-line interface, command line interactive interface, a collection of user-defined command tools.

[0038] With regard to the technical problems existing in the prior art, the update prompt method, device, electronic device and storage medium of the node package manager NPM software package provided in this application are intended to solve at least one of the above technical problems in the prior art.

[0039] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0040] The present application embodiment provides a possible implementation method, such as Figure 3As shown, a flowchart of a method for updating a node package manager NPM software package is provided. The solution can be executed by any electronic device, and optionally, can be executed on a server side, including the following steps:

[0041] Step S310, obtaining the communication information of the user of the NPM software package;

[0042] Step S320, when the NPM software package is updated, the update information of the NPM software package is sent to the user according to the communication information, and the update information includes the update content.

[0043] The present application obtains the communication information of the user of the NPM software package so as to directly send the relevant information of the NPM software package to the user through the communication information of the user, so that the user can efficiently obtain the relevant information of the NPM software package.

[0044] Since the update information of the software package can be sent to the user through communication information, such as email, SMS, etc., compared with the update information given in the form of the existing update prompt pop-up window, the update information provided by the present application can carry more information. The update information of the software package may include the update content, and the update content may include: update version number, advantages of the update version, problems solved, new functions of the update version, new modules, etc., which solves the problem of not being able to obtain detailed update information of the software package in the prior art. Moreover, the present application sends the update information of the NPM software package to the user automatically, without the need for the user to actively query, which is conducive to achieving the purpose of timely delivering the update information of the NPM software package to the user.

[0045] Optionally, the update information of the NPM software package is sent to the user according to the communication information. This can be done periodically, or the update information can be sent immediately when an update of the NPM software package is detected, so as to increase the rate at which the user obtains the update information.

[0046] Furthermore, the update information may also include update guidance information, according to which the updated NPM software package may be obtained. The update guidance information may be a download address or download path of the updated NPM software package, etc., to facilitate users to obtain the updated NPM software package for software updates.

[0047] By obtaining the communication information of the users of the NPM software package in advance, the present application can actively and promptly deliver the update information of the NPM software package to the users. Moreover, compared with the update information given in the existing update prompt pop-up window, the update information provided by the present application is more detailed, which is conducive to the users of the NPM software package to obtain the detailed update information of the NPM software package through the update information.

[0048] Among them, obtaining the communication information of the user of the NPM software package can be done in the following ways:

[0049] Receive the communication information sent by the user of the NPM package. The communication information is obtained by the user in the following ways:

[0050] Get the description file information corresponding to the NPM software package;

[0051] Get the communication information of the user of the NPM package based on the description file information.

[0052] The description file information of the NPM software package can be obtained in the following manner: create a project for installing the NPM software package at the user end, initialize the project, obtain the description file corresponding to the installation of the NPM software package, read the content of the description file to obtain the description file information, the description file information includes the user's communication information, and the user's communication information can be extracted from the description file information. This solution can accurately obtain the communication information of the user of the NPM software package by obtaining the user's communication information from the description file information of the NPM software package.

[0053] In order to make the update prompt scheme of the node package manager NPM software package provided by this application clearer and its technical effects, the specific implementation scheme is described in detail with multiple examples below.

[0054] The present application also provides an optional embodiment for obtaining description file information. The NPM software package includes a script for obtaining description file information. The description file information corresponding to the NPM software package can be obtained by running the script for obtaining description file information. Optionally, obtaining the description file information corresponding to the NPM software package can include the following steps:

[0055] When the NPM software package is installed, the description file information corresponding to the NPM software package is obtained by running the script for obtaining the description file information.

[0056] Run the script used to obtain the description file information on the user end. This step can be performed after the NPM package is installed. Next, Figure 4 The example shown illustrates a solution of obtaining description file information by running a script and then obtaining the user's communication information.

[0057] Optionally, a schematic diagram of the process of obtaining the user's communication information by running a script is shown in Figure 4As shown, an installation project is created in advance for installing the NPM package, and the project name is set to xxx. The npm install xxx command is run in the root directory of the program to generate a description file corresponding to the user's installation of the NPM software package. The description file can be named package.json file. A hook function is set in the description file. This hook function represents running the postinstall.js script after the NPM software package is installed. The postinstall.js script is a script for obtaining the description file information. Then, the NPM software package is obtained and installed. The installation of the software package can be to obtain all the files of the NPM software package, that is, to achieve installation. After the software is installed, the postinstall.js script is run according to the setting of the hook function to obtain the description file information in the description file. Then, keywords are extracted from the description file information to obtain the user's communication information, such as: extracting the field corresponding to the author keyword, obtaining the user's communication information corresponding to the author field, and finally, sending the user's communication information to a designated user information collection system, such as uploading to the server.

[0058] Optionally, in the package.json description file, you can use the following keywords to set parameters: 'name' is the package name of the NPM package, 'version' is the version number, 'description' is the package description, 'postinstall' is the hook function, and the parameters in the hook function: 'node src / postinstall.js' indicates that the postinstall.js script in the scr directory will be run after the NPM package is installed, 'repository' is the type of the location where the package code is stored, and the type of the location where the package code is stored can be git type, and the 'author' field corresponds to the information of the user of the package, for example: the user information can be 'Eli Grey<me@eligrey.com> ', through which the user's communication information can be obtained as the mailbox 'me@eligrey.com'.

[0059] The communication information provided in this application is to obtain the description file corresponding to the NPM software package before the NPM software package is installed, and then, after the NPM is installed, obtain the description file information through the script for obtaining the description file information, and then obtain the user's communication information. This solution does not rely on external tools, and obtains the user's communication information through the installation of NPM, and can obtain accurate communication information of the user of the NPM software package.

[0060] In another optional embodiment, if the NPM software package comes with a matching command line interaction interface cli tool, the description file information corresponding to the NPM software package can be obtained in the following way: by running the matching command line interaction interface cli tool that comes with the NPM software package, the description file information of the NPM software package can be read.

[0061] If the NPM software package has an accompanying cli tool, after obtaining the description file corresponding to the NPM software package, use the accompanying cli tool that comes with the NPM software package to read the description file of the NPM software package and obtain the description file information.

[0062] Among them, the cli tool is a user-defined Linux command set. Through the cli tool, you can read the description file of the NPM software package before installing the NPM software package and quickly obtain the description file information of NPM.

[0063] Taking the proprietary cloud as an example, this application provides a set of development tools, including cli tools, component libraries, function libraries, etc. The project is started through the npm run dev command of the cli tool. During the startup process, the description file of the NPM software package can be read to obtain the description file information.

[0064] The flowchart of obtaining the user's communication information by running the cli tool to obtain the description file information is as follows: Figure 5 As shown, the description file information is obtained by running the command line interactive interface cli tool on the client, and the user information is obtained according to the description file information. The user information includes the user's communication information, and the user's communication information is uploaded to the user information collection system.

[0065] This solution does not rely on the installation of the NPM software package. It only needs to obtain the description file of the NPM software package. The description file information of the NPM software package can be obtained through the cli tool to quickly obtain the communication information of the user of the NPM software package.

[0066] The above embodiments provide a method for obtaining communication information by obtaining the communication information of the user of the NPM software package through the NPM description file information. The description file information can be obtained by at least one of the following methods: a script for obtaining the description file information, a command line interactive interface CLI tool, etc. However, when the description file information corresponding to the NPM software package does not contain the user's communication information, or the file description information uploaded by the client is not received, the user's communication information cannot be obtained through the description file information. In order to solve this problem, an optional embodiment of the present application provides the following solution:

[0067] Send a communication information acquisition request to the user of the NPM package;

[0068] The receiving end obtains the communication information of the user who requested to send the communication information based on the communication information.

[0069] This solution can be implemented after the user's communication information cannot be detected in the description file information. In other words, the user information in the description file information may only be a name or code name, rather than communication information that can be used for communication interaction. Assuming that the information corresponding to the author field is 'gery', the user's communication information cannot be determined through the description file information. Optionally, the corresponding communication information acquisition command can be determined according to the type of the location where the software package code is stored. For example, when the type of the location where the software package code is stored is git type, the user's communication information can be obtained by running the git confug user.email command.

[0070] In addition, if the description file information corresponding to the NPM software package does not contain the user's communication information, and the file description information uploaded by the client is not received, the communication information can also be obtained by sending a command to obtain the communication information to the client.

[0071] The solution provided by the present application can be implemented when the description file does not provide the user's communication information, or it can be implemented directly. That is to say, regardless of whether the user's communication information exists in the description file, the communication information can be directly obtained in this way. The communication information of the user of the NPM software package can be obtained through the communication information acquisition command to increase the probability of obtaining the user's communication information.

[0072] The solution provided in the above embodiment is based on the description file information corresponding to the NPM software package. In addition, the optional embodiment of the present application also provides another solution to obtain the communication information of the user of the NPM software package. This method does not rely on the description file information corresponding to the NPM software package, and includes the following steps:

[0073] A1, receiving the user's communication information sent by the download server of the NPM software package, wherein the user's communication information is obtained by the download server in the following manner:

[0074] A11, receiving a software package acquisition request sent by a user of an NPM software package;

[0075] A12, obtaining login information of the download server based on the acquisition request;

[0076] A13, determining the communication information corresponding to the user end according to the login information.

[0077] Wherein, the download server may be a server that provides software downloads, and the server may be a local server, such as a software download platform within an enterprise. Based on the acquisition request, the login information of the download server is acquired, and the login information includes the identification information of the user, so as to determine the communication information of the user based on the identification information. The login information of the download server is acquired based on the acquisition request, and can be obtained in the following manner: based on the acquisition request, a login instruction is sent to the user end, and the user end sends the login information in response to the login instruction; if the user end has logged in to the download server, that is, the download server has obtained the login information of the user end in advance, after the download server receives the software package acquisition request, it can directly read the login information of the user. In addition, the login information of the download server can be sent while sending the software package acquisition request, such as: the user end sends the software package acquisition request to the download server, the download server parses the software package acquisition request, and obtains the login information in the acquisition request. After the download server obtains the login information, it can use the login information, especially the identification information of the software requester in the login information to obtain the communication information of the software requester, such as: the communication information of the software requester is determined according to the identification information of the requester and the association between the pre-built identification information and the communication information.

[0078] In the solution provided in the embodiment of the present application, the acquisition of the communication information of the software requester can be triggered by a pre-built hook function for obtaining the user's communication information. The hook function can be provided by the download server, and the acquisition of the user's communication information is triggered by the hook function. The triggering timing is that the download server receives the acquisition request for the NPM software package sent by the software requester, and sends the acquired communication information of the user.

[0079] The flowchart of obtaining the communication information of the user provided in the embodiment of the present application is as follows: Figure 6 As shown in the example, the download server is a software package warehouse containing multiple software packages. The user sends a request to obtain the software package, and the download server obtains the request, parses the request, obtains the user's communication information, and responds to the request to send the NPM software package to the user end (corresponding to Figure 6 The download server then sends the user's communication information to the information collection system, that is, uploads it to the server, and the server obtains the user's communication information.

[0080] The solution provided in the embodiment of the present application is to obtain the communication information corresponding to the user end during the request acquisition stage of the NPM software package, that is, before entering the installation stage of the NPM software package, which can further improve the rate of obtaining the user's communication information.

[0081] On this basis, users who have installed the NPM package from among the users who obtain the package may be filtered out through filtering conditions, so as to avoid sending update information to users who have not installed the package.

[0082] Optionally, in the solution provided by any of the above embodiments, the communication information includes an email address, a telephone number, etc. The update information of the NPM software package can be sent to the user in the form of an email through the email address, and the update information of the NPM software package can be sent to the user in the form of a text message through the telephone number. Both methods can conveniently inform the user of the detailed update information in a timely manner.

[0083] Optionally, since the cli tool does not rely on the installation of the NPM package to obtain the description file information, if the user has not installed the NPM package, then sending the update information of the NPM package to the user will not only cause trouble to the user, but also increase the data transmission volume of this solution. In order to avoid this situation, this application provides the following solution:

[0084] Send the update information of the NPM package to the user based on the communication information. This can be done in the following ways:

[0085] B1, by running the cli tool, obtaining the user's communication information by reading the description file information, and determining the user who has installed the NPM software package among the users;

[0086] B2, sending the update information of the NPM software package to the user.

[0087] By running the cli tool to read the description file information, the user's communication information is obtained. These users are all users whose corresponding terminals have description files corresponding to the NPM software package. Since the terminal generates a description file for the NPM software package, but the NPM software package is not installed, it is necessary to filter out users who have installed the NPM software package from the users corresponding to all the communication information obtained as users of the NPM software package in this application.

[0088] Optionally, by running the cli tool to determine which users have installed the NPM software package among the users corresponding to the obtained communication information, the communication information corresponding to the users who have installed the NPM software package is used as the user's communication information, and then the update information of the NPM software package is sent to the user based on the user's communication information.

[0089] The solution provided in the embodiment of the present application utilizes the cli tool to filter out the communication information corresponding to users who have installed the NPM software package, and uses the communication information of these users as the user's communication information, thereby enabling accurate delivery of update information and reducing the amount of data transmitted by the system for update information.

[0090] The node package manager NPM software package update prompt method provided in the above embodiment enriches the ways of obtaining the user's communication information by obtaining the user's communication information after the NPM software package is installed, before the installation, or during the acquisition process of the NPM software package. After obtaining the user's communication information, a targeted email can be sent to the user regularly or at any time to prompt the user that there is an update to the NPM software package version and inform the user of detailed update information.

[0091] In addition, the present application also provides another implementation mode, which may include the following steps to obtain the communication information of the user of the NPM software package:

[0092] C1, sending a communication information acquisition request to the user end;

[0093] C2, receiving the user's communication information sent by the user end based on the acquisition request.

[0094] In this solution, the server directly sends an acquisition request to the user terminal that has installed the NPM software package. The acquisition request can be displayed as a prompt window on the user interface to prompt the user to actively report communication information, so that the user's communication information can be obtained directly and quickly.

[0095] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application also provides an update prompt device 800 for a node package manager NPM software package, such as Figure 7 As shown, the device may include: a communication information acquisition module 810 and an update information sending module 820, wherein:

[0096] The communication information acquisition module 810 is used to acquire the communication information of the user of the NPM software package;

[0097] The update information sending module 820 is used to send the update information of the NPM software package to the user according to the communication information when the NPM software package is updated, and the update information includes the update content;

[0098] The communication information acquisition module includes a communication information receiving unit, which is used to:

[0099] Receive the communication information sent by the user of the NPM software package. The communication information is obtained by the sender in the following ways:

[0100] Obtain the description file information corresponding to the NPM software package; obtain the communication information of the user of the NPM software package according to the description file information.

[0101] The update prompt device for the node package manager NPM software package provided by the present application can actively and timely transmit the update information of the NPM software package to the user by obtaining the communication information of the user of the NPM software package in advance. Moreover, the update information provided by the present application includes the update content. Compared with the existing update information that only provides the update version number, the update information provided by the present application is more detailed, which is beneficial for the users of the NPM software package to obtain the detailed update information of the NPM software package through the update information.

[0102] Optionally, the NPM software package includes a script for obtaining description file information, and the script is run when the NPM software package is installed. The communication information receiving unit is further used to:

[0103] After installing the NPM package, get the description file information by running the script.

[0104] Optionally, the NPM software package comes with a matching command line interactive interface cli tool, a communication information receiving unit, and is also used to:

[0105] By running the command line interactive interface cli tool that comes with the NPM software package, the description file information of the NPM software package is read.

[0106] Optionally, the communication information acquisition module 810 is further used to:

[0107] Send a communication information acquisition command to the user of the NPM package;

[0108] The receiving end returns the user's communication information based on the acquisition command.

[0109] Optionally, the communication information receiving unit is further used to:

[0110] Receive the user's communication information sent by the download server of the NPM software package, wherein the user's communication information is obtained by the download server in the following manner:

[0111] Receive the package acquisition request sent by the user of the NPM package;

[0112] Obtain login information of the download server based on the acquisition request;

[0113] Determine the communication information corresponding to the user end according to the login information.

[0114] Optionally, the communication information in the update prompt device 800 includes an email address.

[0115] Optionally, the update information sending module 820 is specifically used to:

[0116] By running the cli tool, the description file information is read to obtain the user's communication information, and the user who has installed the NPM software package among the users is determined;

[0117] Sending update information of the NPM software package to the user.

[0118] Optionally, the communication information acquisition module 810 is further used to:

[0119] Send a communication information acquisition request to the user end;

[0120] The communication information of the user sent by the user end based on the acquisition request is received.

[0121] The update prompt device of the node package manager NPM software package in the embodiment of the present application can execute the update prompt method of the node package manager NPM software package provided in the embodiment of the present application, and its implementation principle is similar. The actions performed by each module and unit in the update prompt device of the node package manager NPM software package in each embodiment of the present application correspond to the steps in the update prompt method of the node package manager NPM software package in each embodiment of the present application. For the detailed functional description of each module of the update prompt device of the node package manager NPM software package, please refer to the description in the corresponding update prompt method of the node package manager NPM software package shown in the previous text, which will not be repeated here.

[0122] Based on the same principle as the method shown in the embodiment of the present application, an electronic device is also provided in the embodiment of the present application, which may include but is not limited to: a processor and a memory; a memory for storing a computer program; a processor for executing the update prompt method of the node package manager NPM software package shown in any optional embodiment of the present application by calling a computer program. Compared with the prior art, the present application can proactively and timely transmit the update information of the NPM software package to the user by obtaining the communication information of the user of the NPM software package in advance. Moreover, compared with the update information given by the existing update prompt pop-up window, the update information provided by the present application is more detailed, which is conducive to the user of the NPM software package to know the detailed update information of the NPM software package through the update information.

[0123] In an alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 4000 shown may be a server, including: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0124] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0125] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0126] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0127] The memory 4003 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the contents shown in the above method embodiment.

[0128] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0129] The server provided in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and this application does not limit this.

[0130] Artificial intelligence cloud service is generally referred to as AIaaS (AI as a Service, Chinese for "AI as a Service"). This is a mainstream service mode of artificial intelligence platform. Specifically, the AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to opening an AI theme mall: all developers can access and use one or more artificial intelligence services provided by the platform through API interfaces. Some senior developers can also use the AI ​​framework and AI infrastructure provided by the platform to deploy and operate their own cloud artificial intelligence services. In this application, the AI ​​framework and AI infrastructure provided by the platform can be used to implement update prompts for the node package manager NPM software package provided in this application.

[0131] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.

[0132] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0133] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0134] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0135] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0136] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the update prompt method of the node package manager NPM software package provided in the above-mentioned various optional implementations.

[0137] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] The modules involved in the embodiments of the present application may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a module for obtaining communication information may also be described as a module for obtaining communication information of users of the NPM software package.

[0140] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for prompting updates of NPM software packages of a node package manager. It is characterized in that include: Get the communication information of the users of NPM packages; When the NPM software package is updated, the update information of the NPM software package is sent to the user according to the communication information, wherein the update information includes update content; Wherein, the obtaining of the communication information of the user of the NPM software package includes: Receive the communication information sent by the user of the NPM software package, where the communication information is obtained by the user in the following manner: Obtain the description file information corresponding to the NPM software package; Acquire the communication information of the user of the NPM software package according to the description file information; The method for the user end to obtain the description file information corresponding to the NPM software package includes: The user end creates an installation project for installing the NPM software package, initializes the installation project, generates a description file corresponding to the installation of the NPM software package, wherein the description file is provided with a hook function, and the hook function is used to run a script for obtaining description file information when the installation of the NPM software package is completed; The user end obtains and installs the NPM software package, and through the hook function, when the installation of the NPM software package is completed, runs the script for obtaining the description file information to obtain the description file information in the description file.

2. The method according to claim 1, It is characterized in that The obtaining, according to the description file information, the communication information of the user of the NPM software package includes: Keywords are extracted from the description file information to obtain the communication information of the user.

3. The method according to claim 1, It is characterized in that The update content includes at least one of the following: updated version number, advantages of the updated version, resolved issues, new functions of the updated version, and new modules.

4. The method according to claim 1 or 3, It is characterized in that The update information also includes update guide information, and the update guide information includes a download address or download path of the updated NPM software package.

5. The method according to claim 1, It is characterized in that The communication information includes an email address.

6. The method according to claim 1, It is characterized in that The NPM software package is provided with a matching command line interactive interface cli tool, and the updating information of the NPM software package is sent to the user according to the communication information, including: By running the cli tool, the description file information is read to obtain the user's communication information, and the user who has installed the NPM software package is determined; Sending update information of the NPM software package to the user.

7. The method according to claim 1, It is characterized in that The obtaining of the communication information of the user of the NPM software package includes: Sending a communication information acquisition request to the user end; Receive the communication information of the user sent by the user end based on the acquisition request.

8. An update prompt device for a node package manager NPM software package, It is characterized in that include: A communication information acquisition module is used to acquire the communication information of the user of the NPM software package; An update information sending module, used for sending the update information of the NPM software package to the user according to the communication information when the NPM software package is updated, wherein the update information includes update content; The communication information acquisition module includes a communication information receiving unit, and the communication information receiving unit is used to: Receive the communication information sent by the user of the NPM software package, where the communication information is obtained by the user in the following manner: Obtaining description file information corresponding to the NPM software package; and obtaining communication information of a user of the NPM software package according to the description file information; The method for the user end to obtain the description file information corresponding to the NPM software package includes: The user end creates an installation project for installing the NPM software package, initializes the installation project, generates a description file corresponding to the installation of the NPM software package, wherein the description file is provided with a hook function, and the hook function is used to run a script for obtaining description file information when the installation of the NPM software package is completed; The user end obtains and installs the NPM software package, and through the hook function, when the installation of the NPM software package is completed, runs the script for obtaining the description file information to obtain the description file information in the description file.

9. The device according to claim 8, It is characterized in that The user's communication information is obtained in the following ways: Keywords are extracted from the description file information to obtain the communication information of the user.

10. The device according to claim 8, It is characterized in that The update content includes at least one of the following: Update version number, advantages of the updated version, issues resolved, new features of the updated version, and new modules.

11. The device according to claim 8 or 10, It is characterized in that The update information also includes update guide information, and the update guide information includes a download address or download path of the updated NPM software package.

12. The device according to claim 8, It is characterized in that The communication information includes an email address.

13. The device according to claim 8, It is characterized in that The NPM software package is provided with a matching command line interactive interface cli tool. The sending update information module is used to send the update information of the NPM software package to the user according to the communication information: By running the cli tool, the description file information is read to obtain the user's communication information, and the user who has installed the NPM software package is determined; Sending update information of the NPM software package to the user.

14. The device according to claim 8, It is characterized in that The communication information acquisition module is used to obtain the communication information of the user of the NPM software package: Sending a communication information acquisition request to the user end; Receive the communication information of the user sent by the user end based on the acquisition request.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.