Software upgrade method, device, equipment and storage medium

By parsing the IP address records in the DNS server, obtaining and segmenting the IP address to determine the latest version of the software, the upgrade interruption problem caused by firewall shielding is solved, and version judgment and upgrade without a network interface is realized.

CN115529343BActive Publication Date: 2025-10-03YIQIYING NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211334601.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-10-03
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

In the existing technology, software or App version upgrades rely on network interface APIs, which are easily blocked by enterprise firewalls, resulting in interruptions in the upgrade process.

Method used

Obtain the IP address corresponding to the target domain name by resolving the IP address record in the DNS server, and segment it to determine the latest version number, avoiding reliance on the API interface to obtain the latest version information.

Benefits of technology

It can determine the latest version of the software without the need for a network interface, avoid the problem of firewall shielding, and ensure the smooth progress of software upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115529343B_ABST
    Figure CN115529343B_ABST
Patent Text Reader

Abstract

The present application discloses a software upgrade method, apparatus, device and storage medium, which relates to the field of computer technology, including: when the current software is started, obtaining the IP address corresponding to the target domain name by parsing the IP address record set in the DNS server; segmenting the IP address to obtain the segmented IP address, and determining the latest version number of the current software based on the segmented IP address; obtaining the current version number of the software through the target API interface; comparing the latest version number with the current version number to obtain a corresponding comparison result; determining whether the current software needs to be upgraded based on the comparison result, and upgrading the software based on the latest version number. The present application can obtain the latest version number by parsing the IP address record set in the DNS server, and then make a version judgment, thereby avoiding relying on obtaining the latest version information through the API interface and avoiding the problem of being blocked by the firewall.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software upgrading method, device, equipment and storage medium. Background Art

[0002] Currently, in the life cycle of a software or App (Application), version updates are often required. Usually, when the software or App is started, we connect to the API (Application Program Interface) interface on the network to obtain the latest software or App information and compare it with the local version. If the latest version returned by the interface is higher than the local version, the software or App is upgraded. However, this method usually requires cooperation from the server, and the server provides a corresponding API interface to return the latest version information of the software or App. When the software or App has a new version, the API interface needs to be modified to return the corresponding software information. Moreover, the API interface needs to be accessed through the network and may be easily blocked by various firewalls, especially the firewalls within the enterprise. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a software upgrade method, apparatus, device, and storage medium that can avoid relying on API interfaces to obtain the latest version information, thereby avoiding the problem of being blocked by firewalls. The specific solution is as follows:

[0004] In a first aspect, the present application discloses a software upgrade method, comprising:

[0005] When the current software is started, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server;

[0006] Segmenting the IP address to obtain segmented IP addresses, and determining the latest version number of the current software based on the segmented IP addresses;

[0007] Obtain the current version number of the software through the target API interface;

[0008] Compare the latest version number with the current version number to obtain a corresponding comparison result;

[0009] Based on the comparison result, it is determined whether the current software needs to be upgraded, and the software is upgraded based on the latest version number.

[0010] Optionally, the segmenting the IP address to obtain segmented IP addresses includes:

[0011] Segmenting the IP address to obtain a segmented IP address including a first segment IP address, a second segment IP address, a third segment IP address, and a fourth segment IP address;

[0012] Accordingly, determining the latest version number of the current software based on the segmented IP address includes:

[0013] The latest version number of the current software is generated based on the third IP address and the fourth IP address in the segmented address.

[0014] Optionally, after segmenting the IP address to obtain segmented IP addresses, the method further includes:

[0015] Determining whether the current software is a mandatory upgrade type based on the target bit of the target segment IP address in the segmented IP address;

[0016] If the target bit of the target segment IP address indicates that the current software is a mandatory upgrade type, the system is triggered to automatically perform a corresponding upgrade operation;

[0017] If the target bit of the target segment IP address indicates that the current software is of a non-mandatory upgrade type, a prompt message indicating whether to perform a version upgrade is returned to the client.

[0018] Optionally, the determining whether the current software is a mandatory upgrade type based on the target bit of the target segment IP address in the segmented IP address includes:

[0019] Based on the first digit of the first segment IP address in the segmented IP address, it is determined whether the current software is a mandatory upgrade type.

[0020] Optionally, after segmenting the IP address to obtain segmented IP addresses, the method further includes:

[0021] The release day of the current software is calculated based on the segmented IP addresses.

[0022] Optionally, calculating the number of days since the current software was released based on the segmented IP addresses includes:

[0023] Determining the length of the first segment IP address in the segmented IP address;

[0024] Determine a calculation rule for the number of release days based on the length of the first segment IP address;

[0025] Under the calculation rule, the number of days since the current software was released is calculated based on the first segment of IP addresses and the second segment of IP addresses.

[0026] Optionally, the software upgrade based on the latest version number includes:

[0027] Splice out a download address corresponding to the latest version number according to the latest version number;

[0028] Download the target installation package corresponding to the latest version based on the download address;

[0029] The target installation package is used to upgrade the current software.

[0030] In a second aspect, the present application discloses a software upgrade device, comprising:

[0031] The IP address acquisition module is used to obtain the IP address corresponding to the target domain name by parsing the IP address record set in the DNS server when the current software is started;

[0032] An IP address segmentation module, which segments the IP address to obtain segmented IP addresses;

[0033] A latest version number determination module, configured to determine the latest version number of the current software based on the segmented IP address;

[0034] A current version number determination module is used to obtain the current version number of the software through the target API interface;

[0035] A version number comparison module, configured to compare the latest version number with the current version number to obtain a corresponding comparison result;

[0036] An upgrading module is used to determine whether the current software needs to be upgraded based on the comparison result, and to upgrade the software based on the latest version number.

[0037] In a third aspect, the present application discloses an electronic device, comprising:

[0038] Memory, used to store computer programs;

[0039] The processor is used to execute the computer program to implement the steps of the software upgrade method disclosed above.

[0040] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the software upgrade method disclosed above are implemented.

[0041] It can be seen that the present application provides a software upgrade method, including: when the current software is started, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server; the IP address is segmented to obtain the segmented IP address, and the latest version number of the current software is determined based on the segmented IP address; the current version number of the software is obtained through the target API interface; the latest version number is compared with the current version number to obtain a corresponding comparison result; based on the comparison result, it is determined whether the current software needs to be upgraded, and the software is upgraded based on the latest version number. It can be seen that the present application obtains the IP address corresponding to the target domain name by parsing the IP address record set in the DNS server, and then the latest version number of the current software can be determined based on the IP address, and then compared with the current version number to determine whether a version upgrade is required. In other words, the present application can obtain the latest version number by parsing the IP address record set in the DNS server, and then make a version judgment, thereby avoiding relying on the API interface to obtain the latest version information and avoiding the problem of being blocked by the firewall. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A flowchart of a software upgrade method disclosed in this application;

[0044] Figure 2 A schematic diagram of IP address segmentation disclosed in this application;

[0045] Figure 3 This is a schematic diagram of the structure of a software upgrading device disclosed in this application;

[0046] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] Currently, in the life cycle of a software or App, it is often necessary to update the version. Usually, when the software or App is started, we connect to the API interface on the network to obtain the latest software or App information and compare it with the local version. If the latest version returned by the interface is higher than the local version, the software or App is upgraded. However, this method usually requires the cooperation of the server, and the server provides a corresponding API interface to return the latest version information of the software or App. When the software or App has a new version, the API interface needs to be modified to return the corresponding software information. Moreover, the API interface needs to be accessed through the network, and there is a possibility that it is easily blocked by various firewalls, especially the firewalls within the enterprise. To this end, the present application provides a software upgrade solution that can avoid relying on obtaining the latest version information through the API interface, thereby avoiding the problem of being blocked by the firewall.

[0049] The embodiment of the present invention discloses a software upgrade method, see Figure 1 As shown, the method includes:

[0050] Step S11: When the current software is started, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server.

[0051] In this embodiment, when the current software is started, the IP address record set in the DNS server is parsed to obtain the IP address corresponding to the target domain name. It is understandable that there are no special requirements for the above-mentioned target domain name, and any domain name can be used, for example, abc.com. And through the DNS resolution service provider, the IP address record is added to the DNS (Domain Name System) domain name resolution, for example, the second-level domain name ver.abc.com is pointed to an IPv4 address, for example, the IPv4 address can be 2.13.104.100. Therefore, when there is a new version of the software or APP, the developer only needs to modify the above IPv4.

[0052] It should be pointed out that the IP address record set in the DNS server represents the version of the software or APP and other information, so there is no need to set up an additional website to provide a server-side interface (i.e., API interface). It is only necessary to determine the latest version number based on the IP address corresponding to the target domain name obtained by parsing the IP address record, so as to perform version judgment and other functions. For example, the A (Address) record of the DNS server is used to represent the version of the software or App and other information. The A (Address) record is used to specify the IP address record corresponding to the host name or domain name. In other words, the A record is the IP address record corresponding to the host name or domain name. The software or App can then obtain the IP address corresponding to the host name or domain name by parsing the A record set in the DNS server. Moreover, different programming languages ​​correspond to different ways of obtaining IP addresses based on domain names. For example, taking Android (Java) as an example, when the current software or APP is started, the IP address corresponding to the target domain name in the A record is obtained by parsing. The IP address corresponding to the domain name can be obtained through the following code:

[0053] InetAddress byName=InetAddress.getByName("ver.abc.com");

[0054] String ipString=byName.getHostAddress();

[0055] In this embodiment, the IP character string that may be obtained is "2.13.104.100", that is, the IP address corresponding to the target domain name ver.abc.com is 2.13.104.100.

[0056] Step S12: Segment the IP address to obtain segmented IP addresses, and determine the latest version number of the current software based on the segmented IP addresses.

[0057] In this embodiment, after obtaining the IP address corresponding to the target domain name, the IP address is segmented to obtain a segmented IP address, wherein each sub-segment in the segmented IP address can be used for different purposes, and then the latest version number of the current software is determined based on the segmented IP address. Specifically, the IP address is segmented to obtain a segmented IP address including a first segment IP address, a second segment IP address, a third segment IP address, and a fourth segment IP address; based on the third segment IP address and the fourth segment IP address in the segmented address, the latest version number of the current software is generated. For example, Figure 2As shown, the obtained IP address can be divided into four segments, each segment is separated by a dot (.), and each segment can be 0 to 255. The third and fourth segments are combined to form the latest version number. The corresponding calculation formula is: the third segment value * 256 + the fourth segment value. For example, when the IP address is *.*.12.34, the latest version number is 3106, that is, 12*256+34.

[0058] In this embodiment, after the IP address is segmented to obtain the segmented IP address, the following may also be included: determining whether the current software is a mandatory upgrade type based on the target bit of the target segmented IP address in the segmented IP address; if the target bit of the target segmented IP address indicates that the current software is a mandatory upgrade type, triggering the system to automatically perform the corresponding upgrade operation; if the target bit of the target segmented IP address indicates that the current software is a non-mandatory upgrade type, returning a prompt message to the client indicating whether to perform a version upgrade. Specifically, determining whether the current software is a mandatory upgrade type based on the first bit of the first segment IP address in the segmented IP address. For example, the first bit of the first segment can be used to indicate whether this version is a mandatory upgrade version. If the first bit of the first segment is 1, it indicates that this version is a non-mandatory upgrade version, and the user can be prompted whether to upgrade, and the user will ultimately decide whether to upgrade. If the first bit of the first segment is 2, it indicates that this version is a mandatory upgrade version, and the system automatically performs the upgrade operation based on the latest version number.

[0059] In this embodiment, after the IP address is segmented to obtain the segmented IP address, it can also include: calculating the release date of the current software based on the segmented IP address, specifically, determining the length of the first segment IP address in the segmented IP address; determining the calculation rule for the release date based on the length of the first segment IP address; under the calculation rule, calculating the release date of the current software based on the first segment IP address and the second segment IP address. For example, the value of the first segment after removing the first digit (counting from left to right), combined with the second segment, represents the release date of the version, indicating the Nth day from 2020.1.1, thereby calculating the version release date to prompt the user, for example, N is 0, indicating 2020.1.1; N is 1, indicating 2020.1.2, and so on to calculate the corresponding date, and the relevant calculation rules are as follows:

[0060] If the length of the first segment is 1, the number of days of publication = the value of the second segment. For example, if the IP address is 1.12.*.*, the number of days of publication is 12.

[0061] If the length of the first segment is 2, the number of days of publication = the second digit of the first segment value * 256 + the value of the second segment. For example, if the IP address is 14.12.*.*, the number of days of publication is 4 * 256 + 12;

[0062] If the length of the first segment is 3, the number of days of publication = the second and third digits of the first segment value * 256 + the second segment value. For example, if the IP address is 124.12.*.*, the number of days of publication is 24*256+12.

[0063] Step S13: Obtain the current version number of the software through the target API interface.

[0064] In this embodiment, the current version number of the software is obtained through the target API interface. That is, when the software or APP is started, the current software version number can be obtained through the API interface of the relevant platform. For example, the version number of the current Android App is obtained. The version number of the Android App is of Int type and is increased each time it is built and released. The relevant acquisition code for obtaining the current version number of the Android App is as follows:

[0065] PackageManager pm=context.getPackageManager();

[0066] PackageInfo pi=pm.getPackageInfo(context.getPackageName(),0);

[0067] Integer versionCode=Integer.parse(pi.getVersionCode);

[0068] Step S14: Compare the latest version number with the current version number to obtain a corresponding comparison result.

[0069] In this embodiment, the latest version number of the current software is determined based on the segmented IP address, and after obtaining the current version number of the software through the target API interface, the latest version number is compared with the current version number to obtain a corresponding comparison result.

[0070] Step S15: Determine whether the current software needs to be upgraded based on the comparison result, and upgrade the software based on the latest version number.

[0071] In this embodiment, when comparing the latest version number with the current version number, if the comparison result shows that the latest version number is greater than the current version number, it means that the current version number of the current software Yuxing is older, and the current software version is upgraded based on the latest version number. If the comparison result shows that the latest version number is not greater than the current version number, it means that the current version of the current software is the latest version and does not need to be upgraded yet.

[0072] In this embodiment, when the current software version needs to be upgraded, the software can be upgraded based on the latest version number. Specifically, a download address corresponding to the latest version number is spliced ​​based on the latest version number; a target installation package corresponding to the latest version number is downloaded based on the download address; and the current software is upgraded using the target installation package. In other words, the latest version of the software or app download address is spliced ​​based on the obtained latest version number. For example, the download address is http: / / xxx.yyy.zzz / down-VERSION.zip, where VERSION is the latest version number calculated based on the segmented IP address.

[0073] It can be seen that in the embodiment of the present application, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server, and then the latest version number of the current software can be determined based on the IP address, and then compared with the current version number to determine whether a version upgrade is required. In other words, the present application can obtain the latest version number by parsing the IP address record set in the DNS server, and then make a version judgment, thereby avoiding reliance on the API interface to obtain the latest version information and avoiding the problem of being blocked by the firewall.

[0074] Correspondingly, the embodiment of the present application also discloses a software upgrade device, see Figure 3 As shown, the device includes:

[0075] The IP address acquisition module 11 is used to obtain the IP address corresponding to the target domain name by parsing the IP address record set in the DNS server when the current software is started;

[0076] An IP address segmentation module 12, which segments the IP address to obtain segmented IP addresses;

[0077] The latest version number determination module 13 is used to determine the latest version number of the current software based on the segmented IP address;

[0078] The current version number determination module 14 is used to obtain the current version number of the software through the target API interface;

[0079] A version number comparison module 15 is configured to compare the latest version number with the current version number to obtain a corresponding comparison result;

[0080] The upgrading module 16 is configured to determine whether the current software needs to be upgraded based on the comparison result, and upgrade the software based on the latest version number.

[0081] As can be seen from the above, in the embodiment of the present application, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server, and then the latest version number of the current software can be determined based on the IP address, and then compared with the current version number to determine whether a version upgrade is required. In other words, the present application can obtain the latest version number by parsing the IP address record set in the DNS server, and then make a version judgment, thereby avoiding reliance on the API interface to obtain the latest version information and avoiding the problem of being blocked by the firewall.

[0082] In some specific embodiments, the IP address segmentation module 12 may specifically include:

[0083] An IP address segmentation unit, configured to segment the IP address to obtain a segmented IP address including a first segment IP address, a second segment IP address, a third segment IP address, and a fourth segment IP address;

[0084] In some specific embodiments, the latest version number determination module 13 may specifically include:

[0085] The latest version number determining unit is used to generate the latest version number of the current software based on the third segment IP address and the fourth segment IP address in the segmented address.

[0086] In some specific embodiments, the software upgrading device may further include:

[0087] A type determination module, configured to determine whether the current software is a mandatory upgrade type based on a target bit of a target segmented IP address in the segmented IP address;

[0088] an automatic upgrade module, configured to trigger the system to automatically perform a corresponding upgrade operation if the target bit of the target segment IP address indicates that the current software is a mandatory upgrade type;

[0089] The prompt information returning module is used to return prompt information of whether to perform version upgrade to the client if the target bit of the target segment IP address indicates that the current software is of non-mandatory upgrade type.

[0090] In some specific embodiments, the type determination module may specifically include:

[0091] A type determination unit is used to determine whether the current software is a mandatory upgrade type based on the first bit of the first segment IP address in the segmented IP address.

[0092] In some specific embodiments, after segmenting the IP address to obtain segmented IP addresses, the following steps may be further performed:

[0093] The release day calculation module is used to calculate the release day of the current software based on the segmented IP address.

[0094] In some specific embodiments, the release date calculation module may specifically include:

[0095] An IP address length determining unit, configured to determine the length of the first segment of the IP address in the segmented IP address;

[0096] a calculation rule determining unit, configured to determine a calculation rule for the number of publication days based on the length of the first segment IP address;

[0097] The release day calculation unit is used to calculate the release day of the current software based on the first segment IP address and the second segment IP address under the calculation rule.

[0098] In some specific embodiments, the upgrade module 16 may specifically include:

[0099] A download address splicing unit, configured to splice a download address corresponding to the latest version number according to the latest version number;

[0100] An installation package downloading unit, configured to download a target installation package corresponding to the latest version based on the download address;

[0101] The software upgrade unit is used to upgrade the current software using the target installation package.

[0102] Furthermore, an embodiment of the present application also provides an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.

[0103] Figure 4This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the software upgrade method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0104] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0105] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0106] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to implement the software upgrade method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to perform other specific tasks.

[0107] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the software upgrade method steps disclosed in any of the aforementioned embodiments are implemented.

[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0109] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0110] The above is a detailed introduction to a software upgrade method, device, equipment and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A software upgrade method, characterized in that: include: When the current software is started, the IP address corresponding to the target domain name is obtained by parsing the IP address record set in the DNS server; Segmenting the IP address to obtain segmented IP addresses, and determining the latest version number of the current software based on the segmented IP addresses; Obtain the current version number of the software through the target API interface; Compare the latest version number with the current version number to obtain a corresponding comparison result; Determining whether the current software needs to be upgraded based on the comparison result, and upgrading the software based on the latest version number; The segmenting of the IP address to obtain segmented IP addresses includes: Segmenting the IP address to obtain a segmented IP address including a first segment IP address, a second segment IP address, a third segment IP address, and a fourth segment IP address; Accordingly, determining the latest version number of the current software based on the segmented IP address includes: The third segment IP address and the fourth segment IP address in the segmented address are calculated based on a preset calculation formula to generate the latest version number of the current software. The preset calculation formula is: latest version number = third segment IP address value * 256 + fourth segment IP address value.

2. The software upgrade method according to claim 1, wherein: After the IP address is segmented to obtain segmented IP addresses, the method further includes: Determining whether the current software is a mandatory upgrade type based on the target bit of the target segment IP address in the segmented IP address; If the target bit of the target segment IP address indicates that the current software is a mandatory upgrade type, the system is triggered to automatically perform a corresponding upgrade operation; If the target bit of the target segment IP address indicates that the current software is of a non-mandatory upgrade type, a prompt message indicating whether to perform a version upgrade is returned to the client.

3. The software upgrade method according to claim 2, wherein: The determining whether the current software is a mandatory upgrade type based on the target bit of the target segment IP address in the segmented IP address includes: Based on the first digit of the first segment IP address in the segmented IP address, it is determined whether the current software is a mandatory upgrade type.

4. The software upgrade method according to claim 1, wherein: After the IP address is segmented to obtain segmented IP addresses, the method further includes: The release day of the current software is calculated based on the segmented IP addresses.

5. The software upgrade method according to claim 4, characterized in that: The calculating of the number of days since the current software was released based on the segmented IP addresses includes: Determining the length of the first segment IP address in the segmented IP address; Determine a calculation rule for the number of release days based on the length of the first segment IP address; Under the calculation rule, the number of days since the current software was released is calculated based on the first segment of IP addresses and the second segment of IP addresses.

6. The software upgrade method according to any one of claims 1 to 5, characterized in that: The software upgrade based on the latest version number includes: Splice out a download address corresponding to the latest version number according to the latest version number; Download the target installation package corresponding to the latest version based on the download address; The target installation package is used to upgrade the current software.

7. A software upgrade device, characterized in that: include: The IP address acquisition module is used to obtain the IP address corresponding to the target domain name by parsing the IP address record set in the DNS server when the current software is started; An IP address segmentation module, which segments the IP address to obtain segmented IP addresses; A latest version number determination module, configured to determine the latest version number of the current software based on the segmented IP address; A current version number determination module is used to obtain the current version number of the software through the target API interface; A version number comparison module, configured to compare the latest version number with the current version number to obtain a corresponding comparison result; An upgrading module, configured to determine whether the current software needs to be upgraded based on the comparison result, and to upgrade the software based on the latest version number; The IP address segmentation module specifically includes: An IP address segmentation unit, configured to segment the IP address to obtain a segmented IP address including a first segment IP address, a second segment IP address, a third segment IP address, and a fourth segment IP address; The latest version number determination module specifically includes: The latest version number determination unit is used to calculate the third segment IP address and the fourth segment IP address in the segmented address based on a preset calculation formula to generate the latest version number of the current software. The preset calculation formula is: latest version number = third segment IP address value * 256 + fourth segment IP address value.

8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the software upgrade method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the software upgrade method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and system for upgrading software of televisions or set-top boxes

    CN102905173A

  • Terminal, server and configuration file upgrading method

    CN106648725A

  • Software version upgrading method and device based on DNS query

    CN110750290A