Nothing Special   »   [go: up one dir, main page]

WO2023088289A1 - Patching method and related device - Google Patents

Patching method and related device Download PDF

Info

Publication number
WO2023088289A1
WO2023088289A1 PCT/CN2022/132193 CN2022132193W WO2023088289A1 WO 2023088289 A1 WO2023088289 A1 WO 2023088289A1 CN 2022132193 W CN2022132193 W CN 2022132193W WO 2023088289 A1 WO2023088289 A1 WO 2023088289A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
patch
application program
patch package
application
Prior art date
Application number
PCT/CN2022/132193
Other languages
French (fr)
Chinese (zh)
Inventor
任文杰
尹永宏
朱祥
窦鑫
李英伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023088289A1 publication Critical patent/WO2023088289A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • This application relates to the field of computer technology, in particular to a patch method and related equipment.
  • an APP not only needs to be installed and run on mobile phones, but also needs to be installed and run on cars, speakers, earphones, watches/bracelets, tablets, large screens, personal computers ( personal computer (PC), augmented reality (augmented reality, AR), virtual reality (virtual reality, VR) and other electronic devices.
  • PC personal computer
  • AR augmented reality
  • VR virtual reality
  • the purpose of this application is to provide a patch method and related equipment, which can avoid the problem of multiple patches with large data volume issued by the server when different terminal equipment needs to upgrade the same APP, and can reduce the number of patches between the server and each terminal equipment.
  • the amount of data transmission between them reduces the consumption of network bandwidth, and the super terminal can quickly restore and generate patches suitable for different versions of APPs of different terminal devices, which greatly improves the efficiency of patch repair and brings better results to users. Use experience.
  • the present application provides a patch method, the method is applied to a server in a first patch system, and the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the electronic devices,
  • the method may include: the server may generate first differential data according to the difference between the first application program on the third electronic device and the first patch package; the first patch package may be used to upgrade the first application program on the first electronic device
  • the third electronic device may be an electronic device in which the installed first application program overlaps with the first patch package among multiple electronic devices; wherein, the multiple electronic devices include the first electronic device and the third electronic device;
  • the server sends the first differential data to the second electronic device; the multiple electronic devices also include the second electronic device; the second electronic device can be used in the first application program based on the first differential data and the third electronic device
  • the first software module restores the first patch package; the first software module overlaps with the first patch package; the second electronic device is used to send the first patch package to the first electronic device.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method in the first aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be an electronic device with the highest degree of overlap between the installed first application program and the first patch package or higher than the first threshold among multiple electronic devices. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method may be a method both in the first application program installed on the third electronic device and in the first patch package
  • the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level overlap between the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the first application program installed on the third electronic device has an application-level overlap with the first patch package, which is the same as the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides a patch method, which is applied to the first electronic device in the first patch system
  • the first patch system includes: a server, a plurality of electronic devices, and the first electronic device is installed on the electronic device application program, the plurality of electronic devices include a first electronic device, the method may include:
  • the first electronic device receives the first patch package sent by the second device, and the multiple electronic devices also include the second electronic device, and the first patch package is obtained by the second electronic device using the first differential data and the third electronic device.
  • the first software module in the first application program is restored, the multiple electronic devices also include a third electronic device, and the third electronic device is the first application program and the first patch package installed in the multiple electronic devices There are overlapped electronic devices; the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device, and is sent to the second electronic device,
  • the first electronic device uses the first patch package to upgrade the first application program installed thereon.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method in the second aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be an electronic device with the highest degree of coincidence between the installed first application program and the first patch package or a degree of coincidence higher than the first threshold among multiple electronic devices. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method may be a method both in the first application program installed on the third electronic device and in the first patch package
  • the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level coincidence degree of the application program and the first patch package the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides a patching method, which is applied to the second electronic device in the first patching system, and the first patching system includes: a server, a plurality of electronic devices, and the first electronic device is installed on the electronic device.
  • application program, the multiple electronic devices include a second electronic device, and the method may include: the second electronic device receives first differential data sent by the server, the first differential data is the first application program on the third electronic device by the server
  • the program and the first patch package are differentially generated.
  • the first patch package is used to upgrade the first application program on the first electronic device.
  • the third electronic device is among multiple electronic devices.
  • a patch package has overlapped electronic devices, the plurality of electronic devices also include a first electronic device and a third electronic device, and then, the second electronic device The first software module restores the first patch package, and the first software module overlaps with the first patch package. Next, the second electronic device sends the first patch package to the first electronic device.
  • the first electronic device uses the first patch package to upgrade the first application program installed thereon.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method in the third aspect can avoid the problem that when the same application program of different terminal devices is upgraded, the server repeatedly issues patches with large data volumes for different devices, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method may be a method both in the first application program installed on the third electronic device and in the first patch package
  • the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides a patch method, the method is applied to the third electronic device in the first patch system, the first patch system includes: a server, a plurality of electronic devices, the electronic device is installed with the first Application program, the multiple electronic devices include the third electronic device, the second electronic device, and the first electronic device, and the method may include:
  • the third electronic device sends a first data package to the second electronic device, and the first data package includes a first software module in a first application program installed on the third electronic device, and the first software module and the first patch package overlap;
  • the first patch package is restored by the second electronic device using the first differential data and the first software module in the first application program on the third electronic device, where the third electronic device is a plurality of electronic devices
  • the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device, and is sent
  • the second electronic device is used to restore the first patch package according to the first differential data and the first software module in the first application program on the third electronic device; the second electronic device It is also used for sending the first patch package to the first electronic device.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method in the fourth aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method may be a method both in the first application program installed on the third electronic device and in the first patch package
  • the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level coincidence degree of the application program and the first patch package the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides a patch method, the method is applied to a first patch system, the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the plurality of electronic devices, the The method may include: the server may perform a difference according to the first application program on the third electronic device and the first patch package to generate first difference data, and the first patch package is used to upgrade the first application program on the first electronic device , the third electronic device is among the plurality of electronic devices, the installed first application program overlaps with the first patch package, and then the server can send the first differential data to the second electronic device, and the second electronic device
  • the first patch package can be restored according to the first differential data and the first software module in the first application program on the third electronic device, wherein the first software module overlaps with the first patch package, and then, the The second electronic device sends the first patch package to the first electronic device, and the first electronic device uses the first patch package to upgrade the first application installed on it.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method in the fifth aspect can avoid the problem that when the same application program of different terminal devices is upgraded, the server repeatedly issues patches with large data volumes for different devices, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method may be a method both in the first application program installed on the third electronic device and in the first patch package
  • the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides a patch system
  • the patch system includes: a server, a plurality of electronic devices, the first application program is installed on the electronic devices, wherein the server is used to An application program and a first patch package are differentially generated to generate first differential data.
  • the first patch package is used to upgrade the first application program on the first electronic device, and the third electronic device is the first installed electronic device among multiple electronic devices.
  • An application program overlaps with the first patch package of electronic devices
  • the multiple electronic devices include the first electronic device and the third electronic device
  • the server is used to send the first differential data to the second electronic device
  • the multiple electronic devices It also includes a second electronic device
  • the second electronic device is used to restore the first patch package according to the first differential data and the first software module in the first application program on the third electronic device, and the first software module and The first patch package overlaps
  • the second electronic device is used to send the first patch package to the first electronic device
  • the first electronic device is used to upgrade the first application program installed on it by using the first patch package.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
  • Implementing the method of the sixth aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
  • overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
  • the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
  • the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
  • the same method can be the method in both the first application program installed on the third electronic device and the first patch package
  • the same variable can be the method in both the first application program installed on the third electronic device and the first patch package.
  • the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods
  • the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
  • the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the platform-level coincidence degree of the application program and the first patch package the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices.
  • the application-level overlapping degree of the application program and the first patch package means that the platform-level overlapping degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices. the degree of platform-level overlap between the first application and the first patch,
  • platform-level coincidence degree (number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number)
  • application-level coincidence degree (same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  • one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
  • overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
  • the present application provides another patch method, which may include: the server may perform a difference according to the first application program on the first electronic device and the first patch package, and generate second difference data, the first patch The package is used to upgrade the first application program on the first electronic device, and then, the server sends the second differential data to the second electronic device, and the second electronic device uses the second differential data and the first application program on the first electronic device
  • the first software module restores the first patch package, wherein the first software module overlaps with the first patch package, and then the second electronic device sends the first patch package to the first electronic device, and the first patch package
  • An electronic device uses a first patch package to upgrade a first application program installed thereon.
  • the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices.
  • the first electronic device may be a terminal device installed with an application program, that is, a target device of the patch package.
  • the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities.
  • the second electronic device has the functions of receiving differential data and restoring patch packages.
  • the present application provides a server, which may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs.
  • a server which may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs.
  • the processor When the processor is executing one or more programs, the electronic device can implement any function of the electronic device in the first aspect, which will not be repeated here.
  • the present application provides an electronic device, which is a first electronic device and may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs.
  • the electronic device can implement any function of the electronic device in the second aspect, which will not be repeated here.
  • the present application provides an electronic device, which is a second electronic device, and may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs.
  • the electronic device can implement any function of the electronic device in the third aspect, which will not be repeated here.
  • the present application provides an electronic device, which is a third electronic device, and may include: a communication device, a memory, and a processor coupled to the memory, multiple application programs, and one or more programs .
  • the electronic device can implement any function of the electronic device in the fourth aspect, which will not be repeated here.
  • the present application provides a computer-readable medium, where instructions can be stored in the storage medium.
  • the electronic device can be made to execute the first aspect and/or the second aspect and/or the third aspect and/or the fourth aspect and/or the fifth aspect and/or the sixth aspect and/or Or any function in the seventh aspect and/or the eighth aspect and/or the ninth aspect and/or the tenth aspect and/or the eleventh aspect will not be repeated here.
  • FIG. 1 is a schematic diagram of the architecture of a patch system provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a patch method provided in an embodiment of the present application.
  • FIG. 3A is a schematic diagram of a method for determining the most relevant device provided by an embodiment of the present application.
  • FIG. 3B is a schematic diagram of a method for generating differential data C provided by an embodiment of the present application.
  • FIG. 3C is a schematic diagram of a method for restoring patch 3 provided by an embodiment of the present application.
  • Fig. 4 is a flowchart of a patch method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another patch method provided in the embodiment of the present application.
  • FIG. 6A is a schematic diagram of a method for determining minimum difference data provided by an embodiment of the present application.
  • Fig. 6B is a schematic diagram of a method for determining the minimum difference data provided by the embodiment of the present application.
  • Fig. 6C is a schematic diagram of three differential methods provided by the embodiment of the present application.
  • FIG. 6D is a schematic diagram of another method for restoring patch 3 provided by the embodiment of the present application.
  • Fig. 7 is a flow chart of another patch method provided by the embodiment of the present application.
  • FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a user interface provided by an embodiment of the present application.
  • Fig. 11A is a schematic diagram of a user interface provided by an embodiment of the present application.
  • Fig. 11B is a schematic diagram of a user interface provided by an embodiment of the present application.
  • Fig. 11C is a schematic diagram of a user interface provided by the embodiment of the present application.
  • Fig. 11D is a schematic diagram of a user interface provided by an embodiment of the present application.
  • the patch system 10 may include a server 100, a router 101, and multiple terminal devices such as a mobile phone 102, a smart bracelet 103, a smart earphone 104, a smart speaker 105, a smart TV 106, and a computer 107.
  • the router 101 can set up a wireless network and transmit wireless network signals
  • terminal devices such as mobile phones 102, smart bracelets 103, smart earphones 104, smart speakers 105, smart TVs 106, computers 107, etc. can connect to the wireless network of the router 101 and server 100 communications.
  • multiple terminal devices in the patch system 10 may have different versions of the application program "APP-1" installed.
  • the version of "APP-1" on the mobile phone 102 is "2.0.0", and the size of the patch 1 adapted to it is 20M; 0", the size of patch 2 adapted to it is 2M; the version of "APP-1" on the smart earphone 104 is “4.0.0", and the size of patch 3 adapted to it is 800K; the size of "APP-1" on the smart speaker 105 is The version of "1” is “5.0.0", and the size of patch 4 is 1M; the version of "APP-1” on the smart TV 106 is “6.0.0", and the size of patch 5 is 50M; The version of "APP-1” on the computer 107 is “7.0.0", and the patch 6 adapted to it has a size of 40M.
  • the server 100 when the server 100 detects that the "APP-1" on the smart earphone 104 needs to be upgraded, first, the server 100 can send the "APP-1 4.0.0 for Patch 3 of "Smart Headphones", the size of patch 3 is 800K. Next, the smart earphone 104 can directly download patch 3 to upgrade the application program "APP-1" from “APP-1 4.0.0 for smart earphones” to "APP-1 4.1.0 for smart earphones".
  • the process of "APP-1" on other terminal devices upgrading "APP-1" with a patch can be similar to the process of "APP-1" on the smart earphone 104 directly downloading patch 3 for upgrading.
  • the embodiment of the present application provides a patch system 20 and a patch method implemented in the patch system.
  • a terminal device with strong computing processing capability and sufficient storage capability such as the mobile phone 102
  • "Hyper Terminal” can use the smaller differential data sent by the server 100 to restore a patch package suitable for the target device (such as smart earphone 104, etc.), and then "Hyper Terminal” sends the restored patch package to The target device, so that the server 100 does not need to directly transmit patch packages with a large amount of data to each terminal device, thereby reducing the amount of data transmission and reducing the burden on the network.
  • the patch system 20 may include: a server 100 and terminal devices such as a mobile phone 102 , a smart bracelet 103 , and a smart earphone 104 .
  • the mobile phone 102, the smart bracelet 103 and the smart earphone 104 can be in the same local area network by accessing the same Wi-Fi access point provided by the router 101.
  • the mobile phone 102, the smart bracelet 103, the smart earphone 104 and other terminal devices can all be installed with an application program "APP-1".
  • APP-1 application program
  • the version of "APP-1" in the mobile phone 102 is 2.0.0
  • the version of "APP-1" in the smart bracelet 103 is 3.0.0
  • the version of "APP-1" in the smart earphone 104 is 4.0 .0.
  • the patch method provided in the embodiment of the present application may include the following steps:
  • Step 1 The server 100 can prepare the patch 3 required for upgrading the "APP-1" of the smart earphone 104, and its size can be, for example, 800K.
  • the server 100 determines the most relevant device from all the terminal devices connected to it.
  • the most relevant devices may be a mobile phone 102 and a smart bracelet 103, and the mobile phone 102 is selected as the most relevant device because "APP-1 2.0.0" on the device has a software module that highly overlaps with patch 3,
  • the smart bracelet 103 was also selected as the most relevant device because the "APP-1 3.0.0" on the device has a software module that highly overlaps with Patch 3.
  • the server 100 can use the "APP-1" on the most relevant device (i.e. the mobile phone 102 and the smart bracelet 103) (specifically, it can refer to some modules that highly overlap with the patch 3) and the patch 3 to generate differential data C, Its size can be 50K, which is significantly smaller than the size of patch 3.
  • Step 4 The server 100 can send the differential data C to the mobile phone 102, and inform the mobile phone 102 of the target device (ie, the smart earphone 104) and the most relevant device.
  • the target device ie, the smart earphone 1014
  • Step 5 the mobile phone 102 can use the differential data C and the "APP-1" on the most relevant device (specifically, it can refer to some modules that are highly overlapped with the patch 3) to restore the patch 3, and then the mobile phone 102 can send the smart earphone 104 (that is, the target device) sends the restored patch 3 .
  • Step 6 The smart earphone 104 can use the patch 3 of the mobile phone 102 to upgrade "APP-1", specifically, "APP-1" can be upgraded from the old version 4.0.0 to the new version 4.1.0.
  • the server 100 since the patch system 20 provided by the embodiment of the present application has the role of "hyper terminal", the server 100 does not need to directly transmit patches with a large amount of data to each terminal device, but only needs to transmit patches to the "hyper terminal” Utilize small differential data compared to the amount of data generated by the patch pack and the application on the most relevant device.
  • the "Hyper Terminal” can use the differential data and the application program on the most relevant device to restore the patch package, and transmit the patch package to the target device, so as to finally realize the application program upgrade on the target device.
  • This patch technology obviously reduces the amount of data transmission between the server and each terminal device when the application program on each terminal device is upgraded.
  • the most relevant device may refer to a terminal device on which "APP-1" has one or more software modules highly overlapping with patch 3.
  • APP-1 software modules highly overlapping with patch 3.
  • one most relevant device may be determined, or multiple most relevant devices may be determined.
  • any terminal device may become the most relevant device for patch 3 .
  • FIG. 3A exemplarily shows the software architecture of "APP-1" and Patch 3 on terminal devices such as mobile phone 102, smart bracelet 103, smart speaker 105 and the like.
  • Patch 3 and "APP-1" on each terminal device can be divided into three software modules: FA1interface code, Entrylegcy code and FA1 code according to their software architecture, among which the FA1 interface code software module can be used to implement the interface layer The specific logical structure, the Entrylegcy code software module can be used to realize the compatibility processing function of the software data system, and the FA1 code module can be used to realize the Hongmeng card function of the application program.
  • Each software module may be composed of multiple methods and variables, and the composition of the same software module on different terminal devices and patches may be different.
  • the FA1 interface code software module in the patch 3 can include the following variables: variable 1-a, variable 1-b, variable 1-c, variable 1-d, and the following methods: method 1-a, Method 1-b, Method 1-c, Method 1-d.
  • the FA1 interface code software module in the "APP-1" on the mobile phone 102 can include the following variables: variable 1-a, variable 1-b, variable 1-c, variable 1-d, variable 1-e, variable 1-f , and the following methods: Method 1-a, Method 1-b, Method 1-c, Method 1-d, Method 1-e, Method 1-f.
  • the FA1 interface code software module in the "APP-1" on the smart bracelet 103 can include the following variables: variable 1-d, variable 1-e, variable 1-f, and the following methods: method 1-d, method 1- e. Method 1-f.
  • the FA1 interface code software module in the "APP-1" on the smart speaker 105 can include the following variables: variable 1-e, variable 1-f, variable 1-g, and the following methods: method 1-e, method 1-f , Method 1-g. Similar variables and methods that may be included in Patch 3 and other modules of various other terminal devices are shown in FIG. 3A , and will not be repeated here.
  • the FA1 interface code (02) module of "APP-1" on the mobile phone 102 has the highest overlap with the FA1 interface code (01) module in patch 3, and has the same variables as follows: variable 1-a, variable 1-b, variant 1-c, variant 1-d, and the same method with the following: method 1-a, method 1-b, method 1-c, method 1-d.
  • the entrylegcy code (03) module of "APP-1" on the smart bracelet 103 and the entrylegcy code (01) module in patch 3 have the highest coincidence degree, and have the same variables as follows: variable 2-b, variable 2-c, Variable 2-g, and has the same methods as: method 2-b, method 2-c, method 2-g.
  • the FA1 code (03) module of "APP-1" on the smart bracelet 103 and the FA1 code (01) module in patch 3 have the highest coincidence degree, and have the same variables as follows: variable 3-a, variable 3-b, Variable 3-g, and has the same methods as: method 3-a, method 3-b, method 3-g.
  • the coincidence degree (the number of the same method+the number of the same variable)/(the total number of methods+the total number of variables).
  • the most relevant to the FA1 interface code module of patch 3 is the FA1 interface code module in the "APP-1" of the mobile phone 102, and the most relevant to the Entrylegcy code module of patch 3 is the "APP-1" module of the smart bracelet 103.
  • the Entrylegcy code module in "APP-1” has the greatest correlation with the FA1 code module of Patch 3 is the FA1 code module in "APP-1" of the smart bracelet 103.
  • the codes in the three modules of different software versions of "APP-1" of different terminal devices have similarities and differences.
  • the three modules of patch 3 and the codes on all terminal devices are obtained.
  • the correlation size of the module corresponding to the name of "APP-1” select the module of "APP-1” that has the greatest correlation with the three modules of Patch 3, which is the most relevant module, and the terminal device where the most relevant module is located is most relevant equipment.
  • the first method is to calculate the coupling coefficient, that is, to reversely analyze the module software code, obtain multiple variables and methods in the corresponding code segment, and perform structural analysis.
  • the coupling coefficient is calculated as follows:
  • Coupling coefficient (change in the number of variables + change in the number of methods) / (number of methods + number of variables)
  • each software module can also be divided into methods and variables of two dimensions, namely the platform dimension and the application dimension.
  • the methods and variables of the platform dimension are divided into methods and variables based on the only difference of the terminal device.
  • the methods and variables of the application dimension are divided into methods and variables based on the only difference of the application program. How to determine the most relevant device in two dimensions will be described with reference to FIG. 3A .
  • the priority of the methods and variables on the platform dimension and the methods and variables on the application dimension can be distinguished.
  • the priority of the platform dimension is higher than the priority of the application dimension, then firstly determine which devices have software modules highly overlapping with patch 3 based on the methods and variables of the platform dimension.
  • variable 1-d and method 1-d in the FA1 interface code (01) module in patch 3 are the variables and methods of the platform dimension
  • the variable 1-a , variable 1-b, variable 1-c and method 1-a, method 1-b, method 1-c are the variables and methods of the application dimension
  • Variable 1-d and method 1-d in the code(02) module are variables and methods of the platform dimension
  • variable 1-a, variable 1-b, variable 1-c, variable 1-e, variable 1-f and method 1 -a, method 1-b, method 1-c, method 1-e, method 1-f are the variables and methods of the application dimension
  • the variables in the FA1 interface code (03) module in version 3.0.0 of "APP-1" 1-d and method 1-d are variables and methods of the platform dimension
  • variables and methods of variable 1-e, variable 1-f, method 1-e, and method 1-f are variables and methods of the application dimension.
  • the coupling coefficient between the FA1 interface code (01) module in patch 3 and the FA1 interface code (02) module in version 2.0.0 of the "APP-1" on the mobile phone 102 is zero, and the same , the coupling coefficient between the FA1 interface code (01) module in patch 3 and the FA1 interface code (03) module in version 3.0.0 of "APP-1" is also zero, that is, the two in the platform dimension and FA1 in patch 3
  • the coupling coefficients of the interface code(01) modules are equal.
  • the coupling coefficient calculation on the application dimension is performed to obtain the module with the smallest coupling coefficient with the FA1 interface code(01) module in patch 3, so as to determine the most relevant Devices, which are calculated similarly to the platform dimension.
  • the priority of the application dimension is higher than the priority of the platform dimension, then first determine which devices have software modules that have a high overlap with patch 3 based on the methods and variables of the application dimension. The calculation is similar to that shown above. If the coupling coefficient of a module on two devices calculated on the application dimension is equal to that of a module in patch 3, then the coupling coefficient calculation on the platform dimension is performed to determine the most relevant device.
  • the binary code of the software module may also be used to determine the most relevant device.
  • the second method is to use binary to perform correlation calculation on the module software code (including but not limited to the bsdiff algorithm).
  • the following is the correlation coefficient size of the corresponding module in the "APP-1" of the first embodiment patch 3 and each terminal device:
  • the correlation coefficient calculated by the FA1 interface code module of patch 3 and the FA1 interface code module of "APP-1" in the mobile phone 102 is 0.8, and the Entry Legcycode module of patch 3 and the Entry Legcycode of "APP-1" in the mobile phone 102
  • the correlation coefficient calculated by the module is 0.4, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the mobile phone 102 is 0.2;
  • the correlation coefficient calculated by the FA1 interface code module of Patch 3 and the FA1 interface code module of "APP-1" in the smart bracelet 103 is 0.7, and the Entry Legcycode module of Patch 3 and the "APP-1" in the smart bracelet 103
  • the correlation coefficient calculated by the Entry Legcycode module of "is 0.7, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the smart bracelet 103 is 0.6;
  • the correlation coefficient calculated between the FA1 interface code module of patch 3 and the FA1 interface code module of "APP-1" in the smart speaker 105 is 06, and the correlation coefficient between the Entry Legcycode module of patch 3 and the "APP-1" in the smart speaker 105 is 06.
  • the correlation coefficient calculated by the Entry Legcycode module is 0.6, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the smart speaker 105 is 0.5;
  • the correlation coefficient between the FA1 interface code (02) in the "APP-1" of the mobile phone 102 and the FA1 interface code (01) in the patch 3 is at most 0.8
  • the "APP-1" of the smart earphone 104 is 0.8
  • the correlation coefficient between EntryLegacycode (03) in "EntryLegacycode (03) and EntryLegacycode (01) in Patch 3 is at most 0.7
  • the correlation coefficient between FA1 code (03) in "APP-1" of smart earphone 104 and FA1 code (01) in Patch 3 The maximum coefficient of sex is 0.6. Then it can be determined that the most relevant devices for patch 3 are the mobile phone 102 and the smart earphone 104 .
  • Step 3 shown in FIG. 3B the differential data C is obtained by the software module on the most relevant device (FA1 interface code (02 shown in FIG. 3B ) ) module, Entrylegcy code (03) module and FA1 code (03) module) and Patch 3 are obtained by making differences based on the principle of removing common ground while reserving differences.
  • Differential data C also has the same software architecture as patch 3 and "APP-1" on each terminal device, that is, it also includes three modules: FA1 interface code, Entrylegcy code and FA1 code.
  • FIG. 3B exemplarily shows specific operations on how to generate differential data C.
  • the methods and variables within the gray dotted lines in each module are the methods and variables discarded after the difference, and the remaining methods and variables are the methods and variables retained after the difference.
  • the FA1 interface code (00) module is generated by the difference between the FA1 interface code (01) module in the patch 3 and the FA1 interface code (02) module in the "APP-1 2.0.0" of the mobile phone 102, and the Entrylegcy code
  • the (00) module is generated by the difference between the Entry legcy code (01) module in patch 3 and the Entrylegcy code (03) module in the "APP-1 3.0.0" of the smart bracelet 103
  • the FA1 code (00) module is generated by The FA1 code(01) module in Patch 3 and the FA1 code(03) module in the "APP-1 3.0.0" of smart bracelet 103 are generated by difference.
  • the differential data C obtained in this way is the smallest differential data volume, and the size is only 50K, so that when the server 100 transmits the differential data C to the mobile phone 102, the transmitted data volume is the smallest and the transmission efficiency is the highest. , which can improve the efficiency of patches to fix urgent problems.
  • each module in the differential data C is the most relevant module of the "APP-1" of the most relevant device (Fig. 3C shows the FA1 interface code (02) module, the Entrylegcy code (03) module and the FA1 code (03) module) to restore patch 3 according to the principle of removing common differences while reserving differences.
  • the principle of removing common differences while reserving differences is to discard differential data C and
  • the most relevant modules have common variables and methods, and the unique variables and methods of differential data C and the unique variables and methods of the most relevant modules are reserved.
  • the methods and variables within the gray dotted line in each module are the methods and variables discarded after restoration, and the remaining methods and variables are the methods and variables retained after restoration.
  • the FA1 interface code (01) module is the FA1 interface code (02) module in the smart phone 102 and the FA1 interface code (00) module in the differential data C and discards the shared variable 1-e, variable 1-f and method 1-e, method 1-f, leave the unique variable 1-a, variable 1-b, variable 1-c, variable 1-d and method 1-a, method 1-b unique to the FA1 interface code (02) module , method 1-c, method 1-d;
  • the Entrylegcy code (01) module is the Entrylegcy code (03) module in the smart bracelet 103 and the Entrylegcy code (00) module in the differential data C. Abandon the shared variable 2-h and method 2-h, and leave the Entrylegcy code (03) Module unique variable 2-b, variable 2-c, variable 2-g and method 2-b, method 2-c, method 2-g and Entrylegcy code (00) module unique variable 2-f and method 2 -f;
  • the FA1 code(01) module discards the common variable 3-h and method 3-h for the FA1 code(03) module in the smart bracelet 103 and the FA1 code(00) module in the differential data C, leaving the FA1 code(03 ) module unique variable 3-a, variable 3-b, variable 3-g and method 3-a, method 3-b, method 3-g and FA1 code(00) module unique variable 3-d and method 3-d.
  • FIG. 2 is only for illustrating the embodiment of the present application, and does not constitute any limitation to the present application.
  • FIG. 4 shows a method flow of a patch method provided by an embodiment of the present application. Specifically, the following steps may be included:
  • the server side detects whether the "APP-1" of the terminal device under the server 100 needs to issue a patch, and determines that a patch 3 needs to be issued to the "APP-1" of the smart earphone 104 .
  • the server 100 sends a patch 3 prompt message to the mobile phone 102, wherein the prompt message includes the terminal device that needs to be updated, that is, the smart earphone 104, and the version information of the "APP-1" of the device before and after the update is 4.0.0 Updated to 4.1.0.
  • the prompt message includes the terminal device that needs to be updated, that is, the smart earphone 104, and the version information of the "APP-1" of the device before and after the update is 4.0.0 Updated to 4.1.0.
  • the mobile phone 102 detects that the user selects an update operation.
  • the server 100 acquires a request from the user to agree to download the patch 3 and update "APP-1".
  • the server 100 obtains the version information of "APP-1" of all terminal devices, and further determines the most relevant device in combination with Patch 3.
  • the server 100 obtains difference data C according to difference between "APP-1" of the most relevant device and patch 3.
  • the server 100 sends the differential data C to the mobile phone 102 to the mobile phone 102 .
  • the mobile phone 102 restores the patch 3 according to the most relevant module and the differential data C of "APP-1" in the most relevant device.
  • the mobile phone 102 sends the “APP-1” patch 3 for updating the smart headset 104 to the smart headset 104 .
  • the smart earphone 104 downloads and installs Patch 3, and performs a version update.
  • the server 100 receives an instruction from the smart earphone 104 indicating that the update of "APP-1" is successful.
  • the server 100 updates and saves the "APP-1" version information of the smart earphone 104.
  • the server 100 sends an instruction indicating that the "APP-1" is successfully updated to the mobile phone 102.
  • the mobile phone 102 displays a prompt message that the "APP-1" version of the smart earphone 104 has been successfully updated from 4.0.0 to 4.1.0.
  • the embodiment of the present application also provides a patch system 30 and a patch method implemented in the patch system.
  • a terminal device with strong computing processing capability and relatively sufficient storage capability such as the mobile phone 102
  • "Hyper Terminal” can also utilize the relatively small differential data sent by the server 100 to restore a patch package suitable for the target device, and then "Hyper Terminal” sends the restored patch package to the target device, so that the server 100 also achieves the effect of not needing to directly transmit patch packages with a large amount of data to the target device, thereby reducing the amount of data transmission and reducing the burden on the network.
  • the target device of the patch delivered by the server is not in the scenario of 1+8+N devices, but a single terminal device that can establish a connection and communicate with the mobile phone 102, so there is no most relevant module , and there is no most relevant device for the patch pack.
  • the patch system 30 provided in the embodiment of the present application may include: a server 100 and terminal devices such as a mobile phone 102 and a smart earphone 104 .
  • the mobile phone 102 and the smart earphone 104 can be in the same local area network by accessing the same Wi-Fi access point provided by the router 101 .
  • the application program "APP-1" can be installed on terminal devices such as the mobile phone 102 and the smart earphone 104 .
  • the version of "APP-1" in the mobile phone 102 is 2.0.0
  • the version of "APP-1" in the smart earphone 104 is 4.0.0.
  • the patch method provided by the embodiment of the present application may include the following steps:
  • Step 1 The server 100 can prepare the patch 3 required for upgrading the "APP-1" of the smart earphone 104, and its size can be, for example, 800K.
  • Step 2 the server 100 can use the "APP-1 4.0.0" of the smart earphone 104 and the patch 3 to generate three different differential data a, b and c, wherein it can be seen that the differential data a has the smallest data volume, and its size can be, for example, 80K , significantly smaller than the size of patch 3.
  • Step 3 The server 100 can send the differential data a to the mobile phone 102, and inform the mobile phone 102 of the target device (ie, the smart earphone 104) and the differential data.
  • the target device ie, the smart earphone 1004.
  • Step 4 the mobile phone 102 can use the differential data a and the "APP-1 4.0.0" on the smart earphone 104 (specifically, it can be part of the data that has been differentiated), restore patch 3, and then, the mobile phone 102 can send the patch 3 to the smart earphone 104 104 (that is, the target device) sends the restored patch 3 .
  • Step 5 the smart earphone 104 can use the patch 3 of the mobile phone 102 to upgrade "APP-1", specifically, "APP-1" can be upgraded from the old version 4.0.0 to the new version 4.1.0.
  • the server 100 since the patch system 30 provided by the embodiment of the present application has the role of "hyper terminal", the server 100 does not need to directly transmit patches with a large amount of data to each terminal device, but only needs to transmit patches to the "hyper terminal” Utilizes the smallest differential data compared to the amount of data generated by the patch pack and the application on the target device.
  • the "Hyper Terminal” can use the differential data and the application program on the target device to restore the patch package, and transmit the patch package to the target device, so as to finally realize the application program upgrade on the target device.
  • This patch technology significantly reduces the amount of data transmission between the server and each target device when the application program on each target device is upgraded.
  • the "APP-1" of the smart headset 104 can be divided into three modules: FA1 interface code, Entrylegcy code and FA1 code according to its software architecture, and patch 3 can be divided into two modules: Entrylegcy code and FA1 code according to its software architecture. module,
  • the Entrylegcy code module in patch 3 is not equivalent to only upgrading the Entrylegcy code module in the "APP-1" of the smart earphone 104, but the FA1 interface code and Entrylegcy code in the "APP-1" of the smart earphone 104. code Two modules are upgraded together. This will lead to uncertainty in the specific distribution of methods and variables on the two modules of FA1 interface code and Entrylegcy code in the "APP-1" of the smart earphone 104, so the minimum differential data is determined by three differential methods.
  • the determination of the minimum difference data diagram shown in Figure 6B and the three ways of difference shown in Figure 6C are the three ways of performing three ways between the software module on the patch 3 and the software module on the smart earphone 104 "APP-1".
  • the difference is combined to form the difference data, including three ways of difference:
  • the first differential method is to differentiate the FA1 interface code module of the "APP-1" of the smart earphone 104 and the Entrylegcy code module in patch 3 to obtain a differential module 1, which includes variable 1-d, variable 2-b, and variable 2- e, variable 2-g and method 1-d, method 2-b, method 2-e, method 2-g, the FA1 code module of the "APP-1" of the smart earphone 104 and the FA1 code module in the patch 3
  • the difference is obtained by difference module 4, which includes variable 3-a, variable 3-d, method 3-a, method 3-d, and difference data a can be formed by difference module 1 and difference module 4.
  • the second differential method is to differentiate the Entrylegcy code module of "APP-1" of the smart earphone 104 and the Entrylegcy code module in patch 3 to obtain a differential module 2, which includes variable 1-a, variable 1-b, and variable 1-c , variable 1-d, variable 2-a, variable 2-c, variable 2-e, variable 2-g and method 1-a, method 1-b, method 1-c, method 1-d, method 2-a , method 2-c, method 2-e, method 2-g, the FA1 code module of the "APP-1" of the smart earphone 104 and the FA1 code module in the patch 3 are differentiated to obtain the difference module 4, the difference module 2 and the difference Module 4 can constitute differential data b.
  • the third differential method is to differentiate the FA1 interface code module and the Entrylegcy code module of the "APP-1" of the smart earphone 104 from the Entrylegcy code module in patch 3 to obtain a differential module 3, which includes variables 1-d and variable 2 -a, variable 2-c, variable 2-e, variable 2-g and method 1-d, method 2-a, method 2-c, method 2-e, method 2-g, the "APP
  • the difference between the FA1 code module of -1" and the FA1 code module in patch 3 is obtained to obtain the difference module 4, and the difference module 3 and the difference module 4 can form the difference data c.
  • the server 100 transmits the differential data to the mobile phone 102, the amount of transmitted data is the smallest, and the transmission Highest efficiency, improving the efficiency of patches to fix urgent problems.
  • the differential data a includes two modules, Entrylegcy code and FA1 code, where the Entrylegcy code module is composed of the Entrylegcy code module in patch 3 and the "APP-1" of the smart earphone 104.
  • the difference between the FA1 interface code module in ", the FA1 code module is obtained by the difference between the FA1 code module in patch 3 and the FA1 code module in the "APP-1" of the smart earphone 104.
  • each module in the differential data a and the relevant modules in the "APP-1" of the smart earphone 104 that have performed differential operations (Figure 6D shows that "APP-1" in the smart earphone 104 "'s FA1 interface code module and FA1 code module) restore patch 3 based on the principle of removing common differences while reserving differences.
  • the principle of removing common differences while reserving differences is to discard the common variables and methods of differential data a and related modules, and retain the unique variables and methods of differential data a.
  • the Entrylegcy code module of patch 3 is left with its unique variable 1-a, variable 1-b, variable 1-c, method 1-a, method 1-b, method 1-c and the Entrylegcy code module in differential data a leave its unique variable 1-d, variable 2-b, variable 2-e, variable 2-g and method 1-d, method 2- b. Formed by method 2-e and method 2-g.
  • the FA1 code module of patch 3 is the unique variable 3-b, variable 3-c, method 3-b, method 3-c and differential data a left by the FA1 code module in the "APP-1" of the smart earphone 104 In the FA1 code module, its unique variable 3-d and method 3-d are left, and the common variable 3-a and method 3-a are discarded.
  • the restoration process is only based on the gray module shown in FIG. 6D , that is, the differential data a and the FA1 interface code module and FA1 code module of "APP-1" in the smart earphone 104, and does not use the gray module in the smart earphone 104. Entrylegcy code module of "APP-1".
  • FIG. 7 shows a method flow of another patch method provided by an embodiment of the present application. Specifically, the following steps may be included:
  • the server side detects whether the "APP-1" of the smart earphone 104 under the server 100 needs to issue a patch, and determines to issue a patch 3.
  • the server 100 sends a patch 3 notification message to the mobile phone 102, wherein the message includes the terminal device that needs to be updated, that is, the smart earphone 104, and the version information before and after the update of the "APP-1" of the device is updated from 4.0.0 to 4.1.0.
  • the mobile phone 102 detects that the user selects an update operation.
  • the server 102 acquires a request from the user to agree to download the patch 3 and update "APP-1".
  • the server 100 obtains the version information of "APP-1" of the smart earphone 104, and performs a difference in combination with the patch 3 to obtain the minimum difference data, that is, the difference data a.
  • the server 100 sends the differential data a to the mobile phone 102.
  • the mobile phone 102 restores the patch 3 according to the "APP-1" of the smart earphone 104 and the differential data a.
  • the mobile phone 102 sends the “APP-1” patch 3 for updating the smart headset 104 to the smart headset 104 .
  • the smart earphone 104 downloads and installs the patch 3, and performs a version update.
  • the server 100 receives an instruction from the smart earphone 104 that the update of "APP-1" is successful.
  • the server 100 updates and saves the "APP-1" version information of the smart earphone 104.
  • the server 100 sends an instruction indicating that the "APP-1" is successfully updated to the mobile phone 102.
  • the mobile phone 102 displays a prompt message that the "APP-1" version of the smart earphone 104 has been successfully updated from 4.0.0 to 4.1.0.
  • the server 100 can generate one or more sets of different patch packages required by it for different electronic devices.
  • the cloud server can send the generated patch package to the mobile phone 102 through far-field communication, and then transmit it to the target device of the patch package through the Bluetooth connection.
  • Each electronic device can also download the corresponding patch package by itself through the wireless network connected to the router.
  • the generated patch package may be used to repair one or more loopholes of the program, or may be used to add one or more product features or functions and/or functions, which is not limited in this application.
  • an electronic device can add a "voice assistant" function by installing a certain patch package, which can help users send messages and make and receive calls without touching the electronic device, and can also help users communicate with others face to face in different languages.
  • patches can be of various types, such as Taking the system as an example, corresponding types of patches may exist in the application (APP) layer, application framework (application framework) layer, kernel (kernel) layer, or hardware driver (hardware driver) layer, which is not limited in this application.
  • APP application
  • application framework application framework
  • kernel kernel
  • hardware driver hardware driver
  • the mobile phone 102 may have strong computing and processing capabilities and sufficient internal storage space, and the mobile phone 102 may serve as a hyper terminal to receive and process one or more patch packages from the server side.
  • the mobile phone 102 may have a Bluetooth (bluetooth, BT) module and/or a wireless local area network (wireless local area networks, WLAN) module.
  • the Bluetooth module can provide one or more Bluetooth communication solutions including classic Bluetooth (Bluetooth 2.1) or Bluetooth low energy (Bluetooth low energy, BLE), and the WLAN module can provide solutions including wireless fidelity direct , Wi-Fi direct), wireless fidelity local area networks (wireless fidelity local area networks, Wi-Fi LAN) or one or more WLANs in wireless fidelity software access point (wireless fidelity software access point, Wi-Fi softAP) Communication solutions.
  • the mobile phone 102 can use Bluetooth or WLAN or other types of one or more wireless communication technologies to establish a wireless communication connection with other electronic devices near the mobile phone 102, and then send patches to other electronic devices through the wireless communication connection.
  • each terminal device of the local area network such as mobile phone 102, smart bracelet 103, smart earphone 104, smart speaker 105, smart TV 106, computer 107, etc.
  • the same operating system such as The system, under the connection of the router 101, forms a system ecology.
  • the patch program codes corresponding to different version information of the same software on various devices have small differences, and the server can quickly generate corresponding differential data according to the version information of the most relevant terminal device.
  • the patch system 10 shown in this embodiment does not constitute a specific limitation to this embodiment of this application.
  • the patch system 10 may also include more or less devices than shown in the figure.
  • the communication system 10 may also include other electronic devices such as a smart desk lamp and a smart refrigerator, and this application does not make any limitation thereto.
  • FIG. 8 shows a schematic structural diagram of the electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the electronic device 100 can be a mobile phone 102, a smart bracelet 103, a smart earphone 104, a smart speaker 105, a smart TV 106, a computer 107, or other electronic devices, such as a desktop computer, a laptop computer, a handheld computer, a notebook Computers, ultra-mobile personal computers (UMPCs), netbooks, and cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) ) equipment, artificial intelligence (AI) equipment, wearable equipment, vehicle-mounted equipment, smart home equipment and/or smart city equipment, the embodiment of the present application does not specifically limit the specific type of the electronic equipment.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the electronic device can be a portable terminal device equipped with iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., or a laptop computer (Laptop) with a touch-sensitive surface or a touch panel, Non-portable terminal devices such as desktop computers with touch-sensitive surfaces or touch panels.
  • the electronic device 100 when the electronic device 100 is implemented as the mobile phone 102 in FIG. Information about the associated device.
  • the electronic device 100 can also receive the most relevant modules from the most relevant devices (ie, the mobile phone 102 and the smart bracelet 103 ) through the wireless communication module 160 . Therefore, the processor 110 of the electronic device 100 can use the received differential data C and the most relevant modules to restore the patch. After the patch 3 is restored, the electronic device 100 can issue the patch 3 to the smart earphone 104 through the wireless communication module 160 , so that the smart earphone 104 uses the patch 3 to perform "APP-1" upgrade.
  • patch restoration please refer to the content of the method for restoring the patch package introduced in FIG. 3C above, which will not be repeated here.
  • the electronic device 100 When the electronic device 100 is implemented as the most relevant device in FIG.
  • the module is patched and restored.
  • the most relevant module please refer to the content of the method for determining the most relevant device introduced in FIG. 3A above, which will not be repeated here.
  • the electronic device 100 When the electronic device 100 is implemented as the target device in FIG. 2, that is, the smart earphone 104, the electronic device 100 can receive the patch 3 from the mobile phone 102 through the wireless communication module 160, and use the patch 3 to update "APP-1" from 4.0.0 The version was upgraded to version 4.1.0.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units can be independent devices, and can also be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • WLAN wireless local area networks
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the display screen 194 is used to display images, videos and the like.
  • Camera 193 is used to capture still images or video.
  • the external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100 .
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes).
  • the distance sensor 180F is used to measure the distance.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, and the ambient light sensor 180L is used to sense ambient light brightness.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the temperature sensor 180J is used to detect temperature.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the keys 190 include a power key, a volume key and the like.
  • the motor 191 can generate a vibrating reminder.
  • Indicator 192 may be a light.
  • the SIM card interface 195 is used for connecting a SIM card.
  • FIG. 9 exemplarily shows the structure of the server 200 involved in the embodiment of the present application.
  • the server 200 includes but not limited to the following components: one or more network device processors 201 , memory 202 , communication interface 203 , transmitter 205 , receiver 206 , coupler 207 and antenna 208 .
  • FIG. 9 takes the connection through the bus as an example. in:
  • the communication interface 203 can be used for the server 200 to communicate with other communication devices, such as the mobile phone 102 , the smart bracelet 103 and the smart earphone 104 .
  • the communication interface 203 may be a 3G communication interface, a long-term evolution (LTE) (4G) communication interface, a 5G communication interface, a WLAN communication interface, a WAN communication interface, and the like.
  • LTE long-term evolution
  • the network device processor 201 may also configure the wired communication interface 203 to support wired communication, for example, the backhaul link between the server 200 and other servers may be a wired communication connection.
  • the transmitter 205 and receiver 206 can be regarded as a wireless modem.
  • the transmitter 205 can be used for transmitting and processing the signal output by the network device processor 201 .
  • Receiver 206 may be used to receive signals.
  • the number of transmitters 205 and receivers 206 can be one or more.
  • Antenna 208 may be used to convert electromagnetic energy in a transmission line to electromagnetic waves in free space, or to convert electromagnetic waves in free space to electromagnetic energy in a transmission line.
  • the coupler 207 can be used to split the mobile communication signal into multiple paths and distribute them to multiple receivers 206 . Understandably, the antenna 208 of the network device may be implemented as a large-scale antenna array.
  • the memory 202 is coupled with the network device processor 201 and is used for storing various software programs and/or sets of instructions.
  • the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices or other non-volatile solid-state storage devices.
  • the server 200 may be the server 100 in the patch system shown in FIG. 2 , or the server 100 in the patch system shown in FIG. 5 .
  • the memory 202 in the server 200 stores version information and software codes of "APP-1" connected to all terminal electronic devices
  • the network device processor 201 in the server 200 Generate the patch 3 that can upgrade the "APP-1" on the target device, that is, the smart earphone 104, and the network device processor 201 can utilize the patch 3 and the most relevant device stored in the memory 202 (that is, the mobile phone 102 and the smart bracelet 103).
  • the most relevant module makes a difference, generates differential data C, and then sends the differential data C to the mobile phone 102 through the transmitter 205, and at the same time, the server 200 sends the target device information (that is, the smart earphone 104) and the relevant information of the most relevant device through the communication interface 203 Give the phone 102.
  • the target device information that is, the smart earphone 104
  • the memory 202 in the server 200 stores the version information and software code of the “APP-1” of the connected target device, that is, the smart earphone 104, and the network device in the server 200 processes the
  • the processor 201 generates a patch 3 capable of upgrading the "APP-1” on the smart earphone 104, and the network device processor 201 can use the software module of "APP-1" on the smart earphone 104 stored in the memory 202 to make a difference between the patch 3 , generate the minimum difference data a, and then send the difference data a to the mobile phone 102 through the transmitter 205, and at the same time, the server 200 sends the relevant information of the software module of the "APP-1" on the smart earphone 104 to which the difference has been made through the communication interface 203 to Mobile 102.
  • server 200 shown in FIG. 9 is only an implementation manner of the embodiment of the present application. In practical applications, the server 200 may include more or fewer components, which is not limited here.
  • GUI graphical user interface
  • FIG. 10 shows an exemplary user interface 1001 .
  • the user interface 1001 may include: a status bar 1002, a calendar indicator 1003, other application icons 1004, a page indicator 1005, and a tray 1006 with frequently used application icons.
  • the status bar 1002 may include: one or more signal strength indicators for a mobile communication signal (also may be referred to as a cellular signal), one or more signal strength indicators for a wireless fidelity (Wi-Fi) signal, a battery status indicators, etc.
  • a mobile communication signal also may be referred to as a cellular signal
  • Wi-Fi wireless fidelity
  • the calendar indicator 1003 can be used to indicate the current time, such as date, day of the week, time and division information, and the like.
  • Other application program icons 1004 may be, for example: reading icons, photo icons, clock icons, theme icons and the like.
  • the page indicator 1005 may be used to indicate the application in which page the user is currently browsing. The user can slide the area of other application icons left and right to browse the application icons in other pages.
  • the tray 1006 with commonly used application program icons can display: phone icon, setting icon, address book icon, information icon and so on.
  • the user interface 1001 exemplarily shown in FIG. 10 may be a main interface (home screen).
  • the electronic device may further include a home screen key.
  • the home screen key may be a physical key or a virtual key.
  • the home screen button can be used to receive an instruction from the user, and return the currently displayed UI to the main interface, so that the user can view the home screen at any time.
  • the above instruction can specifically be an operation instruction in which the user presses the home screen button once, or an operation instruction in which the user presses the home screen button twice in a short period of time, or an operation instruction in which the user presses the home screen button for a long time within a predetermined period of time. operating instructions.
  • the home screen key can also be integrated with a fingerprint reader, so that when the user presses the home screen key, the fingerprint can be collected and identified accordingly.
  • FIG. 10 only exemplarily shows the user interface on the mobile phone 102, and should not be construed as limiting the embodiment of the present application.
  • FIG. 10 shows an exemplary user interface shown by the mobile phone 102 when the server 100 detects that the smart earphone 104 needs an updated version.
  • the mobile phone 102 on the same local area network as the smart earphone 104 can display a prompt box 1007 in the user interface 1001.
  • the prompt box 1007 It can be used to prompt the user whether to allow the server 100 to perform the patch difference operation and send the difference data to the mobile phone 102 .
  • the prompt information displayed in the prompt box 1007 may be the text "It is found that the smart earphone "APP-1" has a new version, do you want to update it?".
  • the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application.
  • the prompt box 1007 can also display corresponding controls, so that the user can choose whether to update the “APP-1” of the smart earphone 104 .
  • the mobile phone 102 can execute the option corresponding to the control to allow "APP-1" of the smart earphone 104 to update or allow the "APP-1" of the smart earphone 104 to update.
  • options For example, the prompt box 1007 may display a "Yes" control and a "No" control, and upon detection of a user's touch operation (for example, a click) on the "Yes" control, the mobile phone 102 may always allow the smart earphone 104 to pass through in the networked state. The mobile phone 102 obtains the patch package for updating.
  • Fig. 11A, Fig. 11B, Fig. 11C, and Fig. 11D show the user interface related to the technical effect exhibited after implementing the technical solution of the present application.
  • the user interface 1101 of the mobile phone 102 may be displayed when the cloud side server generates the patch "APP-1" of the smart earphone 104 after the user clicks the "Yes" control in the operation shown in FIG.
  • the user interface 1101 may include a title bar 1102, a program version update main interface 1103, and the like.
  • Title bar 1102 may include a current page indicator, and a back navigation control.
  • the current page indicator can be used to indicate the current page, for example, the text message "smart earphones" can be used to indicate that the current page is used to display information related to system updates. Not limited to text information, the current page indicator can also be an icon.
  • the back navigation control can be used to listen to operations (such as touch operations) through the control. In response to this operation, the electronic device can return from the current interface to the upper-level interface.
  • the program version update main interface 1103 may display one or more version update related information items, and the one or more version update related information items may include: the electronic device discovers a new patch prompt item of "APP-1", download size information item, Update time information entry, update log information entry, etc.
  • Each item of version update related information on the program version update main interface 1103 corresponds to a corresponding title and text description.
  • the title corresponding to the electronic device discovery new patch prompt entry is "Discover a new patch for "APP-1”
  • the corresponding title of the patch package size information entry is "Download Size”
  • the text description is the new version number found “approximately 50K”
  • the title corresponding to the update time information entry is "Update Time”
  • the text description is "October 15, 2021”
  • the title corresponding to the update log information entry is "Update Log”
  • the text description is "This update will "APP -1 "version 4.0.0 was upgraded to version 4.1.0", etc.
  • the program version update main interface 1103 may also include an "update” operation control 1104 and a “cancel” operation control 1105, which can be used to monitor operations (such as touch operations) through the controls. In response to the operation of "update” or "cancel", the electronic device will perform the update patch, or cancel the update patch.
  • the program version update page may display information related to other program version updates, including but not limited to, for example, third-party applications.
  • the version update page can add information items related to version update, or reduce the number of information items related to version update, which is not limited in this application.
  • the user interface 1107 of the mobile phone 102 exemplarily shown in FIG. 11B may be the user interface displayed on the mobile phone 102 when receiving and downloading the patch issued by the cloud side server.
  • the progress of the server downloading the patch For example, an icon 1106 may be displayed, which prompts the user that the patch is being downloaded, and the download progress is 25%.
  • the user interface 1107 may also display text information "downloading data (50K)" to prompt the user that the patch is being downloaded. Not limited to text information, the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application.
  • the user interface 1107 may also display a cancel control 1108 for monitoring a touch operation (such as a click) on the control. In response to the "cancel" operation, the mobile phone 102 can cancel the operation of downloading the patch from the cloud server.
  • the user interface 1110 of the mobile phone 102 exemplarily shown in FIG. 11C may be the user interface displayed on the mobile phone 102 when the smart earphone 104 receives the patch issued by the mobile phone 102, and the user interface 1110 may be used to prompt the smart earphone 104 The progress of downloading the patch from the mobile phone 102 .
  • an icon 1109 may be displayed, which prompts the user that the patch is being downloaded, and the download progress is 25%.
  • the user interface 1110 may also display text information "the smart earphone is downloading and installing the patch (800K)" to prompt the user that the patch is being downloaded.
  • the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application.
  • the user interface 1110 can also display a cancel control 1111 for listening to touch operations (such as clicks) on the control.
  • the mobile phone 102 may cancel the operation of the smart earphone 104 from downloading and installing the patch from the mobile phone 102 .
  • FIG. 11D exemplarily shows the user interface 1112 of the mobile phone 102.
  • the user interface can prompt the user that the version of "APP-1" in the smart earphone 104 has been successfully upgraded.
  • the user interface 1112 may display text prompt information "download and installation complete", and display the version number information of "APP-1" in the smart earphone 104 ""APP-1" has been upgraded to version 4.1.0".
  • the prompt information may also be a voice output by an electronic device or other types of prompt information, which is not limited in this application.
  • Fig. 11A, Fig. 11B, Fig. 11C, and Fig. 11D only the mobile phone 102 has downloaded the differential data for "APP-1" of the smart earphone 104 from the cloud server, and the mobile phone 102 can use the The differential data and the built-in application packages of "APP-1" of different electronic devices are restored to form a patch package for upgrading the "APP-1" of the smart earphone 104 from version 4.0.0 to 4.1.0, and the mobile phone 102 applies the patch The packet is sent to the smart earphone 104.
  • the smart bracelet 103 and the smart earphone 104 located in the same local area network as the mobile phone 102 do not need to download the patch for the target device from the cloud server, so in FIG. 104 did not download the patch from the server 100.
  • the mobile phone 102 finishes downloading the differential data the mobile phone will restore and generate patch packages for different target devices in the same local area network.
  • FIG. 10 , FIG. 11A , FIG. 11B , FIG. 11C , and FIG. 11D are only examples of some user interfaces, and do not constitute any limitation to other embodiments of the present application.
  • the term “when” may be interpreted to mean “if” or “after” or “in response to determining" or “in response to detecting".
  • the phrase “in determining” or “if detected (a stated condition or event)” may be interpreted to mean “if determining" or “in response to determining" or “on detecting (a stated condition or event)” or “in response to detecting (a stated condition or event)”.
  • first and second are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • a patch may refer to a small program released to solve problems exposed during the use of large-scale software systems or applications.
  • a patch can be used to fix one or more software vulnerabilities.
  • a patch can fix one or more vulnerabilities including but not limited to applications, application frameworks, kernels, and hardware drivers. Patches can also be used to add new product features or functionality.
  • the 1+8+N device scene architecture can be a business ecosystem of the Internet of Things, where 1 represents users (mobile phones), and 8 represents 8 types of devices (cars, speakers, earphones, watches/bracelets, tablets, large screens, PCs, etc.) , AR/VR), and N represents the smart hardware and APPs connected to Hongmeng OS, and various devices are connected to each other through the super terminal (mobile phone).
  • Hongmeng OS super terminal can connect multiple devices at once. Its function allows users to automatically connect nearby Huawei mobile phones, batteries, tablets, speakers, computers, cameras and other smart devices equipped with Hongmeng OS system. , realize multi-device collaborative management, resource sharing, and form a collaborative work scene.
  • the specific operation of the HyperTerminal is as follows: first turn on Bluetooth and WLAN on the mobile phone and log in the user account, then turn on Bluetooth and WLAN on other devices with Bluetooth and WLAN functions, and log in to the same account as the mobile phone.
  • the server may include a patch shooting tool, a patch archive, a patch release, and the like.
  • the patch shooting tool is a script running in the background of the server, which packs the patch files into a compressed file, and the overall layout of each file in the compressed file is unique to the patch package.
  • the patch package archive is used to place the patch package to the specified archive address after the patch package tool generates the patch package, so that the subsequent server can obtain the patch package.
  • the release of the patch package is used for the server to deliver the patch file to the terminal device.
  • Terminal devices may include downloading of patch packages, patch engines, patch package upgrades, patch partitions, and the like. Wherein, the patch package download is used to receive the patch package delivered by the server.
  • Patch package upgrade refers to the operation that the patch engine downloads, verifies, and installs the patch package after the user searches for the patch package on the mobile phone and confirms that the patch package is downloaded uniformly.
  • the patch engine encapsulates various types of business logic, including the verification of patch files, enabling patches to take effect, and revoking abnormal patches.
  • the patch partition is a space address on the hard disk of the terminal device, and the binary patch image in the patch package can be burned into this partition.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed in the present application are a patching method and a related device. The method comprises: calculating, in a server, the coincidence degree of each software module in a first patch, which is used for upgrading a first application in a first electronic device, and each software module of a first application in a third electronic device; selecting parts that have the greatest coincidence degree to combine into a whole; and differentiating the whole from the first patch to generate differential data. A second electronic device can obtain the differential data and recover same to a first patch pack, and the first electronic device can receive the first patch pack from the second electronic device and upgrade the first application in the first electronic device. By means of the technical solution of the present application, a server can be prevented from performing multiple issuances of big data patches, such that the consumption of network bandwidths is reduced, and the efficiency of patch repair is greatly improved, thereby bringing a better usage experience to a user.

Description

补丁方法及相关设备Patch method and related equipment
本申请要求于2021年11月19日提交中国专利局、申请号为202111410274.4、申请名称为“补丁方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111410274.4 and the application title "Patch Method and Related Equipment" filed with the China Patent Office on November 19, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及计算机技术领域,尤其涉及补丁方法及相关设备。This application relates to the field of computer technology, in particular to a patch method and related equipment.
背景技术Background technique
随着电子技术发展,越来越多的电子设备可以支持安装应用程序(application,APP),导致同一个APP需要提供适应不同电子设备的多个版本。例如,在1+8+N场景下,一个APP不仅要有安装运行于手机上的版本,还需要有安装运行于车机、音箱、耳机、手表/手环、平板、大屏、个人计算机(personal computer,PC)、增强现实技术(augmented reality,AR)、虚拟现实技术(virtual reality,VR)等电子设备上的多个版本。当服务器利用补丁对各个设备上的不同版本的APP进行升级时,多版本问题将导致补丁包较大,服务器传输补丁包的负担较重。With the development of electronic technology, more and more electronic devices can support the installation of application programs (applications, APPs), resulting in the need to provide multiple versions of the same APP adapted to different electronic devices. For example, in the 1+8+N scenario, an APP not only needs to be installed and run on mobile phones, but also needs to be installed and run on cars, speakers, earphones, watches/bracelets, tablets, large screens, personal computers ( personal computer (PC), augmented reality (augmented reality, AR), virtual reality (virtual reality, VR) and other electronic devices. When the server uses patches to upgrade APPs of different versions on each device, the problem of multiple versions will lead to a large patch package, and the burden on the server to transmit the patch package is heavy.
发明内容Contents of the invention
本申请的目的在于提供一种补丁方法及相关设备,可以避免在不同的终端设备需要升级同一APP的情况下,服务器下发的多个数据量大的补丁的问题,可以减少服务器与各个终端设备之间的数据传输量,降低了网络带宽的耗费,并且在超级终端可以快速还原生成适应于不同终端设备不同版本的APP的补丁,大大提升了补丁修复的效率,给用户带来更为良好的使用体验。The purpose of this application is to provide a patch method and related equipment, which can avoid the problem of multiple patches with large data volume issued by the server when different terminal equipment needs to upgrade the same APP, and can reduce the number of patches between the server and each terminal equipment. The amount of data transmission between them reduces the consumption of network bandwidth, and the super terminal can quickly restore and generate patches suitable for different versions of APPs of different terminal devices, which greatly improves the efficiency of patch repair and brings better results to users. Use experience.
上述目标和其他目标将通过独立权利要求中的特征来达成。进一步的实现方式在从属权利要求、说明书和附图中体现。The above and other objects are achieved by the features in the independent claims. Further implementations are presented in the dependent claims, the description and the drawings.
第一方面,本申请提供了一种补丁方法,该方法应用于第一补丁系统中的服务器,该第一补丁系统包括:服务器、多个电子设备,该电子设备上安装有第一应用程序,该方法可以包括:该服务器可以根据第三电子设备上的第一应用程序和第一补丁包进行差分生成第一差分数据;该第一补丁包可用于升级第一电子设备上的第一应用程序;该第三电子设备可以是多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;其中,多个电子设备包括第一电子设备、第三电子设备;In a first aspect, the present application provides a patch method, the method is applied to a server in a first patch system, and the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the electronic devices, The method may include: the server may generate first differential data according to the difference between the first application program on the third electronic device and the first patch package; the first patch package may be used to upgrade the first application program on the first electronic device The third electronic device may be an electronic device in which the installed first application program overlaps with the first patch package among multiple electronic devices; wherein, the multiple electronic devices include the first electronic device and the third electronic device;
服务器向第二电子设备发送所述第一差分数据;多个电子设备还包括第二电子设备;该第二电子设备可以用于根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包;该第一软件模块与第一补丁包有重合;该第二电子设备用于向第一电子设备发送第一补丁包。The server sends the first differential data to the second electronic device; the multiple electronic devices also include the second electronic device; the second electronic device can be used in the first application program based on the first differential data and the third electronic device The first software module restores the first patch package; the first software module overlaps with the first patch package; the second electronic device is used to send the first patch package to the first electronic device.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第一方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method in the first aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
结合第一方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the first aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第一方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the first aspect, in some embodiments, the third electronic device may be an electronic device with the highest degree of overlap between the installed first application program and the first patch package or higher than the first threshold among multiple electronic devices. equipment.
结合第一方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the first aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method may be a method both in the first application program installed on the third electronic device and in the first patch package, and the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第一方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the first aspect, in some embodiments, if the platform-level overlap between the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第一方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the first aspect, in some embodiments, if the first application program installed on the third electronic device has an application-level overlap with the first patch package, which is the same as the first application program installed on another electronic device among the multiple electronic devices. The application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第一方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the first aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第一方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the first aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第二方面,本申请提供了一种补丁方法,该方法应用于第一补丁系统中的第一电子设备,该第一补丁系统包括:服务器、多个电子设备,该电子设备上安装有第一应用程序,该多个 电子设备包括第一电子设备,该方法可以包括:In a second aspect, the present application provides a patch method, which is applied to the first electronic device in the first patch system, the first patch system includes: a server, a plurality of electronic devices, and the first electronic device is installed on the electronic device application program, the plurality of electronic devices include a first electronic device, the method may include:
该第一电子设备接收第二设备发送的第一补丁包,该多个电子设备还包括第二电子设备,该第一补丁包是所第二电子设备利用第一差分数据和第三电子设备上的第一应用程序中的第一软件模块还原出的,该多个电子设备还包括第三电子设备,该第三电子设备是多个电子设备中,安装的第一应用程序与第一补丁包有重合的电子设备;该第一差分数据是服务器将第三电子设备上的第一应用程序和第一补丁包进行差分生成的,并被发送给第二电子设备,The first electronic device receives the first patch package sent by the second device, and the multiple electronic devices also include the second electronic device, and the first patch package is obtained by the second electronic device using the first differential data and the third electronic device. The first software module in the first application program is restored, the multiple electronic devices also include a third electronic device, and the third electronic device is the first application program and the first patch package installed in the multiple electronic devices There are overlapped electronic devices; the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device, and is sent to the second electronic device,
该第一电子设备利用第一补丁包升级其上安装的第一应用程序。The first electronic device uses the first patch package to upgrade the first application program installed thereon.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第二方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method in the second aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
结合第二方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the second aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第二方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the second aspect, in some embodiments, the third electronic device may be an electronic device with the highest degree of coincidence between the installed first application program and the first patch package or a degree of coincidence higher than the first threshold among multiple electronic devices. equipment.
结合第二方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the second aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method may be a method both in the first application program installed on the third electronic device and in the first patch package, and the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第二方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the second aspect, in some embodiments, if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第二方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the second aspect, in some embodiments, if the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第二方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the second aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第二方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the second aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第三方面,本申请提供了一种补丁方法,该方法应用于第一补丁系统中的第二电子设备,该第一补丁系统包括:服务器、多个电子设备,该电子设备上安装有第一应用程序,该多个电子设备包括第二电子设备,该方法可以包括:该第二电子设备接收服务器发送的第一差分数据,该第一差分数据是服务器将第三电子设备上的第一应用程序和第一补丁包进行差分生成的,该第一补丁包用于升级第一电子设备上的第一应用程序,该第三电子设备是多个电子设备中,安装的第一应用程序与第一补丁包有重合的电子设备,该多个电子设备还包括第一电子设备、第三电子设备,然后,该第二电子设备根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包,该第一软件模块与第一补丁包有重合,接下来,该第二电子设备向第一电子设备发送第一补丁包。In the third aspect, the present application provides a patching method, which is applied to the second electronic device in the first patching system, and the first patching system includes: a server, a plurality of electronic devices, and the first electronic device is installed on the electronic device. application program, the multiple electronic devices include a second electronic device, and the method may include: the second electronic device receives first differential data sent by the server, the first differential data is the first application program on the third electronic device by the server The program and the first patch package are differentially generated. The first patch package is used to upgrade the first application program on the first electronic device. The third electronic device is among multiple electronic devices. A patch package has overlapped electronic devices, the plurality of electronic devices also include a first electronic device and a third electronic device, and then, the second electronic device The first software module restores the first patch package, and the first software module overlaps with the first patch package. Next, the second electronic device sends the first patch package to the first electronic device.
该第一电子设备利用第一补丁包升级其上安装的第一应用程序。The first electronic device uses the first patch package to upgrade the first application program installed thereon.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第三方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method in the third aspect can avoid the problem that when the same application program of different terminal devices is upgraded, the server repeatedly issues patches with large data volumes for different devices, which saves bandwidth and improves the delivery time. patch efficiency.
结合第三方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the third aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第三方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the third aspect, in some embodiments, the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
结合第三方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the third aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method may be a method both in the first application program installed on the third electronic device and in the first patch package, and the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第三方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the third aspect, in some embodiments, if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第三方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the third aspect, in some embodiments, if the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第三方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the third aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第三方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the third aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第四方面,本申请提供了一种补丁方法,该方法应用于第一补丁系统中的第三电子设备,该第一补丁系统包括:服务器、多个电子设备,该电子设备上安装有第一应用程序,该多个电子设备包括所述第三电子设备、第二电子设备、第一电子设备,该方法可以包括:In a fourth aspect, the present application provides a patch method, the method is applied to the third electronic device in the first patch system, the first patch system includes: a server, a plurality of electronic devices, the electronic device is installed with the first Application program, the multiple electronic devices include the third electronic device, the second electronic device, and the first electronic device, and the method may include:
该第三电子设备向第二电子设备发送第一数据包,该第一数据包包括第三电子设备上安装的第一应用程序中的第一软件模块,该第一软件模块与第一补丁包有重合;The third electronic device sends a first data package to the second electronic device, and the first data package includes a first software module in a first application program installed on the third electronic device, and the first software module and the first patch package overlap;
其中,该第一补丁包是第二电子设备利用第一差分数据和第三电子设备上的第一应用程序中的所述第一软件模块还原出的,该第三电子设备是多个电子设备中,安装的第一应用程序与第一补丁包有重合的电子设备,该第一差分数据是服务器将第三电子设备上的第一应用程序和第一补丁包进行差分生成的,并被发送给所述第二电子设备,该第二电子设备用于根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包;该第二电子设备还用于向第一电子设备发送第一补丁包。Wherein, the first patch package is restored by the second electronic device using the first differential data and the first software module in the first application program on the third electronic device, where the third electronic device is a plurality of electronic devices In the electronic device where the installed first application program and the first patch package overlap, the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device, and is sent For the second electronic device, the second electronic device is used to restore the first patch package according to the first differential data and the first software module in the first application program on the third electronic device; the second electronic device It is also used for sending the first patch package to the first electronic device.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第四方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method in the fourth aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
结合第四方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the fourth aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第四方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the fourth aspect, in some embodiments, the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
结合第四方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the fourth aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method may be a method both in the first application program installed on the third electronic device and in the first patch package, and the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第四方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the fourth aspect, in some embodiments, if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第四方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the fourth aspect, in some embodiments, if the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第四方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the fourth aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第四方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the fourth aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第五方面,本申请提供了一种补丁方法,该方法应用于第一补丁系统,该第一补丁系统包括:服务器、多个电子设备,该多个电子设备上安装有第一应用程序,该方法可以包括:该服务器可以根据第三电子设备上的第一应用程序和第一补丁包进行差分,生成第一差分数据,该第一补丁包用于升级第一电子设备上的第一应用程序,该第三电子设备是多个电子设备中,安装的第一应用程序与第一补丁包有重合的电子设备,然后,服务器可以向第二电子设备发送第一差分数据,该第二电子设备可以根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包,其中,该第一软件模块与第一补丁包有重合,接下来,第二电子设备向第一电子设备发送第一补丁包,该第一电子设备利用第一补丁包升级其上安装的第一应用程序。In a fifth aspect, the present application provides a patch method, the method is applied to a first patch system, the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the plurality of electronic devices, the The method may include: the server may perform a difference according to the first application program on the third electronic device and the first patch package to generate first difference data, and the first patch package is used to upgrade the first application program on the first electronic device , the third electronic device is among the plurality of electronic devices, the installed first application program overlaps with the first patch package, and then the server can send the first differential data to the second electronic device, and the second electronic device The first patch package can be restored according to the first differential data and the first software module in the first application program on the third electronic device, wherein the first software module overlaps with the first patch package, and then, the The second electronic device sends the first patch package to the first electronic device, and the first electronic device uses the first patch package to upgrade the first application installed on it.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第五方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method in the fifth aspect can avoid the problem that when the same application program of different terminal devices is upgraded, the server repeatedly issues patches with large data volumes for different devices, which saves bandwidth and improves the delivery time. patch efficiency.
结合第五方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the fifth aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第五方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the fifth aspect, in some embodiments, the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
结合第五方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the fifth aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method may be a method both in the first application program installed on the third electronic device and in the first patch package, and the same variable may be a method in both the first application program installed on the third electronic device and in the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第五方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the fifth aspect, in some embodiments, if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第五方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the fifth aspect, in some embodiments, if the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The application-level coincidence degree of the application program and the first patch package, the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第五方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the fifth aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第五方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the fifth aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第六方面,本申请提供了一种补丁系统,该补丁系统包括:服务器、多个电子设备,该电子设备上安装有第一应用程序,其中,该服务器用于根据第三电子设备上的第一应用程序 和第一补丁包进行差分生成第一差分数据,该第一补丁包用于升级第一电子设备上的第一应用程序,该第三电子设备是多个电子设备中,安装的第一应用程序与第一补丁包有重合的电子设备,该多个电子设备包括第一电子设备、第三电子设备,该服务器用于向第二电子设备发送第一差分数据,该多个电子设备还包括第二电子设备,该第二电子设备用于根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包,该第一软件模块与第一补丁包有重合,该第二电子设备用于向第一电子设备发送第一补丁包,该第一电子设备用于利用第一补丁包升级其上安装的第一应用程序。In a sixth aspect, the present application provides a patch system, the patch system includes: a server, a plurality of electronic devices, the first application program is installed on the electronic devices, wherein the server is used to An application program and a first patch package are differentially generated to generate first differential data. The first patch package is used to upgrade the first application program on the first electronic device, and the third electronic device is the first installed electronic device among multiple electronic devices. An application program overlaps with the first patch package of electronic devices, the multiple electronic devices include the first electronic device and the third electronic device, the server is used to send the first differential data to the second electronic device, the multiple electronic devices It also includes a second electronic device, the second electronic device is used to restore the first patch package according to the first differential data and the first software module in the first application program on the third electronic device, and the first software module and The first patch package overlaps, and the second electronic device is used to send the first patch package to the first electronic device, and the first electronic device is used to upgrade the first application program installed on it by using the first patch package.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device on which an application program is installed, that is, a target device of a patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
在本申请中,第三电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第三电子设备作为补丁包的最相关设备,其上的应用程序能够与补丁包进行差分形成差分数据。In this application, the third electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The third electronic device is the most relevant device of the patch package, and the application program on it can be differentiated from the patch package to form differential data.
实施第六方面的方法,可以避免不同的终端设备的同一应用程序进行升级的情况下,服务器多次下发针对于不同设备的数据量较大的补丁的问题,节省了带宽,提高了下发补丁效率。Implementing the method of the sixth aspect can avoid the problem of the server repeatedly issuing patches with large data volumes for different devices when the same application program of different terminal devices is upgraded, which saves bandwidth and improves the delivery time. patch efficiency.
结合第六方面,在一些实施例中,有重合可以是指第一应用程序的代码和第一补丁包的代码具有相同的方法、变量。With reference to the sixth aspect, in some embodiments, overlapping may mean that the code of the first application program and the code of the first patch package have the same methods and variables.
结合第六方面,在一些实施例中,该第三电子设备可以是在多个电子设备中,安装的第一应用程序与第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。With reference to the sixth aspect, in some embodiments, the third electronic device may be among multiple electronic devices, the installed first application program and the first patch package have the highest coincidence degree or the coincidence degree is higher than the first threshold. equipment.
结合第六方面,在一些实施例中,该第三电子设备上安装的第一应用程序与第一补丁包的重合度可以为:(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),With reference to the sixth aspect, in some embodiments, the degree of coincidence between the first application program installed on the third electronic device and the first patch package may be: (the number of the same method+the number of the same variable)/(total The number of methods + the total number of variables),
其中,相同方法可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的方法,相同变量可以是第三电子设备上安装的第一应用程序与第一补丁包中都有的变量,总的方法个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的方法之和与相同方法的个数的差值,总的变量个数可以是第三电子设备上安装的第一应用程序和第一补丁包中所有的变量之和与相同变量的个数的差值。Wherein, the same method can be the method in both the first application program installed on the third electronic device and the first patch package, and the same variable can be the method in both the first application program installed on the third electronic device and the first patch package. For some variables, the total number of methods can be the difference between the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and the number of the same methods, and the total number of variables can be The difference between the sum of all variables in the first application program and the first patch package installed on the third electronic device and the number of the same variables.
结合第六方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,With reference to the sixth aspect, in some embodiments, if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices The platform-level coincidence degree of the application program and the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices the degree of application-level overlap between the first application program and the first patch package,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第六方面,在一些实施例中,若第三电子设备上安装的第一应用程序与第一补丁包的应用级重合度,同于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的应用级重合度,则第三电子设备上安装的第一应用程序与第一补丁包的平台级重合度,高于多个电子设备中另一电子设备上安装的第一应用程序与第一补丁包的平台级重合度,With reference to the sixth aspect, in some embodiments, if the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of the first application program installed on another electronic device among the multiple electronic devices. The application-level overlapping degree of the application program and the first patch package means that the platform-level overlapping degree of the first application program installed on the third electronic device and the first patch package is higher than that installed on another electronic device among the plurality of electronic devices. the degree of platform-level overlap between the first application and the first patch,
其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
结合第六方面,在一些实施例中,该第三电子设备上安装的第一应用程序中的一个或多个软件模块与第一补丁包中的软件模块有重合。With reference to the sixth aspect, in some embodiments, one or more software modules in the first application program installed on the third electronic device overlap with the software modules in the first patch package.
结合第六方面,在一些实施例中,有重合可以是指该第三电子设备上安装的第一应用程序和第一补丁包具有相同的二进制代码。With reference to the sixth aspect, in some embodiments, overlapping may mean that the first application program and the first patch package installed on the third electronic device have the same binary code.
第七方面,本申请提供了另一种补丁方法,该方法可以包括:服务器可以根据第一电子设备上的第一应用程序和第一补丁包进行差分,生成第二差分数据,该第一补丁包用于升级第一电子设备上的第一应用程序,然后,服务器向第二电子设备发送第二差分数据,该第二电子设备根据第二差分数据和第一电子设备上的第一应用程序的第一软件模块,还原出所述第一补丁包,其中,该第一软件模块与第一补丁包有重合,接下来,第二电子设备向第一电子设备发送第一补丁包,该第一电子设备利用第一补丁包升级其上安装的第一应用程序。In the seventh aspect, the present application provides another patch method, which may include: the server may perform a difference according to the first application program on the first electronic device and the first patch package, and generate second difference data, the first patch The package is used to upgrade the first application program on the first electronic device, and then, the server sends the second differential data to the second electronic device, and the second electronic device uses the second differential data and the first application program on the first electronic device The first software module restores the first patch package, wherein the first software module overlaps with the first patch package, and then the second electronic device sends the first patch package to the first electronic device, and the first patch package An electronic device uses a first patch package to upgrade a first application program installed thereon.
在本申请中,第一电子设备可以是手机、智能手环、智能耳机、智能音箱、智能电视、平板电脑、笔记本电脑、台式电脑或者其他类型的终端设备。该第一电子设备可以是安装有应用程序的终端设备,即为补丁包的目标设备。In this application, the first electronic device may be a mobile phone, a smart bracelet, a smart earphone, a smart speaker, a smart TV, a tablet computer, a notebook computer, a desktop computer or other types of terminal devices. The first electronic device may be a terminal device installed with an application program, that is, a target device of the patch package.
在本申请中,第二电子设备可以是手机、平板电脑、笔记本电脑、台式电脑等具有较强计算处理能力和较充足的存储能力的终端设备。该第二电子设备作为“超级终端”具有接收差分数据、还原补丁包的功能。In this application, the second electronic device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices with relatively strong computing and processing capabilities and relatively sufficient storage capabilities. As a "super terminal", the second electronic device has the functions of receiving differential data and restoring patch packages.
第八方面,本申请提供了一种服务器,该服务器可以包括:通信装置、存储器以及耦合于该存储器的处理器,多个应用程序,以及一个或多个程序。在该处理器在执行一个或多个该程序时,该电子设备可以实现第一方面中电子设备所具备的任一功能,这里不再赘述。In an eighth aspect, the present application provides a server, which may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs. When the processor is executing one or more programs, the electronic device can implement any function of the electronic device in the first aspect, which will not be repeated here.
第九方面,本申请提供了一种电子设备,该电子设备为第一电子设备,可以包括:通信装置、存储器以及耦合于该存储器的处理器,多个应用程序,以及一个或多个程序。在该处理器在执行一个或多个该程序时,该电子设备可以实现第二方面中电子设备所具备的任一功能,这里不再赘述。In a ninth aspect, the present application provides an electronic device, which is a first electronic device and may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs. When the processor is executing one or more programs, the electronic device can implement any function of the electronic device in the second aspect, which will not be repeated here.
第十方面,本申请提供了一种电子设备,该电子设备为第二电子设备,可以包括:通信装置、存储器以及耦合于该存储器的处理器,多个应用程序,以及一个或多个程序。在该处理器在执行一个或多个该程序时,该电子设备可以实现第三方面中电子设备所具备的任一功能,这里不再赘述。In a tenth aspect, the present application provides an electronic device, which is a second electronic device, and may include: a communication device, a memory, a processor coupled to the memory, multiple application programs, and one or more programs. When the processor is executing one or more programs, the electronic device can implement any function of the electronic device in the third aspect, which will not be repeated here.
第十一方面,本申请提供了一种电子设备,该电子设备为第三电子设备,可以包括:通信装置、存储器以及耦合于该存储器的处理器,多个应用程序,以及一个或多个程序。在该处理器在执行一个或多个该程序时,该电子设备可以实现第四方面中电子设备所具备的任一功能,这里不再赘述。In an eleventh aspect, the present application provides an electronic device, which is a third electronic device, and may include: a communication device, a memory, and a processor coupled to the memory, multiple application programs, and one or more programs . When the processor is executing one or more programs, the electronic device can implement any function of the electronic device in the fourth aspect, which will not be repeated here.
第十二方面,本申请提供可一种计算机可读介质,该存储介质中可以存储有指令。当该指令在电子设备上运行时,可以使得电子设备执行第一方面和/或第二方面和/或第三方面和/或第四方面和/或第五方面和/或第六方面和/或第七方面和/或第八方面和/或第九方面和/或 第十方面和/或第十一方面中的任一项功能,这里不再赘述。In a twelfth aspect, the present application provides a computer-readable medium, where instructions can be stored in the storage medium. When the instruction is run on the electronic device, the electronic device can be made to execute the first aspect and/or the second aspect and/or the third aspect and/or the fourth aspect and/or the fifth aspect and/or the sixth aspect and/or Or any function in the seventh aspect and/or the eighth aspect and/or the ninth aspect and/or the tenth aspect and/or the eleventh aspect will not be repeated here.
附图说明Description of drawings
图1是本申请实施例所提供的一种补丁系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a patch system provided by an embodiment of the present application;
图2是本申请实施例提供的一种补丁的方法的场景示意图;FIG. 2 is a schematic diagram of a patch method provided in an embodiment of the present application;
图3A是本申请实施例提供的一种确定最相关设备的方法的示意图;FIG. 3A is a schematic diagram of a method for determining the most relevant device provided by an embodiment of the present application;
图3B是本申请实施例提供的一种生成差分数据C的方法的示意图;FIG. 3B is a schematic diagram of a method for generating differential data C provided by an embodiment of the present application;
图3C是本申请实施例提供的一种还原补丁3的方法的示意图;FIG. 3C is a schematic diagram of a method for restoring patch 3 provided by an embodiment of the present application;
图4是本申请实施例提供的一种补丁的方法的流程图;Fig. 4 is a flowchart of a patch method provided by an embodiment of the present application;
图5是本申请实施例提供的另一种补丁的方法的场景示意图;FIG. 5 is a schematic diagram of another patch method provided in the embodiment of the present application;
图6A是本申请实施例提供的一种确定最小差分数据的方法的示意图;FIG. 6A is a schematic diagram of a method for determining minimum difference data provided by an embodiment of the present application;
图6B是本申请实施例提供的一种确定最小差分数据的方法的示意图;Fig. 6B is a schematic diagram of a method for determining the minimum difference data provided by the embodiment of the present application;
图6C是本申请实施例提供的一种三种差分方式的示意图;Fig. 6C is a schematic diagram of three differential methods provided by the embodiment of the present application;
图6D是本申请实施例提供的另一种还原补丁3的方法的示意图;FIG. 6D is a schematic diagram of another method for restoring patch 3 provided by the embodiment of the present application;
图7是本申请实施例提供的另一种补丁的方法的流程图;Fig. 7 is a flow chart of another patch method provided by the embodiment of the present application;
图8是本申请实施例所提供的一种电子设备的硬件结构示意图;FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;
图9是本申请实施例提供的一种服务器的结构示意图;FIG. 9 is a schematic structural diagram of a server provided by an embodiment of the present application;
图10是本申请实施例提供的一种用户界面示意图;FIG. 10 is a schematic diagram of a user interface provided by an embodiment of the present application;
图11A是本申请实施例提供的一种用户界面示意图;Fig. 11A is a schematic diagram of a user interface provided by an embodiment of the present application;
图11B是本申请实施例提供的一种用户界面示意图;Fig. 11B is a schematic diagram of a user interface provided by an embodiment of the present application;
图11C是本申请实施例提供的一种用户界面示意图;Fig. 11C is a schematic diagram of a user interface provided by the embodiment of the present application;
图11D是本申请实施例提供的一种用户界面示意图。Fig. 11D is a schematic diagram of a user interface provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
首先,结合图1介绍一种补丁系统10以及如何在补丁系统10中利用补丁对应用程序“APP-1”进行升级。Firstly, a patch system 10 and how to upgrade the application program "APP-1" using patches in the patch system 10 will be introduced with reference to FIG. 1 .
如图1示例所示,该补丁系统10可以包括服务器100、路由器101,以及手机102、智能手环103、智能耳机104、智能音箱105、智能电视106、电脑107等多个终端设备。其中,路由器101可以组建无线网络并发射无线网络信号,手机102、智能手环103、智能耳机104、智能音箱105、智能电视106、电脑107等终端设备可以通过接入路由器101的无线网络与服务器100通信。As shown in FIG. 1 , the patch system 10 may include a server 100, a router 101, and multiple terminal devices such as a mobile phone 102, a smart bracelet 103, a smart earphone 104, a smart speaker 105, a smart TV 106, and a computer 107. Among them, the router 101 can set up a wireless network and transmit wireless network signals, and terminal devices such as mobile phones 102, smart bracelets 103, smart earphones 104, smart speakers 105, smart TVs 106, computers 107, etc. can connect to the wireless network of the router 101 and server 100 communications.
如图1所示,补丁系统10中的多个终端设备上可以安装有不同版本的应用程序“APP-1”。其中,具体的,手机102上的“APP-1”的版本为“2.0.0”,其适配的补丁1大小为20M;智能手环103上的“APP-1”的版本为“3.0.0”,其适配的补丁2大小为2M;智能耳机104上的“APP-1”的版本为“4.0.0”,其适配的补丁3大小为800K;智能音箱105上的“APP-1”的版本为“5.0.0”,其适配的补丁4大小为1M;智能电视106上的“APP-1”的版本为“6.0.0”,其适配的补丁5大小为50M;电脑107上的“APP-1”的版本为“7.0.0”,其适配的补丁6大小为40M。As shown in FIG. 1 , multiple terminal devices in the patch system 10 may have different versions of the application program "APP-1" installed. Among them, specifically, the version of "APP-1" on the mobile phone 102 is "2.0.0", and the size of the patch 1 adapted to it is 20M; 0", the size of patch 2 adapted to it is 2M; the version of "APP-1" on the smart earphone 104 is "4.0.0", and the size of patch 3 adapted to it is 800K; the size of "APP-1" on the smart speaker 105 is The version of "1" is "5.0.0", and the size of patch 4 is 1M; the version of "APP-1" on the smart TV 106 is "6.0.0", and the size of patch 5 is 50M; The version of "APP-1" on the computer 107 is "7.0.0", and the patch 6 adapted to it has a size of 40M.
在补丁系统10中,当服务器100检测到智能耳机104上的“APP-1”需要进行升级时,首先,服务器100可以通过路由器101向智能耳机104发送适配于“APP-1 4.0.0 for智能耳机”的补丁3,其补丁3大小为800K。接下来,智能耳机104可以直接下载补丁3将应用程序“APP-1”由“APP-1 4.0.0 for智能耳机”升级到“APP-1 4.1.0 for智能耳机”。其他终端设备上的“APP-1”利用补丁进行升级“APP-1”的流程可以类似于智能耳机104上“APP-1”直接下载补丁3进行升级的过程。In the patch system 10, when the server 100 detects that the "APP-1" on the smart earphone 104 needs to be upgraded, first, the server 100 can send the "APP-1 4.0.0 for Patch 3 of "Smart Headphones", the size of patch 3 is 800K. Next, the smart earphone 104 can directly download patch 3 to upgrade the application program "APP-1" from "APP-1 4.0.0 for smart earphones" to "APP-1 4.1.0 for smart earphones". The process of "APP-1" on other terminal devices upgrading "APP-1" with a patch can be similar to the process of "APP-1" on the smart earphone 104 directly downloading patch 3 for upgrading.
从图1中可以看出,由于不同终端设备上的“APP-1”的版本不同,因此,服务器100为适配各个终端设备上的“APP-1”所下发的补丁也会有所不同,这将导致服务器100将多个适配于不同终端设备的多个补丁包下发至其需要进行升级的终端设备时,数据的传输量很大,网络负担严重。It can be seen from FIG. 1 that since the versions of "APP-1" on different terminal devices are different, the patches issued by the server 100 to adapt to "APP-1" on each terminal device will also be different. , which will cause the server 100 to send multiple patch packages adapted to different terminal devices to the terminal device that needs to be upgraded, the amount of data transmission is very large, and the network burden is serious.
如图2所示,本申请实施例提供一种补丁系统20以及实施于该补丁系统中的补丁方法。在图2所示的补丁系统20中,具有较强计算处理能力和较充足的存储能力的终端设备,如手机102,可以作为“超级终端”。“超级终端”可以利用服务器100下发的数据量相比较小的差分数据还原出适配于目标设备(例如智能耳机104等)的补丁包,然后“超级终端”将还原出来的补丁包发送给目标设备,这样服务器100就无需向各个终端设备直接传输数据量较大的补丁包,从而降低了数据传输量,减轻了网络负担。As shown in FIG. 2 , the embodiment of the present application provides a patch system 20 and a patch method implemented in the patch system. In the patch system 20 shown in FIG. 2 , a terminal device with strong computing processing capability and sufficient storage capability, such as the mobile phone 102, can be used as a "super terminal". "Hyper Terminal" can use the smaller differential data sent by the server 100 to restore a patch package suitable for the target device (such as smart earphone 104, etc.), and then "Hyper Terminal" sends the restored patch package to The target device, so that the server 100 does not need to directly transmit patch packages with a large amount of data to each terminal device, thereby reducing the amount of data transmission and reducing the burden on the network.
如图2示例性所示,本申请实施例提供的补丁系统20可以包括:服务器100以及手机102、智能手环103和智能耳机104等终端设备。手机102、智能手环103以及智能耳机104可以通过接入路由器101提供的同一个Wi-Fi接入点而处于同一局域网中。手机102、智能手环103以及智能耳机104等终端设备上都可以安装有应用程序“APP-1”。其中,手机102中的“APP-1”的版本为2.0.0,智能手环103中的“APP-1”的版本为3.0.0,智能耳机104中的“APP-1”的版本为4.0.0。As exemplarily shown in FIG. 2 , the patch system 20 provided by the embodiment of the present application may include: a server 100 and terminal devices such as a mobile phone 102 , a smart bracelet 103 , and a smart earphone 104 . The mobile phone 102, the smart bracelet 103 and the smart earphone 104 can be in the same local area network by accessing the same Wi-Fi access point provided by the router 101. The mobile phone 102, the smart bracelet 103, the smart earphone 104 and other terminal devices can all be installed with an application program "APP-1". Among them, the version of "APP-1" in the mobile phone 102 is 2.0.0, the version of "APP-1" in the smart bracelet 103 is 3.0.0, and the version of "APP-1" in the smart earphone 104 is 4.0 .0.
在补丁系统20中,以升级智能耳机104上安装的“APP-1”为例,本申请实施例提供的补丁方法可以包括以下步骤:In the patch system 20, taking upgrading the "APP-1" installed on the smart earphone 104 as an example, the patch method provided in the embodiment of the present application may include the following steps:
步骤1、服务器100可以为智能耳机104的“APP-1”准备升级所需的补丁3,其大小可以例如800K。 Step 1. The server 100 can prepare the patch 3 required for upgrading the "APP-1" of the smart earphone 104, and its size can be, for example, 800K.
步骤2、服务器100从所有与其连接的终端设备中确定出最相关设备。在本示例中,最相关设备可以是手机102和智能手环103,手机102因其设备上的“APP-1 2.0.0”具有和补丁3高度重合的软件模块而被选为最相关设备,智能手环103同样因其设备上的“APP-1 3.0.0”具有和补丁3高度重合的软件模块而也被选为最相关设备。 Step 2. The server 100 determines the most relevant device from all the terminal devices connected to it. In this example, the most relevant devices may be a mobile phone 102 and a smart bracelet 103, and the mobile phone 102 is selected as the most relevant device because "APP-1 2.0.0" on the device has a software module that highly overlaps with patch 3, The smart bracelet 103 was also selected as the most relevant device because the "APP-1 3.0.0" on the device has a software module that highly overlaps with Patch 3.
步骤3、服务器100可以利用最相关设备(即手机102和智能手环103)上的“APP-1”(具体可以是指与补丁3存在高度重合的一些模块)与补丁3生成差分数据C,其大小可以50K,明显小于补丁3的大小。Step 3. The server 100 can use the "APP-1" on the most relevant device (i.e. the mobile phone 102 and the smart bracelet 103) (specifically, it can refer to some modules that highly overlap with the patch 3) and the patch 3 to generate differential data C, Its size can be 50K, which is significantly smaller than the size of patch 3.
步骤4、服务器100可以将差分数据C发送至手机102,并将目标设备(即智能耳机104)和最相关设备告知手机102。Step 4. The server 100 can send the differential data C to the mobile phone 102, and inform the mobile phone 102 of the target device (ie, the smart earphone 104) and the most relevant device.
步骤5、手机102可以利用差分数据C与最相关设备上的“APP-1”(具体可以是指与补丁3存在高度重合的一些模块),还原出补丁3,然后,手机102可以向智能耳机104(即目 标设备)发送还原出的补丁3。Step 5, the mobile phone 102 can use the differential data C and the "APP-1" on the most relevant device (specifically, it can refer to some modules that are highly overlapped with the patch 3) to restore the patch 3, and then the mobile phone 102 can send the smart earphone 104 (that is, the target device) sends the restored patch 3 .
步骤6、智能耳机104可以利用手机102的补丁3升级“APP-1”,具体可以将“APP-1”由旧版本4.0.0升级到新版本4.1.0。Step 6. The smart earphone 104 can use the patch 3 of the mobile phone 102 to upgrade "APP-1", specifically, "APP-1" can be upgraded from the old version 4.0.0 to the new version 4.1.0.
可以看出,由于本申请实施例提供的补丁系统20中存在着“超级终端”这一角色,服务器100可无需直接向各个终端设备传输数据量大的补丁,而只需要向“超级终端”传输利用补丁包和最相关设备上的应用程序所生成的数据量相比小的差分数据。It can be seen that since the patch system 20 provided by the embodiment of the present application has the role of "hyper terminal", the server 100 does not need to directly transmit patches with a large amount of data to each terminal device, but only needs to transmit patches to the "hyper terminal" Utilize small differential data compared to the amount of data generated by the patch pack and the application on the most relevant device.
进一步的,“超级终端”可以利用差分数据以及最相关设备上的应用程序还原出补丁包,并将补丁包传输给目标设备,以最终实现目标设备上的应用程序升级。这种补丁技术明显降低了服务器升级各个终端设备上的应用程序时与各个终端设备之间的数据传输量。Further, the "Hyper Terminal" can use the differential data and the application program on the most relevant device to restore the patch package, and transmit the patch package to the target device, so as to finally realize the application program upgrade on the target device. This patch technology obviously reduces the amount of data transmission between the server and each terminal device when the application program on each terminal device is upgraded.
在上述补丁技术中,关于如何确定最相关设备、如何生成差分数据以及如何利用差分数据还原出补丁包,下面将会详细展开说明。In the above patch technology, how to determine the most relevant device, how to generate differential data, and how to use the differential data to restore a patch package will be described in detail below.
1.如何确定最相关设备1. How to determine the most relevant equipment
本申请实施例中,最相关设备可以是指,其上的“APP-1”具有和补丁3中高度重合的一个或多个软件模块的终端设备。针对任何一个补丁,可能确定出一个最相关设备,也可能确定出多个最相关设备。在图2所示的补丁系统20中,任意一个终端设备都可能成为补丁3的最相关设备。In this embodiment of the present application, the most relevant device may refer to a terminal device on which "APP-1" has one or more software modules highly overlapping with patch 3. For any patch, one most relevant device may be determined, or multiple most relevant devices may be determined. In the patch system 20 shown in FIG. 2 , any terminal device may become the most relevant device for patch 3 .
图3A示例性示出了手机102、智能手环103、智能音箱105等等终端设备上的“APP-1”以及补丁3的软件架构。FIG. 3A exemplarily shows the software architecture of "APP-1" and Patch 3 on terminal devices such as mobile phone 102, smart bracelet 103, smart speaker 105 and the like.
如图3A所示,补丁3和各个终端设备上的“APP-1”根据其软件架构均可以分成FA1interface code、Entrylegcy code和FA1 code三个软件模块,其中FA1 interface code软件模块可用于实现接口层的具体逻辑结构,Entrylegcy code软件模块可用于实现软件数据系统兼容处理功能,FA1 code模块可用于实现应用程序的鸿蒙卡片功能。各个软件模块可以由多个方法和变量构成,同一个软件模块在不同终端设备上、补丁中的构成有所异同。As shown in Figure 3A, Patch 3 and "APP-1" on each terminal device can be divided into three software modules: FA1interface code, Entrylegcy code and FA1 code according to their software architecture, among which the FA1 interface code software module can be used to implement the interface layer The specific logical structure, the Entrylegcy code software module can be used to realize the compatibility processing function of the software data system, and the FA1 code module can be used to realize the Hongmeng card function of the application program. Each software module may be composed of multiple methods and variables, and the composition of the same software module on different terminal devices and patches may be different.
例如,如图3A所示,补丁3中FA1 interface code软件模块可包括如下变量:变量1-a、变量1-b、变量1-c、变量1-d,以及如下方法:方法1-a、方法1-b、方法1-c、方法1-d。手机102上的“APP-1”中的FA1 interface code软件模块可包括如下变量:变量1-a、变量1-b、变量1-c、变量1-d、变量1-e、变量1-f,以及如下方法:方法1-a、方法1-b、方法1-c、方法1-d、方法1-e、方法1-f。智能手环103上的“APP-1”中的FA1 interface code软件模块可包括如下变量:变量1-d、变量1-e、变量1-f,以及如下方法:方法1-d、方法1-e、方法1-f。智能音箱105上的“APP-1”中的FA1 interface code软件模块可包括如下变量:变量1-e、变量1-f、变量1-g,以及如下方法:方法1-e、方法1-f、方法1-g。类似的补丁3和其他各种终端设备的其他各个模块可包括的变量和方法如图3A中所示,这里不再赘述。For example, as shown in Figure 3A, the FA1 interface code software module in the patch 3 can include the following variables: variable 1-a, variable 1-b, variable 1-c, variable 1-d, and the following methods: method 1-a, Method 1-b, Method 1-c, Method 1-d. The FA1 interface code software module in the "APP-1" on the mobile phone 102 can include the following variables: variable 1-a, variable 1-b, variable 1-c, variable 1-d, variable 1-e, variable 1-f , and the following methods: Method 1-a, Method 1-b, Method 1-c, Method 1-d, Method 1-e, Method 1-f. The FA1 interface code software module in the "APP-1" on the smart bracelet 103 can include the following variables: variable 1-d, variable 1-e, variable 1-f, and the following methods: method 1-d, method 1- e. Method 1-f. The FA1 interface code software module in the "APP-1" on the smart speaker 105 can include the following variables: variable 1-e, variable 1-f, variable 1-g, and the following methods: method 1-e, method 1-f , Method 1-g. Similar variables and methods that may be included in Patch 3 and other modules of various other terminal devices are shown in FIG. 3A , and will not be repeated here.
可以看出,手机102上的“APP-1”的FA1 interface code(02)模块和补丁3中的FA1 interface code(01)模块的重合度最高,具有如下相同的变量:变量1-a、变量1-b、变量1-c、变量1-d,以及具有如下相同的方法:方法1-a、方法1-b、方法1-c、方法1-d。It can be seen that the FA1 interface code (02) module of "APP-1" on the mobile phone 102 has the highest overlap with the FA1 interface code (01) module in patch 3, and has the same variables as follows: variable 1-a, variable 1-b, variant 1-c, variant 1-d, and the same method with the following: method 1-a, method 1-b, method 1-c, method 1-d.
智能手环103上的“APP-1”的Entrylegcy code(03)模块和补丁3中的Entrylegcy code(01)模块的重合度最高,具有如下相同的变量:变量2-b、变量2-c、变量2-g,以及具有如下相同的方法:方法2-b、方法2-c、方法2-g。The entrylegcy code (03) module of "APP-1" on the smart bracelet 103 and the entrylegcy code (01) module in patch 3 have the highest coincidence degree, and have the same variables as follows: variable 2-b, variable 2-c, Variable 2-g, and has the same methods as: method 2-b, method 2-c, method 2-g.
智能手环103上的“APP-1”的FA1 code(03)模块和补丁3中的FA1 code(01)模块 的重合度最高,具有如下相同的变量:变量3-a、变量3-b、变量3-g,以及具有如下相同的方法:方法3-a、方法3-b、方法3-g。The FA1 code (03) module of "APP-1" on the smart bracelet 103 and the FA1 code (01) module in patch 3 have the highest coincidence degree, and have the same variables as follows: variable 3-a, variable 3-b, Variable 3-g, and has the same methods as: method 3-a, method 3-b, method 3-g.
其中重合度=(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数)。The coincidence degree=(the number of the same method+the number of the same variable)/(the total number of methods+the total number of variables).
因此,与补丁3的FA1 interface code模块的相关性最大的是手机102的“APP-1”中的FA1 interface code模块,与补丁3的Entrylegcy code模块的相关性最大的是智能手环103的“APP-1”中的Entrylegcy code模块,与补丁3的FA1 code模块的相关性最大的是智能手环103的“APP-1”中的FA1 code模块。Therefore, the most relevant to the FA1 interface code module of patch 3 is the FA1 interface code module in the "APP-1" of the mobile phone 102, and the most relevant to the Entrylegcy code module of patch 3 is the "APP-1" module of the smart bracelet 103. The Entrylegcy code module in "APP-1" has the greatest correlation with the FA1 code module of Patch 3 is the FA1 code module in "APP-1" of the smart bracelet 103.
如上所述,不同终端设备的“APP-1”的不同软件版本的三个模块中的代码对应有所异同,通过运用计算相关性的方法,得到补丁3的三个模块与所有终端设备上的“APP-1”名称对应的模块的相关性大小,选择与补丁3的三个模块相关性最大的“APP-1”的模块,即为最相关模块,其最相关模块所在的终端设备即为最相关设备。As mentioned above, the codes in the three modules of different software versions of "APP-1" of different terminal devices have similarities and differences. By using the method of calculating correlation, the three modules of patch 3 and the codes on all terminal devices are obtained. The correlation size of the module corresponding to the name of "APP-1", select the module of "APP-1" that has the greatest correlation with the three modules of Patch 3, which is the most relevant module, and the terminal device where the most relevant module is located is most relevant equipment.
在本申请实施例中,为了确定最相关设备而计算相关性的方法可以包括两种:In the embodiment of the present application, there are two methods for calculating the correlation in order to determine the most relevant device:
第一种方法是计算耦合系数,即对模块软件代码进行反向解析,获取对应的代码段中多个变量及方法,进行结构化分析,耦合系数如下计算:The first method is to calculate the coupling coefficient, that is, to reversely analyze the module software code, obtain multiple variables and methods in the corresponding code segment, and perform structural analysis. The coupling coefficient is calculated as follows:
耦合系数=(变量个数变动+方法个数变动)/(方法个数+变量个数)Coupling coefficient = (change in the number of variables + change in the number of methods) / (number of methods + number of variables)
以单个软件模块为单位进行耦合系数的计算,选择耦合系数最小即重合度最高的模块作为最相关模块,该模块所在的终端设备即为最相关设备;Calculate the coupling coefficient with a single software module as the unit, select the module with the smallest coupling coefficient or the highest coincidence degree as the most relevant module, and the terminal device where the module is located is the most relevant device;
进一步的,各个软件模块中的方法和变量还可以区分为两种维度的方法及变量,即平台维度和应用维度,平台维度的方法及变量是以终端设备为唯一区别来进行方法和变量的划分,应用维度的方法及变量是以应用程序为唯一区别进行方法和变量的划分。结合图3A说明在两种维度下如何确定最相关设备。Furthermore, the methods and variables in each software module can also be divided into methods and variables of two dimensions, namely the platform dimension and the application dimension. The methods and variables of the platform dimension are divided into methods and variables based on the only difference of the terminal device. , the methods and variables of the application dimension are divided into methods and variables based on the only difference of the application program. How to determine the most relevant device in two dimensions will be described with reference to FIG. 3A .
在确定最相关设备时,可以区别平台维度上的方法及变量和应用维度上的方法及变量的优先级。When determining the most relevant device, the priority of the methods and variables on the platform dimension and the methods and variables on the application dimension can be distinguished.
例如,如果平台维度的优先级高于应用维度的优先级,那么,先基于平台维度的方法及变量来确定哪些设备具有跟补丁3具有高度重合的软件模块。For example, if the priority of the platform dimension is higher than the priority of the application dimension, then firstly determine which devices have software modules highly overlapping with patch 3 based on the methods and variables of the platform dimension.
在图3A所示的步骤2关于确定最相关设备方法图中,假设补丁3中FA1 interface code(01)模块中变量1-d和方法1-d为平台维度的变量与方法,变量1-a、变量1-b、变量1-c和方法1-a、方法1-b、方法1-c为应用维度的变量与方法;手机102上的“APP-1”的版本2.0.0中FA1 interface code(02)模块中变量1-d和方法1-d为平台维度的变量与方法,变量1-a、变量1-b、变量1-c、变量1-e、变量1-f和方法1-a、方法1-b、方法1-c、方法1-e、方法1-f为应用维度的变量与方法;“APP-1”的版本3.0.0中FA1 interface code(03)模块中变量1-d和方法1-d为平台维度的变量与方法,变量1-e、变量1-f和方法1-e、方法1-f为应用维度的变量与方法。In the step 2 shown in Figure 3A about determining the most relevant device method diagram, it is assumed that the variable 1-d and method 1-d in the FA1 interface code (01) module in patch 3 are the variables and methods of the platform dimension, and the variable 1-a , variable 1-b, variable 1-c and method 1-a, method 1-b, method 1-c are the variables and methods of the application dimension; the FA1 interface in the version 2.0.0 of "APP-1" on the mobile phone 102 Variable 1-d and method 1-d in the code(02) module are variables and methods of the platform dimension, variable 1-a, variable 1-b, variable 1-c, variable 1-e, variable 1-f and method 1 -a, method 1-b, method 1-c, method 1-e, method 1-f are the variables and methods of the application dimension; the variables in the FA1 interface code (03) module in version 3.0.0 of "APP-1" 1-d and method 1-d are variables and methods of the platform dimension, and variables and methods of variable 1-e, variable 1-f, method 1-e, and method 1-f are variables and methods of the application dimension.
那么可以知道,在平台维度上,补丁3中FA1 interface code(01)模块与手机102上的“APP-1”的版本2.0.0中FA1 interface code(02)模块的耦合系数为零,同样的,补丁3中FA1 interface code(01)模块与“APP-1”的版本3.0.0中FA1 interface code(03)模块的耦合系数也为零,即为平台维度上的两者与补丁3中FA1 interface code(01)模块的耦合系数相等,在这种情况下再进行应用维度上的耦合系数计算,得到与补丁3中FA1 interface code(01)模块的耦合系数最小的模块,从而确定出最相关设备,其计算方式与平台维度上的相似。Then we can know that in the platform dimension, the coupling coefficient between the FA1 interface code (01) module in patch 3 and the FA1 interface code (02) module in version 2.0.0 of the "APP-1" on the mobile phone 102 is zero, and the same , the coupling coefficient between the FA1 interface code (01) module in patch 3 and the FA1 interface code (03) module in version 3.0.0 of "APP-1" is also zero, that is, the two in the platform dimension and FA1 in patch 3 The coupling coefficients of the interface code(01) modules are equal. In this case, the coupling coefficient calculation on the application dimension is performed to obtain the module with the smallest coupling coefficient with the FA1 interface code(01) module in patch 3, so as to determine the most relevant Devices, which are calculated similarly to the platform dimension.
相反的,如果应用维度的优先级高于平台维度的优先级,那么,先基于应用维度的方法及变量来确定哪些设备具有跟补丁3具有高度重合的软件模块。计算方式如上所示类似。如果在应用维度上计算出来的某两个设备上的某个模块与补丁3的某个模块的耦合系数相等,那么再进行平台维度上的耦合系数计算,从而确定出最相关设备。On the contrary, if the priority of the application dimension is higher than the priority of the platform dimension, then first determine which devices have software modules that have a high overlap with patch 3 based on the methods and variables of the application dimension. The calculation is similar to that shown above. If the coupling coefficient of a module on two devices calculated on the application dimension is equal to that of a module in patch 3, then the coupling coefficient calculation on the platform dimension is performed to determine the most relevant device.
不限于上述利用方法及变量的耦合系数来确定出最相关设备,本申请实施例还可以利用软件模块的二进制代码来确定出最相关设备。It is not limited to determining the most relevant device by using the method and the coupling coefficient of the variables described above. In the embodiment of the present application, the binary code of the software module may also be used to determine the most relevant device.
第二种方法是对模块软件代码使用二进制进行相关性计算(包含但不限于bsdiff算法),以下是实施例一补丁3与各个终端设备的“APP-1”中对应模块的相关性系数大小:The second method is to use binary to perform correlation calculation on the module software code (including but not limited to the bsdiff algorithm). The following is the correlation coefficient size of the corresponding module in the "APP-1" of the first embodiment patch 3 and each terminal device:
补丁3的FA1 interface code模块与手机102中的“APP-1”的FA1 interface code模块计算得到的相关性系数为0.8,补丁3的Entry Legcycode模块与手机102中的“APP-1”的Entry Legcycode模块计算得到的相关性系数为0.4,补丁3的FA1 code模块与手机102中的“APP-1”的FA1 code模块计算得到的相关性系数为0.2;The correlation coefficient calculated by the FA1 interface code module of patch 3 and the FA1 interface code module of "APP-1" in the mobile phone 102 is 0.8, and the Entry Legcycode module of patch 3 and the Entry Legcycode of "APP-1" in the mobile phone 102 The correlation coefficient calculated by the module is 0.4, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the mobile phone 102 is 0.2;
补丁3的FA1 interface code模块与智能手环103中的“APP-1”的FA1 interface code模块计算得到的相关性系数为0.7,补丁3的Entry Legcycode模块与智能手环103中的“APP-1”的Entry Legcycode模块计算得到的相关性系数为0.7,补丁3的FA1 code模块与智能手环103中的“APP-1”的FA1 code模块计算得到的相关性系数为0.6;The correlation coefficient calculated by the FA1 interface code module of Patch 3 and the FA1 interface code module of "APP-1" in the smart bracelet 103 is 0.7, and the Entry Legcycode module of Patch 3 and the "APP-1" in the smart bracelet 103 The correlation coefficient calculated by the Entry Legcycode module of "is 0.7, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the smart bracelet 103 is 0.6;
补丁3的FA1 interface code模块与智能音箱105中的“APP-1”的FA1 interface code模块计算得到的相关性系数为06,补丁3的Entry Legcycode模块与智能音箱105中的“APP-1”的Entry Legcycode模块计算得到的相关性系数为0.6,补丁3的FA1 code模块与智能音箱105中的“APP-1”的FA1 code模块计算得到的相关性系数为0.5;The correlation coefficient calculated between the FA1 interface code module of patch 3 and the FA1 interface code module of "APP-1" in the smart speaker 105 is 06, and the correlation coefficient between the Entry Legcycode module of patch 3 and the "APP-1" in the smart speaker 105 is 06. The correlation coefficient calculated by the Entry Legcycode module is 0.6, and the correlation coefficient calculated by the FA1 code module of patch 3 and the FA1 code module of "APP-1" in the smart speaker 105 is 0.5;
由上述相关性系数可以知道,手机102的“APP-1”中FA1 interface code(02)与补丁3中的FA1 interface code(01)的相关性系数最大为0.8,智能耳机104的“APP-1”中EntryLegacycode(03)与补丁3中的EntryLegacycode(01)的相关性系数最大为0.7,智能耳机104的“APP-1”中FA1 code(03)与补丁3中的FA1 code(01)的相关性系数最大为0.6。那么可以确定补丁3的最相关设备为手机102和智能耳机104。It can be known from the above correlation coefficient that the correlation coefficient between the FA1 interface code (02) in the "APP-1" of the mobile phone 102 and the FA1 interface code (01) in the patch 3 is at most 0.8, and the "APP-1" of the smart earphone 104 is 0.8. The correlation coefficient between EntryLegacycode (03) in "EntryLegacycode (03) and EntryLegacycode (01) in Patch 3 is at most 0.7, and the correlation coefficient between FA1 code (03) in "APP-1" of smart earphone 104 and FA1 code (01) in Patch 3 The maximum coefficient of sex is 0.6. Then it can be determined that the most relevant devices for patch 3 are the mobile phone 102 and the smart earphone 104 .
在图3B所示的步骤3关于如何得到差分数据的方法图中,可以看出,在服务器100上,差分数据C是由最相关设备上的软件模块(图3B示出的FA1 interface code(02)模块、Entrylegcy code(03)模块和FA1 code(03)模块)和补丁3根据去同存异的原则进行差分而得到的。差分数据C也具有和补丁3、各个终端设备上的“APP-1”相同的软件架构,即同样包括FA1 interface code、Entrylegcy code和FA1 code三个模块。In Step 3 shown in FIG. 3B about how to obtain differential data, it can be seen that on the server 100, the differential data C is obtained by the software module on the most relevant device (FA1 interface code (02 shown in FIG. 3B ) ) module, Entrylegcy code (03) module and FA1 code (03) module) and Patch 3 are obtained by making differences based on the principle of removing common ground while reserving differences. Differential data C also has the same software architecture as patch 3 and "APP-1" on each terminal device, that is, it also includes three modules: FA1 interface code, Entrylegcy code and FA1 code.
2.如何生成差分数据2. How to generate differential data
图3B示例性示出了关于如何生成差分数据C的具体操作。如图3B所示,各个模块中灰色虚线内的方法及变量即为差分后舍弃的方法与变量,其余的方法与变量即为差分后保留的方法与变量。FIG. 3B exemplarily shows specific operations on how to generate differential data C. As shown in FIG. As shown in Figure 3B, the methods and variables within the gray dotted lines in each module are the methods and variables discarded after the difference, and the remaining methods and variables are the methods and variables retained after the difference.
可以看出,FA1 interface code(00)模块是由补丁3中FA1 interface code(01)模块与手机102的“APP-1 2.0.0”中FA1 interface code(02)模块进行差分生成的,Entrylegcy code(00)模块是由补丁3中Entry legcy code(01)模块与智能手环103的“APP-1 3.0.0”中Entrylegcy code(03)模块进行差分生成的,FA1 code(00)模块是由补丁3中FA1 code(01)模块与智能手环103的“APP-1 3.0.0”中FA1 code(03)模块进行差分生成的。It can be seen that the FA1 interface code (00) module is generated by the difference between the FA1 interface code (01) module in the patch 3 and the FA1 interface code (02) module in the "APP-1 2.0.0" of the mobile phone 102, and the Entrylegcy code The (00) module is generated by the difference between the Entry legcy code (01) module in patch 3 and the Entrylegcy code (03) module in the "APP-1 3.0.0" of the smart bracelet 103, and the FA1 code (00) module is generated by The FA1 code(01) module in Patch 3 and the FA1 code(03) module in the "APP-1 3.0.0" of smart bracelet 103 are generated by difference.
由上述内容可知,以该种方式获取的差分数据C为最小的差分数据量,大小仅为50K,能使得在服务器100将差分数据C传输给手机102时,传输的数据量最小,传输效率最高,能够提高补丁修复紧急问题的效率。From the above content, it can be known that the differential data C obtained in this way is the smallest differential data volume, and the size is only 50K, so that when the server 100 transmits the differential data C to the mobile phone 102, the transmitted data volume is the smallest and the transmission efficiency is the highest. , which can improve the efficiency of patches to fix urgent problems.
3.如何还原补丁3. How to restore the patch
在图3C所示的步骤4关于如何还原补丁3的方法图中,可以看出,在手机102中,差分数据C中的各个模块与最相关设备的“APP-1”的最相关模块(图3C示出了FA1 interface code(02)模块、Entrylegcy code(03)模块和FA1 code(03)模块)依据去同存异的原则还原补丁3,该去同存异的原则为舍弃差分数据C和最相关模块共有变量与方法,保留差分数据C特有的变量与方法和最相关模块特有的变量与方法。各个模块中灰色虚线内的方法及变量即为还原后舍弃的方法与变量,其余的方法与变量即为还原后保留的方法与变量。In the method diagram of how to restore patch 3 in step 4 shown in FIG. 3C, it can be seen that in the mobile phone 102, each module in the differential data C is the most relevant module of the "APP-1" of the most relevant device (Fig. 3C shows the FA1 interface code (02) module, the Entrylegcy code (03) module and the FA1 code (03) module) to restore patch 3 according to the principle of removing common differences while reserving differences. The principle of removing common differences while reserving differences is to discard differential data C and The most relevant modules have common variables and methods, and the unique variables and methods of differential data C and the unique variables and methods of the most relevant modules are reserved. The methods and variables within the gray dotted line in each module are the methods and variables discarded after restoration, and the remaining methods and variables are the methods and variables retained after restoration.
具体是指,FA1 interface code(01)模块为智能手机102中FA1 interface code(02)模块和差分数据C中的FA1 interface code(00)模块舍弃共有的变量1-e、变量1-f和方法1-e、方法1-f,留下FA1 interface code(02)模块独有的变量1-a、变量1-b、变量1-c、变量1-d和方法1-a、方法1-b、方法1-c、方法1-d;Specifically, the FA1 interface code (01) module is the FA1 interface code (02) module in the smart phone 102 and the FA1 interface code (00) module in the differential data C and discards the shared variable 1-e, variable 1-f and method 1-e, method 1-f, leave the unique variable 1-a, variable 1-b, variable 1-c, variable 1-d and method 1-a, method 1-b unique to the FA1 interface code (02) module , method 1-c, method 1-d;
Entrylegcy code(01)模块为智能手环103中Entrylegcy code(03)模块和差分数据C中的Entrylegcy code(00)模块舍弃共有的变量2-h和方法2-h,留下Entrylegcy code(03)模块独有的变量2-b、变量2-c、变量2-g和方法2-b、方法2-c、方法2-g与Entrylegcy code(00)模块独有的变量2-f和方法2-f;The Entrylegcy code (01) module is the Entrylegcy code (03) module in the smart bracelet 103 and the Entrylegcy code (00) module in the differential data C. Abandon the shared variable 2-h and method 2-h, and leave the Entrylegcy code (03) Module unique variable 2-b, variable 2-c, variable 2-g and method 2-b, method 2-c, method 2-g and Entrylegcy code (00) module unique variable 2-f and method 2 -f;
FA1 code(01)模块为智能手环103中的FA1 code(03)模块和差分数据C中的FA1 code(00)模块舍弃共有的变量3-h和方法3-h,留下FA1 code(03)模块独有的变量3-a、变量3-b、变量3-g和方法3-a、方法3-b、方法3-g与FA1 code(00)模块独有的变量3-d和方法3-d。The FA1 code(01) module discards the common variable 3-h and method 3-h for the FA1 code(03) module in the smart bracelet 103 and the FA1 code(00) module in the differential data C, leaving the FA1 code(03 ) module unique variable 3-a, variable 3-b, variable 3-g and method 3-a, method 3-b, method 3-g and FA1 code(00) module unique variable 3-d and method 3-d.
可以理解的是,图2中的实施场景仅仅是为了示例性说明本申请实施例,并不对本申请构成任何限制。It can be understood that the implementation scenario in FIG. 2 is only for illustrating the embodiment of the present application, and does not constitute any limitation to the present application.
图4示出了本申请实施例提供的一种补丁的方法的方法流程。具体地,可以包括以下步骤:FIG. 4 shows a method flow of a patch method provided by an embodiment of the present application. Specifically, the following steps may be included:
S101、服务器端自行检测服务器100下的终端设备的“APP-1”是否需要下发补丁,确定需针对智能耳机104的“APP-1”下发补丁3。S101 , the server side detects whether the "APP-1" of the terminal device under the server 100 needs to issue a patch, and determines that a patch 3 needs to be issued to the "APP-1" of the smart earphone 104 .
S102、服务器100向手机102发送补丁3下发提示信息,其中,该提示信息包括需进行更新的终端设备即智能耳机104、该设备的“APP-1”更新前后的版本信息即由4.0.0更新至4.1.0。S102, the server 100 sends a patch 3 prompt message to the mobile phone 102, wherein the prompt message includes the terminal device that needs to be updated, that is, the smart earphone 104, and the version information of the "APP-1" of the device before and after the update is 4.0.0 Updated to 4.1.0.
S103、手机102检测到用户选择更新的操作。S103, the mobile phone 102 detects that the user selects an update operation.
S104、服务器100获取用户同意下载补丁3并更新“APP-1”的请求。S104. The server 100 acquires a request from the user to agree to download the patch 3 and update "APP-1".
S105、服务器100获得所有终端设备的“APP-1”的版本信息,结合补丁3进一步确定最相关设备。S105. The server 100 obtains the version information of "APP-1" of all terminal devices, and further determines the most relevant device in combination with Patch 3.
S106、服务器100依据最相关设备的“APP-1”的与补丁3的进行差分获得差分数据C。S106. The server 100 obtains difference data C according to difference between "APP-1" of the most relevant device and patch 3.
S107、服务器100向手机102下发差分数据C至手机102。S107 , the server 100 sends the differential data C to the mobile phone 102 to the mobile phone 102 .
S108、手机102根据最相关设备中“APP-1”的最相关模块和差分数据C,还原出补丁3。S108, the mobile phone 102 restores the patch 3 according to the most relevant module and the differential data C of "APP-1" in the most relevant device.
S109、手机102向智能耳机104发送用于更新智能耳机104的“APP-1”补丁3。S109, the mobile phone 102 sends the “APP-1” patch 3 for updating the smart headset 104 to the smart headset 104 .
S110、智能耳机104下载安装补丁3,进行版本更新。S110, the smart earphone 104 downloads and installs Patch 3, and performs a version update.
S111、服务器100接收到来自智能耳机104的“APP-1”更新成功的指令。S111. The server 100 receives an instruction from the smart earphone 104 indicating that the update of "APP-1" is successful.
S112、服务器100更新智能耳机104的“APP-1”版本信息并保存。S112. The server 100 updates and saves the "APP-1" version information of the smart earphone 104.
S113、服务器100将“APP-1”更新成功的指令发送给手机102。S113. The server 100 sends an instruction indicating that the "APP-1" is successfully updated to the mobile phone 102.
S114、手机102上显示智能耳机104的“APP-1”版本由4.0.0成功更新为4.1.0的提示信息。S114, the mobile phone 102 displays a prompt message that the "APP-1" version of the smart earphone 104 has been successfully updated from 4.0.0 to 4.1.0.
如图5所示,本申请实施例还提供了一种补丁系统30以及实施于该补丁系统中的补丁方法。在图5所示的补丁系统中,具有较强计算处理能力和较充足的存储能力的终端设备,如手机102,可以作为“超级终端”。“超级终端”同样是能够利用服务器100下发的数据量相比较小的差分数据还原出适配于目标设备的补丁包,然后“超级终端”将还原出来的补丁包发送给目标设备,这样服务器100就同样也是达到无需向目标设备直接传输数据量较大的补丁包的效果,从而降低了数据传输量,减轻了网络负担。As shown in FIG. 5 , the embodiment of the present application also provides a patch system 30 and a patch method implemented in the patch system. In the patch system shown in FIG. 5 , a terminal device with strong computing processing capability and relatively sufficient storage capability, such as the mobile phone 102, can be used as a "super terminal". "Hyper Terminal" can also utilize the relatively small differential data sent by the server 100 to restore a patch package suitable for the target device, and then "Hyper Terminal" sends the restored patch package to the target device, so that the server 100 also achieves the effect of not needing to directly transmit patch packages with a large amount of data to the target device, thereby reducing the amount of data transmission and reducing the burden on the network.
在一些实施例中,服务器下发的补丁包的目标设备并不处于1+8+N设备的场景中,而是可以与手机102建立连接、进行通信的单一终端设备,因此不存在最相关模块,也不存在与补丁包的最相关设备。In some embodiments, the target device of the patch delivered by the server is not in the scenario of 1+8+N devices, but a single terminal device that can establish a connection and communicate with the mobile phone 102, so there is no most relevant module , and there is no most relevant device for the patch pack.
如图5示例性所示,本申请实施例提供的补丁系统30可以包括:服务器100以及手机102和智能耳机104等终端设备。手机102以及智能耳机104可以通过接入路由器101提供的同一个Wi-Fi接入点而处于同一局域网中。手机102和智能耳机104等终端设备上都可以安装有应用程序“APP-1”。其中,手机102中的“APP-1”的版本为2.0.0,智能耳机104中的“APP-1”的版本为4.0.0。As exemplarily shown in FIG. 5 , the patch system 30 provided in the embodiment of the present application may include: a server 100 and terminal devices such as a mobile phone 102 and a smart earphone 104 . The mobile phone 102 and the smart earphone 104 can be in the same local area network by accessing the same Wi-Fi access point provided by the router 101 . The application program "APP-1" can be installed on terminal devices such as the mobile phone 102 and the smart earphone 104 . Wherein, the version of "APP-1" in the mobile phone 102 is 2.0.0, and the version of "APP-1" in the smart earphone 104 is 4.0.0.
在补丁系统30中,以升级智能耳机104上安装的“APP-1”为例,本申请实施例提供的补丁方法可以包括以下步骤:In the patch system 30, taking upgrading the "APP-1" installed on the smart earphone 104 as an example, the patch method provided by the embodiment of the present application may include the following steps:
步骤1、服务器100可以为智能耳机104的“APP-1”准备升级所需的补丁3,其大小可例如为800K。 Step 1. The server 100 can prepare the patch 3 required for upgrading the "APP-1" of the smart earphone 104, and its size can be, for example, 800K.
步骤2、服务器100可以利用智能耳机104的“APP-1 4.0.0”与补丁3生成三种不同的差分数据a、b和c,其中可知差分数据a数据量最小,其大小可例如为80K,明显小于补丁3的大小。 Step 2, the server 100 can use the "APP-1 4.0.0" of the smart earphone 104 and the patch 3 to generate three different differential data a, b and c, wherein it can be seen that the differential data a has the smallest data volume, and its size can be, for example, 80K , significantly smaller than the size of patch 3.
步骤3、服务器100可以将差分数据a发送至手机102,并将目标设备(即智能耳机104)以及进行过差分的数据告知手机102。Step 3. The server 100 can send the differential data a to the mobile phone 102, and inform the mobile phone 102 of the target device (ie, the smart earphone 104) and the differential data.
步骤4、手机102可以利用差分数据a与智能耳机104上的“APP-1 4.0.0”上(具体可以是进行过差分的部分数据),还原出补丁3,然后,手机102可以向智能耳机104(即目标设备)发送还原出的补丁3。Step 4, the mobile phone 102 can use the differential data a and the "APP-1 4.0.0" on the smart earphone 104 (specifically, it can be part of the data that has been differentiated), restore patch 3, and then, the mobile phone 102 can send the patch 3 to the smart earphone 104 104 (that is, the target device) sends the restored patch 3 .
步骤5、智能耳机104可以利用手机102的补丁3升级“APP-1”,具体可以将“APP-1” 由旧版本4.0.0升级到新版本4.1.0。Step 5, the smart earphone 104 can use the patch 3 of the mobile phone 102 to upgrade "APP-1", specifically, "APP-1" can be upgraded from the old version 4.0.0 to the new version 4.1.0.
可以看出,由于本申请实施例提供的补丁系统30中存在着“超级终端”这一角色,服务器100可无需直接向各个终端设备传输数据量大的补丁,而只需要向“超级终端”传输利用补丁包和目标设备上的应用程序所生成的数据量相比最小的差分数据。It can be seen that since the patch system 30 provided by the embodiment of the present application has the role of "hyper terminal", the server 100 does not need to directly transmit patches with a large amount of data to each terminal device, but only needs to transmit patches to the "hyper terminal" Utilizes the smallest differential data compared to the amount of data generated by the patch pack and the application on the target device.
进一步的,“超级终端”可以利用差分数据以及目标设备上的应用程序还原出补丁包,并将补丁包传输给目标设备,以最终实现目标设备上的应用程序升级。这种补丁技术明显降低了服务器升级各个目标设备上的应用程序时与各个目标设备之间的数据传输量。Further, the "Hyper Terminal" can use the differential data and the application program on the target device to restore the patch package, and transmit the patch package to the target device, so as to finally realize the application program upgrade on the target device. This patch technology significantly reduces the amount of data transmission between the server and each target device when the application program on each target device is upgraded.
在上述补丁技术中,关于如何生成最小差分数据以及如何利用差分数据还原出补丁包,下面将会详细展开说明。In the above patch technology, how to generate the minimum difference data and how to use the difference data to restore the patch package will be described in detail below.
1.如何确定最小差分数据1. How to determine the minimum difference data
在图6A和图6B所示的步骤2确定最小差分数据方法图中,包括补丁3、智能耳机104的“APP-1”、差分数据的代码架构。从图6A可以看出,智能耳机104的“APP-1”根据其软件架构可以分成FA1 interface code、Entrylegcy code和FA1 code三个模块,补丁3根据其软件架构可以分成Entrylegcy code和FA1 code两个模块,In the diagram of the method for determining the minimum differential data in step 2 shown in FIG. 6A and FIG. 6B , it includes patch 3, "APP-1" of the smart earphone 104, and the code structure of the differential data. It can be seen from Figure 6A that the "APP-1" of the smart headset 104 can be divided into three modules: FA1 interface code, Entrylegcy code and FA1 code according to its software architecture, and patch 3 can be divided into two modules: Entrylegcy code and FA1 code according to its software architecture. module,
特殊的是,其中补丁3中Entrylegcy code模块并不等同于仅仅升级智能耳机104的“APP-1”中的Entrylegcy code模块,而是对智能耳机104的“APP-1”中FA1 interface code和Entrylegcy code两个模块进行共同升级。这样会导致智能耳机104的“APP-1”中FA1 interface code和Entrylegcy code两个模块上的方法和变量具体分布具有不确定性,因此通过三种差分方式来确定最小差分数据。What is special is that the Entrylegcy code module in patch 3 is not equivalent to only upgrading the Entrylegcy code module in the "APP-1" of the smart earphone 104, but the FA1 interface code and Entrylegcy code in the "APP-1" of the smart earphone 104. code Two modules are upgraded together. This will lead to uncertainty in the specific distribution of methods and variables on the two modules of FA1 interface code and Entrylegcy code in the "APP-1" of the smart earphone 104, so the minimum differential data is determined by three differential methods.
如图6B所示的确定最小差分数据图和图6C所示的三种差分方式,是将补丁3上的软件模块与智能耳机104“APP-1”上的软件模块之间进行三种方式的差分再组合起来构成差分数据,包括三种差分方式具体为:The determination of the minimum difference data diagram shown in Figure 6B and the three ways of difference shown in Figure 6C are the three ways of performing three ways between the software module on the patch 3 and the software module on the smart earphone 104 "APP-1". The difference is combined to form the difference data, including three ways of difference:
第一种差分方式是将智能耳机104的“APP-1”的FA1 interface code模块与补丁3中Entrylegcy code模块进行差分得到差分模块1,其中包括变量1-d、变量2-b、变量2-e、变量2-g和方法1-d、方法2-b、方法2-e、方法2-g,将智能耳机104的“APP-1”的FA1 code模块与补丁3中的FA1 code模块进行差分得到差分模块4,其中包括变量3-a、变量3-d和方法3-a、方法3-d,再由差分模块1与差分模块4可以构成差分数据a。The first differential method is to differentiate the FA1 interface code module of the "APP-1" of the smart earphone 104 and the Entrylegcy code module in patch 3 to obtain a differential module 1, which includes variable 1-d, variable 2-b, and variable 2- e, variable 2-g and method 1-d, method 2-b, method 2-e, method 2-g, the FA1 code module of the "APP-1" of the smart earphone 104 and the FA1 code module in the patch 3 The difference is obtained by difference module 4, which includes variable 3-a, variable 3-d, method 3-a, method 3-d, and difference data a can be formed by difference module 1 and difference module 4.
第二种差分方式是将智能耳机104的“APP-1”的Entrylegcy code模块与补丁3中Entrylegcy code模块进行差分得到差分模块2,其中包括变量1-a、变量1-b、变量1-c、变量1-d、变量2-a、变量2-c、变量2-e、变量2-g和方法1-a、方法1-b、方法1-c、方法1-d、方法2-a、方法2-c、方法2-e、方法2-g,将智能耳机104的“APP-1”的FA1 code模块与补丁3中的FA1 code模块进行差分得到差分模块4,差分模块2与差分模块4可以构成差分数据b。The second differential method is to differentiate the Entrylegcy code module of "APP-1" of the smart earphone 104 and the Entrylegcy code module in patch 3 to obtain a differential module 2, which includes variable 1-a, variable 1-b, and variable 1-c , variable 1-d, variable 2-a, variable 2-c, variable 2-e, variable 2-g and method 1-a, method 1-b, method 1-c, method 1-d, method 2-a , method 2-c, method 2-e, method 2-g, the FA1 code module of the "APP-1" of the smart earphone 104 and the FA1 code module in the patch 3 are differentiated to obtain the difference module 4, the difference module 2 and the difference Module 4 can constitute differential data b.
第三种差分方式是将智能耳机104的“APP-1”的FA1 interface code模块和Entrylegcy code模块与补丁3中Entrylegcy code模块分别都进行差分得到差分模块3,其中包括变量1-d、变量2-a、变量2-c、变量2-e、变量2-g和方法1-d、方法2-a、方法2-c、方法2-e、方法2-g,将智能耳机104的“APP-1”的FA1 code模块与补丁3中的FA1 code模块进行差分得到差分模块4,差分模块3与差分模块4可以构成差分数据c。The third differential method is to differentiate the FA1 interface code module and the Entrylegcy code module of the "APP-1" of the smart earphone 104 from the Entrylegcy code module in patch 3 to obtain a differential module 3, which includes variables 1-d and variable 2 -a, variable 2-c, variable 2-e, variable 2-g and method 1-d, method 2-a, method 2-c, method 2-e, method 2-g, the "APP The difference between the FA1 code module of -1" and the FA1 code module in patch 3 is obtained to obtain the difference module 4, and the difference module 3 and the difference module 4 can form the difference data c.
然后从差分数据a、b和c中选择出最小的差分数据,可以得到差分数据a为最小的差分数据,这样能使得在服务器100将差分数据传输给手机102时,传输的数据量最小,传输效率最高,提高补丁修复紧急问题的效率。Then select the smallest differential data from the differential data a, b and c, and the differential data with the differential data a being the smallest can be obtained, so that when the server 100 transmits the differential data to the mobile phone 102, the amount of transmitted data is the smallest, and the transmission Highest efficiency, improving the efficiency of patches to fix urgent problems.
在图6D所示的步骤3关于如何还原补丁方法图中,差分数据a包括Entrylegcy code和FA1 code两个模块,其中Entrylegcy code模块是由补丁3中Entrylegcy code模块与智能耳机104的“APP-1”中FA1 interface code模块进行差分得到的,FA1 code模块是由补丁3中FA1 code模块与智能耳机104的“APP-1”中FA1 code模块进行差分得到的。In the step 3 shown in Figure 6D on how to restore the patch method, the differential data a includes two modules, Entrylegcy code and FA1 code, where the Entrylegcy code module is composed of the Entrylegcy code module in patch 3 and the "APP-1" of the smart earphone 104. The difference between the FA1 interface code module in ", the FA1 code module is obtained by the difference between the FA1 code module in patch 3 and the FA1 code module in the "APP-1" of the smart earphone 104.
可以看出,在手机102中,差分数据a中的各个模块与智能耳机104的“APP-1”中的进行过差分操作的相关模块(图6D示出了智能耳机104中的“APP-1”的FA1 interface code模块和FA1 code模块)依据去同存异的原则还原补丁3,该去同存异的原则为舍弃差分数据a和相关模块共有变量与方法,保留差分数据a特有的变量与方法和相关模块特有的变量与方法:It can be seen that in the mobile phone 102, each module in the differential data a and the relevant modules in the "APP-1" of the smart earphone 104 that have performed differential operations (Figure 6D shows that "APP-1" in the smart earphone 104 "'s FA1 interface code module and FA1 code module) restore patch 3 based on the principle of removing common differences while reserving differences. The principle of removing common differences while reserving differences is to discard the common variables and methods of differential data a and related modules, and retain the unique variables and methods of differential data a. Methods and related module-specific variables and methods:
即补丁3的Entrylegcy code模块是由智能耳机104的“APP-1”中FA1 interface code模块留下其独有的变量1-a、变量1-b、变量1-c和方法1-a、方法1-b、方法1-c与差分数据a中Entrylegcy code模块留下其独有的变量1-d、变量2-b、变量2-e、变量2-g和方法1-d、方法2-b、方法2-e、方法2-g构成的。That is, the Entrylegcy code module of patch 3 is left with its unique variable 1-a, variable 1-b, variable 1-c, method 1-a, method 1-b, method 1-c and the Entrylegcy code module in differential data a leave its unique variable 1-d, variable 2-b, variable 2-e, variable 2-g and method 1-d, method 2- b. Formed by method 2-e and method 2-g.
补丁3的FA1 code模块是由智能耳机104的“APP-1”中FA1 code模块留下其独有的变量3-b、变量3-c和方法3-b、方法3-c与差分数据a中FA1 code模块留下其独有的变量3-d、和方法3-d,舍弃共有的变量3-a和方法3-a构成的。The FA1 code module of patch 3 is the unique variable 3-b, variable 3-c, method 3-b, method 3-c and differential data a left by the FA1 code module in the "APP-1" of the smart earphone 104 In the FA1 code module, its unique variable 3-d and method 3-d are left, and the common variable 3-a and method 3-a are discarded.
在该实施例中,还原过程中仅依据图6D中所示的灰色模块即差分数据a与智能耳机104中“APP-1”的FA1 interface code模块和FA1 code模块,并未利用智能耳机104中“APP-1”的Entrylegcy code模块。In this embodiment, the restoration process is only based on the gray module shown in FIG. 6D , that is, the differential data a and the FA1 interface code module and FA1 code module of "APP-1" in the smart earphone 104, and does not use the gray module in the smart earphone 104. Entrylegcy code module of "APP-1".
可以理解的是,图5中的实施场景仅仅是为了示例性说明本申请实施例,并不对本申请构成任何限制。It can be understood that the implementation scenario in FIG. 5 is only for illustrating the embodiment of the present application, and does not constitute any limitation to the present application.
图7示出了本申请实施例提供的另一种补丁的方法的方法流程。具体地,可以包括以下步骤:FIG. 7 shows a method flow of another patch method provided by an embodiment of the present application. Specifically, the following steps may be included:
S201、服务器端自行检测服务器100下的智能耳机104的“APP-1”是否需要下发补丁,确定下发补丁3。S201. The server side detects whether the "APP-1" of the smart earphone 104 under the server 100 needs to issue a patch, and determines to issue a patch 3.
S202、服务器100向手机102发送补丁3下发提示信息,其中,该信息包括需进行更新的终端设备即智能耳机104、该设备的“APP-1”更新前后的版本信息即由4.0.0更新至4.1.0。S202, the server 100 sends a patch 3 notification message to the mobile phone 102, wherein the message includes the terminal device that needs to be updated, that is, the smart earphone 104, and the version information before and after the update of the "APP-1" of the device is updated from 4.0.0 to 4.1.0.
S203、手机102检测到用户选择更新的操作。S203. The mobile phone 102 detects that the user selects an update operation.
S204、服务器102获取用户同意下载补丁3并更新“APP-1”的请求。S204. The server 102 acquires a request from the user to agree to download the patch 3 and update "APP-1".
S205、服务器100获得智能耳机104的“APP-1”的版本信息,结合补丁3进行差分得到最小差分数据即差分数据a。S205. The server 100 obtains the version information of "APP-1" of the smart earphone 104, and performs a difference in combination with the patch 3 to obtain the minimum difference data, that is, the difference data a.
S206、服务器100下发差分数据a至手机102。S206. The server 100 sends the differential data a to the mobile phone 102.
S207、手机102根据智能耳机104的“APP-1”和差分数据a,还原出补丁3。S207, the mobile phone 102 restores the patch 3 according to the "APP-1" of the smart earphone 104 and the differential data a.
S208、手机102向智能耳机104发送用于更新智能耳机104的“APP-1”补丁3。S208, the mobile phone 102 sends the “APP-1” patch 3 for updating the smart headset 104 to the smart headset 104 .
S209、智能耳机104下载安装补丁3,进行版本更新。S209. The smart earphone 104 downloads and installs the patch 3, and performs a version update.
S210、服务器100接收到来自智能耳机104的“APP-1”更新成功的指令。S210, the server 100 receives an instruction from the smart earphone 104 that the update of "APP-1" is successful.
S211、服务器100更新智能耳机104的“APP-1”版本信息并保存。S211. The server 100 updates and saves the "APP-1" version information of the smart earphone 104.
S212、服务器100将“APP-1”更新成功的指令发送给手机102。S212. The server 100 sends an instruction indicating that the "APP-1" is successfully updated to the mobile phone 102.
S213、手机102上显示智能耳机104的“APP-1”版本由4.0.0成功更新为4.1.0的提示信息。S213, the mobile phone 102 displays a prompt message that the "APP-1" version of the smart earphone 104 has been successfully updated from 4.0.0 to 4.1.0.
服务器100可以针对不同的电子设备生成其所需要的一组或多组不同得到补丁包。云服务器可以通过远场通信将所生成的补丁包下发给手机102,再通过蓝牙连接传输至补丁包目标设备,各个电子设备也可以通过接入路由器的无线网络自行下载相应的补丁包,其生成的补丁包可以用于修复程序的一个或多个漏洞,或者可以用于增加一个或多个产品特性或功和/或功能,本申请对此不作限制。例如,电子设备可以通过安装某个补丁包,增加“语音助手”功能,该功能可以帮助用户不触碰电子设备的情景下发送信息、接打电话,也可以帮助用户在与他人面对面进行不同语言间的交谈时,帮助用户实时将对方的语言翻译为用户所能理解的语言。而电子设备在安装该补丁包前,不具有上述“语音助手”一系列的相关功能。另外,补丁可以有多种类型,比如以
Figure PCTCN2022132193-appb-000001
系统为例,应用程序(application,APP)层、应用框架(application framework)层、内核(kernel)层或硬件驱动(hardware driver)层等都可能存在相应类型的补丁,本申请对此不作限制。
The server 100 can generate one or more sets of different patch packages required by it for different electronic devices. The cloud server can send the generated patch package to the mobile phone 102 through far-field communication, and then transmit it to the target device of the patch package through the Bluetooth connection. Each electronic device can also download the corresponding patch package by itself through the wireless network connected to the router. The generated patch package may be used to repair one or more loopholes of the program, or may be used to add one or more product features or functions and/or functions, which is not limited in this application. For example, an electronic device can add a "voice assistant" function by installing a certain patch package, which can help users send messages and make and receive calls without touching the electronic device, and can also help users communicate with others face to face in different languages. When chatting between people, help users translate each other's language into a language that users can understand in real time. However, the electronic device does not have a series of related functions of the above-mentioned "voice assistant" before the patch package is installed. In addition, patches can be of various types, such as
Figure PCTCN2022132193-appb-000001
Taking the system as an example, corresponding types of patches may exist in the application (APP) layer, application framework (application framework) layer, kernel (kernel) layer, or hardware driver (hardware driver) layer, which is not limited in this application.
在一些实施例中,手机102可以具备较强的计算处理能力及较充足的内部存储空间,手机102可以作为超级终端,接收并处理来自服务器侧的一个或多个补丁包。手机102可以具有蓝牙(bluetooth,BT)模块和/或无线局域网络(wireless local area networks,WLAN)模块。其中,蓝牙模块可以提供包括经典蓝牙(蓝牙2.1)或蓝牙低功耗(bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案,WLAN模块可以提供包括无线保真直连(wireless fidelity direct,Wi-Fi direct)、无线保真局域网(wireless fidelity local area networks,Wi-Fi LAN)或无线保真软件接入点(wireless fidelity software access point,Wi-Fi softAP)中一项或多项WLAN通信的解决方案。手机102可以使用蓝牙或WLAN或其他类型的一种或多种无线通信技术与手机102附近其他电子设备建立无线通信连接,然后可以通过该无线通信连接发送补丁至与其他电子设备上。In some embodiments, the mobile phone 102 may have strong computing and processing capabilities and sufficient internal storage space, and the mobile phone 102 may serve as a hyper terminal to receive and process one or more patch packages from the server side. The mobile phone 102 may have a Bluetooth (bluetooth, BT) module and/or a wireless local area network (wireless local area networks, WLAN) module. Among them, the Bluetooth module can provide one or more Bluetooth communication solutions including classic Bluetooth (Bluetooth 2.1) or Bluetooth low energy (Bluetooth low energy, BLE), and the WLAN module can provide solutions including wireless fidelity direct , Wi-Fi direct), wireless fidelity local area networks (wireless fidelity local area networks, Wi-Fi LAN) or one or more WLANs in wireless fidelity software access point (wireless fidelity software access point, Wi-Fi softAP) Communication solutions. The mobile phone 102 can use Bluetooth or WLAN or other types of one or more wireless communication technologies to establish a wireless communication connection with other electronic devices near the mobile phone 102, and then send patches to other electronic devices through the wireless communication connection.
在一些实施例中,局域网的各个终端设备,如手机102、智能手环103、智能耳机104、智能音箱105、智能电视106、电脑107等可以装有相同的操作系统,如
Figure PCTCN2022132193-appb-000002
系统,在路由器101的连接下,形成一个系统生态。在相同的操作系统下,各种设备上的同一软件的不同版本信息对应的补丁程序的代码差异较小,服务器可以根据最相关的终端设备的版本信息快速生成对应的差分数据。
In some embodiments, each terminal device of the local area network, such as mobile phone 102, smart bracelet 103, smart earphone 104, smart speaker 105, smart TV 106, computer 107, etc., can be equipped with the same operating system, such as
Figure PCTCN2022132193-appb-000002
The system, under the connection of the router 101, forms a system ecology. Under the same operating system, the patch program codes corresponding to different version information of the same software on various devices have small differences, and the server can quickly generate corresponding differential data according to the version information of the most relevant terminal device.
可以理解的是,本实施例示出的补丁系统10并不构成对本申请实施例的具体限定。在本申请另外一些实施例中,补丁系统10还可以包括比图示更多或更少的设备。例如,通信系统10中还可以包括智能台灯、智能冰箱等其它电子设备,本申请对此不作任何限制。It can be understood that the patch system 10 shown in this embodiment does not constitute a specific limitation to this embodiment of this application. In some other embodiments of the present application, the patch system 10 may also include more or less devices than shown in the figure. For example, the communication system 10 may also include other electronic devices such as a smart desk lamp and a smart refrigerator, and this application does not make any limitation thereto.
下面,介绍本申请实施例中提供的示例性电子设备100。Next, an exemplary electronic device 100 provided in the embodiment of the present application is introduced.
图8示出了电子设备100的结构示意图。FIG. 8 shows a schematic structural diagram of the electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142, 天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
其中电子设备100可以是手机102、智能手环103、智能耳机104、智能音箱105、智能电视106、电脑107,也可以是其他电子设备,如桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。Wherein the electronic device 100 can be a mobile phone 102, a smart bracelet 103, a smart earphone 104, a smart speaker 105, a smart TV 106, a computer 107, or other electronic devices, such as a desktop computer, a laptop computer, a handheld computer, a notebook Computers, ultra-mobile personal computers (UMPCs), netbooks, and cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) ) equipment, artificial intelligence (AI) equipment, wearable equipment, vehicle-mounted equipment, smart home equipment and/or smart city equipment, the embodiment of the present application does not specifically limit the specific type of the electronic equipment. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
电子设备可以是搭载iOS、Android、Microsoft或者其它操作系统的便携式终端设备,例如手机、平板电脑、可穿戴设备等,还可以是具有触敏表面或触控面板的膝上型计算机(Laptop)、具有触敏表面或触控面板的台式计算机等非便携式终端设备。The electronic device can be a portable terminal device equipped with iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., or a laptop computer (Laptop) with a touch-sensitive surface or a touch panel, Non-portable terminal devices such as desktop computers with touch-sensitive surfaces or touch panels.
在本申请实施例中,当电子设备100实施为图2中的手机102时,电子设备100可以通过无线通信模块160接收来自服务器100的差分数据C、目标设备信息(即智能耳机104)和最相关设备的相关信息。电子设备100还可以通过无线通信模块160接收来自最相关设备(即手机102和智能手环103)的最相关模块。从而,电子设备100的处理器110可以利用收到的差分数据C和最相关模块进行补丁还原。在还原出补丁3之后,电子设备100可以通过无线通信模块160向智能耳机104下发补丁3,以使智能耳机104利用补丁3进行“APP-1”升级。关于补丁还原的说明,请参考前述图3C所介绍的还原补丁包的方法的内容,这里不再赘述。In the embodiment of the present application, when the electronic device 100 is implemented as the mobile phone 102 in FIG. Information about the associated device. The electronic device 100 can also receive the most relevant modules from the most relevant devices (ie, the mobile phone 102 and the smart bracelet 103 ) through the wireless communication module 160 . Therefore, the processor 110 of the electronic device 100 can use the received differential data C and the most relevant modules to restore the patch. After the patch 3 is restored, the electronic device 100 can issue the patch 3 to the smart earphone 104 through the wireless communication module 160 , so that the smart earphone 104 uses the patch 3 to perform "APP-1" upgrade. For the description of patch restoration, please refer to the content of the method for restoring the patch package introduced in FIG. 3C above, which will not be repeated here.
当电子设备100实施为图2中的最相关设备即智能手环103时,电子设备100可以通过无线通信模块160向手机102传输最相关模块,以使手机102利用智能手环103中的最相关模块进行补丁还原。关于最相关模块的说明,请参考前述图3A所介绍的确定最相关设备方法的内容,这里不再赘述。When the electronic device 100 is implemented as the most relevant device in FIG. The module is patched and restored. For the description of the most relevant module, please refer to the content of the method for determining the most relevant device introduced in FIG. 3A above, which will not be repeated here.
当电子设备100实施为图2中的目标设备即智能耳机104时,电子设备100可以通过无线通信模块160接收来自手机102的补丁3,并利用该补丁3将“APP-1”从4.0.0版本升级到4.1.0版本。When the electronic device 100 is implemented as the target device in FIG. 2, that is, the smart earphone 104, the electronic device 100 can receive the patch 3 from the mobile phone 102 through the wireless communication module 160, and use the patch 3 to update "APP-1" from 4.0.0 The version was upgraded to version 4.1.0.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也 可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units can be independent devices, and can also be integrated in one or more processors.
处理器110中还可以设置存储器,用于存储指令和数据。A memory may also be provided in the processor 110 for storing instructions and data.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。The charging management module 140 is configured to receive a charging input from a charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
显示屏194用于显示图像,视频等。The display screen 194 is used to display images, videos and the like.
摄像头193用于捕获静态图像或视频。Camera 193 is used to capture still images or video.
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备100的存储能力。The external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100 .
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器180B可以用于确定电子设备100的运动姿态。气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器。加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。距离传感器180F,用于测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。触摸传感器180K用于检测作用于其上或附近的触摸操作。骨传导传感器180M可以获取振动信号。按键190包括开机键,音量键等。马达191可以产生振动提示。指示器192可以是指示灯。SIM卡接口195用于连接SIM卡。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, and the ambient light sensor 180L is used to sense ambient light brightness. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect temperature. The touch sensor 180K is used to detect a touch operation on or near it. The bone conduction sensor 180M can acquire vibration signals. The keys 190 include a power key, a volume key and the like. The motor 191 can generate a vibrating reminder. Indicator 192 may be a light. The SIM card interface 195 is used for connecting a SIM card.
图9示例性示出了本申请实施例中涉及的服务器200的结构。如图9所示,服务器200包括但不限于以下部件:一个或多个网络设备处理器201、存储器202、通信接口203、发射器205、接收器206、耦合器207和天线208。FIG. 9 exemplarily shows the structure of the server 200 involved in the embodiment of the present application. As shown in FIG. 9 , the server 200 includes but not limited to the following components: one or more network device processors 201 , memory 202 , communication interface 203 , transmitter 205 , receiver 206 , coupler 207 and antenna 208 .
这些部件可通过总线204或者其他方式连接,图9以通过总线连接为例。其中:These components can be connected through the bus 204 or in other ways, and FIG. 9 takes the connection through the bus as an example. in:
通信接口203可用于服务器200与其他通信设备,例如手机102、智能手环103以及智能耳机104等进行通信。具体的,通信接口203可以是3G通信接口、长期演进(LTE)(4G) 通信接口、5G通信接口、WLAN通信接口、WAN通信接口等等。不限于无线通信接口,网络设备处理器201还可以配置有线的通信接口203来支持有线通信,例如服务器200与其他服务器之间的回程链接可以是有线通信连接。The communication interface 203 can be used for the server 200 to communicate with other communication devices, such as the mobile phone 102 , the smart bracelet 103 and the smart earphone 104 . Specifically, the communication interface 203 may be a 3G communication interface, a long-term evolution (LTE) (4G) communication interface, a 5G communication interface, a WLAN communication interface, a WAN communication interface, and the like. Not limited to the wireless communication interface, the network device processor 201 may also configure the wired communication interface 203 to support wired communication, for example, the backhaul link between the server 200 and other servers may be a wired communication connection.
在本申请的一些实施例中,发射器205和接收器206可看作一个无线调制解调器。发射器205可用于对网络设备处理器201输出的信号进行发射处理。接收器206可用于接收信号。在服务器200中,发射器205和接收器206的数量均可以是一个或者多个。天线208可用于将传输线中的电磁能转换成自由空间中的电磁波,或者将自由空间中的电磁波转换成传输线中的电磁能。耦合器207可用于将移动通信号分成多路,分配给多个的接收器206。可理解的,网络设备的天线208可以实现为大规模天线阵列。In some embodiments of the present application, the transmitter 205 and receiver 206 can be regarded as a wireless modem. The transmitter 205 can be used for transmitting and processing the signal output by the network device processor 201 . Receiver 206 may be used to receive signals. In the server 200, the number of transmitters 205 and receivers 206 can be one or more. Antenna 208 may be used to convert electromagnetic energy in a transmission line to electromagnetic waves in free space, or to convert electromagnetic waves in free space to electromagnetic energy in a transmission line. The coupler 207 can be used to split the mobile communication signal into multiple paths and distribute them to multiple receivers 206 . Understandably, the antenna 208 of the network device may be implemented as a large-scale antenna array.
存储器202与网络设备处理器201耦合,用于存储各种软件程序和/或多组指令。具体的,存储器202可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。The memory 202 is coupled with the network device processor 201 and is used for storing various software programs and/or sets of instructions. Specifically, the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices or other non-volatile solid-state storage devices.
服务器200可以为图2所示补丁系统中的服务器100,还可以是图5所示补丁系统中的服务器100。The server 200 may be the server 100 in the patch system shown in FIG. 2 , or the server 100 in the patch system shown in FIG. 5 .
当服务器200实施为图2中的服务器100时,服务器200中的存储器202中储存有与其连接所有终端电子设备的“APP-1”的版本信息及软件代码,服务器200中的网络设备处理器201生成能够升级目标设备即智能耳机104上的“APP-1”的补丁3,网络设备处理器201可以利用补丁3和存储器202中的存储的最相关设备(即手机102和智能手环103)的最相关模块进行差分,生成差分数据C,再通过发射器205将差分数据C发送给手机102,同时服务器200通过通信接口203将目标设备信息(即智能耳机104)和最相关设备的相关信息发送给手机102。When the server 200 is implemented as the server 100 in FIG. 2, the memory 202 in the server 200 stores version information and software codes of "APP-1" connected to all terminal electronic devices, and the network device processor 201 in the server 200 Generate the patch 3 that can upgrade the "APP-1" on the target device, that is, the smart earphone 104, and the network device processor 201 can utilize the patch 3 and the most relevant device stored in the memory 202 (that is, the mobile phone 102 and the smart bracelet 103). The most relevant module makes a difference, generates differential data C, and then sends the differential data C to the mobile phone 102 through the transmitter 205, and at the same time, the server 200 sends the target device information (that is, the smart earphone 104) and the relevant information of the most relevant device through the communication interface 203 Give the phone 102.
当服务器200实施为图5中的服务器100时,服务器200中的存储器202中储存有与其连接目标设备即智能耳机104的“APP-1”的版本信息及软件代码,服务器200中的网络设备处理器201生成能够升级智能耳机104上的“APP-1”的补丁3,网络设备处理器201可以利用补丁3和存储器202中的存储的智能耳机104上的“APP-1”的软件模块进行差分,生成最小差分数据a,再通过发射器205将差分数据a发送给手机102,同时服务器200通过通信接口203将智能耳机104上的“APP-1”进行过差分的软件模块的相关信息发送给手机102。When the server 200 is implemented as the server 100 in FIG. 5 , the memory 202 in the server 200 stores the version information and software code of the “APP-1” of the connected target device, that is, the smart earphone 104, and the network device in the server 200 processes the The processor 201 generates a patch 3 capable of upgrading the "APP-1" on the smart earphone 104, and the network device processor 201 can use the software module of "APP-1" on the smart earphone 104 stored in the memory 202 to make a difference between the patch 3 , generate the minimum difference data a, and then send the difference data a to the mobile phone 102 through the transmitter 205, and at the same time, the server 200 sends the relevant information of the software module of the "APP-1" on the smart earphone 104 to which the difference has been made through the communication interface 203 to Mobile 102.
需要说明的,图9所示的服务器200仅仅是本申请实施例的一种实现方式,实际应用中,服务器200还可以包括更多或更少的部件,这里不作限制。It should be noted that the server 200 shown in FIG. 9 is only an implementation manner of the embodiment of the present application. In practical applications, the server 200 may include more or fewer components, which is not limited here.
下面,基于前述的补丁系统及电子设备100,详细说明本申请提供的打补丁的方法。Next, based on the foregoing patch system and electronic device 100 , the patching method provided by the present application will be described in detail.
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface, GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The term "user interface (UI)" in the following embodiments of this application is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the difference between the internal form of information and the form acceptable to the user. conversion between. The user interface is the source code written in a specific computer language such as java and extensible markup language (XML). The source code of the interface is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, and other visible interface elements displayed on the display screen of the electronic device.
下面介绍手机102上的用于应用程序菜单的示例性用户界面。An exemplary user interface for the application menu on the handset 102 is described below.
图10示出了一种示例性用户界面1001。FIG. 10 shows an exemplary user interface 1001 .
用户界面1001可以包括:状态栏1002、日历指示符1003、其他应用程序图标1004、页面指示符1005以及具有常用应用程序图标的托盘1006。The user interface 1001 may include: a status bar 1002, a calendar indicator 1003, other application icons 1004, a page indicator 1005, and a tray 1006 with frequently used application icons.
状态栏1002可以包括:移动通信信号(又可以称为蜂窝信号)的一个或多个信号强度指示符、无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符、电池状态指示符等。The status bar 1002 may include: one or more signal strength indicators for a mobile communication signal (also may be referred to as a cellular signal), one or more signal strength indicators for a wireless fidelity (Wi-Fi) signal, a battery status indicators, etc.
日历指示符1003可以用于指示当前时间,例如日期、星期几、时分信息等。The calendar indicator 1003 can be used to indicate the current time, such as date, day of the week, time and division information, and the like.
其他应用程序图标1004可以例如:阅读图标、照片图标、时钟图标、主题图标等。Other application program icons 1004 may be, for example: reading icons, photo icons, clock icons, theme icons and the like.
页面指示符1005可以用于指示用户当前浏览的哪一个页面中的应用程序。用户可以左右滑动其他应用程序图标的区域,来浏览其他页面中的应用程序图标。The page indicator 1005 may be used to indicate the application in which page the user is currently browsing. The user can slide the area of other application icons left and right to browse the application icons in other pages.
具有常用应用程序图标的托盘1006可以展示:电话图标、设置图标、通讯录图标、信息图标等。The tray 1006 with commonly used application program icons can display: phone icon, setting icon, address book icon, information icon and so on.
在一些实施例中,图10示例性所示的用户界面1001可以为主界面(home screen)。In some embodiments, the user interface 1001 exemplarily shown in FIG. 10 may be a main interface (home screen).
在其他一些实施例中,电子设备还可以包括主屏幕键。该主屏幕键可以是实体按键,也可以是虚拟按键。该主屏幕按键可以用于接收用户的指令,将当前显示的UI返回到主界面,这样可以方便用户随时查看主屏幕。上述指令具体可以是用户单次按下主屏幕键的操作指令,也可以是用户在短时间内连续两次按下主屏幕键的操作指令,还可以是用户在预定时间内长按主屏幕键的操作指令。在本申请其他一些实施例中,主屏幕键还可以集成指纹识别器,以便用户在按下主屏幕键的时候,随之进行指纹采集和识别。In some other embodiments, the electronic device may further include a home screen key. The home screen key may be a physical key or a virtual key. The home screen button can be used to receive an instruction from the user, and return the currently displayed UI to the main interface, so that the user can view the home screen at any time. The above instruction can specifically be an operation instruction in which the user presses the home screen button once, or an operation instruction in which the user presses the home screen button twice in a short period of time, or an operation instruction in which the user presses the home screen button for a long time within a predetermined period of time. operating instructions. In some other embodiments of the present application, the home screen key can also be integrated with a fingerprint reader, so that when the user presses the home screen key, the fingerprint can be collected and identified accordingly.
可以理解的是,图10仅仅示例性示出了手机102上的用户界面,不应构成对本申请实施例的限定。It can be understood that FIG. 10 only exemplarily shows the user interface on the mobile phone 102, and should not be construed as limiting the embodiment of the present application.
下面分别描述本申请涉及的应用场景以及手机102上实现的用户界面的一些实施例。The application scenarios involved in this application and some embodiments of the user interface implemented on the mobile phone 102 are respectively described below.
图10示出了当服务器100检测到智能耳机104需要更新版本时,手机102示例性示出的用户界面。FIG. 10 shows an exemplary user interface shown by the mobile phone 102 when the server 100 detects that the smart earphone 104 needs an updated version.
如图10所示,当服务器100需要将补丁3下发给智能耳机104进行版本更新时,在与智能耳机104同一局域网的手机102可以在用户界面1001中显示出提示框1007,该提示框1007可以用于提示用户是否允许服务器100进行补丁差分操作下发差分数据至手机102。例如,该提示框1007显示的提示信息可以是文本“发现智能耳机“APP-1”有新版本,是否进行更新?”。不限于文本信息,该提示信息还可以是手机102输出的语音或其他类型的提示信息等,本申请对此不作限制。该提示框1007还可以显示相应的控件,以便用户选择是否对智能耳机104的“APP-1”进行更新操作。响应于用户在控件上的触摸操作(例如点击),手机102可以执行该控件对应的允许智能耳机104的“APP-1”进行更新的选项或者允许智能耳机104的“APP-1”进行更新的选项。例如,该提示框1007可以显示“是”控件和“否”控件,检测到用户作用在“是”控件上的触摸操作(例如点击),手机102可以执行在联网状态下始终允许智能耳机104通过手机102获取补丁包进行更新。As shown in FIG. 10, when the server 100 needs to send Patch 3 to the smart earphone 104 for version update, the mobile phone 102 on the same local area network as the smart earphone 104 can display a prompt box 1007 in the user interface 1001. The prompt box 1007 It can be used to prompt the user whether to allow the server 100 to perform the patch difference operation and send the difference data to the mobile phone 102 . For example, the prompt information displayed in the prompt box 1007 may be the text "It is found that the smart earphone "APP-1" has a new version, do you want to update it?". Not limited to text information, the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application. The prompt box 1007 can also display corresponding controls, so that the user can choose whether to update the “APP-1” of the smart earphone 104 . In response to the user's touch operation (such as clicking) on the control, the mobile phone 102 can execute the option corresponding to the control to allow "APP-1" of the smart earphone 104 to update or allow the "APP-1" of the smart earphone 104 to update. options. For example, the prompt box 1007 may display a "Yes" control and a "No" control, and upon detection of a user's touch operation (for example, a click) on the "Yes" control, the mobile phone 102 may always allow the smart earphone 104 to pass through in the networked state. The mobile phone 102 obtains the patch package for updating.
图11A、图11B、图11C、图11D示出了与实施本申请技术方案后所展现出的技术效果相关的用户界面。Fig. 11A, Fig. 11B, Fig. 11C, and Fig. 11D show the user interface related to the technical effect exhibited after implementing the technical solution of the present application.
手机102的用户界面1101可以为用户在手机102进行图10所示操作中点击“是”控件后,云侧服务器生成智能耳机104的“APP-1”补丁时所显示。用户界面1101可以包括标题栏1102、程序版本更新主界面1103等。The user interface 1101 of the mobile phone 102 may be displayed when the cloud side server generates the patch "APP-1" of the smart earphone 104 after the user clicks the "Yes" control in the operation shown in FIG. The user interface 1101 may include a title bar 1102, a program version update main interface 1103, and the like.
标题栏1102可以包括当前页面指示符,和返回导航控件。当前页面指示符可用于指示当前页面,例如文本信息“智能耳机”可用于指示当前页面用于展示系统更新相关信息。不限于文本信息,当前页面指示符还可以是图标。返回导航控件可用于监听通过该控件的操作(如触摸操作)。响应于该操作,电子设备可由当前界面返回到上一级界面。 Title bar 1102 may include a current page indicator, and a back navigation control. The current page indicator can be used to indicate the current page, for example, the text message "smart earphones" can be used to indicate that the current page is used to display information related to system updates. Not limited to text information, the current page indicator can also be an icon. The back navigation control can be used to listen to operations (such as touch operations) through the control. In response to this operation, the electronic device can return from the current interface to the upper-level interface.
程序版本更新主界面1103可以展示一个或多个版本更新相关信息条目,该一个或多个版本更新相关信息条目可以包括:电子设备发现“APP-1”的新补丁提示条目、下载大小信息条目、更新时间信息条目、更新日志信息条目等。The program version update main interface 1103 may display one or more version update related information items, and the one or more version update related information items may include: the electronic device discovers a new patch prompt item of "APP-1", download size information item, Update time information entry, update log information entry, etc.
在程序版本更新主界面1103的每个版本更新相关信息的条目上,对应有相应的标题和文字说明。例如,电子设备发现新补丁提示条目对应的标题为“发现“APP-1”的新补丁”,补丁包大小信息条目对应的标题为“下载大小”,文字说明为发现的新版本号“约50K”,更新时间信息条目对应的标题为“更新时间”,文字说明为“2021年10月15日”,更新日志信息条目对应的标题为“更新日志”,文字说明为“本次更新将“APP-1”的4.0.0版本升级为4.1.0版本”等。Each item of version update related information on the program version update main interface 1103 corresponds to a corresponding title and text description. For example, the title corresponding to the electronic device discovery new patch prompt entry is "Discover a new patch for "APP-1"", the corresponding title of the patch package size information entry is "Download Size", and the text description is the new version number found "approximately 50K ", the title corresponding to the update time information entry is "Update Time", the text description is "October 15, 2021", the title corresponding to the update log information entry is "Update Log", and the text description is "This update will "APP -1 "version 4.0.0 was upgraded to version 4.1.0", etc.
程序版本更新主界面1103也可以包括“更新”操作控件1104、“取消”操作控件1105,可用于监听通过该控件的操作(如触摸操作)。响应于作用于“更新”或“取消”的操作,电子设备将进行更新补丁,或,取消更新补丁。The program version update main interface 1103 may also include an "update" operation control 1104 and a "cancel" operation control 1105, which can be used to monitor operations (such as touch operations) through the controls. In response to the operation of "update" or "cancel", the electronic device will perform the update patch, or cancel the update patch.
在其他一些实施例中,程序版本更新页面可以展示其他程序版本更新的相关信息,包括但不限于例如第三方应用程序。版本更新页面可以增加版本更新相关信息条目,也可以减少版本更新相关信息条目,本申请对此不作限制。In some other embodiments, the program version update page may display information related to other program version updates, including but not limited to, for example, third-party applications. The version update page can add information items related to version update, or reduce the number of information items related to version update, which is not limited in this application.
图11B中示例性示出的手机102的用户界面1107,可以是在接收下载云侧服务器下发的补丁时,手机102上所显示的用户界面,该用户界面1107可以用于提示用户从云侧服务器下载补丁的进度。例如,可以显示出图标1106,该图标1106提示用户补丁正在下载,下载的进度为25%。该用户界面1107还可以显示出文本信息“正在下载数据(50K)”,以提示用户补丁正在下载。不限于文本信息,该提示信息还可以是手机102输出的语音或其他类型的提示信息等,本申请对此不作限制。该用户界面1107还可以显示取消控件1108,用于监听作用于该控件上的触摸操作(例如点击)。响应于该“取消”操作,手机102可以进行取消从云侧服务器下载补丁的操作。The user interface 1107 of the mobile phone 102 exemplarily shown in FIG. 11B may be the user interface displayed on the mobile phone 102 when receiving and downloading the patch issued by the cloud side server. The progress of the server downloading the patch. For example, an icon 1106 may be displayed, which prompts the user that the patch is being downloaded, and the download progress is 25%. The user interface 1107 may also display text information "downloading data (50K)" to prompt the user that the patch is being downloaded. Not limited to text information, the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application. The user interface 1107 may also display a cancel control 1108 for monitoring a touch operation (such as a click) on the control. In response to the "cancel" operation, the mobile phone 102 can cancel the operation of downloading the patch from the cloud server.
图11C中示例性示出的手机102的用户界面1110,可以是智能耳机104在接收手机102下发的补丁时,手机102上所显示的用户界面,该用户界面1110可以用于提示智能耳机104从手机102下载补丁的进度。例如,可以显示出图标1109,该图标1109提示用户补丁正在下载,下载的进度为25%。该用户界面1110还可以显示出文本信息“智能耳机正在下载安装补丁(800K)”,以提示用户补丁正在下载。不限于文本信息,该提示信息还可以是手机102输出的语音或其他类型的提示信息等,本申请对此不作限制。该用户界面1110还可以显示取消控件1111,用于监听作用于该控件上的触摸操作(例如点击)。响应于该“取消”操作, 手机102可以进行取消智能耳机104从手机102下载安装补丁的操作。The user interface 1110 of the mobile phone 102 exemplarily shown in FIG. 11C may be the user interface displayed on the mobile phone 102 when the smart earphone 104 receives the patch issued by the mobile phone 102, and the user interface 1110 may be used to prompt the smart earphone 104 The progress of downloading the patch from the mobile phone 102 . For example, an icon 1109 may be displayed, which prompts the user that the patch is being downloaded, and the download progress is 25%. The user interface 1110 may also display text information "the smart earphone is downloading and installing the patch (800K)" to prompt the user that the patch is being downloaded. Not limited to text information, the prompt information may also be a voice output by the mobile phone 102 or other types of prompt information, which is not limited in this application. The user interface 1110 can also display a cancel control 1111 for listening to touch operations (such as clicks) on the control. In response to the “cancel” operation, the mobile phone 102 may cancel the operation of the smart earphone 104 from downloading and installing the patch from the mobile phone 102 .
图11D示例性示出了手机102的用户界面1112,该用户界面可以提示用户,智能耳机104中“APP-1”的版本已升级成功。例如,用户界面1112可以显示出文字提示信息“下载安装完成”,并显示出智能耳机104中“APP-1”的版本号信息““APP-1”已升级为版本4.1.0”。不限于文本信息,该提示信息还可以是电子设备输出的语音或其他类型的提示信息等,本申请对此不作限制。FIG. 11D exemplarily shows the user interface 1112 of the mobile phone 102. The user interface can prompt the user that the version of "APP-1" in the smart earphone 104 has been successfully upgraded. For example, the user interface 1112 may display text prompt information "download and installation complete", and display the version number information of "APP-1" in the smart earphone 104 ""APP-1" has been upgraded to version 4.1.0". Not limited to text information, the prompt information may also be a voice output by an electronic device or other types of prompt information, which is not limited in this application.
在图11A、图11B、图11C、图11D所示的实施例中,仅有手机102从云服务器下载了针对于智能耳机104的“APP-1”的差分数据,手机102可以在手机侧根据差分数据和不同电子设备的“APP-1”的内置应用包,还原形成用于将智能耳机104的“APP-1”从版本4.0.0升级为4.1.0的补丁包,手机102再将补丁包发送给智能耳机104。关于在1+8+N鸿蒙应用软件场景下服务器100和手机102对智能耳机104的补丁包进行处理的具体方法可参考方法实施例一,关于在单一设备场景下服务器100和手机102对智能耳机104的补丁包进行处理的具体方法可参考方法实施例二,在这里不再赘述。In the embodiments shown in Fig. 11A, Fig. 11B, Fig. 11C, and Fig. 11D, only the mobile phone 102 has downloaded the differential data for "APP-1" of the smart earphone 104 from the cloud server, and the mobile phone 102 can use the The differential data and the built-in application packages of "APP-1" of different electronic devices are restored to form a patch package for upgrading the "APP-1" of the smart earphone 104 from version 4.0.0 to 4.1.0, and the mobile phone 102 applies the patch The packet is sent to the smart earphone 104. For the specific method for the server 100 and the mobile phone 102 to process the patch package of the smart earphone 104 in the 1+8+N Hongmeng application software scenario, please refer to the method embodiment 1, about the pairing of the smart earphone by the server 100 and the mobile phone 102 in the single device scenario For the specific method of processing the patch package in 104, reference may be made to Method Embodiment 2, which will not be repeated here.
与手机102位于同一个局域网中的智能手环103和智能耳机104不需要再从云服务器下载针对于目标设备的补丁,因此在图11A中手机102在下载差分数据,智能手环103和智能耳机104并没有从服务器100下载补丁。但是在手机102完成下载差分数据后,手机会针对的同一个局域网中不同的目标设备会还原生成补丁包。实施本实施例,可以避免下载服务器下发的大数据补丁,节省了带宽,提高了下发补丁效率。The smart bracelet 103 and the smart earphone 104 located in the same local area network as the mobile phone 102 do not need to download the patch for the target device from the cloud server, so in FIG. 104 did not download the patch from the server 100. However, after the mobile phone 102 finishes downloading the differential data, the mobile phone will restore and generate patch packages for different target devices in the same local area network. By implementing this embodiment, it is possible to avoid downloading the large data patch delivered by the server, save bandwidth, and improve the efficiency of patch delivery.
可以理解的是,图10、图11A、图11B、图11C、图11D仅为一些用户界面的示例,不对本申请其他实施例构成任何限制。It can be understood that, FIG. 10 , FIG. 11A , FIG. 11B , FIG. 11C , and FIG. 11D are only examples of some user interfaces, and do not constitute any limitation to other embodiments of the present application.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, depending on the context, the term "when" may be interpreted to mean "if" or "after" or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "in determining" or "if detected (a stated condition or event)" may be interpreted to mean "if determining..." or "in response to determining..." or "on detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)".
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in the text is only a description of associated objects The association relationship indicates that there may be three kinds of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiment of the present application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
下面,介绍一些与本申请相关的术语及概念。Below, some terms and concepts related to this application are introduced.
补丁(patch)可以是指针对于大型软件系统或应用程序在使用过程中暴露的问题而发布的解决问题的小程序。补丁可用于修复一个或多个软件漏洞,例如,补丁可以修复包括但不 限于应用程序、应用框架、内核、硬件驱动等一项或多项漏洞。补丁也可以用于增加新的产品特性或功能。A patch (patch) may refer to a small program released to solve problems exposed during the use of large-scale software systems or applications. A patch can be used to fix one or more software vulnerabilities. For example, a patch can fix one or more vulnerabilities including but not limited to applications, application frameworks, kernels, and hardware drivers. Patches can also be used to add new product features or functionality.
1+8+N设备场景架构可以是一种物联网的商业生态,其中1代表用户(手机),8代表8种设备(车机、音箱、耳机、手表/手环、平板、大屏、PC、AR/VR),而N则代表接入鸿蒙OS的智能硬件和APP等,各种设备之间通过超级终端(手机)相互连接互相通信。The 1+8+N device scene architecture can be a business ecosystem of the Internet of Things, where 1 represents users (mobile phones), and 8 represents 8 types of devices (cars, speakers, earphones, watches/bracelets, tablets, large screens, PCs, etc.) , AR/VR), and N represents the smart hardware and APPs connected to Hongmeng OS, and various devices are connected to each other through the super terminal (mobile phone).
鸿蒙OS超级终端作为多设备控制中心能让多设备一拉即连,其功能可以让用户将附近的华为手机,电池,平板,音箱,电脑,摄像头等所有搭载鸿蒙os系统的智能设备自动连接起来,实现多设备协同管理、资源共享,形成相互协作的工作场景。超级终端具体操作如下:先在手机上开启蓝牙、WLAN并登录用户的账号,将其他具有蓝牙、WLAN功能的设备,开启蓝牙、WLAN,与手机登录同一账号即可。As a multi-device control center, Hongmeng OS super terminal can connect multiple devices at once. Its function allows users to automatically connect nearby Huawei mobile phones, batteries, tablets, speakers, computers, cameras and other smart devices equipped with Hongmeng OS system. , realize multi-device collaborative management, resource sharing, and form a collaborative work scene. The specific operation of the HyperTerminal is as follows: first turn on Bluetooth and WLAN on the mobile phone and log in the user account, then turn on Bluetooth and WLAN on other devices with Bluetooth and WLAN functions, and log in to the same account as the mobile phone.
补丁生成与生效的相关设备,主要涉及到服务器和终端设备。服务器可包括补丁拍包工具、补丁包归档、补丁包发布等。其中,补丁拍包工具为服务器后台运行的脚本,把补丁文件打包到一个压缩文件中,这个压缩文件内部各个文件的整体布局为补丁包特有。补丁包归档用于在补丁拍包工具生成补丁包之后将补丁包放置到指定的归档地址,用于后续服务器获取补丁包。补丁包发布用于服务器将补丁文件下发给终端设备。终端设备可以包括补丁包下载、补丁引擎、补丁包升级及补丁分区等。其中,补丁包下载用于接收服务器下发的补丁包。补丁包升级指用户在手机上搜索到补丁包,并确认统一下载补丁包后,补丁引擎进行下载、校验、安装补丁包的操作。补丁引擎封装了各种类型的业务逻辑,包括补丁文件的校验,能使补丁生效、撤销异常补丁等功能。补丁分区为终端设备硬盘上的一块空间地址,补丁包中二进制补丁镜像可以被烧录到该分区中。Related devices for patch generation and effectiveness mainly involve servers and terminal devices. The server may include a patch shooting tool, a patch archive, a patch release, and the like. Among them, the patch shooting tool is a script running in the background of the server, which packs the patch files into a compressed file, and the overall layout of each file in the compressed file is unique to the patch package. The patch package archive is used to place the patch package to the specified archive address after the patch package tool generates the patch package, so that the subsequent server can obtain the patch package. The release of the patch package is used for the server to deliver the patch file to the terminal device. Terminal devices may include downloading of patch packages, patch engines, patch package upgrades, patch partitions, and the like. Wherein, the patch package download is used to receive the patch package delivered by the server. Patch package upgrade refers to the operation that the patch engine downloads, verifies, and installs the patch package after the user searches for the patch package on the mobile phone and confirms that the patch package is downloaded uniformly. The patch engine encapsulates various types of business logic, including the verification of patch files, enabling patches to take effect, and revoking abnormal patches. The patch partition is a space address on the hard disk of the terminal device, and the binary patch image in the patch package can be burned into this partition.
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。Various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In a word, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. All modifications, equivalent replacements, improvements, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims (23)

  1. 一种补丁方法,其特征在于,应用于第一补丁系统中的服务器,所述第一补丁系统包括:服务器、多个电子设备,所述电子设备上安装有第一应用程序;所述方法包括:A patch method, characterized in that it is applied to a server in a first patch system, and the first patch system includes: a server, a plurality of electronic devices, and a first application program is installed on the electronic devices; the method includes :
    所述服务器根据第三电子设备上的第一应用程序和第一补丁包进行差分生成第一差分数据;所述第一补丁包用于升级第一电子设备上的第一应用程序;第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;所述多个电子设备包括所述第一电子设备、所述第三电子设备;The server generates first differential data according to the difference between the first application program and the first patch package on the third electronic device; the first patch package is used to upgrade the first application program on the first electronic device; the third electronic device The device is an electronic device in which the first application program installed overlaps with the first patch package among the plurality of electronic devices; the plurality of electronic devices include the first electronic device and the third electronic device;
    所述服务器向第二电子设备发送所述第一差分数据;所述多个电子设备还包括所述第二电子设备;所述第二电子设备用于根据第一差分数据和第三电子设备上的第一应用程序中的第一软件模块,还原出第一补丁包;所述第一软件模块与所述第一补丁包有重合;所述第二电子设备用于向所述第一电子设备发送所述第一补丁包。The server sends the first differential data to the second electronic device; the multiple electronic devices further include the second electronic device; the second electronic device is configured to The first software module in the first application program restores the first patch package; the first software module overlaps with the first patch package; the second electronic device is used to provide the first patch package to the first electronic device Send the first patch package.
  2. 根据权利要求1所述的方法,其特征在于,所述有重合具体包括:The method according to claim 1, wherein the overlapping specifically includes:
    所述第一应用程序的代码和所述第一补丁包的代码具有相同的方法、变量。The code of the first application program and the code of the first patch package have the same methods and variables.
  3. 根据权利要求1-2中任一项所述的方法,其特征在于,所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。The method according to any one of claims 1-2, wherein the third electronic device is the degree of coincidence between the installed first application program and the first patch package among the plurality of electronic devices Electronic devices with the highest or coincidence degree higher than the first threshold.
  4. 根据权利要求3所述的方法,其特征在于,所述第三电子设备上安装的第一应用程序与所述第一补丁包的重合度=(相同方法的个数+相同变量的个数)/(总的方法个数+总的变量个数),The method according to claim 3, wherein the degree of coincidence between the first application program installed on the third electronic device and the first patch package=(the number of the same method+the number of the same variable) /(total number of methods + total number of variables),
    其中,所述相同方法为所述第三电子设备上安装的第一应用程序与所述第一补丁包中都有的方法,所述相同变量为所述第三电子设备上安装的第一应用程序与所述第一补丁包中都有的变量,所述总的方法个数为所述第三电子设备上安装的第一应用程序和所述第一补丁包中所有的方法之和与所述相同方法的个数的差值,所述总的变量个数为所述第三电子设备上安装的第一应用程序和所述第一补丁包中所有的变量之和与所述相同变量的个数的差值。Wherein, the same method is a method in both the first application program installed on the third electronic device and the first patch package, and the same variable is the first application program installed on the third electronic device The variables in both the program and the first patch pack, the total number of methods is the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and all the methods in the first patch pack The difference between the number of the same method, the total number of variables is the sum of all variables in the first application program installed on the third electronic device and the first patch package and the number of the same variables difference in number.
  5. 根据权利要求所4述的方法,其特征在于,若所述第三电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,同于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,则所述第三电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,高于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,The method according to claim 4, wherein if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of other electronic devices among the plurality of electronic devices, The first application program installed on an electronic device and the platform-level coincidence degree of the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package, Higher than the application-level coincidence degree of the first application program installed on another electronic device among the plurality of electronic devices and the first patch package,
    其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  6. 根据权利要求4所述的方法,其特征在于,若所述第三电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,同于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,则:所述第三电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,高于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,The method according to claim 4, wherein if the first application installed on the third electronic device overlaps with the application level of the first patch package, it is the same as that of other electronic devices among the plurality of electronic devices. The application-level coincidence degree of the first application program installed on an electronic device and the first patch package is: the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package , higher than the platform-level overlap between the first application program installed on another electronic device among the plurality of electronic devices and the first patch package,
    其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述第三电子设备上安装的第一应用程序中的一个或多个软件模块与所述第一补丁包中的所述软件模块有重合。The method according to any one of claims 1-6, wherein one or more software modules in the first application program installed on the third electronic device are compatible with all software modules in the first patch package. The above software modules overlap.
  8. 根据权利要求1所述的方法,其特征在于,所述有重合的具体包括:所述第三电子设备上安装的第一应用程序和所述第一补丁包具有相同的二进制代码。The method according to claim 1, wherein the overlapping specifically includes: the first application program installed on the third electronic device and the first patch package have the same binary code.
  9. 一种补丁方法,其特征在于,应用于第一补丁系统中的第一电子设备,所述第一补丁系统包括:服务器、多个电子设备,所述电子设备上安装有第一应用程序,所述多个电子设备包括所述第一电子设备;所述方法包括:A patch method, characterized in that it is applied to a first electronic device in a first patch system, the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the electronic device, the The plurality of electronic devices includes the first electronic device; the method includes:
    所述第一电子设备接收第二设备发送的第一补丁包;所述多个电子设备还包括所述第二电子设备,所述第一补丁包是所述第二电子设备利用第一差分数据和第三电子设备上的第一应用程序中的第一软件模块还原出的,所述多个电子设备还包括所述第三电子设备,所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;所述第一差分数据是所述服务器将第三电子设备上的第一应用程序和第一补丁包进行差分生成的,并被发送给所述第二电子设备;The first electronic device receives the first patch package sent by the second device; the plurality of electronic devices also include the second electronic device, and the first patch package is the second electronic device using the first differential data and the first software module in the first application program on the third electronic device, the plurality of electronic devices also include the third electronic device, and the third electronic device is one of the plurality of electronic devices , the installed first application program overlaps with the first patch package on the electronic device; the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device , and sent to the second electronic device;
    所述第一电子设备利用所述第一补丁包升级其上安装的第一应用程序。The first electronic device uses the first patch package to upgrade the first application program installed thereon.
  10. 一种补丁方法,其特征在于,应用于第一补丁系统中的第二电子设备,所述第一补丁系统包括:服务器、多个电子设备,所述电子设备上安装有第一应用程序,所述多个电子设备包括所述第二电子设备;所述方法包括:A patch method, characterized in that it is applied to a second electronic device in a first patch system, the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the electronic device, the The plurality of electronic devices includes the second electronic device; the method includes:
    第二电子设备接收所述服务器发送的第一差分数据;所述第一差分数据是所述服务器将第三电子设备上的第一应用程序和第一补丁包进行差分生成的;所述第一补丁包用于升级第一电子设备上的第一应用程序;所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;所述多个电子设备还包括所述第一电子设备、第三电子设备;The second electronic device receives the first differential data sent by the server; the first differential data is generated by the server through the difference between the first application program and the first patch package on the third electronic device; the first The patch package is used to upgrade the first application program on the first electronic device; the third electronic device is an electronic device in which the installed first application program overlaps with the first patch package among the plurality of electronic devices; The multiple electronic devices also include the first electronic device and a third electronic device;
    所述第二电子设备根据所述第一差分数据和所述第三电子设备上的第一应用程序中的第一软件模块,还原出所述第一补丁包;所述第一软件模块与所述第一补丁包有重合;The second electronic device restores the first patch package according to the first differential data and the first software module in the first application program on the third electronic device; the first software module and the first software module The above-mentioned first patch package overlaps;
    所述第二电子设备向所述第一电子设备发送所述第一补丁包。The second electronic device sends the first patch package to the first electronic device.
  11. 根据权利要求10所述的方法,其特征在于,所述有重合具体包括:The method according to claim 10, wherein the overlapping specifically comprises:
    所述第一应用程序的代码和所述第一补丁包的代码具有相同的方法、变量。The code of the first application program and the code of the first patch package have the same methods and variables.
  12. 根据权利要求10-11中任一项所述的方法,其特征在于,所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。The method according to any one of claims 10-11, wherein the third electronic device is the degree of coincidence between the installed first application program and the first patch package among the plurality of electronic devices Electronic devices with the highest or coincidence degree higher than the first threshold.
  13. 根据权利要求12所述的方法,其特征在于,所述第三电子设备上安装的第一应用程序与所述第一补丁包的重合度=(相同方法的个数+相同变量的个数)/(总的方法个数+总的 变量个数),The method according to claim 12, wherein the coincidence degree of the first application program installed on the third electronic device and the first patch package=(the number of the same method+the number of the same variable) /(total number of methods + total number of variables),
    其中,所述相同方法为所述第三电子设备上安装的第一应用程序与所述第一补丁包中都有的方法,所述相同变量为所述第三电子设备上安装的第一应用程序与所述第一补丁包中都有的变量,所述总的方法个数为所述第三电子设备上安装的第一应用程序和所述第一补丁包中所有的方法之和与所述相同方法的个数的差值,所述总的变量个数为所述第三电子设备上安装的第一应用程序和所述第一补丁包中所有的变量之和与所述相同变量的个数的差值。Wherein, the same method is a method in both the first application program installed on the third electronic device and the first patch package, and the same variable is the first application program installed on the third electronic device The variables in both the program and the first patch pack, the total number of methods is the sum of the first application program installed on the third electronic device and all the methods in the first patch pack and all the methods in the first patch pack The difference between the number of the same method, the total number of variables is the sum of all variables in the first application program installed on the third electronic device and the first patch package and the number of the same variables difference in number.
  14. 根据权利要求13所述的方法,其特征在于,若所述第三电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,同于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,则所述第三电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,高于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,The method according to claim 13, wherein if the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package is the same as that of other electronic devices among the plurality of electronic devices, The first application program installed on an electronic device and the platform-level coincidence degree of the first patch package, the application-level coincidence degree of the first application program installed on the third electronic device and the first patch package, Higher than the application-level coincidence degree of the first application program installed on another electronic device among the plurality of electronic devices and the first patch package,
    其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  15. 根据权利要求13所述的方法,其特征在于,若所述第三电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,同于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的应用级重合度,则:所述第三电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,高于所述多个电子设备中另一电子设备上安装的第一应用程序与所述第一补丁包的平台级重合度,The method according to claim 13, wherein if the first application program installed on the third electronic device overlaps with the application level of the first patch package, it is the same as that of the other electronic devices among the multiple electronic devices The application-level coincidence degree of the first application program installed on an electronic device and the first patch package is: the platform-level coincidence degree of the first application program installed on the third electronic device and the first patch package , higher than the platform-level overlap between the first application program installed on another electronic device among the plurality of electronic devices and the first patch package,
    其中,平台级重合度=(相同平台级方法的个数+相同平台级变量的个数)/(总的方法个数+总的变量个数),应用级重合度=(相同应用级方法的个数+相同应用级变量的个数)/(总的方法个数+总的变量个数)。Wherein, platform-level coincidence degree=(number of same platform-level methods+number of same platform-level variables)/(total method number+total variable number), application-level coincidence degree=(same application-level method number + number of the same application-level variables)/(total number of methods + total number of variables).
  16. 根据权利要求10-15中任一项所述的方法,其特征在于,所述第三电子设备上安装的第一应用程序中的一个或多个软件模块与所述第一补丁包中的所述软件模块有重合。The method according to any one of claims 10-15, wherein one or more software modules in the first application program installed on the third electronic device are compatible with all the software modules in the first patch package. The above software modules overlap.
  17. 根据权利要求10所述的方法,其特征在于,所述有重合的具体包括:所述第三电子设备上安装的第一应用程序和所述第一补丁包具有相同的二进制代码。The method according to claim 10, wherein the overlapping specifically includes: the first application program installed on the third electronic device and the first patch package have the same binary code.
  18. 一种补丁方法,其特征在于,应用于第一补丁系统中的第三电子设备,所述第一补丁系统包括:服务器、多个电子设备,所述电子设备上安装有第一应用程序,所述多个电子设备包括所述第三电子设备、第二电子设备、第一电子设备;所述方法包括:A patch method, characterized in that it is applied to a third electronic device in a first patch system, the first patch system includes: a server, a plurality of electronic devices, a first application program is installed on the electronic device, the The multiple electronic devices include the third electronic device, the second electronic device, and the first electronic device; the method includes:
    所述第三电子设备向所述第二电子设备发送第一数据包,所述第一数据包包括所述第三电子设备上安装的第一应用程序中的第一软件模块,所述第一软件模块与第一补丁包有重合;The third electronic device sends a first data packet to the second electronic device, the first data packet includes a first software module in a first application program installed on the third electronic device, and the first The software module overlaps with the first patch package;
    其中,所述第一补丁包是所述第二电子设备利用第一差分数据和所述第三电子设备上的第一应用程序中的所述第一软件模块还原出的,所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;所述第一差分数据是所述服务器将所述第三电子设备上的第一应用程序和第一补丁包进行差分生成的,并被发送给所述第二电子设备;所述第二电子设备用于根据所述第一差分数据和所述第三电子设备上的第一应用程序中的所述第一软件模块,还原出所述第一补丁包;所述第二电子设备还用于向所述第一 电子设备发送所述第一补丁包。Wherein, the first patch package is restored by the second electronic device using the first differential data and the first software module in the first application program on the third electronic device, and the third electronic The device is among the multiple electronic devices, the first application program installed overlaps with the first patch package; the first differential data is the first The application program and the first patch package are differentially generated and sent to the second electronic device; the second electronic device is configured to use the first differential data and the first application on the third electronic device The first software module in the program restores the first patch package; the second electronic device is further configured to send the first patch package to the first electronic device.
  19. 一种补丁系统,其特征在于,所述第一补丁系统包括:服务器、多个电子设备,所述电子设备上安装有第一应用程序;其中:A patch system, characterized in that the first patch system includes: a server, a plurality of electronic devices, and a first application program is installed on the electronic devices; wherein:
    所述服务器用于根据第三电子设备上的第一应用程序和第一补丁包进行差分生成第一差分数据;所述第一补丁包用于升级第一电子设备上的第一应用程序;第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包有重合的电子设备;所述多个电子设备包括所述第一电子设备、所述第三电子设备;The server is used to generate first differential data according to the difference between the first application program and the first patch package on the third electronic device; the first patch package is used to upgrade the first application program on the first electronic device; The third electronic device is among the multiple electronic devices, the installed first application program overlaps with the first patch package; the multiple electronic devices include the first electronic device, the third electronic device equipment;
    所述服务器用于向第二电子设备发送所述第一差分数据;所述多个电子设备还包括所述第二电子设备;The server is configured to send the first differential data to a second electronic device; the multiple electronic devices also include the second electronic device;
    所述第二电子设备用于根据所述第一差分数据和所述第三电子设备上的第一应用程序中的第一软件模块,还原出所述第一补丁包;所述第一软件模块与所述第一补丁包有重合;The second electronic device is configured to restore the first patch package according to the first differential data and the first software module in the first application program on the third electronic device; the first software module There is overlap with the first patch package;
    所述第二电子设备用于向所述第一电子设备发送所述第一补丁包;The second electronic device is configured to send the first patch package to the first electronic device;
    所述第一电子设备用于利用所述第一补丁包升级其上安装的第一应用程序。The first electronic device is configured to use the first patch package to upgrade a first application program installed thereon.
  20. 根据权利要求19中任一项所述的系统,其特征在于,所述第三电子设备是所述多个电子设备中,安装的第一应用程序与所述第一补丁包的重合度最高或者重合度高于第一阈值的电子设备。The system according to any one of claims 19, wherein the third electronic device is one of the plurality of electronic devices, the installed first application program has the highest coincidence degree with the first patch package or Electronic devices whose coincidence degree is higher than the first threshold.
  21. 一种服务器,其特征在于,包括:通信装置、存储器以及耦合于所述存储器的处理器,多个应用程序,以及一个或多个程序;所述处理器在执行所述一个或多个程序时,使得所述服务器实现如权利要求1至8中任一项所述的方法。A server, characterized in that it includes: a communication device, a memory, and a processor coupled to the memory, a plurality of application programs, and one or more programs; when the processor executes the one or more programs , so that the server implements the method according to any one of claims 1-8.
  22. 一种电子设备,其特征在于,包括:通信装置、存储器以及耦合于所述存储器的处理器,多个应用程序,以及一个或多个程序;所述处理器在执行所述一个或多个程序时,使得所述电子设备实现如权利要求9、权利要求10至17中任一项、权利要求18中任一项所述的方法。An electronic device, characterized in that it includes: a communication device, a memory, and a processor coupled to the memory, a plurality of application programs, and one or more programs; the processor executes the one or more programs , so that the electronic device implements the method according to any one of claim 9, any one of claims 10 to 17, and any one of claim 18.
  23. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1至18中任一项所述的方法。A computer-readable storage medium, comprising instructions, wherein, when the instructions are run on an electronic device, the electronic device is made to execute the method according to any one of claims 1 to 18.
PCT/CN2022/132193 2021-11-19 2022-11-16 Patching method and related device WO2023088289A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111410274.4A CN116149716A (en) 2021-11-19 2021-11-19 Patch method and related equipment
CN202111410274.4 2021-11-19

Publications (1)

Publication Number Publication Date
WO2023088289A1 true WO2023088289A1 (en) 2023-05-25

Family

ID=86360572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/132193 WO2023088289A1 (en) 2021-11-19 2022-11-16 Patching method and related device

Country Status (2)

Country Link
CN (1) CN116149716A (en)
WO (1) WO2023088289A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376078A (en) * 2018-02-26 2018-08-07 广东美的制冷设备有限公司 Upgrade method, device and the household appliance of equipment
US20190158304A1 (en) * 2008-08-11 2019-05-23 Icontrol Networks, Inc. Data model for home automation
US20190155598A1 (en) * 2017-11-17 2019-05-23 Apple Inc. Techniques for updating a file using a multi-version patch file
CN110633090A (en) * 2019-08-14 2019-12-31 华为技术有限公司 Patch method, related device and system
CN111316230A (en) * 2018-07-19 2020-06-19 华为技术有限公司 Method and equipment for generating patch package

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190158304A1 (en) * 2008-08-11 2019-05-23 Icontrol Networks, Inc. Data model for home automation
US20190155598A1 (en) * 2017-11-17 2019-05-23 Apple Inc. Techniques for updating a file using a multi-version patch file
CN108376078A (en) * 2018-02-26 2018-08-07 广东美的制冷设备有限公司 Upgrade method, device and the household appliance of equipment
CN111316230A (en) * 2018-07-19 2020-06-19 华为技术有限公司 Method and equipment for generating patch package
CN110633090A (en) * 2019-08-14 2019-12-31 华为技术有限公司 Patch method, related device and system

Also Published As

Publication number Publication date
CN116149716A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
US11985374B2 (en) Method of controlling the sharing of videos and electronic device adapted thereto
US10223132B2 (en) Synchronization between electronic devices
CN106101979B (en) Method for short-range wireless communication and electronic device using the same
US20200366516A1 (en) Electronic device and method for registering smart home device in smart home system
US10469428B2 (en) Apparatus and method for transmitting message
US11321407B2 (en) Search method, and apparatus
KR102206351B1 (en) Electronic device and method for making continuity of operated work thereof
CN108605373B (en) Method and electronic device for providing network sharing service
US10048828B2 (en) Method of interface control and electronic device thereof
WO2022156535A1 (en) Distributed application processing method and apparatus
EP4350540A1 (en) Account login method and electronic device
US10284614B2 (en) Method for downloading contents of electronic device and electronic device thereof
CN109144596B (en) Quick starting method, device, terminal, server and system
WO2022063037A1 (en) Method and apparatus for installing patch package
WO2022161024A1 (en) Upgrade prompt method, terminal device, and computer readable storage medium
KR20180121178A (en) Method for wireless connection and electronic device thereof
WO2023088289A1 (en) Patching method and related device
EP4191409A1 (en) Shared library multiplexing method and electronic device
EP4130983A1 (en) Method and apparatus for installing application program, and terminal device and storage medium
KR102131943B1 (en) Method for controlling an url and an electronic device
WO2022068605A1 (en) Patch reusing method and system, and electronic device
CN114356316B (en) Patch multiplexing method, system and electronic equipment
WO2024046062A1 (en) Cross-device card interaction method and electronic device
CN115145563A (en) Application interface development method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22894821

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE