WO2024083114A1 - Software distribution method, electronic device, and system - Google Patents

Software distribution method, electronic device, and system Download PDF

Info

Publication number
WO2024083114A1
WO2024083114A1 PCT/CN2023/124946 CN2023124946W WO2024083114A1 WO 2024083114 A1 WO2024083114 A1 WO 2024083114A1 CN 2023124946 W CN2023124946 W CN 2023124946W WO 2024083114 A1 WO2024083114 A1 WO 2024083114A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
capability set
capability
electronic device
installation file
Prior art date
Application number
PCT/CN2023/124946
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 WO2024083114A1 publication Critical patent/WO2024083114A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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

  • the present application relates to the field of computer technology, and in particular to a software distribution method, electronic device and system.
  • Software available to users on the terminal can be distributed to the terminal by the server.
  • software distribution is based on the device types supported by the software.
  • the device types supported by software 1 include mobile phones and tablets. Therefore, mobile phones and tablets can be distributed with software 1, but large screens cannot be distributed.
  • This distribution method has great limitations. For example, there are many devices released by different manufacturers. It is possible that the software developer cannot obtain the type field of some devices supported by the software, resulting in the inability to distribute the software to these devices. It is not flexible and intelligent enough.
  • the present application discloses a software distribution method, electronic device and system, which can provide a more flexible and intelligent software distribution mechanism, is independent of the device type, and expands the range of devices to which software can be distributed.
  • the present application provides a software distribution method, applied to a first device, the method comprising: sending a first message to a network device, the first message being used to request acquisition of a first software, the first message comprising first information for indicating a capability set of the first device, the capability set of the first device comprising hardware capabilities and software capabilities supported by the first device; when the capability set of the first device matches the capability set corresponding to the first software, receiving an installation file of the first software sent by the network device or a download method of the installation file of the first software, the capability set corresponding to the first software comprising hardware capabilities and software capabilities that a device that can run the first software needs to support; and displaying a first interface of the first software according to the installation file of the first software or the download method of the installation file of the first software.
  • the first device can request the network device to obtain the first software.
  • the capability set of the first device matches the capability set corresponding to the first software
  • the first software can be distributed by the network device.
  • This method implements the software distribution function based on the device capability set and the capability set required by the software, and does not depend on the device type. This avoids the situation where some devices have the ability to run the first software but cannot be distributed the first software because the device type is not the device type supported by the first software. This expands the range of devices that can be distributed the first software and makes the application scenarios of the software distribution function more extensive.
  • sending the first message to the network device includes: when it is determined to be in a preset scenario, sending the first message to the network device, and the first software is related to the preset scenario.
  • the first device when it is determined that the first device is in the preset scenario, the first device can request the network device to distribute the first software related to the preset scenario, that is, the distributed software meets the current usage scenario/current user needs.
  • the software distributed in different scenarios can be different, which can meet the different needs of different users in different scenarios, making the software distribution function more flexible and intelligent, and improving the user experience.
  • the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations: the capability set of the first device includes capabilities in the capability set corresponding to the first software; the capability set of the first device includes capabilities that are strongly dependent on the capability set corresponding to the first software, and the strongly dependent capabilities are capabilities required by the device to which the first software is distributed; the capability set of the first device includes the parent capability of the capabilities that are strongly dependent on the capabilities in the capability set corresponding to the first software.
  • the capability set corresponding to the first software may include strongly dependent capabilities and weakly dependent capabilities.
  • the strongly dependent capabilities are capabilities that the device to which the first software is distributed is required to have, and the weakly dependent capabilities are capabilities that the device to which the first software is distributed may not have.
  • a parent capability may correspond to at least one child capability.
  • the parent capability is a strongly dependent capability
  • the corresponding child capabilities are all strongly dependent capabilities
  • the parent capability is a strongly dependent capability.
  • the capability set of the first device matches the capability set corresponding to the first software.
  • the capability set of the first device includes all capabilities in the capability set corresponding to the first software, which can be understood as a situation where the requirements for the distributed device are higher.
  • the capability set of the first device includes strongly dependent capabilities in the capability set corresponding to the first software or the parent capabilities of the strongly dependent capabilities, which can be understood as a situation where the requirements for the distributed device are lower, thereby broadening the application scenarios of software distribution.
  • the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same. Or different, when the capability set of the first device matches the capability set corresponding to the first software, the installation file of the first software sent by the network device is received or the installation file of the first software is downloaded, including: when the capability set of the first device matches the capability set corresponding to the first version of the first software, the installation file of the first version of the first software sent by the network device is received or the installation file of the first version of the first software is downloaded.
  • the first device when the capability set of the first device matches the capability set corresponding to the first software of any one of multiple versions, the first device can be distributed with the first software of that version, thereby avoiding the situation where the capability set of the first device does not match the capability set corresponding to some versions of the first software, resulting in the first device being unable to be distributed with the first software, thereby expanding the range of devices to which the first software can be distributed.
  • the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same or different.
  • the method also includes: when the capability set of the first device matches the capability set corresponding to the second version of the first software, and the capability set corresponding to the third version of the first software matches, receiving the installation file of the second version of the first software sent by the network device or the download method of the installation file of the second version of the first software, wherein the second version is newer than the third version.
  • the first device when the capability set of the first device matches the capability sets corresponding to multiple versions of the first software, the first device can be distributed with the updated version of the first software.
  • the software distribution method is more refined and more in line with user needs, thereby improving the user experience.
  • displaying the first interface of the first software according to the installation file of the first software or the downloading method of the installation file of the first software includes: installing the first software according to the installation file of the first software; displaying the first interface of the first software; or, downloading the installation file of the first software according to the downloading method of the installation file of the first software; installing the first software according to the installation file of the first software; and displaying the first interface of the first software.
  • the installation of the first software is a silent installation, for example, a user interface and installation progress prompting the user to install are not displayed.
  • the first device after the first device receives the installation file of the first software, it can automatically install the first software, or after the first device receives the download address of the installation file of the first software, it can automatically download the installation file and then automatically install the first software, without the need for manual operation by the user, which is more convenient for users to use.
  • the method also includes: obtaining a capability set of the second device; sending a second message to the network device, the second message being used to request distribution of second software to the second device, the second message including second information indicating the capability set of the second device, the second device being used to receive the installation file of the second software or the download method of the installation file of the second software when the capability set of the second device matches the capability set corresponding to the second software, the installation file of the second software or the download method of the installation file of the second software being used by the second device to display a second interface of the second software.
  • the first device can request the network device to distribute the second software to the second device.
  • the second device can be distributed the second software.
  • This software distribution method not only does not depend on the device type, but also does not require the second device to which the software is distributed to request the network device on its own. Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can still be distributed the second software, further expanding the range of devices to which the software can be distributed and making the application scenarios of the software distribution function more extensive.
  • obtaining the capability set of the second device includes: sending a third message to the second device, where the third message is used to request obtaining the capability set of the second device; and receiving the capability set of the second device sent by the second device.
  • the first interface includes a flow control; and obtaining the capability set of the second device includes: receiving a first operation for the flow control; and obtaining the capability set of the second device.
  • the first operation can trigger the process of distributing the second software to the second device, that is, the timing of software distribution is determined according to the user operation, which is more in line with user needs and improves user experience.
  • the method further includes: receiving a third message sent by the network device, the third message being used to instruct distribution of the second software to the second device; and sending the installation file of the second software or the download method of the installation file of the second software to the second device.
  • the first device can distribute the second software (which can be called cross-device flow software) to the second device according to the third message sent by the network device. Even if the network device cannot communicate with the second device, the second software can be distributed to the second device normally, making the application scenarios of the software distribution function more extensive.
  • the second software which can be called cross-device flow software
  • the method further includes: receiving a fourth message sent by the network device, the fourth message being used to indicate that the second software is not distributed to the second device; and displaying a prompt message, the prompt message indicating that the second device does not have the ability to run the second software.
  • the first device can prompt the user that the second device does not have the ability to run the second software based on the fourth message sent by the network device, so that the user can obtain the reason for the failure of software distribution, which is more in line with user needs and improves user experience.
  • the first software is related to the preset scene, including: the first software is related to the preset scene It is related to at least one of the location, time, user portrait, and user operation.
  • the first software related to the preset scene is an atomic service for travel ticket booking.
  • the first software can be determined according to at least one of the location, time, user portrait, and user operation in the preset scenario.
  • the first software can be determined according to the user operation, or even if the user does not perform the user operation, the user portrait and other information can be automatically identified to determine the first software. This can meet the software distribution needs of users in different preset scenarios, making the software distribution function more flexible and intelligent, and improving the user experience.
  • the second device is a device discovered and/or connected to the first device through a distributed communication manner.
  • the present application provides another software distribution method, which is applied to a second device, and the method includes: receiving a first message sent by a first device; sending a capability set of the second device to the first device according to the first message, the capability set of the second device including hardware capabilities and software capabilities supported by the second device, and the capability set of the second device is used to determine whether to distribute the first software to the second device; when the capability set of the second device matches the capability set corresponding to the first software, receiving the installation file of the first software sent by the first device or the download method of the installation file of the first software, or receiving the installation file of the first software sent by a network device or the download method of the installation file of the first software; and displaying the interface of the first software according to the installation file of the first software or the download method of the installation file of the first software.
  • the second device can send the capability set of the second device to the first device, so that the network device can determine whether to distribute the first software to the second device.
  • the second device can be distributed the first software and display the interface of the first software.
  • This method of software distribution not only does not depend on the device type, but also does not require the second device to request the network device on its own. Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can be distributed the second software, which further expands the range of devices that can be distributed with software and makes the application scenarios of the software distribution function more extensive.
  • displaying the interface of the first software according to the installation file of the first software or the downloading method of the installation file of the first software includes: installing the first software according to the installation file of the first software; displaying the interface of the first software; or, downloading the installation file of the first software according to the downloading method of the installation file of the first software; installing the first software according to the installation file of the first software; and displaying the interface of the first software.
  • the installation of the first software is a silent installation, for example, a user interface and installation progress prompting the user to install are not displayed.
  • the second device after the second device receives the installation file of the first software, it can automatically install the first software, or, after the second device receives the download address of the installation file of the first software, it can automatically download the installation file and then automatically install the first software, without the need for manual operation by the user, which is more convenient for users to use.
  • the present application provides another software distribution method, which is applied to a network device, and the method includes: receiving a first message sent by a first device, the first message is used to request acquisition of a first software, the first message includes first information used to indicate a capability set of the first device, the capability set of the first device includes hardware capabilities and software capabilities supported by the first device; judging whether the capability set of the first device and the capability set corresponding to the first software match according to the first message, the capability set corresponding to the first software includes hardware capabilities and software capabilities that a device that can run the first software needs to support; when the capability set of the first device and the capability set corresponding to the first software match, sending the installation file of the first software or the download method of the installation file of the first software to the first device, the installation file of the first software or the download method of the installation file of the first software is used by the first device to display a first interface of the first software.
  • the network device can receive a first message from the first device requesting to obtain the first software, and obtain the capability set of the first device according to the first message, compare whether the capability set of the first device matches the capability set corresponding to the first software, and when the two match, send the installation file of the first software or the download method of the installation file of the first software to the first device to distribute the first software.
  • This method implements the software distribution function based on the device capability set and the capability set required by the software, and does not depend on the device type. It avoids the situation where some devices have the ability to run the first software but cannot be distributed the first software because the device type is not the device type supported by the first software. It expands the range of devices that can be distributed with the first software and makes the application scenarios of the software distribution function more extensive.
  • the method further includes: receiving a second message sent by the first device, the second message being used to request distribution of second software to the second device, the second message including second information indicating a capability set of the second device, the capability set of the second device including hardware capabilities and software capabilities supported by the second device; judging whether the capability set of the second device matches the capability set corresponding to the second software according to the second message, the capability set corresponding to the second software including hardware capabilities and software capabilities that a device that can run the second software needs to support according to the capability set of the second device; and when the capability set of the second device matches the capability set corresponding to the second software, sending a third message to the first device, the third message being used to instruct the first device to send the installation file of the second software or the download method of the installation file of the second software to the second device, or sending the installation file of the second software or the first message to the second device.
  • the downloading method of the installation file of the second software, the installation file of the second software or the downloading method of the installation file of the second software is used
  • the network device can receive a second message from the first device requesting to distribute the second software to the second device, and obtain the capability set of the second device according to the second message, compare whether the capability set of the second device and the capability set corresponding to the second software match, and when the two match, send a third message to the first device, instructing the first device to distribute the second software to the second device (which can be called cross-device software transfer).
  • This method of software distribution not only does not depend on the device type, but also does not require the second device to which the software is distributed to request the network device on its own.
  • the second device Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can also be distributed the second software, further expanding the range of devices to which the software can be distributed, and making the application scenarios of the software distribution function more extensive.
  • the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations: the capability set of the first device includes capabilities in the capability set corresponding to the first software; the capability set of the first device includes capabilities that are strongly dependent on the capability set corresponding to the first software, and the strongly dependent capabilities are capabilities required by the device to which the first software is distributed; the capability set of the first device includes the parent capability of the capabilities that are strongly dependent on the capabilities in the capability set corresponding to the first software.
  • the capability set corresponding to the first software may include strongly dependent capabilities and weakly dependent capabilities.
  • the strongly dependent capabilities are capabilities that the device to which the first software is distributed is required to have, and the weakly dependent capabilities are capabilities that the device to which the first software is distributed may not have.
  • a parent capability may correspond to at least one child capability.
  • the parent capability is a strongly dependent capability
  • the corresponding child capabilities are all strongly dependent capabilities
  • the parent capability is a strongly dependent capability.
  • the capability set of the first device matches the capability set corresponding to the first software.
  • the capability set of the first device includes all capabilities in the capability set corresponding to the first software, which can be understood as a situation where the requirements for the distributed device are higher.
  • the capability set of the first device includes strongly dependent capabilities in the capability set corresponding to the first software or the parent capabilities of the strongly dependent capabilities, which can be understood as a situation where the requirements for the distributed device are lower, thereby broadening the application scenarios of software distribution.
  • the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same or different.
  • the installation file of the first software is sent to the first device or the download method of the installation file of the first software includes: when the capability set of the first device matches the capability set corresponding to the first version of the first software, the installation file of the first version of the first software is sent to the first device or the download method of the installation file of the first version of the first software.
  • the first device when the capability set of the first device matches the capability set corresponding to the first software of any one of multiple versions, the first device can be distributed with the first software of that version, thereby avoiding the situation where the capability set of the first device does not match the capability set corresponding to some versions of the first software, resulting in the first device being unable to be distributed with the first software, thereby expanding the range of devices to which the first software can be distributed.
  • the present application provides an electronic device, comprising a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the software distribution method in any possible implementation of the first aspect or the second aspect.
  • the present application provides an electronic device, comprising one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the software distribution method in any possible implementation of the first aspect or the second aspect.
  • the present application provides a network device, including a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the software distribution method in any possible implementation of the third aspect.
  • the present application provides a computer storage medium storing a computer program, which, when executed by a processor, implements the software distribution method in any possible implementation of any of the above aspects.
  • the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the software distribution method in any possible implementation of the first aspect or the second aspect.
  • the present application provides an electronic device, the electronic device comprising a method or device for executing any one of the implementations of the first aspect or the second aspect of the present application.
  • the electronic device is, for example, a chip.
  • FIG1 is a schematic diagram of the architecture of a software distribution system 10 provided by the present application.
  • FIG. 2 is a schematic diagram of the hardware structure of an electronic device 100 provided in the present application.
  • FIG3 is a schematic diagram of a software architecture of an electronic device 100 provided in the present application.
  • FIG4 is a schematic diagram of the hardware structure of a network device 300 provided in the present application.
  • FIG5 is a flow chart of a software distribution method provided by the present application.
  • FIG6 is a flowchart of another software distribution method provided by the present application.
  • FIG7 is a flowchart of another software distribution method provided by the present application.
  • FIG8 is a flowchart of another software distribution method provided by the present application.
  • 9-10 are schematic diagrams of some user interfaces provided by this application.
  • first and second are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features.
  • a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
  • software may include, but is not limited to, applications, applets, and atomic services.
  • atomic services can be services that can be used without explicit installation and can be installed by the system program framework background, such as feature capabilities (FA).
  • FA feature capabilities
  • atomic services can be composed of one or more HarmonyOS capability deployment packages (HAP), one HAP corresponds to one entry capability (mainAbility), and mainAbility is an abstraction of the capabilities possessed by the application. Each ability can run independently and can complete a specific function. One or more functions can complete a specific convenient service.
  • HAP HarmonyOS capability deployment packages
  • mainAbility is an abstraction of the capabilities possessed by the application.
  • Each ability can run independently and can complete a specific function.
  • One or more functions can complete a specific convenient service.
  • Distributing software may include, but is not limited to: sending software files, or sending software files download methods (such as download addresses), wherein the software files are used for electronic devices to run the software, and the file can be an executable file, such as an installation package.
  • sending software files or sending software files download methods (such as download addresses), wherein the software files are used for electronic devices to run the software, and the file can be an executable file, such as an installation package.
  • the following embodiments are described by taking the software file as an installation package as an example.
  • the server can distribute software to electronic devices, or the electronic devices with the software installed can distribute the software to other electronic devices (which can be referred to as cross-device software transfer).
  • the distribution of software is based on the device types supported by the software. For example, when the server distributes atomic services to electronic devices, the server can compare the device types supported by the atomic service and the type of the electronic device. If the device types supported by the atomic service include the type of the electronic device, the server sends the installation package of the atomic service to the electronic device, and the electronic device can run the atomic service based on the installation package.
  • this distribution method has great limitations (for example, the scope of software distribution is limited), and there are at least the following technical problems:
  • Some device types cannot accurately distinguish device capabilities, that is, devices of the same type may have different capabilities.
  • speaker devices with screens and speaker devices without screens are defined as the same device type, resulting in some software that only requires a screen to run cannot be distributed to speaker devices with screens.
  • the present application provides a software distribution method, which is applied to a software distribution system.
  • the method can realize software distribution based on the capability set of a device. For example, when the capability set required by the software matches the capability set of the device, the software can be distributed to the device. Therefore, a software distribution mechanism that is independent of the device type and more flexible and intelligent is provided, which solves the technical problems existing in the current software distribution method, expands the range of devices that can be distributed with software, broadens the application scenarios, and improves the user experience.
  • the capability set of a device refers to the set of hardware capabilities and software capabilities supported by the device, where hardware capabilities include, but are not limited to, display screen, camera, speaker, Bluetooth, near field communication (NFC), wireless fidelity (Wi-Fi), etc., and software capabilities include, but are not limited to, clock, payment, screenshot, etc.
  • the capability sets of devices of the same type can be the same or different, and the capability sets of devices of different types can be the same or different. It can be understood that the capability set of a device does not depend on the type of device.
  • the capability set required by the software refers to the set of hardware capabilities and software capabilities that the device running the software needs to support.
  • a capability set may include at least one capability, any of which may be characterized by a unique identifier.
  • the unique identifier used to characterize the capability in the following embodiments is a code, but in a specific implementation, the identifier may also be of other types, which is not limited in this application.
  • the capability in this application may be a capability provided by the system of the electronic device, or may not be a capability provided by the system, such as a capability provided by other manufacturers.
  • a server e.g., a management platform of an operating system (OS)
  • OS operating system
  • the capability set dictionary may be represented in a manner similar to a capability set, and may be represented by encoding and/or character strings.
  • the capability set dictionary may be used, for example, but not limited to, to generate a capability set for a device and/or a capability set required by software.
  • FIG. 1 exemplarily shows a schematic diagram of the architecture of a software distribution system 10 .
  • the software distribution system 10 may include an electronic device 100, an electronic device 200, a network device 300, and an electronic device 400. Among them:
  • the electronic device 100 may be a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), and smart home devices such as smart TVs and projectors, wearable devices such as smart bracelets, smart watches, and smart glasses, and extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR) or vehicle-mounted devices.
  • XR extended reality
  • AR augmented reality
  • VR virtual reality
  • MR mixed reality
  • the network device 300 may include at least one server.
  • any one of the servers may be a hardware server.
  • any one of the servers may be a cloud server.
  • any one of the servers may be a Linux server, a Windows server, or other server devices that can provide simultaneous access to multiple devices.
  • the network device 300 may be a server cluster consisting of multiple regions, multiple computer rooms, and multiple servers.
  • the electronic device 100 can communicate with the network device 300 via wired (e.g., universal serial bus (USB), twisted pair, coaxial cable and optical fiber, etc.) and/or wireless (e.g., wireless local area networks (WLAN), Bluetooth and cellular communication networks, etc.).
  • wired e.g., universal serial bus (USB), twisted pair, coaxial cable and optical fiber, etc.
  • wireless e.g., wireless local area networks (WLAN), Bluetooth and cellular communication networks, etc.
  • the electronic device 100 may request the network device 300 to distribute software (for example, software related to the received user operation).
  • the network device 300 may compare the capability set of the electronic device 100 with the capability set required by the software. When the two match, the network device 300 may distribute the software to the electronic device 100, and the electronic device 100 may run the software. For example, after the electronic device 100 receives the download address of the installation package of the software sent by the network device 300, it downloads the installation package of the software based on the download address, and then installs and runs the software based on the installation package of the software.
  • the electronic device 100 can communicate with the electronic device 200 in a wired and/or wireless manner, for example, the electronic device 100 and the electronic device 200 realize distributed communication through a soft bus, Bluetooth and/or WLAN, etc.
  • the software on the electronic device 100 can be distributed to the electronic device 200, for example, after the electronic device 100 receives a user operation of a flow control in an interface of the software, the software is distributed to the electronic device 200.
  • the electronic device 100 can first obtain the capability set of the electronic device 200, and then request the network device 300 to distribute the software to the electronic device 200.
  • the network device 300 can compare the capability set of the electronic device 200 with the capability set required by the software.
  • the network device 300 can distribute the software to the electronic device 200 through the electronic device 100, and the electronic device 200 can run the software.
  • the electronic device 200 may communicate with the network device 300 via wired and/or wireless means, and the network device 300 may distribute software directly to the electronic device 200 without being relayed through the electronic device 100.
  • the network device 300 may send a notification to the electronic device 100, and after receiving the notification, the electronic device 100 may distribute the software to the electronic device 200. This application does not limit this.
  • the electronic device 400 may communicate with the network device 300 in a wired and/or wireless manner, wherein the example of the electronic device 400 may refer to the examples of the electronic device 100 and the network device 300.
  • the electronic device 400 is related to the software 1, for example, it is a device of the manufacturer/developer of the software.
  • the electronic device 400 may send an installation package of software 1 to the network device 300, the installation package of software 1 may include a capability set required by software 1, and the network device 300 may store the installation package of software 1.
  • the capability set required by software 1 may be independent of the installation package of software 1, and the electronic device 400 may send the installation package of software 1 and the capability set required by software 1 to the network device 300.
  • the network device 300 may store the installation package of software 1 through other devices, and store the capability set required by software 1 and the download location of the installation package of software 1 by itself. This application does not limit this.
  • the software distribution system 10 may further include a network device 500 and an electronic device 600.
  • the network device 500 may communicate with the electronic device 600 in a wired and/or wireless manner, wherein the description of the network device 500 may refer to the description of the network device 300 and will not be repeated.
  • the network device 500 may be a device for maintaining/storing a capability set dictionary.
  • the electronic device 600 is related to the electronic device 700, and the electronic device 700 is, for example but not limited to, the electronic device 100 or the electronic device 200, for example, the electronic device 600 is a device of the manufacturer/developer of the electronic device 700.
  • the electronic device 600 may request the network device 500 to obtain the capability set of the electronic device 700.
  • the electronic device 600 may store the capability set of the electronic device 700 sent by the network device 500.
  • the number and form of the electronic devices and network devices shown in FIG1 are merely examples. In a specific implementation, the number may be greater and the devices may be in other forms, which is not limited in this application.
  • FIG. 2 exemplarily shows a schematic diagram of the hardware structure of an electronic device 100 .
  • the electronic device 100 shown in FIG2 is only an example, and the electronic device 100 may have more or fewer components than those shown in FIG2, may combine two or more components, or may have a different component configuration.
  • the various components shown in FIG2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • 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, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the charging management module 140 is used to receive charging input from a charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor and the baseband processor.
  • the electronic device 100 can be implemented by the wireless communication function and the network
  • the electronic device 100 communicates with the network device 300, for example, receives the software installation package sent by the network device 300.
  • the electronic device 100 can communicate with the electronic device 200 through a wireless communication function, for example, sending the software installation package to the electronic device 200.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100.
  • the mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some of the functional modules of the mobile communication module 150 can be set in the processor 110.
  • at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 100.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In an optional embodiment, ISP can be set in camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object is projected onto the photosensitive element through the lens to generate an optical image.
  • the photosensitive element can be Charge coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CCD Charge coupled device
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • an external memory card such as a Micro SD card
  • the internal memory 121 may be used to store computer executable program codes, which include instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the receiver 170B also called a “handset”, is used to convert audio electrical signals into sound signals.
  • Microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the earphone jack 170D is used to connect a wired earphone.
  • the pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.
  • the pressure sensor 180A can be set on the display screen 194.
  • a capacitive pressure sensor can be a parallel plate including at least two conductive materials.
  • the electronic device 100 determines the intensity of the pressure based on the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A.
  • the electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
  • the gyro sensor 180B may be used to determine the motion posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B may 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, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the acceleration sensor 180E can detect the magnitude of 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, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light outward through the light emitting diode.
  • the electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
  • the temperature sensor 180J is used to detect the temperature.
  • the touch sensor 180K is also called a "touch control device”.
  • the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • Bone conduction sensor 180M can obtain vibration signals.
  • Buttons 190 include a power button, a volume button, and the like.
  • Motor 191 can generate vibration prompts.
  • Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the software system of the layered architecture may be an Android system, or a Harmony operating system (OS), or other software systems.
  • OS Harmony operating system
  • the embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100.
  • FIG. 3 exemplarily shows a schematic diagram of a software architecture of an electronic device 100 .
  • the layered architecture divides the software into several layers, each with a clear role and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, music, calendar, short message, call, navigation, Bluetooth, browser, etc.
  • the application package in this application may also be replaced by other forms of software such as mini-programs and atomic services.
  • the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • a display interface can be composed of one or more views.
  • a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
  • the phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
  • Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • a 2D graphics engine is a drawing engine for 2D drawings.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the following is an example of the workflow of the software and hardware of the electronic device 100 in conjunction with the startup scenario of the atomic service.
  • the kernel layer processes the voice signal into raw input events (including the content of the voice signal, the timestamp of receiving the voice signal, and other information).
  • the raw input events are stored in the kernel layer.
  • the application framework layer obtains the raw input events from the kernel layer and identifies the input events. Taking the content of the voice signal "Check my express delivery" as an example, the express application calls the interface of the application framework layer, starts the atomic service of the express application, and then controls the display driver by calling the kernel layer, and displays the user interface of the atomic service of the express application through the display screen 194, which includes the express delivery obtained according to the content of the voice signal. Deliver information.
  • the description of the electronic device 200 is similar to the description of the electronic device 100 shown in FIG. 2 and FIG. 3 , and will not be repeated herein.
  • FIG. 4 exemplarily shows a schematic diagram of the hardware structure of a network device 300 .
  • the network device 300 may include one or more processors 301, a communication interface 302, and a memory 303, wherein the processor 301, the communication interface 302, and the memory 303 may be connected via a bus or other means, and the embodiment of the present application takes the connection via a bus 304 as an example.
  • processors 301 may include one or more processors 301, a communication interface 302, and a memory 303, wherein the processor 301, the communication interface 302, and the memory 303 may be connected via a bus or other means, and the embodiment of the present application takes the connection via a bus 304 as an example.
  • a bus or other means the embodiment of the present application takes the connection via a bus 304 as an example.
  • the processor 301 may be composed of one or more general-purpose processors, such as a CPU.
  • the processor 301 may be used to run program codes related to the device control method.
  • the communication interface 302 may be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other nodes. In the embodiment of the present application, the communication interface 302 may be specifically used to communicate with at least one of the electronic device 100, the electronic device 200, and the electronic device 400.
  • a wired interface e.g., an Ethernet interface
  • a wireless interface e.g., a cellular network interface or a wireless local area network interface
  • the memory 303 may include a volatile memory, such as a RAM; the memory may also include a non-volatile memory, such as a ROM, a flash memory, a HDD, or a solid-state drive SSD.
  • the memory 303 may also include a combination of the above-mentioned types of memories.
  • the memory 303 may be used to store a set of program codes so that the processor 301 calls the program codes stored in the memory 303 to implement the implementation method of the embodiment of the present application on the server.
  • the memory 303 may also be a storage array, and so on.
  • the network device 300 may include multiple servers, such as a web server, a background server, a download server, etc.
  • the hardware structures of these multiple servers can refer to the hardware structure of the network device 300 shown in Figure 4.
  • the network device 300 shown in FIG. 4 is an implementation example of an embodiment of the present application. In actual applications, the network device 300 may also include more or fewer components, which is not limited here.
  • Figure 5 is a flowchart of a software distribution method provided by an embodiment of the present application.
  • the method can be applied to the software distribution system 10 shown in Figure 1.
  • the method may include but is not limited to the following steps:
  • S101 The electronic device 600 sends a first message to the network device 500.
  • S101 is an optional step.
  • the network device 500 may maintain/store a capability set dictionary, which may include multiple capabilities, such as capabilities of a large number of different devices, any of which may be represented by a code (also referred to as one capability corresponding to one code).
  • the encoding corresponding to any capability may be segmented (referred to as segmented encoding), assuming that it is represented as x.y.z, where y is the parent class of z (z is the child class of y), x is the parent class of y (y is the child class of x), and x, y and z include at least one non-negative integer.
  • the segmented encoding corresponding to the capabilities provided by the system (such as capabilities provided by other manufacturers) and the capabilities provided by the system in the electronic device may be different, and optionally, x may be different.
  • the segmented encoding corresponding to the capabilities provided by the system is 0, and the segmented encoding corresponding to the capabilities provided by the non-system is k. Specific examples are shown below:
  • the NFC capability of an electronic device can be represented by the string SystemCapability.Communication.NFC.Core, where SystemCapability indicates that the NFC capability is a capability provided by the system of the electronic device, Communication indicates that the NFC capability is used to implement the communication function, NFC is the name of the capability, and Core indicates that the capability belongs to the core layer of the electronic device.
  • the segmented code corresponding to the NFC capability can be 0000.0001.0005.
  • the system account capability of an electronic device can be represented by a string SystemCapability.Account.OsAccount, where SystemCapability represents that the system account capability is a capability provided by the system of the electronic device, Account represents that the system account capability is used to implement the account function, OsAccount represents the name of the capability, and the segmented code corresponding to the system account capability can be 0000.0002.0001.
  • the application account capability of an electronic device can be represented by a string SystemCapability.Account.AppAccount, where SystemCapability represents that the application account capability is a capability provided by the system of the electronic device, Account represents that the application account capability is used to implement the account function, AppAccount represents the name of the capability, and the segmented code corresponding to the application account capability can be 0000.0002.0002.
  • the account capability of an electronic device can be represented by a string SystemCapability.Account, where SystemCapability represents that the account capability is a capability provided by the system of the electronic device, and Account represents that the account capability is used to implement the account function.
  • SystemCapability represents that the account capability is a capability provided by the system of the electronic device
  • Account represents that the account capability is used to implement the account function.
  • both the system account capability and the application account capability are subclasses of the account capability, and the account capability is the parent class of the system account capability and the application account capability.
  • the eye protection capability provided by a manufacturer can be represented by the string PrivateCapability.Light.EyeProtection, where PrivateCapability represents The eye protection capability is not provided by the system, for example, it is provided by a manufacturer. Light indicates that the eye protection capability is used to realize the lighting function. EyeProtection is used to indicate the name of the capability.
  • the segmented code corresponding to the eye protection capability may be k.0001.0011.
  • the segmented codes corresponding to the capabilities can be compressed.
  • the segmented codes can be compressed by omitting 0 in the segmented codes.
  • the segmented code 0000.0001.0005 corresponding to the NFC capability can be compressed to 1.5
  • the segmented code 0000.0002.0001 corresponding to the system account capability can be compressed to 2.1
  • the segmented code 0000.0000.0003 corresponding to the capability A provided by a system can be compressed to 3
  • the segmented code x.0001.0011 corresponding to the eye protection capability can be compressed to x.1.11.
  • Specific examples can be seen in Table 1 below.
  • the electronic device 600 may send a first message to the network device 500, and the first message may be used to request the addition of a first capability in the capability set dictionary, wherein the first capability is a capability that is not included in the capability set dictionary before the network device 500 receives the first message.
  • the first capability is a capability of the electronic device 700, for example, before the electronic device 700 is released, the developer of the electronic device 700 uses the electronic device 600 to send a first message to the network device 500, wherein the electronic device 700 may be, but is not limited to, the electronic device 100 or the electronic device 200.
  • the first message carries information about the first capability, such as a string used to characterize the first capability, such as the string SystemCapability.Communication.NFC.Core corresponding to the NFC capability.
  • the network device 500 adds the first capability to the capability set dictionary.
  • S102 is an optional step.
  • the network device 500 after receiving the first message, the network device 500 generates a code corresponding to the first capability and adds the code corresponding to the first capability to the capability set dictionary. In some examples, after receiving the first message, the network device 500 first determines whether the capability set dictionary includes the code/string of the first capability, and when it is determined that the capability set dictionary does not include the code/string of the first capability, the code/string corresponding to the first capability is added to the capability set dictionary.
  • the network device 500 when the capability set dictionary includes the first capability, the network device 500 does not add the first capability to the capability set dictionary.
  • the electronic device 600 sends a second message to the network device 500 .
  • the second message may be used to request the acquisition of the capability set of the electronic device 700.
  • the second message carries information about the capability of the electronic device 700, such as a character string used to characterize the capability of the electronic device 700.
  • the electronic device 600 may obtain information about the capability of the electronic device 700 in response to a user operation (e.g., a user operation input by a developer of the electronic device 700 through a development tool of the electronic device 600).
  • the capability of the electronic device 700 includes hardware capabilities and/or software capabilities, and the hardware capabilities include, for example but not limited to, display screen, camera, speaker, Bluetooth, NFC, Wi-Fi, etc., and the software capabilities include, for example but not limited to, clock, payment, screenshot, etc.
  • the network device 500 generates a capability set of the electronic device 700 .
  • the network device 500 after receiving the second message sent by the electronic device 600, the network device 500 generates a capability set (for example, but not limited to, a file in pcid format) of the electronic device 700. In some examples, the network device 500 generates the capability set of the electronic device 700 according to the information of the capability of the electronic device 700 in the second message. In some examples, the network device 500 obtains the codes corresponding to the capabilities of the electronic device 700 from the capability set dictionary, and generates the capability set of the electronic device 700 including these codes.
  • a capability set for example, but not limited to, a file in pcid format
  • the network device 500 sends the capability set of the electronic device 700 to the electronic device 600 .
  • the electronic device 600 saves the capability set of the electronic device 700 .
  • the capability set of the electronic device 700 may be stored in the electronic device 600. In another optional embodiment, the capability set of the electronic device 700 may be stored in the system of the electronic device 700. In the method shown in FIG5 , each capability in the capability set dictionary is independent of the device type, and the corresponding code is unique, which unifies the standards of different manufacturers and reduces the difficulty of management and maintenance.
  • Figure 6 is a flowchart of another software distribution method provided by an embodiment of the present application.
  • the method can be applied to the software distribution system 10 shown in Figure 1.
  • the method may include but is not limited to the following steps:
  • S201 is an optional step.
  • the electronic device 400 is installed with development software, and the developer of the first software can develop the first software through the development software of the electronic device 400 .
  • the electronic device 400 obtains a capability set of at least one electronic device.
  • S202 is an optional step.
  • the electronic device 400 may receive a capability set of at least one electronic device input by a user (for example but not limited to a file in pcid format), for example, a developer of the first software inputs the capability set of at least one electronic device through a development tool of the electronic device 400.
  • a user for example but not limited to a file in pcid format
  • a developer of the first software inputs the capability set of at least one electronic device through a development tool of the electronic device 400.
  • the electronic device 400 may request the network device 500 to obtain at least one capability.
  • the description of the network device 500 may refer to the description of the network device 500 in S101 of FIG. 5 .
  • the capability set of at least one electronic device in step S202 may also be replaced by other device capability set files, as long as the user can select the capabilities required by the first software from the device capability set files.
  • S203 The electronic device 400 selects capabilities required by the first software, and sets the dependency level of the capabilities.
  • the electronic device 400 can select the capabilities required by the first software from the capability set of the above-mentioned at least one electronic device. For example, the developer of the first software inputs user operations through the development tool of the electronic device 400, and the electronic device 400 selects the capabilities required by the first software based on the user operations.
  • the electronic device 400 may set the degree of dependency of the capabilities in the capability set required by the first software, for example, according to user operation settings.
  • the degree of dependency may include, but is not limited to, strong dependency and weak dependency, wherein a strongly dependent capability is a capability that the device to which the first software is distributed must have; a weakly dependent capability is a capability that the device to which the first software is distributed may not have.
  • the capability set required by the first software includes a strongly dependent NFC capability and a weakly dependent account capability
  • the capability set of electronic device A includes NFC capability but does not include account capability
  • the capability set of electronic device B does not include NFC capability but includes account capability
  • a parent-child relationship may exist between the capabilities in the capability set required by the first software, for example, the system account capability and the application account capability are sub-capabilities (i.e., subclasses) of the account capability, and the account capability is the parent capability (i.e., parent class) of the system account capability and the application account capability.
  • the electronic device 400 can set the degree of dependency of the parent capability by setting the degree of dependency of the sub-capability. For example, after the system account capability and the application account capability as sub-capabilities are set to strong dependency and weak dependency respectively, the degree of dependency of the account capability as the parent capability is strong dependency.
  • the electronic device 400 can set the degree of dependency of the sub-capability by setting the degree of dependency of the parent capability. For example, after the account capability as the parent capability is set to strong dependency, the degree of dependency of the system account capability and the application account capability as the sub-capability are both strong dependencies.
  • S204 The electronic device 400 generates a capability set required by the first software.
  • the electronic device 400 can generate a capability set required by the first software (for example, but not limited to, a file in rpcid format) based on the selected capability.
  • the identification method of the capability in the capability set required by the first software is consistent with the identification method of the capability in the capability set dictionary described in FIG. 5 (i.e., through coding identification). No more details are given.
  • the first software may include multiple versions, wherein the capability sets required by different versions of the first software may be the same or different, which is not limited in the present application.
  • S205 The electronic device 400 generates an installation package for the first software.
  • the electronic device 400 may receive a user operation and generate an installation package of the first software.
  • the developer of the first software inputs the user operation through a development tool of the electronic device 400, and the electronic device 400 compiles and generates the installation package of the first software according to the user operation.
  • the installation package of the first software may include a capability set required by the first software.
  • the electronic device 400 sends the installation package of the first software to the network device 300 .
  • the installation package of the first software may include a capability set required by the first software.
  • the capability set required by the first software is independent of the installation package of the first software, and the electronic device 400 can send the capability set required by the first software to the network device 300.
  • S207 The network device 300 saves the installation package of the first software.
  • the network device 300 may store a capability set required by the first software for distribution of the first software.
  • the network device 300 can store the installation package of the first software for distribution of the first software.
  • the network device 300 can send the installation package of the first software to other devices so that the other devices store the installation package of the first software, and the network device 300 can store the download method of the installation package of the first software, such as information of the other devices, such as the download address, for distribution of the first software.
  • the electronic device 400 can also send the installation package of the first software to other devices, and send the download method of the installation package of the first software to the network device 300, and this application does not limit this.
  • the identification method of the capabilities in the capability set required by the first software is consistent with the identification method of the capabilities in the capability set dictionary described in FIG. 5 , which unifies the identification method of the capabilities and reduces the difficulty of development and maintenance.
  • Figure 7 is a flowchart of another software distribution method provided by an embodiment of the present application.
  • the method can be applied to the software distribution system 10 shown in Figure 1.
  • the method may include but is not limited to the following steps:
  • S301 The electronic device 100 determines that second software needs to be distributed.
  • the electronic device 100 may determine that the electronic device 100 needs to be distributed with a second software, and the second software is related to the above-mentioned triggering scenario.
  • the third software of the electronic device 100 may determine that the electronic device 100 needs to be distributed with a second software, wherein the third software of the electronic device 100 is software related to the second software, for example, the second software needs to be run in an environment where the third software of the electronic device 100 is installed, for example, the electronic device 100 is a negative one-screen application, and the second software is an atomic service for travel booking.
  • the electronic device 100 when the electronic device 100 arrives at a preset location, it is determined to be in a first triggering scenario.
  • the preset location is an airport
  • the second software related to the first triggering scenario is an atomic service for travel booking.
  • the electronic device 100 can determine whether it is in a trigger scenario and the related second software based on the user portrait. For example, the electronic device 100 determines based on the user portrait that the user will use the atomic service of notes after starting the reading application. Therefore, when the electronic device 100 receives the user operation for starting the reading application, it determines that it is in the second trigger scenario, and the second software related to the second trigger scenario is the atomic service of notes.
  • the electronic device 100 when the electronic device 100 receives a user operation, it is determined to be in a triggering scenario, and the user operation may include but is not limited to touch operation, voice input, brain waves, etc.
  • the electronic device 100 receives a user input voice "check my express delivery"
  • the electronic device 100 receives a user input voice "check my express delivery”
  • the second software related to the third triggering scenario is an atomic service for express delivery.
  • the electronic device 100 can determine whether it is in a trigger scenario based on a scheduled task set by the user. For example, the scheduled task set by the user is to play the news at eight o'clock in the morning. Therefore, when the electronic device 100 determines that the time difference between the current moment and eight o'clock is less than or equal to the preset duration, it determines that it is in the fourth trigger scenario, and the second software related to the fourth trigger scenario is an atomic service for news.
  • the electronic device 100 can determine whether it is in a trigger scene based on the keywords searched by the user. For example, when the user searches for "food" in the negative one screen application, the electronic device 100 determines that it is in the fifth trigger scene, and the second software related to the fifth trigger scene is an atomic service for nearby food.
  • the electronic device 100 obtains a capability set of the electronic device 100.
  • S302 is an optional step.
  • the third software of the electronic device 100 requests the system of the electronic device 100 to obtain the capability set of the electronic device 100.
  • the third software of the electronic device 100 may call the interface provided by the system of the electronic device 100 to request the system of the electronic device 100 to obtain the capability set of the electronic device 100, and the system of the electronic device 100 returns the capability set of the electronic device 100 to the third software of the electronic device 100.
  • the system of the electronic device 100 is, for example but not limited to, an OS.
  • the capability set of the electronic device 100 may be characterized by a first parameter, and the first parameter may include an encoding of a capability in the capability set of the electronic device 100. For example, when the capability set of the electronic device 100 includes the capabilities shown in Table 1, it may be characterized by a first parameter (for example, named pcidVar) "1.5, 2.1, 2.2, x.1.11".
  • the electronic device 100 may send a third message to the network device 300 , and the third message may be used to request to obtain the second software.
  • the third software of the electronic device 100 may send a third message to the network device 300 .
  • the third message carries a capability set of the electronic device 100, for example, the third message carries a capability set for characterizing the electronic device 100.
  • the first parameter of the capability set of the sub-device 100 in some examples, the electronic device 100 may generate a third message according to the stored capability set of the electronic device 100.
  • the third message may include information of the second software, such as the name of the second software, the unique identification code of the second software, the version of the second software, etc.
  • S304 The network device 300 determines the second software that needs to be distributed according to the third message.
  • the network device 300 may obtain the capability set of the electronic device 100 from the received third message. In another optional embodiment, the network device 300 may store the capability set of the electronic device 100, and after receiving the third message, the network device 300 may read the stored capability set of the electronic device 100.
  • the network device 300 may obtain information about the second software based on the received third message, and obtain the capability set required by the second software based on the information about the second software.
  • the information about the second software may include, for example but not limited to, the name of the second software, the unique identification code of the second software, and the version of the second software.
  • the network device 300 may store capability sets required by multiple software, and the network device 300 may find the capability set required by the second software from the stored capability sets required by multiple software based on the information about the second software. An example of how the network device 300 obtains capability sets required by multiple software can be found in the embodiment shown in FIG6.
  • S305 The network device 300 determines whether the first condition is met.
  • the first condition includes that the capability set of the electronic device 100 matches the capability set required by the second software.
  • the network device 300 can distribute the second software to the electronic device 100, that is, execute S307.
  • meeting the first condition may include but is not limited to at least one of the following situations:
  • Case 1 the capability set of the electronic device 100 includes each capability in the capability set required by the second software
  • the capability set of the electronic device 100 includes a capability that is strongly dependent on the capability set required by the second software
  • Case 3 The capability set of the electronic device 100 includes the parent capability of the capability that the second software strongly depends on in the capability set.
  • the matching of the capability set of the electronic device 100 and the capability set required by the second software may include the above-mentioned case 1 and case 2, for example, the case where the degree of dependency of each capability in the capability set required by the second software is a strong dependency.
  • the capability set of electronic device 100 and the capability set required by the second software may match Case 2 and Case 3 described above.
  • the capability set of electronic device 100 includes capability 1 and capability 2
  • the capability set required by the second software includes strongly dependent capability 1 and capability 3, wherein capability 2 is the parent capability of capability 3.
  • the network device 300 may not distribute the second software to the electronic device 100 .
  • the second software may include multiple versions, and the capability sets required by different versions of the second software may be the same. In another optional embodiment, the capability sets required by different versions of the second software may be different.
  • the third message may include the version of the second software (assuming it is the first version), and the network device 300 may compare the capability set of the electronic device 100 with the capability set required by the first version of the second software. When the two match, the network device 300 may distribute the second software to the electronic device 100, otherwise the second software will not be distributed.
  • the third message does not include the version of the second software.
  • the network device 300 can compare the capability set of the electronic device 100 with the capability sets required by the second software of multiple versions. In some examples, when the capability set required by only one second version of the second software matches the capability set of the electronic device 100, the network device 300 can distribute the second version of the second software to the electronic device 100. In other examples, when the capability sets required by at least two versions of the second software match the capability set of the electronic device 100, the network device 300 can distribute the newer version of the second software to the electronic device 100.
  • the network device 300 can distribute the fourth version of the second software to the electronic device 100.
  • the network device 300 may not distribute the second software to the electronic device 100.
  • the third message includes the version of the second software (assuming it is the first version). If the network device 300 determines that the capability set of the electronic device 100 does not match the capability set required by the first version of the second software, but the network device 300 determines that the capability set of the electronic device 100 matches the capability set required by the fifth version of the second software, the fifth version of the second software can be distributed to the electronic device 100. This application does not limit this.
  • the network device 300 may send a fourth message to the electronic device 100, where the fourth message is used to prompt the user that the electronic device 100 does not have the ability to run the second software.
  • the network device 300 sends the installation package of the second software to the electronic device 100 .
  • the network device 300 may send the installation package of the second software to the electronic device 100 to distribute the second software. In an optional embodiment, when the first condition is met, the network device 300 may send the installation package of the second software to the third software of the electronic device 100 to distribute the second software.
  • the network device 300 may store the installation package of the second software, and the network device 300 may send the installation package of the second software to the electronic device 100 to distribute the second software.
  • the installation package of the second software is stored by another device other than the network device 300, and the network device 300 may store the download method of the installation package of the second software, such as information of the other device, such as a download address, and the network device 300 may send the download method of the second software to the electronic device 100 to distribute the second software.
  • S307 is an optional step.
  • the second software can be installed according to the installation package.
  • the third software of the electronic device 100 receives the installation package of the second software sent by the network device 300
  • the second software can be installed according to the installation package.
  • the installation can be, but is not limited to, a silent installation, such as an installation without displaying the installation progress and icon.
  • the electronic device 100 after the electronic device 100 receives the download method of the second software sent by the network device 300, it can obtain the installation package of the second software according to the download method of the second software, and install the second software according to the installation package.
  • S308 The electronic device 100 displays the interface of the second software.
  • S308 is an optional step.
  • the user interface of the second software is displayed.
  • the electronic device 100 after the electronic device 100 installs the second software, it receives a user operation, and displays the user interface of the second software in response to the user operation.
  • the third software of the electronic device 100 after the third software of the electronic device 100 installs the second software, the user interface of the second software is displayed.
  • a home scenario mobile phone 1, speaker 1 equipped with a display screen, speaker 2 not equipped with a display screen, and door lock 1 equipped with a display screen.
  • the user in the home scenario can output a voice, assuming it is "play video A".
  • Any device in the home scenario can receive the above voice and determine that it is in triggering scenario 6 based on the voice.
  • the software related to triggering scenario 6 is an atomic service for video, and the capability set required by the software includes a strongly dependent capability of video playback capability. Since the capability sets of mobile phone 1, speaker 1, and door lock 1 include video playback capability and the parent capability of video playback capability, mobile phone 1, speaker 1, and door lock 1 can be distributed with the above software. Since the capability set of speaker 2 does not include video playback capability and the parent capability of video playback capability, speaker 2 cannot be distributed with the above software.
  • the distribution of software is implemented based on the capability set of the device, and is independent of the device type.
  • the scenarios for triggering software distribution i.e., the above-mentioned triggering scenarios
  • this method does not require users to manually download and install software, that is, electronic devices can automatically install software distributed by network devices, which is more convenient for users to use.
  • Figure 8 is a flowchart of another software distribution method provided by an embodiment of the present application.
  • the method can be applied to the software distribution system 10 shown in Figure 1.
  • the method may include but is not limited to the following steps:
  • S401 The electronic device 100 determines that the fourth software needs to be distributed.
  • the electronic device 100 may determine that the fourth software needs to be distributed when it is recognized that the user intends to distribute the fourth software.
  • the fifth software of the electronic device 100 may determine that the fourth software needs to be distributed when it is recognized that the user intends to distribute the fourth software, wherein the fifth software of the electronic device 100 is software related to the fourth software, for example, the fourth software needs to be run in an environment where the fifth software of the electronic device 100 is installed.
  • the electronic device 100 can identify the user intention based on the received user operation. For example, when the electronic device 100 displays the user interface of the fourth software, in response to the user operation on the flow control in the user interface, it is determined that the fourth software needs to be distributed. In other examples, the electronic device 100 can automatically identify the user intention, for example, identifying the user intention based on the user portrait.
  • electronic device 100 may determine that the software to be distributed is the fourth software in response to a user operation. In other examples, electronic device 100 may also determine preset software as the software to be distributed. For example, when electronic device 100 displays the user interface of the fourth software, the fourth software is set as the software to be distributed.
  • the electronic device 100 determines a target device to which the fourth software is distributed.
  • the electronic device 100 may receive a user operation to determine a target device to which the fourth software is distributed.
  • the fifth software of the electronic device may receive a user operation to determine a target device to which the fourth software is distributed.
  • the fifth software of the electronic device 100 may display information of multiple devices in response to a user operation on a flow control in a user interface of the fourth software.
  • the multiple devices may be discovered and/or connected to the electronic device 100 through a distributed communication method (e.g., a soft bus).
  • a distributed communication method e.g., a soft bus.
  • the fifth software of the electronic device 100 receives the user operation for the information of the electronic device 200 among the multiple devices, it can determine that the target device to which the fourth software is distributed is the electronic device 200.
  • the electronic device 100 can determine that the target device to which the software is distributed is the electronic device 200 in response to the user operation.
  • the electronic device 100 can determine a preset device as the target device to which the software is distributed, for example, setting the electronic device 200 with the most recent communication as the target device to which the software is distributed.
  • S403 The electronic device 100 requests the electronic device 200 to obtain the capability set of the electronic device 200.
  • S403 is an optional step.
  • the capability set of the electronic device 200 may be used by the electronic device 100 to request the network device 300 to distribute the fourth software to the electronic device 200.
  • the fifth software of the electronic device 100 may request the electronic device 200 to obtain the capability set of the electronic device 200, wherein the capability set of the electronic device 200 may be used by the fifth software of the electronic device 100 to request the network device 300 to distribute the fourth software to the electronic device 200.
  • the electronic device 200 sends the capability set of the electronic device 200 to the electronic device 100 .
  • S404 is an optional step.
  • the electronic device 200 after the electronic device 200 receives the request sent by the electronic device 100, it can obtain the capability set of the electronic device 200 and send the capability set of the electronic device 200 to the electronic device 100. In an optional embodiment, after the electronic device 200 receives the request of the fifth software of the electronic device 100, it can obtain the capability set of the electronic device 200 and send the capability set of the electronic device 200 to the fifth software of the electronic device 100.
  • the capability set of the electronic device 200 may be characterized by a second parameter. For specific examples, see the description of the method for characterizing the capability set of the electronic device 100 in S302 of FIG. 7 .
  • S405 The electronic device 100 sends a fifth message to the network device 300 .
  • the electronic device 100 after the electronic device 100 receives the capability set of the electronic device 200, it can send a fifth message to the network device 300, and the fifth message can be used to request the distribution of the fourth software to the electronic device 200. In an optional embodiment, after the fifth software of the electronic device 100 receives the capability set of the electronic device 200, it can send a fifth message to the network device 300.
  • the fifth message carries a capability set of the electronic device 200 , for example, the fifth message carries a second parameter for characterizing the capability set of the electronic device 200 .
  • the fifth message may include information about the fourth software, such as but not limited to the name of the fourth software, the unique identification code of the fourth software, and the version of the fourth software.
  • the network device 300 determines the fourth software that needs to be distributed according to the fifth message.
  • the network device 300 may obtain the capability set of the electronic device 200 from the received fifth message. In another optional embodiment, the network device 300 may store the capability set of the electronic device 200, and after receiving the fifth message, the network device 300 may read the stored capability set of the electronic device 200.
  • the network device 300 can obtain information about the fourth software based on the received fifth message, and obtain the capability set required by the fourth software based on the information of the fourth software.
  • the network device 300 can obtain the capability set required by the second software in S304 of Figure 7, which will not be repeated here.
  • S407 The network device 300 determines whether the second condition is met.
  • the second condition includes that the capability set of the electronic device 200 matches the capability set required by the fourth software.
  • the second condition see the description of matching the capability set of the electronic device 100 and the capability set required by the second software in S305 of FIG. 7 .
  • the network device 300 sends a sixth message to the electronic device 100 .
  • S408 is an optional step.
  • the network device 300 may send a sixth message to the electronic device 100 according to the result of whether the second condition is satisfied. In an optional embodiment, the network device 300 may send a sixth message to the fifth software of the electronic device 100 according to the result of whether the second condition is satisfied. Optionally, the sixth message may indicate whether the fourth software can be distributed to the electronic device 200. In some examples, when the second condition is satisfied, the sixth message indicates that the fourth software can be distributed to the electronic device 200, and in other examples, when the second condition is not satisfied, the sixth message indicates that the fourth software cannot be distributed to the electronic device 200.
  • the network device 300 may store the installation package of the fourth software, the sixth message may include the installation package of the fourth software, and the sixth message may indicate that the fourth software can be distributed to the electronic device 200.
  • the installation package of the fourth software is stored by another device other than the network device 300, the network device 300 may store the download method of the installation package of the fourth software, the sixth message may include the download method of the installation package of the fourth software, and the sixth message may indicate that the fourth software can be distributed to the electronic device 200.
  • S409 is an optional step.
  • the electronic device 100 can distribute the fourth software to the electronic device 200.
  • the fifth software of the electronic device 100 when the sixth message indicates that the fourth software can be distributed to the electronic device 200, the fifth software of the electronic device 100 can distribute the fourth software to the electronic device 200.
  • the electronic device 100 may obtain the installation package of the fourth software according to the received sixth message, and then send the installation package of the fourth software to the electronic device 200 to distribute the fourth software.
  • the electronic device 100 may obtain the download method of the installation package of the fourth software according to the received sixth message, and then send the download method of the installation package of the fourth software to the electronic device 200 to distribute the fourth software.
  • the electronic device 100 may send the installation package of the fourth software stored in the electronic device 100 or the download method of the installation package of the fourth software to the electronic device 200 to distribute the fourth software.
  • the electronic device 100 may not distribute the fourth software to the electronic device 200. For example, at this time, the electronic device 100 may display a prompt message, and the prompt message is used to prompt the user that the electronic device 200 does not have the ability to run the fourth software.
  • S410 The electronic device 200 installs the fourth software.
  • S410 is an optional step.
  • S410 is similar to S307 in FIG. 7 , and details of S307 in FIG. 7 may be referred to, and will not be described in detail.
  • S411 The electronic device 200 displays an interface of the fourth software.
  • S411 is an optional step.
  • S411 is similar to S308 in FIG. 7 , and details of S308 in FIG. 7 may be referred to, and details will not be repeated here.
  • S403-S404 may be replaced by: the network device 300 requests the electronic device 200 to obtain the capability set of the electronic device 200, and the electronic device 200 sends the capability set of the electronic device 200 to the network device 300.
  • This optional embodiment may be after S405 and before S406, and the specific description is similar to that of S405-S406, and will not be repeated here.
  • S408 - S409 may be replaced by: the network device 300 distributes the fourth software to the electronic device 200 , and the specific description is similar to that of S409 and will not be repeated herein.
  • cross-device software transfer is implemented based on the capability set of the device, and is independent of the device type, which solves the technical problem that some devices supported by the software cannot be transferred when transferring software based on the device type, and expands the range of devices that can be transferred.
  • the electronic device 200 to which the software is transferred does not require the user to manually download and install the software, that is, the electronic device 200 can automatically install the transferred software, which is more convenient for the user to use.
  • FIG. 9 exemplarily shows a user interface diagram of a software distribution process.
  • the electronic device 100 may display a user interface 1000, for example, the user interface 1000 is the desktop of the electronic device 100.
  • the user interface 1000 may include a control 1010, which may indicate that the electronic device 100 has turned on the function of a voice assistant.
  • the electronic device 100 may receive a user operation, for example, the user operation is a voice input, and FIG. 9 takes the voice input as "check my express delivery" as an example for explanation.
  • the electronic device 100 may respond to the user operation and obtain software related to the user operation (FIG. 9 takes the atomic service of express delivery as an example for explanation), for example, executing S301-S306 of FIG. 7 , wherein the atomic service of express delivery is the second software.
  • the electronic device 100 may install the atomic service of express delivery obtained, for example, executing S307 of FIG. 7 , at which time the electronic device 100 may display the user interface of the atomic service, for example, executing S308 of FIG. 7 , and specifically refer to the user interface 2000 shown in (B) of FIG. 9 .
  • the user interface 2000 is, for example, the desktop of the electronic device 100.
  • the user interface 2000 may include a window 2010, and the window 2010 may include a voice message 2020, a card control 2030, and a flow control 2040.
  • the characters included in the voice message 2020 are the specific content of the above-mentioned voice input, namely, "check my express delivery".
  • the card control 2030 is used to display the specific content of the atomic service of express delivery, such as the content related to the above-mentioned voice input, that is, the express information 2030A of the current user.
  • the flow control 2040 can be used to circulate atomic services.
  • the electronic device 100 can respond to a user operation on the flow control 2040, for example, the user operation is a touch operation, and the touch operation is, for example, a click operation, to display a selection interface for the flow content and the flow object, and specifically refer to the user interface 3000 shown in (C) of FIG. 9 .
  • the user operation is a touch operation
  • the touch operation is, for example, a click operation
  • the user interface 3000 may include a target content list 3010 and a target device list 3020.
  • the target content list 3010 may include at least one option for software that can be distributed (i.e., streaming content), for example: option 3011 indicating an atomic service for express delivery (including the characters “express query service”).
  • the target device list 3020 may include at least one option for a target device (i.e., streaming object) to which software can be distributed.
  • the at least one target device to which software can be distributed may include, but is not limited to, devices discovered and/or connected by the electronic device 100 through near-field and/or far-field communication methods, for example: option 3021 indicating a device named “Smart Screen in the Living Room”, and an option 3022 indicating a device named "My Tablet".
  • the electronic device 100 may respond to a user operation on any one of the options in the target content list 3010, such as a touch operation, and select the software indicated by the option as the streaming content.
  • the electronic device 100 may respond to a user operation on any one of the options in the target device list 3020, such as a touch operation, and select the device indicated by the option as the streaming object.
  • the electronic device 100 can execute the process of distributing the atomic service of express delivery to the electronic device 200, such as executing S401-S409 of Figure 8, wherein the atomic service of express delivery is the fourth software.
  • the electronic device 200 can install the distributed atomic service of express delivery, such as executing S410 of Figure 8, at which time the electronic device 200 can display the user interface of the atomic service, such as executing S411 of Figure 8.
  • the display interface of the electronic device 100 and the electronic device 200 can refer to Figure 10 below.
  • the electronic device 100 can display a user interface 4000, which is similar to the user interface 3000 shown in (C) of Figure 9, except that option 3011 and option 3022 are selected.
  • the electronic device 200 can display a user interface 5000, which is, for example, the desktop of the electronic device 200, and the user interface 5000 may include a card control 5010 and a flow control 5020.
  • the card control 5010 is consistent with the card control 2030 shown in (B) of Figure 9, and will not be repeated.
  • the flow control 5020 can be used to circulate the atomic service of the currently displayed express delivery.
  • the electronic device 100 may no longer display the user interface 3000 or the user interface 4000 , for example, returning to display the desktop, which is not limited in the present application.
  • the card control 5010 displayed by the electronic device 200 may be different from the card control 2030 shown in (B) of FIG. 9 .
  • the card control 5010 is used to display the homepage of the atomic service of express delivery, which is not limited in the present application.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part 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.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., 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 data center that includes one or more available media integrated therein.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DWD), or a semiconductor medium (e.g., a solid state disk (SSD)).

Landscapes

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

Abstract

The present application provides a software distribution method, an electronic device, and a system. The method comprises: sending a first message to a network device, wherein the first message is used for requesting to obtain a first software, the first message comprises first information used for indicating the capability set of the first device, and the capability set of the first device comprises the hardware capability and software capability supported by the first device; when the capability set of the first device matches the capability set corresponding to the first software, receiving an installation file of the first software or a download mode for the installation file of the first software sent by the network device, wherein the capability set corresponding to the first software comprises the hardware capability and the software capability that a device must support in order to be able to run the first software; displaying a first interface of the first software according to the installation file of the first software or the download mode of the installation file of the first software. The present application utilizes artificial intelligence (AI) technology to enable a more flexible and intelligent software distribution mechanism that is independent of device types, expanding the range of devices for software distribution.

Description

一种软件分发方法、电子设备及***Software distribution method, electronic device and system
本申请要求在2022年10月20日提交中国国家知识产权局、申请号为202211287246.2的中国专利申请的优先权,发明名称为“一种软件分发方法、电子设备及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on October 20, 2022, with application number 202211287246.2, and priority to the Chinese patent application with the invention name “A software distribution method, electronic device and system”, all contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及计算机技术领域,尤其涉及一种软件分发方法、电子设备及***。The present application relates to the field of computer technology, and in particular to a software distribution method, electronic device and system.
背景技术Background technique
终端上可供用户使用的软件例如应用程序和小程序等,这些软件可以由服务器分发给终端。目前,软件的分发是基于软件支持的设备类型实现的,例如,软件1支持的设备类型包括手机和平板,因此,手机和平板可以被分发软件1,但大屏无法被分发。这样的分发方式局限性很大,例如,不同厂家发布的设备繁多,可能存在软件的开发者无法获取到该软件支持的部分设备的类型字段,导致这部分设备无法被分发该软件的情况,不够灵活和智能。Software available to users on the terminal, such as applications and applets, can be distributed to the terminal by the server. Currently, software distribution is based on the device types supported by the software. For example, the device types supported by software 1 include mobile phones and tablets. Therefore, mobile phones and tablets can be distributed with software 1, but large screens cannot be distributed. This distribution method has great limitations. For example, there are many devices released by different manufacturers. It is possible that the software developer cannot obtain the type field of some devices supported by the software, resulting in the inability to distribute the software to these devices. It is not flexible and intelligent enough.
发明内容Summary of the invention
本申请公开了一种软件分发方法、电子设备及***,能够提供更加灵活和智能的软件分发机制,不依赖于设备类型,扩大了可被分发软件的设备范围。The present application discloses a software distribution method, electronic device and system, which can provide a more flexible and intelligent software distribution mechanism, is independent of the device type, and expands the range of devices to which software can be distributed.
第一方面,本申请提供了一种软件分发方法,应用于第一设备,该方法包括:向网络设备发送第一消息,所述第一消息用于请求获取第一软件,所述第一消息包括用于指示所述第一设备的能力集的第一信息,所述第一设备的能力集包括所述第一设备支持的硬件能力和软件能力;当所述第一设备的能力集和所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,所述第一软件对应的能力集包括能运行所述第一软件的设备需要支持的硬件能力和软件能力;根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的第一界面。In a first aspect, the present application provides a software distribution method, applied to a first device, the method comprising: sending a first message to a network device, the first message being used to request acquisition of a first software, the first message comprising first information for indicating a capability set of the first device, the capability set of the first device comprising hardware capabilities and software capabilities supported by the first device; when the capability set of the first device matches the capability set corresponding to the first software, receiving an installation file of the first software sent by the network device or a download method of the installation file of the first software, the capability set corresponding to the first software comprising hardware capabilities and software capabilities that a device that can run the first software needs to support; and displaying a first interface of the first software according to the installation file of the first software or the download method of the installation file of the first software.
在上述方法中,第一设备可以向网络设备请求获取第一软件,当第一设备的能力集和第一软件对应的能力集匹配时,可以被网络设备分发第一软件,该方法是基于设备能力集和软件需要的能力集实现软件分发功能,而不依赖于设备类型,避免某些设备虽然具备能运行第一软件的能力但由于设备类型不为第一软件支持的设备类型,造成这些设备无法被分发第一软件的情况,扩大了可被分发第一软件的设备范围,使软件分发功能的应用场景更加广泛。In the above method, the first device can request the network device to obtain the first software. When the capability set of the first device matches the capability set corresponding to the first software, the first software can be distributed by the network device. This method implements the software distribution function based on the device capability set and the capability set required by the software, and does not depend on the device type. This avoids the situation where some devices have the ability to run the first software but cannot be distributed the first software because the device type is not the device type supported by the first software. This expands the range of devices that can be distributed the first software and makes the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述向网络设备发送第一消息,包括:当确定处于预设场景时,向所述网络设备发送所述第一消息,所述第一软件和所述预设场景相关。In a possible implementation, sending the first message to the network device includes: when it is determined to be in a preset scenario, sending the first message to the network device, and the first software is related to the preset scenario.
在上述方法中,当确定处于预设场景时,第一设备可以向网络设备请求被分发和预设场景相关的第一软件,也就是说,分发的软件符合当前使用场景/当前用户需求。不同场景下分发的软件可以不同,能够满足不同用户在不同场景下的不同需求,使得软件分发功能更加灵活和智能,提升用户体验。In the above method, when it is determined that the first device is in the preset scenario, the first device can request the network device to distribute the first software related to the preset scenario, that is, the distributed software meets the current usage scenario/current user needs. The software distributed in different scenarios can be different, which can meet the different needs of different users in different scenarios, making the software distribution function more flexible and intelligent, and improving the user experience.
在一种可能的实现方式中,所述第一设备的能力集和所述第一软件对应的能力集匹配,包括以下至少一种情况:所述第一设备的能力集包括所述第一软件对应的能力集中的能力;所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力,所述强依赖的能力为被分发所述第一软件的设备要求具备的能力;所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力的父能力。In a possible implementation, the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations: the capability set of the first device includes capabilities in the capability set corresponding to the first software; the capability set of the first device includes capabilities that are strongly dependent on the capability set corresponding to the first software, and the strongly dependent capabilities are capabilities required by the device to which the first software is distributed; the capability set of the first device includes the parent capability of the capabilities that are strongly dependent on the capabilities in the capability set corresponding to the first software.
在一些示例中,第一软件对应的能力集可以包括强依赖的能力和弱依赖的能力,强依赖的能力为被分发第一软件的设备要求具备的能力,弱依赖的能力为被分发第一软件的设备可以不具备的能力。In some examples, the capability set corresponding to the first software may include strongly dependent capabilities and weakly dependent capabilities. The strongly dependent capabilities are capabilities that the device to which the first software is distributed is required to have, and the weakly dependent capabilities are capabilities that the device to which the first software is distributed may not have.
在一些示例中,能力之间可以存在父子关系,即一个父能力可以对应至少一个子能力。在一些示例中,父能力为强依赖的能力时,对应的子能力均为强依赖的能力,对应的子能力均为强依赖时,父能力为强依赖的能力。In some examples, there may be a parent-child relationship between capabilities, that is, a parent capability may correspond to at least one child capability. In some examples, when the parent capability is a strongly dependent capability, the corresponding child capabilities are all strongly dependent capabilities, and when the corresponding child capabilities are all strongly dependent, the parent capability is a strongly dependent capability.
在上述方法中,第一设备的能力集和第一软件对应的能力集匹配的情况多种多样,例如第一设备的能力集包括第一软件对应的能力集中的全部能力可以理解为是对被分发设备的要求较高的情况,第一设备的能力集包括第一软件对应的能力集中强依赖的能力或者强依赖的能力的父能力可以理解为是对被分发设备的要求较低的情况,拓宽软件分发的应用场景。In the above method, there are various situations in which the capability set of the first device matches the capability set corresponding to the first software. For example, the capability set of the first device includes all capabilities in the capability set corresponding to the first software, which can be understood as a situation where the requirements for the distributed device are higher. The capability set of the first device includes strongly dependent capabilities in the capability set corresponding to the first software or the parent capabilities of the strongly dependent capabilities, which can be understood as a situation where the requirements for the distributed device are lower, thereby broadening the application scenarios of software distribution.
在一种可能的实现方式中,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同 或不相同,所述当所述第一设备的能力集和所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,包括:当所述第一设备的能力集和第一版本的所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一版本的第一软件的安装文件或所述第一版本的第一软件的安装文件的下载方式。In a possible implementation, the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same. Or different, when the capability set of the first device matches the capability set corresponding to the first software, the installation file of the first software sent by the network device is received or the installation file of the first software is downloaded, including: when the capability set of the first device matches the capability set corresponding to the first version of the first software, the installation file of the first version of the first software sent by the network device is received or the installation file of the first version of the first software is downloaded.
在上述方法中,当第一设备的能力集和多个版本中任意一个版本的第一软件对应的能力集匹配时,第一设备可以被分发该版本的第一软件,避免第一设备的能力集和部分版本的第一软件对应的能力集不匹配,导致第一设备无法被分发第一软件的情况,扩大了可被分发第一软件的设备范围。In the above method, when the capability set of the first device matches the capability set corresponding to the first software of any one of multiple versions, the first device can be distributed with the first software of that version, thereby avoiding the situation where the capability set of the first device does not match the capability set corresponding to some versions of the first software, resulting in the first device being unable to be distributed with the first software, thereby expanding the range of devices to which the first software can be distributed.
在一种可能的实现方式中,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同或不相同,所述方法还包括:当所述第一设备的能力集和第二版本的所述第一软件对应的能力集匹配、以及第三版本的所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第二版本的第一软件的安装文件或所述第二版本的第一软件的安装文件的下载方式,其中,所述第二版本新于所述第三版本。In a possible implementation, the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same or different. The method also includes: when the capability set of the first device matches the capability set corresponding to the second version of the first software, and the capability set corresponding to the third version of the first software matches, receiving the installation file of the second version of the first software sent by the network device or the download method of the installation file of the second version of the first software, wherein the second version is newer than the third version.
在上述方法中,当第一设备的能力集和多个版本的第一软件对应的能力集均匹配时,第一设备可以被分发版本更新的第一软件,软件分发的方式更加精细化,也更加符合用户需求,提升用户体验。In the above method, when the capability set of the first device matches the capability sets corresponding to multiple versions of the first software, the first device can be distributed with the updated version of the first software. The software distribution method is more refined and more in line with user needs, thereby improving the user experience.
在一种可能的实现方式中,所述根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的第一界面,包括:根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的第一界面;或者,根据所述第一软件的安装文件的下载方式,下载所述第一软件的安装文件;根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的第一界面。In a possible implementation, displaying the first interface of the first software according to the installation file of the first software or the downloading method of the installation file of the first software includes: installing the first software according to the installation file of the first software; displaying the first interface of the first software; or, downloading the installation file of the first software according to the downloading method of the installation file of the first software; installing the first software according to the installation file of the first software; and displaying the first interface of the first software.
在一些示例中,所述安装所述第一软件为静默安装,例如不显示提示用户安装的用户界面和安装进度。In some examples, the installation of the first software is a silent installation, for example, a user interface and installation progress prompting the user to install are not displayed.
在上述方法中,第一设备接收到第一软件的安装文件后可以自动安装第一软件,或者,第一设备接收到第一软件的安装文件的下载地址后,可以自动下载安装文件,再自动安装第一软件,无需用户手动操作,用户使用更加方便。In the above method, after the first device receives the installation file of the first software, it can automatically install the first software, or after the first device receives the download address of the installation file of the first software, it can automatically download the installation file and then automatically install the first software, without the need for manual operation by the user, which is more convenient for users to use.
在一种可能的实现方式中,所述方法还包括:获取第二设备的能力集;向所述网络设备发送第二消息,所述第二消息用于请求向所述第二设备分发第二软件,所述第二消息包括用于指示所述第二设备的能力集的第二信息,所述第二设备用于当所述第二设备的能力集和所述第二软件对应的能力集匹配时,接收所述第二软件的安装文件或所述第二软件的安装文件的下载方式,所述第二软件的安装文件或所述第二软件的安装文件的下载方式用于所述第二设备显示所述第二软件的第二界面。In one possible implementation, the method also includes: obtaining a capability set of the second device; sending a second message to the network device, the second message being used to request distribution of second software to the second device, the second message including second information indicating the capability set of the second device, the second device being used to receive the installation file of the second software or the download method of the installation file of the second software when the capability set of the second device matches the capability set corresponding to the second software, the installation file of the second software or the download method of the installation file of the second software being used by the second device to display a second interface of the second software.
在上述方法中,第一设备可以向网络设备请求向第二设备分发第二软件,当第二设备的能力集和第二软件对应的能力集匹配时,第二设备可以被分发第二软件,这种软件分发的方式不仅不依赖于设备类型,而且无需被分发软件的第二设备自行向网络设备请求,即使第二设备无法和网络设备通信(例如不具备对应的通信能力、未获取到网络设备的地址信息等),也可以被分发第二软件,进一步扩大了可被分发软件的设备范围,使软件分发功能的应用场景更加广泛。In the above method, the first device can request the network device to distribute the second software to the second device. When the capability set of the second device matches the capability set corresponding to the second software, the second device can be distributed the second software. This software distribution method not only does not depend on the device type, but also does not require the second device to which the software is distributed to request the network device on its own. Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can still be distributed the second software, further expanding the range of devices to which the software can be distributed and making the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述获取第二设备的能力集,包括:向所述第二设备发送第三消息,所述第三消息用于请求获取所述第二设备的能力集;接收所述第二设备发送的所述第二设备的能力集。In a possible implementation, obtaining the capability set of the second device includes: sending a third message to the second device, where the third message is used to request obtaining the capability set of the second device; and receiving the capability set of the second device sent by the second device.
在一种可能的实现方式中,所述第一界面包括流转控件;所述获取第二设备的能力集,包括:接收针对所述流转控件的第一操作;获取所述第二设备的能力集。In a possible implementation, the first interface includes a flow control; and obtaining the capability set of the second device includes: receiving a first operation for the flow control; and obtaining the capability set of the second device.
在上述方法中,第一操作可以触发向第二设备分发第二软件的过程,即软件分发的时机是根据用户操作确定的,更加符合用户需求,提升用户体验。In the above method, the first operation can trigger the process of distributing the second software to the second device, that is, the timing of software distribution is determined according to the user operation, which is more in line with user needs and improves user experience.
在一种可能的实现方式中,所述向所述网络设备发送第二消息之后,所述方法还包括:接收所述网络设备发送的第三消息,所述第三消息用于指示向所述第二设备分发所述第二软件;向所述第二设备发送所述第二软件的安装文件或所述第二软件的安装文件的下载方式。In a possible implementation, after sending the second message to the network device, the method further includes: receiving a third message sent by the network device, the third message being used to instruct distribution of the second software to the second device; and sending the installation file of the second software or the download method of the installation file of the second software to the second device.
在上述方法中,第一设备可以根据网络设备发送的第三消息,向第二设备分发第二软件(可称为跨设备流转软件),即使网络设备无法和第二设备通信,也可以正常为第二设备分发第二软件,使软件分发功能的应用场景更加广泛。In the above method, the first device can distribute the second software (which can be called cross-device flow software) to the second device according to the third message sent by the network device. Even if the network device cannot communicate with the second device, the second software can be distributed to the second device normally, making the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述向所述网络设备发送第二消息之后,所述方法还包括:接收所述网络设备发送的第四消息,所述第四消息用于指示不向所述第二设备分发所述第二软件;显示提示信息,所述提示信息指示所述第二设备不具备运行所述第二软件的能力。In one possible implementation, after sending the second message to the network device, the method further includes: receiving a fourth message sent by the network device, the fourth message being used to indicate that the second software is not distributed to the second device; and displaying a prompt message, the prompt message indicating that the second device does not have the ability to run the second software.
在上述方法中,第一设备可以根据网络设备发送的第四消息,提示用户第二设备不具备运行第二软件的能力,让用户可以获取到软件分发失败的原因,更加符合用户需求,提升用户体验。In the above method, the first device can prompt the user that the second device does not have the ability to run the second software based on the fourth message sent by the network device, so that the user can obtain the reason for the failure of software distribution, which is more in line with user needs and improves user experience.
在一种可能的实现方式中,所述第一软件和所述预设场景相关,包括:所述第一软件和所述预设场景 中所处的位置、时间、用户画像、用户操作中的至少一项相关。In a possible implementation, the first software is related to the preset scene, including: the first software is related to the preset scene It is related to at least one of the location, time, user portrait, and user operation.
例如,预设场景中所处的位置为机场时,和预设场景相关的第一软件为出行订票的原子化服务。For example, when the location in the preset scene is an airport, the first software related to the preset scene is an atomic service for travel ticket booking.
在上述方法中,可以根据预设场景中所处的位置、时间、用户画像、用户操作中的至少一项确定第一软件,例如可以根据用户操作确定第一软件,或者,即使用户未执行用户操作,也可以自动识别用户画像等信息来确定第一软件,可以满足用户在不同预设场景下的软件分发需求,使得软件分发功能更加灵活和智能,提升用户体验。In the above method, the first software can be determined according to at least one of the location, time, user portrait, and user operation in the preset scenario. For example, the first software can be determined according to the user operation, or even if the user does not perform the user operation, the user portrait and other information can be automatically identified to determine the first software. This can meet the software distribution needs of users in different preset scenarios, making the software distribution function more flexible and intelligent, and improving the user experience.
在一种可能的实现方式中,所述第二设备为所述第一设备通过分布式通信方式发现和/或连接的设备。In a possible implementation manner, the second device is a device discovered and/or connected to the first device through a distributed communication manner.
第二方面,本申请提供了又一种软件分发方法,应用于第二设备,该方法包括:接收第一设备发送的第一消息;根据所述第一消息向所述第一设备发送所述第二设备的能力集,所述第二设备的能力集包括所述第二设备支持的硬件能力和软件能力,所述第二设备的能力集用于判断是否向所述第二设备分发第一软件;当所述第二设备的能力集和所述第一软件对应的能力集匹配时,接收所述第一设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,或,接收网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式;根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的界面。In a second aspect, the present application provides another software distribution method, which is applied to a second device, and the method includes: receiving a first message sent by a first device; sending a capability set of the second device to the first device according to the first message, the capability set of the second device including hardware capabilities and software capabilities supported by the second device, and the capability set of the second device is used to determine whether to distribute the first software to the second device; when the capability set of the second device matches the capability set corresponding to the first software, receiving the installation file of the first software sent by the first device or the download method of the installation file of the first software, or receiving the installation file of the first software sent by a network device or the download method of the installation file of the first software; and displaying the interface of the first software according to the installation file of the first software or the download method of the installation file of the first software.
在上述方法中,第二设备可以向第一设备发送第二设备的能力集,用于网络设备判断是否向第二设备分发第一软件,当第二设备的能力集和第一软件对应的能力集匹配时,第二设备可以被分发第一软件,并显示第一软件的界面,这种软件分发的方法不仅不依赖于设备类型,而且无需第二设备自行向网络设备请求,即使第二设备无法和网络设备通信(例如不具备对应的通信能力、未获取到网络设备的地址信息等),也可以被分发第二软件,进一步扩大了可被分发软件的设备范围,使软件分发功能的应用场景更加广泛。In the above method, the second device can send the capability set of the second device to the first device, so that the network device can determine whether to distribute the first software to the second device. When the capability set of the second device matches the capability set corresponding to the first software, the second device can be distributed the first software and display the interface of the first software. This method of software distribution not only does not depend on the device type, but also does not require the second device to request the network device on its own. Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can be distributed the second software, which further expands the range of devices that can be distributed with software and makes the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的界面,包括:根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的界面;或者,根据所述第一软件的安装文件的下载方式,下载所述第一软件的安装文件;根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的界面。In a possible implementation, displaying the interface of the first software according to the installation file of the first software or the downloading method of the installation file of the first software includes: installing the first software according to the installation file of the first software; displaying the interface of the first software; or, downloading the installation file of the first software according to the downloading method of the installation file of the first software; installing the first software according to the installation file of the first software; and displaying the interface of the first software.
在一些示例中,所述安装所述第一软件为静默安装,例如不显示提示用户安装的用户界面和安装进度。In some examples, the installation of the first software is a silent installation, for example, a user interface and installation progress prompting the user to install are not displayed.
在上述方法中,第二设备接收到第一软件的安装文件后可以自动安装第一软件,或者,第二设备接收到第一软件的安装文件的下载地址后,可以自动下载安装文件,再自动安装第一软件,无需用户手动操作,用户使用更加方便。In the above method, after the second device receives the installation file of the first software, it can automatically install the first software, or, after the second device receives the download address of the installation file of the first software, it can automatically download the installation file and then automatically install the first software, without the need for manual operation by the user, which is more convenient for users to use.
第三方面,本申请提供了又一种软件分发方法,应用于网络设备,该方法包括:接收第一设备发送的第一消息,所述第一消息用于请求获取第一软件,所述第一消息包括用于指示所述第一设备的能力集的第一信息,所述第一设备的能力集包括所述第一设备支持的硬件能力和软件能力;根据所述第一消息判断所述第一设备的能力集和所述第一软件对应的能力集是否匹配,所述第一软件对应的能力集包括能运行所述第一软件的设备需要支持的硬件能力和软件能力;当所述第一设备的能力集和所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一软件的安装文件或所述第一软件的安装文件的下载方式,所述第一软件的安装文件或所述第一软件的安装文件的下载方式用于所述第一设备显示所述第一软件的第一界面。In a third aspect, the present application provides another software distribution method, which is applied to a network device, and the method includes: receiving a first message sent by a first device, the first message is used to request acquisition of a first software, the first message includes first information used to indicate a capability set of the first device, the capability set of the first device includes hardware capabilities and software capabilities supported by the first device; judging whether the capability set of the first device and the capability set corresponding to the first software match according to the first message, the capability set corresponding to the first software includes hardware capabilities and software capabilities that a device that can run the first software needs to support; when the capability set of the first device and the capability set corresponding to the first software match, sending the installation file of the first software or the download method of the installation file of the first software to the first device, the installation file of the first software or the download method of the installation file of the first software is used by the first device to display a first interface of the first software.
在上述方法中,网络设备可以接收第一设备请求获取第一软件的第一消息,并根据第一消息得到第一设备的能力集,比较第一设备的能力集和第一软件对应的能力集是否匹配,当二者匹配时,向第一设备发送第一软件的安装文件或第一软件的安装文件的下载方式,以分发第一软件,该方法是基于设备能力集和软件需要的能力集实现软件分发功能,而不依赖于设备类型,避免某些设备虽然具备能运行第一软件的能力但由于设备类型不为第一软件支持的设备类型,造成这些设备无法被分发第一软件的情况,扩大了可被分发第一软件的设备范围,使软件分发功能的应用场景更加广泛。In the above method, the network device can receive a first message from the first device requesting to obtain the first software, and obtain the capability set of the first device according to the first message, compare whether the capability set of the first device matches the capability set corresponding to the first software, and when the two match, send the installation file of the first software or the download method of the installation file of the first software to the first device to distribute the first software. This method implements the software distribution function based on the device capability set and the capability set required by the software, and does not depend on the device type. It avoids the situation where some devices have the ability to run the first software but cannot be distributed the first software because the device type is not the device type supported by the first software. It expands the range of devices that can be distributed with the first software and makes the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述方法还包括:接收所述第一设备发送的第二消息,所述第二消息用于请求向所述第二设备分发第二软件,所述第二消息包括用于指示所述第二设备的能力集的第二信息,所述第二设备的能力集包括所述第二设备支持的硬件能力和软件能力;根据所述第二消息判断所述第二设备的能力集和所述第二软件对应的能力集是否匹配,所述第二软件对应的能力集包括能运行所述第二软件的设备需要支持的硬件能力和软件能力;当所述第二设备的能力集和所述第二软件对应的能力集匹配时,向所述第一设备发送第三消息,所述第三消息用于指示所述第一设备向所述第二设备发送所述第二软件的安装文件或所述第二软件的安装文件的下载方式,或,向所述第二设备发送所述第二软件的安装文件或所述第 二软件的安装文件的下载方式,所述第二软件的安装文件或所述第二软件的安装文件的下载方式用于所述第二设备显示所述第二软件的第二界面。In a possible implementation, the method further includes: receiving a second message sent by the first device, the second message being used to request distribution of second software to the second device, the second message including second information indicating a capability set of the second device, the capability set of the second device including hardware capabilities and software capabilities supported by the second device; judging whether the capability set of the second device matches the capability set corresponding to the second software according to the second message, the capability set corresponding to the second software including hardware capabilities and software capabilities that a device that can run the second software needs to support according to the capability set of the second device; and when the capability set of the second device matches the capability set corresponding to the second software, sending a third message to the first device, the third message being used to instruct the first device to send the installation file of the second software or the download method of the installation file of the second software to the second device, or sending the installation file of the second software or the first message to the second device. The downloading method of the installation file of the second software, the installation file of the second software or the downloading method of the installation file of the second software is used for the second device to display the second interface of the second software.
在上述方法中,网络设备可以接收第一设备请求向第二设备分发第二软件的第二消息,并根据第二消息得到第二设备的能力集,比较第二设备的能力集和第二软件对应的能力集是否匹配,当二者匹配时,向第一设备发送第三消息,指示第一设备向第二设备分发第二软件(可称为跨设备流转软件),这种软件分发的方法不仅不依赖于设备类型,而且无需被分发软件的第二设备自行向网络设备请求,即使第二设备无法和网络设备通信(例如不具备对应的通信能力、未获取到网络设备的地址信息等),也可以被分发第二软件,进一步扩大了可被分发软件的设备范围,使软件分发功能的应用场景更加广泛。In the above method, the network device can receive a second message from the first device requesting to distribute the second software to the second device, and obtain the capability set of the second device according to the second message, compare whether the capability set of the second device and the capability set corresponding to the second software match, and when the two match, send a third message to the first device, instructing the first device to distribute the second software to the second device (which can be called cross-device software transfer). This method of software distribution not only does not depend on the device type, but also does not require the second device to which the software is distributed to request the network device on its own. Even if the second device cannot communicate with the network device (for example, it does not have the corresponding communication capability, has not obtained the address information of the network device, etc.), it can also be distributed the second software, further expanding the range of devices to which the software can be distributed, and making the application scenarios of the software distribution function more extensive.
在一种可能的实现方式中,所述第一设备的能力集和所述第一软件对应的能力集匹配,包括以下至少一种情况:所述第一设备的能力集包括所述第一软件对应的能力集中的能力;所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力,所述强依赖的能力为被分发所述第一软件的设备要求具备的能力;所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力的父能力。In a possible implementation, the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations: the capability set of the first device includes capabilities in the capability set corresponding to the first software; the capability set of the first device includes capabilities that are strongly dependent on the capability set corresponding to the first software, and the strongly dependent capabilities are capabilities required by the device to which the first software is distributed; the capability set of the first device includes the parent capability of the capabilities that are strongly dependent on the capabilities in the capability set corresponding to the first software.
在一些示例中,第一软件对应的能力集可以包括强依赖的能力和弱依赖的能力,强依赖的能力为被分发第一软件的设备要求具备的能力,弱依赖的能力为被分发第一软件的设备可以不具备的能力。In some examples, the capability set corresponding to the first software may include strongly dependent capabilities and weakly dependent capabilities. The strongly dependent capabilities are capabilities that the device to which the first software is distributed is required to have, and the weakly dependent capabilities are capabilities that the device to which the first software is distributed may not have.
在一些示例中,能力之间可以存在父子关系,即一个父能力可以对应至少一个子能力。在一些示例中,父能力为强依赖的能力时,对应的子能力均为强依赖的能力,对应的子能力均为强依赖时,父能力为强依赖的能力。In some examples, there may be a parent-child relationship between capabilities, that is, a parent capability may correspond to at least one child capability. In some examples, when the parent capability is a strongly dependent capability, the corresponding child capabilities are all strongly dependent capabilities, and when the corresponding child capabilities are all strongly dependent, the parent capability is a strongly dependent capability.
在上述方法中,第一设备的能力集和第一软件对应的能力集匹配的情况多种多样,例如第一设备的能力集包括第一软件对应的能力集中的全部能力可以理解为是对被分发设备的要求较高的情况,第一设备的能力集包括第一软件对应的能力集中强依赖的能力或者强依赖的能力的父能力可以理解为是对被分发设备的要求较低的情况,拓宽软件分发的应用场景。In the above method, there are various situations in which the capability set of the first device matches the capability set corresponding to the first software. For example, the capability set of the first device includes all capabilities in the capability set corresponding to the first software, which can be understood as a situation where the requirements for the distributed device are higher. The capability set of the first device includes strongly dependent capabilities in the capability set corresponding to the first software or the parent capabilities of the strongly dependent capabilities, which can be understood as a situation where the requirements for the distributed device are lower, thereby broadening the application scenarios of software distribution.
在一种可能的实现方式中,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同或不相同,所述当所述第一设备的能力集和所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一软件的安装文件或所述第一软件的安装文件的下载方式,包括:当所述第一设备的能力集和第一版本的所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一版本的第一软件的安装文件或所述第一版本的第一软件的安装文件的下载方式。In a possible implementation, the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same or different. When the capability set of the first device matches the capability set corresponding to the first software, the installation file of the first software is sent to the first device or the download method of the installation file of the first software includes: when the capability set of the first device matches the capability set corresponding to the first version of the first software, the installation file of the first version of the first software is sent to the first device or the download method of the installation file of the first version of the first software.
在上述方法中,当第一设备的能力集和多个版本中任意一个版本的第一软件对应的能力集匹配时,第一设备可以被分发该版本的第一软件,避免第一设备的能力集和部分版本的第一软件对应的能力集不匹配,导致第一设备无法被分发第一软件的情况,扩大了可被分发第一软件的设备范围。In the above method, when the capability set of the first device matches the capability set corresponding to the first software of any one of multiple versions, the first device can be distributed with the first software of that version, thereby avoiding the situation where the capability set of the first device does not match the capability set corresponding to some versions of the first software, resulting in the first device being unable to be distributed with the first software, thereby expanding the range of devices to which the first software can be distributed.
第四方面,本申请提供了一种电子设备,包括收发器、处理器和存储器,上述存储器用于存储计算机程序,上述处理器调用上述计算机程序,用于执行上述第一方面或第二方面任一种可能的实现方式中的软件分发方法。In a fourth aspect, the present application provides an electronic device, comprising a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the software distribution method in any possible implementation of the first aspect or the second aspect.
第五方面,本申请提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述第一方面或第二方面任一项可能的实现方式中的软件分发方法。In a fifth aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the software distribution method in any possible implementation of the first aspect or the second aspect.
第六方面,本申请提供了一种网络设备,包括收发器、处理器和存储器,上述存储器用于存储计算机程序,上述处理器调用上述计算机程序,用于执行上述第三方面任一种可能的实现方式中的软件分发方法。In a sixth aspect, the present application provides a network device, including a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the software distribution method in any possible implementation of the third aspect.
第七方面,本申请提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该计算机程序被处理器执行时,实现执行上述任一方面任一项可能的实现方式中的软件分发方法。In a seventh aspect, the present application provides a computer storage medium storing a computer program, which, when executed by a processor, implements the software distribution method in any possible implementation of any of the above aspects.
第八方面,本申请提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行上述第一方面或第二方面任一项可能的实现方式中的软件分发方法。In an eighth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the software distribution method in any possible implementation of the first aspect or the second aspect.
第九方面,本申请提供一种电子设备,该电子设备包括执行本申请第一方面或第二方面任一种实现方式所介绍的方法或装置。上述电子设备例如为芯片。In a ninth aspect, the present application provides an electronic device, the electronic device comprising a method or device for executing any one of the implementations of the first aspect or the second aspect of the present application. The electronic device is, for example, a chip.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
以下对本申请用到的附图进行介绍。The following is an introduction to the drawings used in this application.
图1是本申请提供的一种软件分发***10的架构示意图; FIG1 is a schematic diagram of the architecture of a software distribution system 10 provided by the present application;
图2是本申请提供的一种电子设备100的硬件结构示意图;FIG. 2 is a schematic diagram of the hardware structure of an electronic device 100 provided in the present application;
图3是本申请提供的一种电子设备100的软件架构示意图;FIG3 is a schematic diagram of a software architecture of an electronic device 100 provided in the present application;
图4是本申请提供的一种网络设备300的硬件结构示意图;FIG4 is a schematic diagram of the hardware structure of a network device 300 provided in the present application;
图5是本申请提供的一种软件分发方法的流程示意图;FIG5 is a flow chart of a software distribution method provided by the present application;
图6是本申请提供的又一种软件分发方法的流程示意图;FIG6 is a flowchart of another software distribution method provided by the present application;
图7是本申请提供的又一种软件分发方法的流程示意图;FIG7 is a flowchart of another software distribution method provided by the present application;
图8是本申请提供的又一种软件分发方法的流程示意图;FIG8 is a flowchart of another software distribution method provided by the present application;
图9-图10是本申请提供的一些用户界面的示意图。9-10 are schematic diagrams of some user interfaces provided by this application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solution in the embodiment of the present application will be described below in conjunction with the accompanying drawings. In the description of the embodiment of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and/or B can mean: 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, "multiple" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
在本申请中,软件可以但不限于包括应用程序、小程序、原子化服务,可以理解的是,原子化服务可以为无需显式安装,由***程序框架后台安装后即可使用的服务,例如可以为特性能力(feature ability,FA)。应理解,原子化服务可以由一个或多个鸿蒙能力的部署包(harmonyos ability package,HAP)组成,一个HAP对应一个入口能力(mainAbility),mainAbility是应用所具备能力的抽象。每个ability均可独立运行,可完成一个特定功能。一个或多个功能可完成一个特定的便捷服务。分发软件可以但不限于包括:发送软件的文件,或者,发送软件的文件的下载方式(例如下载地址),其中,软件的文件用于电子设备运行该软件,该文件可以是可执行的文件,例如为安装包。为了方便说明,以下实施例以软件的文件为安装包为例进行说明。In the present application, software may include, but is not limited to, applications, applets, and atomic services. It is understood that atomic services can be services that can be used without explicit installation and can be installed by the system program framework background, such as feature capabilities (FA). It should be understood that atomic services can be composed of one or more HarmonyOS capability deployment packages (HAP), one HAP corresponds to one entry capability (mainAbility), and mainAbility is an abstraction of the capabilities possessed by the application. Each ability can run independently and can complete a specific function. One or more functions can complete a specific convenient service. Distributing software may include, but is not limited to: sending software files, or sending software files download methods (such as download addresses), wherein the software files are used for electronic devices to run the software, and the file can be an executable file, such as an installation package. For the convenience of explanation, the following embodiments are described by taking the software file as an installation package as an example.
服务器可以向电子设备分发软件,或者,安装有软件的电子设备可以向其他电子设备分发该软件(可简称为跨设备流转软件)。目前,软件的分发是基于软件支持的设备类型实现的,例如,服务器向电子设备分发原子化服务时,服务器可以对比该原子化服务支持的设备类型和该电子设备的类型,若该原子化服务支持的设备类型包括该电子设备的类型,则服务器向该电子设备发送该原子化服务的安装包,该电子设备可以基于该安装包运行该原子化服务。但这样的分发方式局限性很大(例如软件分发范围局限),至少存在以下技术问题:The server can distribute software to electronic devices, or the electronic devices with the software installed can distribute the software to other electronic devices (which can be referred to as cross-device software transfer). At present, the distribution of software is based on the device types supported by the software. For example, when the server distributes atomic services to electronic devices, the server can compare the device types supported by the atomic service and the type of the electronic device. If the device types supported by the atomic service include the type of the electronic device, the server sends the installation package of the atomic service to the electronic device, and the electronic device can run the atomic service based on the installation package. However, this distribution method has great limitations (for example, the scope of software distribution is limited), and there are at least the following technical problems:
技术问题一:不同厂家是基于各自的标准界定设备类型,可能会存在不一致,导致设备类型字典复杂冗余,不利于管理和维护,并且,软件的开发者可能无法获取到该软件支持的所有设备的设备类型字段,导致该软件支持的部分设备可能无法被分发该软件。Technical issue 1: Different manufacturers define device types based on their own standards, which may be inconsistent, resulting in complex and redundant device type dictionaries that are not conducive to management and maintenance. In addition, software developers may not be able to obtain the device type fields of all devices supported by the software, resulting in some devices supported by the software being unable to be distributed with the software.
技术问题二:部分设备类型会精确区分设备能力,例如,带屏幕的音箱设备和不带屏幕的音箱设备被界定为不同的设备类型,会导致设备类型字典复杂冗余,不利于管理和维护,并且,软件的开发者可能无法获取到该软件支持的所有设备的设备类型字段,导致该软件支持的部分设备可能无法被分发该软件。Technical issue 2: Some device types will accurately distinguish device capabilities. For example, speaker devices with screens and speaker devices without screens are defined as different device types, which will lead to complex and redundant device type dictionaries, which is not conducive to management and maintenance. In addition, software developers may not be able to obtain the device type fields of all devices supported by the software, resulting in the software being unable to be distributed to some devices supported by the software.
技术问题三:部分设备类型无法精确区分设备能力,即同一类型的设备可能具有不同的能力,例如,带屏幕的音箱设备和不带屏幕的音箱设备被界定为相同的设备类型,导致某些只需具备屏幕即可运行的软件无法被分发至带屏幕的音箱设备。Technical issue three: Some device types cannot accurately distinguish device capabilities, that is, devices of the same type may have different capabilities. For example, speaker devices with screens and speaker devices without screens are defined as the same device type, resulting in some software that only requires a screen to run cannot be distributed to speaker devices with screens.
本申请提供了一种软件分发方法,应用于软件分发***,该方法能够基于设备的能力集实现软件的分发,例如,当软件需要的能力集和设备的能力集匹配时,可以为该设备分发该软件,因此,提供了一种不依赖于设备类型、更加灵活和智能的软件分发机制,解决了目前软件分发方式存在的技术问题,扩大了可被分发软件的设备范围,拓宽应用场景,提升用户体验。The present application provides a software distribution method, which is applied to a software distribution system. The method can realize software distribution based on the capability set of a device. For example, when the capability set required by the software matches the capability set of the device, the software can be distributed to the device. Therefore, a software distribution mechanism that is independent of the device type and more flexible and intelligent is provided, which solves the technical problems existing in the current software distribution method, expands the range of devices that can be distributed with software, broadens the application scenarios, and improves the user experience.
其中,设备的能力集是指该设备支持的硬件能力和软件能力的集合,其中,硬件能力例如但不限于包括显示屏、摄像头、扬声器、蓝牙、近距离无线通信技术(near field communication,NFC)、无线保真(wireless fidelity,Wi-Fi)等,软件能力例如但不限于包括时钟、支付、截屏等。同一类型的设备的能力集可以相同或者不同,不同类型的设备的能力集可以相同或者不同,可以理解为是设备的能力集不依赖于设备的类型。软件需要的能力集是指运行该软件的设备需要支持的硬件能力和软件能力的集合。 The capability set of a device refers to the set of hardware capabilities and software capabilities supported by the device, where hardware capabilities include, but are not limited to, display screen, camera, speaker, Bluetooth, near field communication (NFC), wireless fidelity (Wi-Fi), etc., and software capabilities include, but are not limited to, clock, payment, screenshot, etc. The capability sets of devices of the same type can be the same or different, and the capability sets of devices of different types can be the same or different. It can be understood that the capability set of a device does not depend on the type of device. The capability set required by the software refers to the set of hardware capabilities and software capabilities that the device running the software needs to support.
能力集可以包括至少一个能力,其中任意一个能力可以通过唯一标识来表征,为了方便说明,以下实施例中用于表征能力的唯一标识为编码,但在具体实现中,标识也可以为其他类型的,本申请对此不作限定。本申请中的能力可以是电子设备的***提供的能力,也可以不是***提供的能力,例如其他厂家提供的能力。A capability set may include at least one capability, any of which may be characterized by a unique identifier. For ease of explanation, the unique identifier used to characterize the capability in the following embodiments is a code, but in a specific implementation, the identifier may also be of other types, which is not limited in this application. The capability in this application may be a capability provided by the system of the electronic device, or may not be a capability provided by the system, such as a capability provided by other manufacturers.
本申请中,服务器(例如操作***(operating system,OS)的管理平台)可以维护能力集字典,能力集字典可以包括多个能力,例如包括大量不同设备的能力,能力集字典中表征能力的方式和能力集类似,可以通过编码和/或字符串表征能力。能力集字典例如但不限于用于生成设备的能力集和/或软件需要的能力集。In the present application, a server (e.g., a management platform of an operating system (OS)) may maintain a capability set dictionary, which may include multiple capabilities, such as capabilities of a large number of different devices. The capability set dictionary may be represented in a manner similar to a capability set, and may be represented by encoding and/or character strings. The capability set dictionary may be used, for example, but not limited to, to generate a capability set for a device and/or a capability set required by software.
下面介绍本申请实施例涉及的一种软件分发***10。The following introduces a software distribution system 10 involved in an embodiment of the present application.
图1示例性示出了一种软件分发***10的架构示意图。FIG. 1 exemplarily shows a schematic diagram of the architecture of a software distribution system 10 .
如图1所示,软件分发***10可以包括电子设备100、电子设备200、网络设备300、电子设备400。其中:As shown in FIG1 , the software distribution system 10 may include an electronic device 100, an electronic device 200, a network device 300, and an electronic device 400. Among them:
电子设备100可以是手机、平板电脑、手持计算机、桌面型计算机、膝上型计算机、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、蜂窝电话、个人数字助理(personal digital assistant,PDA),以及智能电视、投影仪等智能家居设备,智能手环、智能手表、智能眼镜等可穿戴设备,增强现实(augmented reality,AR)、虚拟现实(virtual reality,VR)、混合现实(mixed reality,MR)等扩展现实(extended reality,XR)设备或车载设备,电子设备200的说明和电子设备100的说明一致。本申请实施例对电子设备的具体类型不作特殊限制。The electronic device 100 may be a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), and smart home devices such as smart TVs and projectors, wearable devices such as smart bracelets, smart watches, and smart glasses, and extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR) or vehicle-mounted devices. The description of the electronic device 200 is consistent with the description of the electronic device 100. The embodiments of the present application do not impose any special restrictions on the specific types of electronic devices.
网络设备300可以包括至少一个服务器,在一种可选的实施例中,任意一个服务器可以为硬件服务器,在一种可选的实施例中,任意一个服务器可以为云服务器。在一种可选的实施例中,任意一个服务器可以是Linux服务器、Windows服务器或其他可以提供多设备同时接入的服务器设备。在一种可选的实施例中,网络设备300可以是多地域、多机房、多服务器所组成的服务器集群。The network device 300 may include at least one server. In an optional embodiment, any one of the servers may be a hardware server. In an optional embodiment, any one of the servers may be a cloud server. In an optional embodiment, any one of the servers may be a Linux server, a Windows server, or other server devices that can provide simultaneous access to multiple devices. In an optional embodiment, the network device 300 may be a server cluster consisting of multiple regions, multiple computer rooms, and multiple servers.
在一种可选的实施例中,电子设备100可以通过有线(例如,通用串行总线(universal serial bus,USB)、双绞线、同轴电缆和光纤等)和/或无线(例如,无线局域网(wireless local area networks,WLAN)、蓝牙和蜂窝通信网络等)的方式和网络设备300进行通信。In an optional embodiment, the electronic device 100 can communicate with the network device 300 via wired (e.g., universal serial bus (USB), twisted pair, coaxial cable and optical fiber, etc.) and/or wireless (e.g., wireless local area networks (WLAN), Bluetooth and cellular communication networks, etc.).
在一种可选的实施例中,当满足预设条件时(例如接收到用户操作时),电子设备100可以向网络设备300请求分发软件(例如和接收到的用户操作相关的软件)。网络设备300可以比较电子设备100的能力集和该软件需要的能力集,当二者匹配时,网络设备300可以向电子设备100分发该软件,电子设备100可以运行该软件,例如,电子设备100接收到网络设备300发送的该软件的安装包的下载地址后,基于该下载地址下载该软件的安装包,然后基于该软件的安装包安装和运行该软件。In an optional embodiment, when a preset condition is met (for example, when a user operation is received), the electronic device 100 may request the network device 300 to distribute software (for example, software related to the received user operation). The network device 300 may compare the capability set of the electronic device 100 with the capability set required by the software. When the two match, the network device 300 may distribute the software to the electronic device 100, and the electronic device 100 may run the software. For example, after the electronic device 100 receives the download address of the installation package of the software sent by the network device 300, it downloads the installation package of the software based on the download address, and then installs and runs the software based on the installation package of the software.
在一种可选的实施例中,电子设备100可以通过有线和/或无线的方式和电子设备200进行通信,例如,电子设备100和电子设备200通过软总线、蓝牙和/或WLAN等实现分布式通信。在一种可选的实施例中,当满足预设条件时,电子设备100上的软件可以分发给电子设备200,例如,电子设备100接收到针对该软件的界面中的流转控件的用户操作后,向电子设备200分发该软件。在一些示例中,电子设备100可以先获取电子设备200的能力集,然后向网络设备300请求:向电子设备200分发软件。网络设备300可以比较电子设备200的能力集和该软件需要的能力集,当二者匹配时,网络设备300可以通过电子设备100向电子设备200分发该软件,电子设备200可以运行该软件。不限于此,在另一种可选的实施例中,电子设备200可以通过有线和/或无线的方式和网络设备300进行通信,网络设备300可以直接向电子设备200分发软件,而无需通过电子设备100中继,在另一种可选的实施例中,网络设备300确定该软件需要的能力集和电子设备200的能力集匹配时,可以向电子设备100发送通知,电子设备100接收到该通知后可以向电子设备200分发该软件,本申请对此不作限定。In an optional embodiment, the electronic device 100 can communicate with the electronic device 200 in a wired and/or wireless manner, for example, the electronic device 100 and the electronic device 200 realize distributed communication through a soft bus, Bluetooth and/or WLAN, etc. In an optional embodiment, when a preset condition is met, the software on the electronic device 100 can be distributed to the electronic device 200, for example, after the electronic device 100 receives a user operation of a flow control in an interface of the software, the software is distributed to the electronic device 200. In some examples, the electronic device 100 can first obtain the capability set of the electronic device 200, and then request the network device 300 to distribute the software to the electronic device 200. The network device 300 can compare the capability set of the electronic device 200 with the capability set required by the software. When the two match, the network device 300 can distribute the software to the electronic device 200 through the electronic device 100, and the electronic device 200 can run the software. Without limitation to this, in another optional embodiment, the electronic device 200 may communicate with the network device 300 via wired and/or wireless means, and the network device 300 may distribute software directly to the electronic device 200 without being relayed through the electronic device 100. In another optional embodiment, when the network device 300 determines that the capability set required by the software matches the capability set of the electronic device 200, it may send a notification to the electronic device 100, and after receiving the notification, the electronic device 100 may distribute the software to the electronic device 200. This application does not limit this.
在一种可选的实施例中,电子设备400可以通过有线和/或无线的方式和网络设备300进行通信,其中,电子设备400的示例可参见电子设备100、网络设备300的示例。在一些示例中,电子设备400和软件1相关,例如为该软件的厂家/开发者的设备。在一种可选的实施例中,电子设备400可以向网络设备300发送软件1的安装包,软件1的安装包可以包括软件1需要的能力集,网络设备300可以存储软件1的安装包。不限于此,在另一种可选的实施例中,软件1需要的能力集可以独立于软件1的安装包,电子设备400可以向网络设备300发送软件1的安装包和软件1需要的能力集。在另一种可选的实施例中,网络设备300可以通过其他设备存储软件1的安装包,自行存储软件1需要的能力集和软件1的安装包的下载地 址,本申请对此不作限定。In an optional embodiment, the electronic device 400 may communicate with the network device 300 in a wired and/or wireless manner, wherein the example of the electronic device 400 may refer to the examples of the electronic device 100 and the network device 300. In some examples, the electronic device 400 is related to the software 1, for example, it is a device of the manufacturer/developer of the software. In an optional embodiment, the electronic device 400 may send an installation package of software 1 to the network device 300, the installation package of software 1 may include a capability set required by software 1, and the network device 300 may store the installation package of software 1. Not limited to this, in another optional embodiment, the capability set required by software 1 may be independent of the installation package of software 1, and the electronic device 400 may send the installation package of software 1 and the capability set required by software 1 to the network device 300. In another optional embodiment, the network device 300 may store the installation package of software 1 through other devices, and store the capability set required by software 1 and the download location of the installation package of software 1 by itself. This application does not limit this.
在一种可选的实施例中,软件分发***10还可以包括网络设备500和电子设备600。网络设备500可以通过有线和/或无线的方式和电子设备600进行通信,其中,网络设备500的说明可以参见网络设备300的说明,不再赘述。电子设备600的示例可参见电子设备100、网络设备300的示例。在一些示例中,网络设备500可以为维护/存储能力集字典的设备。在一些示例中,电子设备600和电子设备700相关,电子设备700例如但不限于为电子设备100或者电子设备200,例如,电子设备600为电子设备700的厂家/开发者的设备。在一种可选的实施例中,电子设备600可以向网络设备500请求获取电子设备700的能力集。电子设备600可以存储网络设备500发送的电子设备700的能力集。In an optional embodiment, the software distribution system 10 may further include a network device 500 and an electronic device 600. The network device 500 may communicate with the electronic device 600 in a wired and/or wireless manner, wherein the description of the network device 500 may refer to the description of the network device 300 and will not be repeated. For an example of the electronic device 600, refer to the examples of the electronic device 100 and the network device 300. In some examples, the network device 500 may be a device for maintaining/storing a capability set dictionary. In some examples, the electronic device 600 is related to the electronic device 700, and the electronic device 700 is, for example but not limited to, the electronic device 100 or the electronic device 200, for example, the electronic device 600 is a device of the manufacturer/developer of the electronic device 700. In an optional embodiment, the electronic device 600 may request the network device 500 to obtain the capability set of the electronic device 700. The electronic device 600 may store the capability set of the electronic device 700 sent by the network device 500.
图1所示的电子设备和网络设备的数量和形态仅为示例,在具体实现中,数量可以更多,设备可以为其他形态,本申请对此不作限定。The number and form of the electronic devices and network devices shown in FIG1 are merely examples. In a specific implementation, the number may be greater and the devices may be in other forms, which is not limited in this application.
接下来介绍本申请实施例提供的示例性的电子设备100。Next, an exemplary electronic device 100 provided in an embodiment of the present application is introduced.
图2示例性示出了一种电子设备100的硬件结构示意图。FIG. 2 exemplarily shows a schematic diagram of the hardware structure of an electronic device 100 .
应理解的是,图2所示电子设备100仅是一个范例,并且电子设备100可以具有比图2中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图2中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the electronic device 100 shown in FIG2 is only an example, and the electronic device 100 may have more or fewer components than those shown in FIG2, may combine two or more components, or may have a different component configuration. The various components shown in FIG2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
如图2所示,电子设备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等。As shown in Figure 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器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 (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一种可选的实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。The processor 110 may also be provided with a memory for storing instructions and data. In an optional embodiment, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一种可选的实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In an optional embodiment, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
充电管理模块140用于从充电器接收充电输入。The charging management module 140 is used to receive charging input from a charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。在一种可能的实现方式中,电子设备100可以通过无线通信功能和网 络设备300进行通信,例如接收网络设备300发送的软件的安装包。在一种可能的实现方式中,电子设备100可以通过无线通信功能和电子设备200进行通信,例如向电子设备200发送软件的安装包。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor and the baseband processor. In a possible implementation, the electronic device 100 can be implemented by the wireless communication function and the network The electronic device 100 communicates with the network device 300, for example, receives the software installation package sent by the network device 300. In a possible implementation, the electronic device 100 can communicate with the electronic device 200 through a wireless communication function, for example, sending the software installation package to the electronic device 200.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一种可选的实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一种可选的实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In an optional embodiment, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In an optional embodiment, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一种可选的实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In an optional embodiment, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块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)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一种可选的实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。In an optional embodiment, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一种可选的实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In an optional embodiment, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,颜色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一种可选的实施例中,ISP可以设置在摄像头193中。ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In an optional embodiment, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是 电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一种可选的实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object is projected onto the photosensitive element through the lens to generate an optical image. The photosensitive element can be Charge coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In an optional embodiment, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
电子设备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 headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
耳机接口170D用于连接有线耳机。The earphone jack 170D is used to connect a wired earphone.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一种可选的实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In an optional embodiment, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一种可选的实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。The gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In an optional embodiment, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
气压传感器180C用于测量气压。The air pressure sensor 180C is used to measure air pressure.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。The magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
距离传感器180F,用于测量距离。The distance sensor 180F is used to measure the distance.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
环境光传感器180L用于感知环境光亮度。The ambient light sensor 180L is used to sense the brightness of ambient light.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
温度传感器180J用于检测温度。The temperature sensor 180J is used to detect the temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。Bone conduction sensor 180M can obtain vibration signals.
按键190包括开机键,音量键等。Buttons 190 include a power button, a volume button, and the like.
马达191可以产生振动提示。Motor 191 can generate vibration prompts.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。 The SIM card interface 195 is used to connect a SIM card.
电子设备100的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。例如,分层架构的软件***可以是安卓(Android)***,也可以是鸿蒙(harmony)操作***(operating system,OS),或其它软件***。本申请实施例以分层架构的Android***为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. For example, the software system of the layered architecture may be an Android system, or a Harmony operating system (OS), or other software systems. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100.
图3示例性示出一种电子设备100的软件架构示意图。FIG. 3 exemplarily shows a schematic diagram of a software architecture of an electronic device 100 .
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一种可选的实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In an optional embodiment, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图3所示,应用程序包可以包括相机,图库,音乐,日历,短信息,通话,导航,蓝牙,浏览器等应用程序。本申请中的应用程序包也可以替换为小程序、原子化服务等其他形式的软件。As shown in Figure 3, the application package may include applications such as camera, gallery, music, calendar, short message, call, navigation, Bluetooth, browser, etc. The application package in this application may also be replaced by other forms of software such as mini-programs and atomic services.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。As shown in FIG. 3 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
下面结合原子化服务的启动场景,示例性说明电子设备100软件以及硬件的工作流程。The following is an example of the workflow of the software and hardware of the electronic device 100 in conjunction with the startup scenario of the atomic service.
当麦克风170C接收到用户输入的语音信号,相应的硬件中断被发给内核层。内核层将语音信号加工成原始输入事件(包括语音信号的内容,接收到语音信号的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件。以该语音信号的内容为“查一下我的快递”为例,快递应用调用应用框架层的接口,启动快递应用的原子化服务,进而通过调用内核层控制显示驱动,通过显示屏194显示快递应用的原子化服务的用户界面,该用户界面包括根据该语音信号的内容得到的快 递信息。When microphone 170C receives a voice signal input by the user, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the voice signal into raw input events (including the content of the voice signal, the timestamp of receiving the voice signal, and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the input events. Taking the content of the voice signal "Check my express delivery" as an example, the express application calls the interface of the application framework layer, starts the atomic service of the express application, and then controls the display driver by calling the kernel layer, and displays the user interface of the atomic service of the express application through the display screen 194, which includes the express delivery obtained according to the content of the voice signal. Deliver information.
电子设备200的说明和图2和图3所示的电子设备100的说明类似,不再赘述。The description of the electronic device 200 is similar to the description of the electronic device 100 shown in FIG. 2 and FIG. 3 , and will not be repeated herein.
接下来介绍本申请实施例提供的示例性的网络设备300。Next, an exemplary network device 300 provided in an embodiment of the present application is introduced.
图4示例性示出了一种网络设备300的硬件结构示意图。FIG. 4 exemplarily shows a schematic diagram of the hardware structure of a network device 300 .
如图4所示,网络设备300可以包括一个或多个处理器301、通信接口302、存储器303,其中处理器301、通信接口302、存储器303可通过总线或者其它方式连接,本申请实施例以通过总线304连接为例。其中:As shown in FIG4 , the network device 300 may include one or more processors 301, a communication interface 302, and a memory 303, wherein the processor 301, the communication interface 302, and the memory 303 may be connected via a bus or other means, and the embodiment of the present application takes the connection via a bus 304 as an example. Among them:
处理器301可以由一个或者多个通用处理器构成,例如CPU。处理器301可用于运行设备控制方法的相关的程序代码。The processor 301 may be composed of one or more general-purpose processors, such as a CPU. The processor 301 may be used to run program codes related to the device control method.
通信接口302可以为有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与其他节点进行通信。本申请实施例中,通信接口302具体可用于与电子设备100、电子设备200、电子设备400中至少一项进行通信。The communication interface 302 may be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other nodes. In the embodiment of the present application, the communication interface 302 may be specifically used to communicate with at least one of the electronic device 100, the electronic device 200, and the electronic device 400.
存储器303可以包括易失性存储器(volatile memory),例如RAM;存储器也可以包括非易失性存储器(non-vlatile memory),例如ROM、快闪存储器(flash memory)、HDD或固态硬盘SSD。存储器303还可以包括上述种类的存储器的组合。存储器303可用于存储一组程序代码,以便于处理器301调用存储器303中存储的程序代码以实现本申请实施例的在服务器的实现方法。在本申请实施例中,存储器303还可以是存储阵列,等等。The memory 303 may include a volatile memory, such as a RAM; the memory may also include a non-volatile memory, such as a ROM, a flash memory, a HDD, or a solid-state drive SSD. The memory 303 may also include a combination of the above-mentioned types of memories. The memory 303 may be used to store a set of program codes so that the processor 301 calls the program codes stored in the memory 303 to implement the implementation method of the embodiment of the present application on the server. In the embodiment of the present application, the memory 303 may also be a storage array, and so on.
在一种可选的实施例中,网络设备300可以包括多个服务器,例如,网页服务器、后台服务器、下载服务器等,这多个服务器的硬件结构都可参照图4所示的网络设备300的硬件结构。In an optional embodiment, the network device 300 may include multiple servers, such as a web server, a background server, a download server, etc. The hardware structures of these multiple servers can refer to the hardware structure of the network device 300 shown in Figure 4.
需要说明的,图4所示的网络设备300是本申请实施例示例的一种实现方式,实际应用中,网络设备300还可以包括更多或更少的部件,这里不作限制。It should be noted that the network device 300 shown in FIG. 4 is an implementation example of an embodiment of the present application. In actual applications, the network device 300 may also include more or fewer components, which is not limited here.
接下来介绍本申请实施例提供的软件分发方法。Next, the software distribution method provided by the embodiment of the present application is introduced.
请参见图5,图5是本申请实施例提供的一种软件分发方法的流程示意图。该方法可以应用于图1所示的软件分发***10。该方法可以包括但不限于如下步骤:Please refer to Figure 5, which is a flowchart of a software distribution method provided by an embodiment of the present application. The method can be applied to the software distribution system 10 shown in Figure 1. The method may include but is not limited to the following steps:
S101:电子设备600向网络设备500发送第一消息。S101: The electronic device 600 sends a first message to the network device 500.
在一种可选的实施例中,S101是可选的步骤。In an optional embodiment, S101 is an optional step.
在一种可选的实施例中,网络设备500可以维护/存储能力集字典,能力集字典可以包括多个能力,例如包括大量不同设备的能力,其中任意一个能力可以通过编码表征(也可称为一个能力对应一个编码)。In an optional embodiment, the network device 500 may maintain/store a capability set dictionary, which may include multiple capabilities, such as capabilities of a large number of different devices, any of which may be represented by a code (also referred to as one capability corresponding to one code).
在一种可选的实施例中,任意一个能力对应的编码可以为分段式的(简称为分段式编码),假设表示为x.y.z,其中,y是z的父类(z是y的子类),x是y的父类(y是x的子类),x、y和z包括至少一个非负整数。在一些示例中,电子设备中非***提供的能力(例如其他厂家提供的能力)和***提供的能力对应的分段式编码可以不同,可选地,x可以不同。在一些示例中,***提供的能力对应的分段式编码中x为0,非***提供的能力对应的分段式编码中x为k,具体示例如下所示:In an optional embodiment, the encoding corresponding to any capability may be segmented (referred to as segmented encoding), assuming that it is represented as x.y.z, where y is the parent class of z (z is the child class of y), x is the parent class of y (y is the child class of x), and x, y and z include at least one non-negative integer. In some examples, the segmented encoding corresponding to the capabilities provided by the system (such as capabilities provided by other manufacturers) and the capabilities provided by the system in the electronic device may be different, and optionally, x may be different. In some examples, the segmented encoding corresponding to the capabilities provided by the system is 0, and the segmented encoding corresponding to the capabilities provided by the non-system is k. Specific examples are shown below:
例如,电子设备的NFC能力可以表征为字符串SystemCapability.Communication.NFC.Core,其中,SystemCapability表征该NFC能力为电子设备的***提供的能力,Communication表征该NFC能力用于实现通信功能,NFC为该能力的名称,Core表征该能力属于电子设备的核心层,该NFC能力对应的分段式编码可以为0000.0001.0005。For example, the NFC capability of an electronic device can be represented by the string SystemCapability.Communication.NFC.Core, where SystemCapability indicates that the NFC capability is a capability provided by the system of the electronic device, Communication indicates that the NFC capability is used to implement the communication function, NFC is the name of the capability, and Core indicates that the capability belongs to the core layer of the electronic device. The segmented code corresponding to the NFC capability can be 0000.0001.0005.
例如,电子设备的***账号能力可以表征为字符串SystemCapability.Account.OsAccount,其中,SystemCapability表征该***账号能力为电子设备的***提供的能力,Account表征该***账号能力用于实现账号功能,OsAccount表征为该能力的名称,该***账号能力对应的分段式编码可以为0000.0002.0001。电子设备的应用程序账号能力可以表征为字符串SystemCapability.Account.AppAccount,其中,SystemCapability表征该应用程序账号能力为电子设备的***提供的能力,Account表征该应用程序账号能力用于实现账号功能,AppAccount表征为该能力的名称,该应用程序账号能力对应的分段式编码可以为0000.0002.0002。电子设备的账号能力可以表征为字符串SystemCapability.Account,其中,SystemCapability表征该账号能力为电子设备的***提供的能力,Account表征该账号能力用于实现账号功能。其中,***账号能力和应用程序账号能力均为账号能力的子类,账号能力为***账号能力和应用程序账号能力的父类。某厂家提供的护眼能力可以表征为字符串PrivateCapability.Light.EyeProtection,其中,PrivateCapability表 征该护眼能力为非***提供的能力,例如某厂家提供的能力,Light表征该护眼能力用于实现照明功能,EyeProtection用于表征该能力的名称,该护眼能力对应的分段式编码可以为k.0001.0011。For example, the system account capability of an electronic device can be represented by a string SystemCapability.Account.OsAccount, where SystemCapability represents that the system account capability is a capability provided by the system of the electronic device, Account represents that the system account capability is used to implement the account function, OsAccount represents the name of the capability, and the segmented code corresponding to the system account capability can be 0000.0002.0001. The application account capability of an electronic device can be represented by a string SystemCapability.Account.AppAccount, where SystemCapability represents that the application account capability is a capability provided by the system of the electronic device, Account represents that the application account capability is used to implement the account function, AppAccount represents the name of the capability, and the segmented code corresponding to the application account capability can be 0000.0002.0002. The account capability of an electronic device can be represented by a string SystemCapability.Account, where SystemCapability represents that the account capability is a capability provided by the system of the electronic device, and Account represents that the account capability is used to implement the account function. Wherein, both the system account capability and the application account capability are subclasses of the account capability, and the account capability is the parent class of the system account capability and the application account capability. The eye protection capability provided by a manufacturer can be represented by the string PrivateCapability.Light.EyeProtection, where PrivateCapability represents The eye protection capability is not provided by the system, for example, it is provided by a manufacturer. Light indicates that the eye protection capability is used to realize the lighting function. EyeProtection is used to indicate the name of the capability. The segmented code corresponding to the eye protection capability may be k.0001.0011.
在一种可选的实施例中,能力对应的分段式编码可以被压缩,在一些示例中,可以通过将分段式编码中的0省略来压缩分段式编码,例如,NFC能力对应的分段式编码0000.0001.0005可以压缩为1.5,***账号能力对应的分段式编码0000.0002.0001可以压缩为2.1,某个***提供能力A对应的分段式编码为0000.0000.0003可以压缩为3,护眼能力对应的分段式编码x.0001.0011可以压缩为x.1.11,具体示例可参见下表1。In an optional embodiment, the segmented codes corresponding to the capabilities can be compressed. In some examples, the segmented codes can be compressed by omitting 0 in the segmented codes. For example, the segmented code 0000.0001.0005 corresponding to the NFC capability can be compressed to 1.5, the segmented code 0000.0002.0001 corresponding to the system account capability can be compressed to 2.1, the segmented code 0000.0000.0003 corresponding to the capability A provided by a system can be compressed to 3, and the segmented code x.0001.0011 corresponding to the eye protection capability can be compressed to x.1.11. Specific examples can be seen in Table 1 below.
表1
Table 1
在一种可选的实施例中,电子设备600可以向网络设备500发送第一消息,第一消息可以用于请求在能力集字典中新增第一能力,其中,第一能力为网络设备500接收到第一消息之前能力集字典不包括的能力。在一些示例中,第一能力为电子设备700的能力,例如,电子设备700发布之前,电子设备700的开发者使用电子设备600向网络设备500发送第一消息,其中,电子设备700可以但不限于为电子设备100或者电子设备200。在一些示例中,第一消息中携带第一能力的信息,例如用于表征第一能力的字符串,例如NFC能力对应的字符串SystemCapability.Communication.NFC.Core。In an optional embodiment, the electronic device 600 may send a first message to the network device 500, and the first message may be used to request the addition of a first capability in the capability set dictionary, wherein the first capability is a capability that is not included in the capability set dictionary before the network device 500 receives the first message. In some examples, the first capability is a capability of the electronic device 700, for example, before the electronic device 700 is released, the developer of the electronic device 700 uses the electronic device 600 to send a first message to the network device 500, wherein the electronic device 700 may be, but is not limited to, the electronic device 100 or the electronic device 200. In some examples, the first message carries information about the first capability, such as a string used to characterize the first capability, such as the string SystemCapability.Communication.NFC.Core corresponding to the NFC capability.
S102:当能力集字典不包括第一能力时,网络设备500在能力集字典中新增第一能力。S102: When the capability set dictionary does not include the first capability, the network device 500 adds the first capability to the capability set dictionary.
在一种可选的实施例中,S102是可选的步骤。In an optional embodiment, S102 is an optional step.
在一种可选的实施例中,网络设备500接收到第一消息后,生成第一能力对应的编码,并在能力集字典中添加第一能力对应的编码。在一些示例中,网络设备500接收到第一消息后,会先判断能力集字典中是否包括第一能力的编码/字符串,当确定能力集字典不包括第一能力的编码/字符串时,将第一能力对应的编码/字符串添加至能力集字典中。In an optional embodiment, after receiving the first message, the network device 500 generates a code corresponding to the first capability and adds the code corresponding to the first capability to the capability set dictionary. In some examples, after receiving the first message, the network device 500 first determines whether the capability set dictionary includes the code/string of the first capability, and when it is determined that the capability set dictionary does not include the code/string of the first capability, the code/string corresponding to the first capability is added to the capability set dictionary.
在另一种可选的实施例中,当能力集字典包括第一能力时,网络设备500不在能力集字典中新增第一能力。In another optional embodiment, when the capability set dictionary includes the first capability, the network device 500 does not add the first capability to the capability set dictionary.
S103:电子设备600向网络设备500发送第二消息。S103 : The electronic device 600 sends a second message to the network device 500 .
在一种可选的实施例中,第二消息可以用于请求获取电子设备700的能力集。在一些示例中,第二消息中携带电子设备700的能力的信息,例如用于表征电子设备700的能力的字符串。在一些示例中,电子设备600可以响应于用户操作(例如电子设备700的开发者通过电子设备600的开发工具输入的用户操作),获取到电子设备700的能力的信息。在一些示例中,电子设备700的能力包括硬件能力和/或软件能力,硬件能力例如但不限于包括显示屏、摄像头、扬声器、蓝牙、NFC、Wi-Fi等,软件能力例如但不限于包括时钟、支付、截屏等。In an optional embodiment, the second message may be used to request the acquisition of the capability set of the electronic device 700. In some examples, the second message carries information about the capability of the electronic device 700, such as a character string used to characterize the capability of the electronic device 700. In some examples, the electronic device 600 may obtain information about the capability of the electronic device 700 in response to a user operation (e.g., a user operation input by a developer of the electronic device 700 through a development tool of the electronic device 600). In some examples, the capability of the electronic device 700 includes hardware capabilities and/or software capabilities, and the hardware capabilities include, for example but not limited to, display screen, camera, speaker, Bluetooth, NFC, Wi-Fi, etc., and the software capabilities include, for example but not limited to, clock, payment, screenshot, etc.
S104:网络设备500生成电子设备700的能力集。S104 : The network device 500 generates a capability set of the electronic device 700 .
在一种可选的实施例中,网络设备500接收到电子设备600发送的第二消息后,生成电子设备700的能力集(例如但不限于为pcid格式的文件),在一些示例中,网络设备500根据第二消息中的电子设备700的能力的信息,生成电子设备700的能力集。在一些示例中,网络设备500从能力集字典中获取到电子设备700的能力对应的编码,并生成包括这些编码的电子设备700的能力集。In an optional embodiment, after receiving the second message sent by the electronic device 600, the network device 500 generates a capability set (for example, but not limited to, a file in pcid format) of the electronic device 700. In some examples, the network device 500 generates the capability set of the electronic device 700 according to the information of the capability of the electronic device 700 in the second message. In some examples, the network device 500 obtains the codes corresponding to the capabilities of the electronic device 700 from the capability set dictionary, and generates the capability set of the electronic device 700 including these codes.
S105:网络设备500向电子设备600发送电子设备700的能力集。S105 : The network device 500 sends the capability set of the electronic device 700 to the electronic device 600 .
S106:电子设备600保存电子设备700的能力集。S106 : The electronic device 600 saves the capability set of the electronic device 700 .
在一种可选的实施例中,电子设备700的能力集可以存储在电子设备600中。在另一种可选的实施例中,电子设备700的能力集可以存储在电子设备700的***中。在图5所示的方法中,能力集字典中的每个能力不依赖于设备类型,并且对应的编码具备唯一性,统一了不同厂家的标准,减少管理和维护的难度。In an optional embodiment, the capability set of the electronic device 700 may be stored in the electronic device 600. In another optional embodiment, the capability set of the electronic device 700 may be stored in the system of the electronic device 700. In the method shown in FIG5 , each capability in the capability set dictionary is independent of the device type, and the corresponding code is unique, which unifies the standards of different manufacturers and reduces the difficulty of management and maintenance.
请参见图6,图6是本申请实施例提供的又一种软件分发方法的流程示意图。该方法可以应用于图1所示的软件分发***10。该方法可以包括但不限于如下步骤:Please refer to Figure 6, which is a flowchart of another software distribution method provided by an embodiment of the present application. The method can be applied to the software distribution system 10 shown in Figure 1. The method may include but is not limited to the following steps:
S201:电子设备400开发第一软件。 S201: The electronic device 400 develops first software.
在一种可选的实施例中,S201是可选的步骤。In an optional embodiment, S201 is an optional step.
在一种可选的实施例中,电子设备400安装有开发软件,第一软件的开发者可以通过电子设备400的开发软件开发第一软件。In an optional embodiment, the electronic device 400 is installed with development software, and the developer of the first software can develop the first software through the development software of the electronic device 400 .
S202:电子设备400获取至少一个电子设备的能力集。S202: The electronic device 400 obtains a capability set of at least one electronic device.
在一种可选的实施例中,S202是可选的步骤。In an optional embodiment, S202 is an optional step.
在一种可选的实施例中,电子设备400可以接收用户输入的至少一个电子设备的能力集(例如但不限于为pcid格式的文件),例如,第一软件的开发者通过电子设备400的开发工具输入至少一个电子设备的能力集。In an optional embodiment, the electronic device 400 may receive a capability set of at least one electronic device input by a user (for example but not limited to a file in pcid format), for example, a developer of the first software inputs the capability set of at least one electronic device through a development tool of the electronic device 400.
不限于上述实施方式,在另一种可选的实施例中,电子设备400可以向网络设备500请求获取至少一个能力,网络设备500的说明可参见图5的S101中网络设备500的说明。Not limited to the above implementation, in another optional embodiment, the electronic device 400 may request the network device 500 to obtain at least one capability. The description of the network device 500 may refer to the description of the network device 500 in S101 of FIG. 5 .
在一种可选的实施例中,步骤S202中的至少一个电子设备的能力集也可以替换为其他设备能力集文件,只要用户可以从该设备能力集文件中选择第一软件需要的能力即可。In an optional embodiment, the capability set of at least one electronic device in step S202 may also be replaced by other device capability set files, as long as the user can select the capabilities required by the first software from the device capability set files.
S203:电子设备400选择第一软件需要的能力,并设置能力的依赖程度。S203: The electronic device 400 selects capabilities required by the first software, and sets the dependency level of the capabilities.
在一种可选的实施例中,电子设备400可以从上述至少一个电子设备的能力集中选择出第一软件需要的能力,例如第一软件的开发者通过电子设备400的开发工具输入用户操作,电子设备400根据用户操作选择出第一软件需要的能力。In an optional embodiment, the electronic device 400 can select the capabilities required by the first software from the capability set of the above-mentioned at least one electronic device. For example, the developer of the first software inputs user operations through the development tool of the electronic device 400, and the electronic device 400 selects the capabilities required by the first software based on the user operations.
在一种可选的实施例中,电子设备400可以设置第一软件需要的能力集中的能力的依赖程度,例如根据用户操作设置。在一些示例中,依赖程度可以但不限于包括强依赖和弱依赖,其中,强依赖的能力为被分发第一软件的设备必须具备的能力;弱依赖的能力为被分发第一软件的设备可以不具备的能力。在一些示例中,假设第一软件需要的能力集包括强依赖的NFC能力和弱依赖的账号能力,假设电子设备A的能力集包括NFC能力但不包括账号能力,电子设备B的能力不包括NFC能力但包括账号能力,因此,电子设备A可以被分发第一软件,电子设备B无法被分发第一软件,电子设备A可以通过第一软件提供的匿名访问能力使用该第一软件。In an optional embodiment, the electronic device 400 may set the degree of dependency of the capabilities in the capability set required by the first software, for example, according to user operation settings. In some examples, the degree of dependency may include, but is not limited to, strong dependency and weak dependency, wherein a strongly dependent capability is a capability that the device to which the first software is distributed must have; a weakly dependent capability is a capability that the device to which the first software is distributed may not have. In some examples, assuming that the capability set required by the first software includes a strongly dependent NFC capability and a weakly dependent account capability, assuming that the capability set of electronic device A includes NFC capability but does not include account capability, and the capability set of electronic device B does not include NFC capability but includes account capability, therefore, electronic device A can be distributed with the first software, electronic device B cannot be distributed with the first software, and electronic device A can use the first software through the anonymous access capability provided by the first software.
在一种可选的实施例中,第一软件需要的能力集中的能力之间可以存在父子关系,例如,***账号能力和应用程序账号能力是账号能力的子能力(即子类),账号能力是***账号能力和应用程序账号能力的父能力(即父类)。在一些示例中,电子设备400可以通过设置子能力的依赖程度,来设置父能力的依赖程度,例如,作为子能力的***账号能力和应用程序账号能力分别设置为强依赖和弱依赖后,作为父能力的账号能力的依赖程度为强依赖。在一些示例中,电子设备400可以通过设置父能力的依赖程度,来设置子能力的依赖程度,例如,作为父能力的账号能力被设置为强依赖后,作为子能力的***账号能力和应用程序账号能力的依赖程度均为强依赖。In an optional embodiment, a parent-child relationship may exist between the capabilities in the capability set required by the first software, for example, the system account capability and the application account capability are sub-capabilities (i.e., subclasses) of the account capability, and the account capability is the parent capability (i.e., parent class) of the system account capability and the application account capability. In some examples, the electronic device 400 can set the degree of dependency of the parent capability by setting the degree of dependency of the sub-capability. For example, after the system account capability and the application account capability as sub-capabilities are set to strong dependency and weak dependency respectively, the degree of dependency of the account capability as the parent capability is strong dependency. In some examples, the electronic device 400 can set the degree of dependency of the sub-capability by setting the degree of dependency of the parent capability. For example, after the account capability as the parent capability is set to strong dependency, the degree of dependency of the system account capability and the application account capability as the sub-capability are both strong dependencies.
第一软件需要的能力集中的编码和依赖程度的示例可参见下表2。Examples of the coding and dependency levels in the capability set required by the first software can be found in Table 2 below.
表2
Table 2
S204:电子设备400生成第一软件需要的能力集。S204: The electronic device 400 generates a capability set required by the first software.
在一种可选的实施例中,电子设备400可以根据选择出的能力生成第一软件需要的能力集(例如但不限于为rpcid格式的文件)。第一软件需要的能力集中的能力的标识方式和图5所述的能力集字典中的能力的标识方式(即通过编码标识)一致。不再赘述。In an optional embodiment, the electronic device 400 can generate a capability set required by the first software (for example, but not limited to, a file in rpcid format) based on the selected capability. The identification method of the capability in the capability set required by the first software is consistent with the identification method of the capability in the capability set dictionary described in FIG. 5 (i.e., through coding identification). No more details are given.
在一种可选的实施例中,第一软件可以包括多个版本,其中,不同版本的第一软件需要的能力集可以相同,也可以不相同,本申请对此不作限定。In an optional embodiment, the first software may include multiple versions, wherein the capability sets required by different versions of the first software may be the same or different, which is not limited in the present application.
S205:电子设备400生成第一软件的安装包。S205: The electronic device 400 generates an installation package for the first software.
在一种可选的实施例中,电子设备400可以接收用户操作,生成第一软件的安装包,例如,第一软件的开发者通过电子设备400的开发工具输入用户操作,电子设备400根据用户操作编译生成第一软件的安装包。在一些示例中,第一软件的安装包可以包括第一软件需要的能力集。In an optional embodiment, the electronic device 400 may receive a user operation and generate an installation package of the first software. For example, the developer of the first software inputs the user operation through a development tool of the electronic device 400, and the electronic device 400 compiles and generates the installation package of the first software according to the user operation. In some examples, the installation package of the first software may include a capability set required by the first software.
S206:电子设备400向网络设备300发送第一软件的安装包。S206 : The electronic device 400 sends the installation package of the first software to the network device 300 .
在一种可选的实施例中,第一软件的安装包可以包括第一软件需要的能力集,在另一种可选的实施例 中,第一软件需要的能力集独立于第一软件的安装包,电子设备400可以向网络设备300发送第一软件需要的能力集。In an optional embodiment, the installation package of the first software may include a capability set required by the first software. In another optional embodiment, In the example, the capability set required by the first software is independent of the installation package of the first software, and the electronic device 400 can send the capability set required by the first software to the network device 300.
S207:网络设备300保存第一软件的安装包。S207: The network device 300 saves the installation package of the first software.
在一种可选的实施例中,网络设备300可以存储第一软件需要的能力集,以用于第一软件的分发。In an optional embodiment, the network device 300 may store a capability set required by the first software for distribution of the first software.
在一种可选的实施例中,网络设备300接收到第一软件的安装包后,可以存储第一软件的安装包,以用于第一软件的分发。在另一种可选的实施例中,网络设备300可以向其他设备发送第一软件的安装包以使其他设备存储第一软件的安装包,网络设备300可以存储第一软件的安装包的下载方式,例如该其他设备的信息,例如下载地址,以用于第一软件的分发。不限于图6所示的实施方式,在另一种可选的实施例中,电子设备400还可以向其他设备发送第一软件的安装包,以及向网络设备300发送第一软件的安装包的下载方式,本申请对此不作限定。In an optional embodiment, after receiving the installation package of the first software, the network device 300 can store the installation package of the first software for distribution of the first software. In another optional embodiment, the network device 300 can send the installation package of the first software to other devices so that the other devices store the installation package of the first software, and the network device 300 can store the download method of the installation package of the first software, such as information of the other devices, such as the download address, for distribution of the first software. Not limited to the implementation shown in Figure 6, in another optional embodiment, the electronic device 400 can also send the installation package of the first software to other devices, and send the download method of the installation package of the first software to the network device 300, and this application does not limit this.
在图6所示的方法中,第一软件需要的能力集中的能力的标识方式和图5所述的能力集字典中的能力的标识方式一致,统一了能力的标识方式,减少了开发和维护的难度。In the method shown in FIG. 6 , the identification method of the capabilities in the capability set required by the first software is consistent with the identification method of the capabilities in the capability set dictionary described in FIG. 5 , which unifies the identification method of the capabilities and reduces the difficulty of development and maintenance.
请参见图7,图7是本申请实施例提供的又一种软件分发方法的流程示意图。该方法可以应用于图1所示的软件分发***10。该方法可以包括但不限于如下步骤:Please refer to Figure 7, which is a flowchart of another software distribution method provided by an embodiment of the present application. The method can be applied to the software distribution system 10 shown in Figure 1. The method may include but is not limited to the following steps:
S301:电子设备100确定需要被分发第二软件。S301: The electronic device 100 determines that second software needs to be distributed.
在一种可选的实施例中,当处于触发场景时,电子设备100可以确定电子设备100需要被分发第二软件,第二软件和上述触发场景相关。在一种可选的实施例中,当处于触发场景时,电子设备100的第三软件可以确定电子设备100需要被分发第二软件,其中,电子设备100的第三软件为和第二软件相关的软件,例如,第二软件需在安装有电子设备100的第三软件的环境下运行,例如,电子设备100的为负一屏应用,第二软件为出行订票的原子化服务。接下来示例性示出一些触发场景和相关的第二软件,但不应构成限定。In an optional embodiment, when in a triggering scenario, the electronic device 100 may determine that the electronic device 100 needs to be distributed with a second software, and the second software is related to the above-mentioned triggering scenario. In an optional embodiment, when in a triggering scenario, the third software of the electronic device 100 may determine that the electronic device 100 needs to be distributed with a second software, wherein the third software of the electronic device 100 is software related to the second software, for example, the second software needs to be run in an environment where the third software of the electronic device 100 is installed, for example, the electronic device 100 is a negative one-screen application, and the second software is an atomic service for travel booking. Some triggering scenarios and related second software are exemplified below, but should not constitute a limitation.
在一些示例中,电子设备100到达预设位置时,确定处于第一触发场景,例如,预设位置为机场,和第一触发场景相关的第二软件为出行订票的原子化服务。In some examples, when the electronic device 100 arrives at a preset location, it is determined to be in a first triggering scenario. For example, the preset location is an airport, and the second software related to the first triggering scenario is an atomic service for travel booking.
在一些示例中,电子设备100可以根据用户画像确定是否处于触发场景和相关的第二软件,例如,电子设备100根据用户画像确定用户启动阅读应用后会使用便签的原子化服务,因此,电子设备100接收到用于启动阅读应用的用户操作时,确定处于第二触发场景,和第二触发场景相关的第二软件为便签的原子化服务。In some examples, the electronic device 100 can determine whether it is in a trigger scenario and the related second software based on the user portrait. For example, the electronic device 100 determines based on the user portrait that the user will use the atomic service of notes after starting the reading application. Therefore, when the electronic device 100 receives the user operation for starting the reading application, it determines that it is in the second trigger scenario, and the second software related to the second trigger scenario is the atomic service of notes.
在一些示例中,电子设备100接收到用户操作时,确定处于触发场景,该用户操作可以但不限于包括触摸操作、语音输入、脑电波等。例如,电子设备100接收到用户输入的语音“查一下我的快递”时,确定处于第三触发场景,和第三触发场景相关的第二软件为快递的原子化服务。In some examples, when the electronic device 100 receives a user operation, it is determined to be in a triggering scenario, and the user operation may include but is not limited to touch operation, voice input, brain waves, etc. For example, when the electronic device 100 receives a user input voice "check my express delivery", it is determined to be in the third triggering scenario, and the second software related to the third triggering scenario is an atomic service for express delivery.
在一些示例中,电子设备100可以根据用户设置的定时任务确定是否处于触发场景,例如,用户设置的定时任务为早上八点播放新闻,因此,电子设备100确定当前时刻和八点的时间差值小于或等于预设时长时,确定处于第四触发场景,和第四触发场景相关的第二软件为新闻的原子化服务。In some examples, the electronic device 100 can determine whether it is in a trigger scenario based on a scheduled task set by the user. For example, the scheduled task set by the user is to play the news at eight o'clock in the morning. Therefore, when the electronic device 100 determines that the time difference between the current moment and eight o'clock is less than or equal to the preset duration, it determines that it is in the fourth trigger scenario, and the second software related to the fourth trigger scenario is an atomic service for news.
在一些示例中,电子设备100可以根据用户搜索的关键词确定是否处于触发场景,例如,用户在负一屏应用中搜索“美食”时,电子设备100确定处于第五触发场景,和第五触发场景相关的第二软件为附近美食的原子化服务。In some examples, the electronic device 100 can determine whether it is in a trigger scene based on the keywords searched by the user. For example, when the user searches for "food" in the negative one screen application, the electronic device 100 determines that it is in the fifth trigger scene, and the second software related to the fifth trigger scene is an atomic service for nearby food.
S302:电子设备100获取电子设备100的能力集。S302: The electronic device 100 obtains a capability set of the electronic device 100.
在一种可选的实施例中,S302是可选的步骤。In an optional embodiment, S302 is an optional step.
在一种可选的实施例中,电子设备100的第三软件向电子设备100的***请求获取电子设备100的能力集。在一种可选的实施例中,电子设备100的第三软件可以调用电子设备100的***提供的接口向电子设备100的***请求获取电子设备100的能力集,电子设备100的***向电子设备100的第三软件返回电子设备100的能力集。在一些示例中,电子设备100的***例如但不限于为OS。在一种可选的实施例中,电子设备100的能力集可以通过第一参数来表征,第一参数可以包括电子设备100的能力集中的能力的编码,例如,电子设备100的能力集包括表1所示的能力时,可以通过第一参数(例如名称为pcidVar)“1.5,2.1,2.2,x.1.11”来表征。In an optional embodiment, the third software of the electronic device 100 requests the system of the electronic device 100 to obtain the capability set of the electronic device 100. In an optional embodiment, the third software of the electronic device 100 may call the interface provided by the system of the electronic device 100 to request the system of the electronic device 100 to obtain the capability set of the electronic device 100, and the system of the electronic device 100 returns the capability set of the electronic device 100 to the third software of the electronic device 100. In some examples, the system of the electronic device 100 is, for example but not limited to, an OS. In an optional embodiment, the capability set of the electronic device 100 may be characterized by a first parameter, and the first parameter may include an encoding of a capability in the capability set of the electronic device 100. For example, when the capability set of the electronic device 100 includes the capabilities shown in Table 1, it may be characterized by a first parameter (for example, named pcidVar) "1.5, 2.1, 2.2, x.1.11".
S303:电子设备100向网络设备300发送第三消息。S303 : The electronic device 100 sends a third message to the network device 300 .
在一种可选的实施例中,电子设备100可以向网络设备300发送第三消息,第三消息可以用于请求获取第二软件。在一种可选的实施例中,电子设备100的第三软件可以向网络设备300发送第三消息。In an optional embodiment, the electronic device 100 may send a third message to the network device 300 , and the third message may be used to request to obtain the second software. In an optional embodiment, the third software of the electronic device 100 may send a third message to the network device 300 .
在一种可选的实施例中,第三消息中携带电子设备100的能力集,例如,第三消息中携带用于表征电 子设备100的能力集的第一参数,在一些示例中,电子设备100可以根据存储的电子设备100的能力集生成第三消息。在一种可选的实施例中,第三消息可以包括第二软件的信息,例如第二软件的名称、第二软件的唯一标识码、第二软件的版本等。In an optional embodiment, the third message carries a capability set of the electronic device 100, for example, the third message carries a capability set for characterizing the electronic device 100. The first parameter of the capability set of the sub-device 100, in some examples, the electronic device 100 may generate a third message according to the stored capability set of the electronic device 100. In an optional embodiment, the third message may include information of the second software, such as the name of the second software, the unique identification code of the second software, the version of the second software, etc.
S304:网络设备300根据第三消息确定需要分发的第二软件。S304: The network device 300 determines the second software that needs to be distributed according to the third message.
在一种可选的实施例中,网络设备300可以从接收到的第三消息中获取到电子设备100的能力集。在另一种可选的实施例中,网络设备300可以存储有电子设备100的能力集,网络设备300接收到第三消息后,可以读取存储的电子设备100的能力集。In an optional embodiment, the network device 300 may obtain the capability set of the electronic device 100 from the received third message. In another optional embodiment, the network device 300 may store the capability set of the electronic device 100, and after receiving the third message, the network device 300 may read the stored capability set of the electronic device 100.
在一种可选的实施例中,网络设备300可以根据接收到的第三消息得到第二软件的信息,并根据第二软件的信息获取第二软件需要的能力集,第二软件的信息例如但不限于包括第二软件的名称、第二软件的唯一标识码、第二软件的版本。在一些示例中,网络设备300可以存储有多个软件需要的能力集,网络设备300可以根据第二软件的信息,从存储的多个软件需要的能力集中找到第二软件需要的能力集。网络设备300获取多个软件需要的能力集的方式示例可参见图6所示的实施例。In an optional embodiment, the network device 300 may obtain information about the second software based on the received third message, and obtain the capability set required by the second software based on the information about the second software. The information about the second software may include, for example but not limited to, the name of the second software, the unique identification code of the second software, and the version of the second software. In some examples, the network device 300 may store capability sets required by multiple software, and the network device 300 may find the capability set required by the second software from the stored capability sets required by multiple software based on the information about the second software. An example of how the network device 300 obtains capability sets required by multiple software can be found in the embodiment shown in FIG6.
S305:网络设备300判断是否满足第一条件。S305: The network device 300 determines whether the first condition is met.
在一种可选的实施例中,第一条件包括电子设备100的能力集和第二软件需要的能力集匹配。在一种可选的实施例中,当满足第一条件时,网络设备300可以向电子设备100分发第二软件,即执行S307。在一种可选的实施例中,满足第一条件可以但不限于包括以下至少一种情况:In an optional embodiment, the first condition includes that the capability set of the electronic device 100 matches the capability set required by the second software. In an optional embodiment, when the first condition is met, the network device 300 can distribute the second software to the electronic device 100, that is, execute S307. In an optional embodiment, meeting the first condition may include but is not limited to at least one of the following situations:
情况1,电子设备100的能力集包含第二软件需要的能力集中的每个能力;Case 1: the capability set of the electronic device 100 includes each capability in the capability set required by the second software;
情况2,电子设备100的能力集包含第二软件需要的能力集中强依赖的能力;Case 2: the capability set of the electronic device 100 includes a capability that is strongly dependent on the capability set required by the second software;
情况3,电子设备100的能力集包含第二软件需要的能力集中强依赖的能力的父能力。Case 3: The capability set of the electronic device 100 includes the parent capability of the capability that the second software strongly depends on in the capability set.
其中,强依赖、父能力的说明可参见图6的S203的说明,不再赘述。The description of strong dependency and parent capability can be found in the description of S203 in FIG. 6 , which will not be described in detail.
在一些示例中,电子设备100的能力集和第二软件需要的能力集匹配可以包括上述情况1和情况2,例如,第二软件需要的能力集中的每个能力的依赖程度均为强依赖的情况。In some examples, the matching of the capability set of the electronic device 100 and the capability set required by the second software may include the above-mentioned case 1 and case 2, for example, the case where the degree of dependency of each capability in the capability set required by the second software is a strong dependency.
在一些示例中,电子设备100的能力集和第二软件需要的能力集匹配可以包括上述情况2和情况3,例如,电子设备100的能力集包括能力1和能力2,第二软件需要的能力集包括强依赖的能力1和能力3,其中,能力2是能力3的父能力。In some examples, the capability set of electronic device 100 and the capability set required by the second software may match Case 2 and Case 3 described above. For example, the capability set of electronic device 100 includes capability 1 and capability 2, and the capability set required by the second software includes strongly dependent capability 1 and capability 3, wherein capability 2 is the parent capability of capability 3.
在一种可选的实施例中,当不满足第一条件时,网络设备300可以不向电子设备100分发第二软件。In an optional embodiment, when the first condition is not met, the network device 300 may not distribute the second software to the electronic device 100 .
在一种可选的实施例中,第二软件可以包括多个版本,不同版本的第二软件需要的能力集可以相同,在另一种可选的实施例中,不同版本的第二软件需要的能力集可以不同。In an optional embodiment, the second software may include multiple versions, and the capability sets required by different versions of the second software may be the same. In another optional embodiment, the capability sets required by different versions of the second software may be different.
在一种可选的实施例中,第三消息可以包括第二软件的版本(假设为第一版本),网络设备300可以比较电子设备100的能力集和第一版本的第二软件需要的能力集,当二者匹配时,网络设备300可以向电子设备100分发第二软件,否则不分发第二软件。In an optional embodiment, the third message may include the version of the second software (assuming it is the first version), and the network device 300 may compare the capability set of the electronic device 100 with the capability set required by the first version of the second software. When the two match, the network device 300 may distribute the second software to the electronic device 100, otherwise the second software will not be distributed.
在另一种可选的实施例中,第三消息不包括第二软件的版本。网络设备300可以比较电子设备100的能力集和多个版本的第二软件需要的能力集,在一些示例中,当仅一个第二版本的第二软件需要的能力集和电子设备100的能力集匹配时,网络设备300可以向电子设备100分发第二版本的第二软件。在另一些示例中,当至少两个版本的第二软件需要的能力集和电子设备100的能力集匹配时,网络设备300可以向电子设备100分发版本较新的第二软件,例如,第三版本的第二软件、第四版本的第二软件均和电子设备100的能力集匹配时,由于第四版本比第三版本新,因此,网络设备300可以向电子设备100分发第四版本的第二软件。在另一些示例中,当上述多个版本的第二软件需要的能力集和电子设备100的能力集均不匹配时,网络设备300可以不向电子设备100分发第二软件。In another optional embodiment, the third message does not include the version of the second software. The network device 300 can compare the capability set of the electronic device 100 with the capability sets required by the second software of multiple versions. In some examples, when the capability set required by only one second version of the second software matches the capability set of the electronic device 100, the network device 300 can distribute the second version of the second software to the electronic device 100. In other examples, when the capability sets required by at least two versions of the second software match the capability set of the electronic device 100, the network device 300 can distribute the newer version of the second software to the electronic device 100. For example, when the third version of the second software and the fourth version of the second software both match the capability set of the electronic device 100, since the fourth version is newer than the third version, the network device 300 can distribute the fourth version of the second software to the electronic device 100. In other examples, when the capability sets required by the second software of the multiple versions do not match the capability set of the electronic device 100, the network device 300 may not distribute the second software to the electronic device 100.
不限于上述实施方式,在另一种可选的实施例中,第三消息包括第二软件的版本(假设为第一版本),若网络设备300确定电子设备100的能力集和第一版本的第二软件需要的能力集不匹配,但网络设备300确定电子设备100的能力集和第五版本的第二软件需要的能力集匹配时,可以向电子设备100分发第五版本的第二软件,本申请对此不作限定。Not limited to the above implementation, in another optional embodiment, the third message includes the version of the second software (assuming it is the first version). If the network device 300 determines that the capability set of the electronic device 100 does not match the capability set required by the first version of the second software, but the network device 300 determines that the capability set of the electronic device 100 matches the capability set required by the fifth version of the second software, the fifth version of the second software can be distributed to the electronic device 100. This application does not limit this.
在一种可选的实施例中,当电子设备100的能力集和第二软件需要的能力集不匹配时,网络设备300可以向电子设备100发送第四消息,第四消息用于提示用户电子设备100不具备运行第二软件的能力。In an optional embodiment, when the capability set of the electronic device 100 does not match the capability set required by the second software, the network device 300 may send a fourth message to the electronic device 100, where the fourth message is used to prompt the user that the electronic device 100 does not have the ability to run the second software.
S306:网络设备300向电子设备100发送第二软件的安装包。S306 : The network device 300 sends the installation package of the second software to the electronic device 100 .
在一种可选的实施例中,当满足第一条件时,网络设备300可以向电子设备100发送第二软件的安装包,以分发第二软件。在一种可选的实施例中,当满足第一条件时,网络设备300可以向电子设备100的第三软件发送第二软件的安装包,以分发第二软件。 In an optional embodiment, when the first condition is met, the network device 300 may send the installation package of the second software to the electronic device 100 to distribute the second software. In an optional embodiment, when the first condition is met, the network device 300 may send the installation package of the second software to the third software of the electronic device 100 to distribute the second software.
在一种可选的实施例中,网络设备300可以存储第二软件的安装包,网络设备300可以向电子设备100发送第二软件的安装包以分发第二软件。在另一种可选的实施例中,第二软件的安装包由网络设备300以外的其他设备存储,网络设备300可以存储第二软件的安装包的下载方式,例如其他设备的信息,例如下载地址,网络设备300可以向电子设备100发送第二软件的下载方式以分发第二软件。In an optional embodiment, the network device 300 may store the installation package of the second software, and the network device 300 may send the installation package of the second software to the electronic device 100 to distribute the second software. In another optional embodiment, the installation package of the second software is stored by another device other than the network device 300, and the network device 300 may store the download method of the installation package of the second software, such as information of the other device, such as a download address, and the network device 300 may send the download method of the second software to the electronic device 100 to distribute the second software.
S307:电子设备100安装第二软件。S307: The electronic device 100 installs the second software.
在一种可选的实施例中,S307是可选的步骤。In an optional embodiment, S307 is an optional step.
在一种可选的实施例中,电子设备100接收到网络设备300发送的第二软件的安装包后,可以根据该安装包安装第二软件。在一种可选的实施例中,电子设备100的第三软件接收到网络设备300发送的第二软件的安装包后,可以根据该安装包安装第二软件。在一些示例中,安装可以但不限于为静默安装,例如不显示安装进度和图标的安装。In an optional embodiment, after the electronic device 100 receives the installation package of the second software sent by the network device 300, the second software can be installed according to the installation package. In an optional embodiment, after the third software of the electronic device 100 receives the installation package of the second software sent by the network device 300, the second software can be installed according to the installation package. In some examples, the installation can be, but is not limited to, a silent installation, such as an installation without displaying the installation progress and icon.
在另一种可选的实施例中,电子设备100接收到网络设备300发送的第二软件的下载方式后,可以根据第二软件的下载方式获取第二软件的安装包,并根据该安装包安装第二软件。In another optional embodiment, after the electronic device 100 receives the download method of the second software sent by the network device 300, it can obtain the installation package of the second software according to the download method of the second software, and install the second software according to the installation package.
S308:电子设备100显示第二软件的界面。S308: The electronic device 100 displays the interface of the second software.
在一种可选的实施例中,S308是可选的步骤。In an optional embodiment, S308 is an optional step.
在一种可选的实施例中,电子设备100安装第二软件后,显示第二软件的用户界面。在另一种可选的实施例中,电子设备100安装第二软件后,接收用户操作,响应于该用户操作,显示第二软件的用户界面。在一种可选的实施例中,电子设备100的第三软件安装第二软件后,显示第二软件的用户界面。In an optional embodiment, after the electronic device 100 installs the second software, the user interface of the second software is displayed. In another optional embodiment, after the electronic device 100 installs the second software, it receives a user operation, and displays the user interface of the second software in response to the user operation. In an optional embodiment, after the third software of the electronic device 100 installs the second software, the user interface of the second software is displayed.
示例性地,假设家庭场景下存在以下设备:手机1,配置有显示屏的音箱1,未配置显示屏的音箱2,配置有显示屏的门锁1。处于该家庭场景下的用户可以输出语音,假设为“播放视频A”,该家庭场景下的任意一个设备可以接收上述语音,并根据该语音确定处于触发场景6,假设和触发场景6相关的软件为视频的原子化服务,并且该软件需要的能力集包括的强依赖的能力为视频播放能力。由于手机1、音箱1和门锁1的能力集包括视频播放能力和视频播放能力的父能力,因此手机1、音箱1和门锁1可以被分发上述软件,由于音箱2的能力集不包括视频播放能力和视频播放能力的父能力,因此音箱2无法被分发上述软件。Exemplarily, assume that the following devices exist in a home scenario: mobile phone 1, speaker 1 equipped with a display screen, speaker 2 not equipped with a display screen, and door lock 1 equipped with a display screen. The user in the home scenario can output a voice, assuming it is "play video A". Any device in the home scenario can receive the above voice and determine that it is in triggering scenario 6 based on the voice. Assume that the software related to triggering scenario 6 is an atomic service for video, and the capability set required by the software includes a strongly dependent capability of video playback capability. Since the capability sets of mobile phone 1, speaker 1, and door lock 1 include video playback capability and the parent capability of video playback capability, mobile phone 1, speaker 1, and door lock 1 can be distributed with the above software. Since the capability set of speaker 2 does not include video playback capability and the parent capability of video playback capability, speaker 2 cannot be distributed with the above software.
在图7所示的方法中,软件的分发是基于设备的能力集实现的,不依赖于设备类型,解决了基于设备类型分发软件时存在的软件支持的部分设备无法被分发软件等技术问题,扩大了可被分发软件的设备范围,软件分发功能的应用场景更加广泛。用于触发软件分发的场景(即上述触发场景)多种多样,例如用户操作主动触发,或者电子设备自动识别,可以满足不同用户在不同场景下的不同需求,软件分发功能更加灵活和智能。并且,这种方法无需用户手动下载安装软件,即电子设备可以自动安装网络设备分发的软件,用户使用更加方便。In the method shown in FIG. 7 , the distribution of software is implemented based on the capability set of the device, and is independent of the device type. This solves the technical problem that some devices supported by the software cannot be distributed with the software when distributing software based on the device type, expands the range of devices that can be distributed with software, and makes the application scenarios of the software distribution function more extensive. The scenarios for triggering software distribution (i.e., the above-mentioned triggering scenarios) are varied, such as active triggering by user operations, or automatic recognition by electronic devices, which can meet the different needs of different users in different scenarios, and the software distribution function is more flexible and intelligent. In addition, this method does not require users to manually download and install software, that is, electronic devices can automatically install software distributed by network devices, which is more convenient for users to use.
请参见图8,图8是本申请实施例提供的又一种软件分发方法的流程示意图。该方法可以应用于图1所示的软件分发***10。该方法可以包括但不限于如下步骤:Please refer to Figure 8, which is a flowchart of another software distribution method provided by an embodiment of the present application. The method can be applied to the software distribution system 10 shown in Figure 1. The method may include but is not limited to the following steps:
S401:电子设备100确定需要分发第四软件。S401: The electronic device 100 determines that the fourth software needs to be distributed.
在一种可选的实施例中,电子设备100可以在识别到用户意图分发第四软件时,确定需要分发第四软件。在一种可选的实施例中,电子设备100的第五软件可以在识别到用户意图分发第四软件时,确定需要分发第四软件,其中,电子设备100的第五软件为和第四软件相关的软件,例如,第四软件需在安装有电子设备100的第五软件的环境下运行。In an optional embodiment, the electronic device 100 may determine that the fourth software needs to be distributed when it is recognized that the user intends to distribute the fourth software. In an optional embodiment, the fifth software of the electronic device 100 may determine that the fourth software needs to be distributed when it is recognized that the user intends to distribute the fourth software, wherein the fifth software of the electronic device 100 is software related to the fourth software, for example, the fourth software needs to be run in an environment where the fifth software of the electronic device 100 is installed.
在一些示例中,电子设备100可以根据接收到的用户操作识别到上述用户意图,例如,电子设备100显示第四软件的用户界面时,响应于针对该用户界面中的流转控件的用户操作,确定需要分发第四软件。在另一些示例中,电子设备100可以自动识别上述用户意图,例如,根据用户画像识别上述用户意图。In some examples, the electronic device 100 can identify the user intention based on the received user operation. For example, when the electronic device 100 displays the user interface of the fourth software, in response to the user operation on the flow control in the user interface, it is determined that the fourth software needs to be distributed. In other examples, the electronic device 100 can automatically identify the user intention, for example, identifying the user intention based on the user portrait.
在一些示例中,电子设备100可以响应于用户操作确定待分发的软件为第四软件,在另一些示例中,电子设备100也可以将预设的软件确定为待分发的软件,例如,电子设备100显示第四软件的用户界面时,将第四软件设置为待分发的软件。In some examples, electronic device 100 may determine that the software to be distributed is the fourth software in response to a user operation. In other examples, electronic device 100 may also determine preset software as the software to be distributed. For example, when electronic device 100 displays the user interface of the fourth software, the fourth software is set as the software to be distributed.
S402:电子设备100确定被分发第四软件的目标设备。S402: The electronic device 100 determines a target device to which the fourth software is distributed.
在一种可选的实施例中,电子设备100可以接收用户操作,确定被分发第四软件的目标设备。在一种可选的实施例中,电子设备的第五软件可以接收用户操作,确定被分发第四软件的目标设备。In an optional embodiment, the electronic device 100 may receive a user operation to determine a target device to which the fourth software is distributed. In an optional embodiment, the fifth software of the electronic device may receive a user operation to determine a target device to which the fourth software is distributed.
在一些示例中,电子设备100第五软件可以响应于针对第四软件的用户界面中的流转控件的用户操作,显示多个设备的信息,这多个设备可以为电子设备100通过分布式通信方式(例如软总线)发现和/或连接 的设备。电子设备100第五软件接收到针对这多个设备中的电子设备200的信息的用户操作时,可以确定被分发第四软件的目标设备为电子设备200。在一些示例中,电子设备100可以响应于用户操作确定被分发软件的目标设备为电子设备200,在另一些示例中,电子设备100可以将预设的设备确定为被分发软件的目标设备,例如,将最近一次通信的电子设备200设置为被分发软件的目标设备。In some examples, the fifth software of the electronic device 100 may display information of multiple devices in response to a user operation on a flow control in a user interface of the fourth software. The multiple devices may be discovered and/or connected to the electronic device 100 through a distributed communication method (e.g., a soft bus). When the fifth software of the electronic device 100 receives the user operation for the information of the electronic device 200 among the multiple devices, it can determine that the target device to which the fourth software is distributed is the electronic device 200. In some examples, the electronic device 100 can determine that the target device to which the software is distributed is the electronic device 200 in response to the user operation. In other examples, the electronic device 100 can determine a preset device as the target device to which the software is distributed, for example, setting the electronic device 200 with the most recent communication as the target device to which the software is distributed.
S403:电子设备100向电子设备200请求获取电子设备200的能力集。S403: The electronic device 100 requests the electronic device 200 to obtain the capability set of the electronic device 200.
在一种可选的实施例中,S403是可选的步骤。In an optional embodiment, S403 is an optional step.
在一种可选的实施例中,电子设备200的能力集可以用于电子设备100向网络设备300请求向电子设备200分发第四软件。在一种可选的实施例中,电子设备100的第五软件可以向电子设备200请求获取电子设备200的能力集,其中,电子设备200的能力集可以用于电子设备100的第五软件向网络设备300请求向电子设备200分发第四软件。In an optional embodiment, the capability set of the electronic device 200 may be used by the electronic device 100 to request the network device 300 to distribute the fourth software to the electronic device 200. In an optional embodiment, the fifth software of the electronic device 100 may request the electronic device 200 to obtain the capability set of the electronic device 200, wherein the capability set of the electronic device 200 may be used by the fifth software of the electronic device 100 to request the network device 300 to distribute the fourth software to the electronic device 200.
S404:电子设备200向电子设备100发送电子设备200的能力集。S404 : The electronic device 200 sends the capability set of the electronic device 200 to the electronic device 100 .
在一种可选的实施例中,S404是可选的步骤。In an optional embodiment, S404 is an optional step.
在一种可选的实施例中,电子设备200接收到电子设备100发送的请求后,可以获取电子设备200的能力集,并向电子设备100发送电子设备200的能力集。在一种可选的实施例中,电子设备200接收到电子设备100的第五软件的请求后,可以获取电子设备200的能力集,并向电子设备100的第五软件发送电子设备200的能力集。In an optional embodiment, after the electronic device 200 receives the request sent by the electronic device 100, it can obtain the capability set of the electronic device 200 and send the capability set of the electronic device 200 to the electronic device 100. In an optional embodiment, after the electronic device 200 receives the request of the fifth software of the electronic device 100, it can obtain the capability set of the electronic device 200 and send the capability set of the electronic device 200 to the fifth software of the electronic device 100.
在一些示例中,电子设备200的能力集可以通过第二参数表征,具体示例可参见图7的S302中电子设备100的能力集的表征方式的说明。In some examples, the capability set of the electronic device 200 may be characterized by a second parameter. For specific examples, see the description of the method for characterizing the capability set of the electronic device 100 in S302 of FIG. 7 .
S405:电子设备100向网络设备300发送第五消息。S405 : The electronic device 100 sends a fifth message to the network device 300 .
在一种可选的实施例中,电子设备100接收到电子设备200的能力集后,可以向网络设备300发送第五消息,第五消息可以用于请求向电子设备200分发第四软件。在一种可选的实施例中,电子设备100的第五软件接收到电子设备200的能力集后,可以向网络设备300发送第五消息。In an optional embodiment, after the electronic device 100 receives the capability set of the electronic device 200, it can send a fifth message to the network device 300, and the fifth message can be used to request the distribution of the fourth software to the electronic device 200. In an optional embodiment, after the fifth software of the electronic device 100 receives the capability set of the electronic device 200, it can send a fifth message to the network device 300.
在一些示例中,第五消息中携带电子设备200的能力集,例如,第五消息中携带用于表征电子设备200的能力集的第二参数。In some examples, the fifth message carries a capability set of the electronic device 200 , for example, the fifth message carries a second parameter for characterizing the capability set of the electronic device 200 .
在一种可选的实施例中,第五消息可以包括第四软件的信息,例如但不限于包括第四软件的名称、第四软件的唯一标识码、第四软件的版本。In an optional embodiment, the fifth message may include information about the fourth software, such as but not limited to the name of the fourth software, the unique identification code of the fourth software, and the version of the fourth software.
S406:网络设备300根据第五消息确定需要分发的第四软件。S406: The network device 300 determines the fourth software that needs to be distributed according to the fifth message.
在一种可选的实施例中,网络设备300可以从接收到的第五消息中获取得到电子设备200的能力集。在另一种可选的实施例中,网络设备300可以存储有电子设备200的能力集,网络设备300接收到第五消息后,可以读取存储的电子设备200的能力集。In an optional embodiment, the network device 300 may obtain the capability set of the electronic device 200 from the received fifth message. In another optional embodiment, the network device 300 may store the capability set of the electronic device 200, and after receiving the fifth message, the network device 300 may read the stored capability set of the electronic device 200.
在一种可选的实施例中,网络设备300可以根据接收到的第五消息得到第四软件的信息,并根据第四软件的信息获取第四软件需要的能力集,具体示例可参见图7的S304中网络设备300获取第二软件需要的能力集的说明,不再赘述。In an optional embodiment, the network device 300 can obtain information about the fourth software based on the received fifth message, and obtain the capability set required by the fourth software based on the information of the fourth software. For specific examples, please refer to the description of the network device 300 obtaining the capability set required by the second software in S304 of Figure 7, which will not be repeated here.
S407:网络设备300判断是否满足第二条件。S407: The network device 300 determines whether the second condition is met.
在一种可选的实施例中,第二条件包括电子设备200的能力集和第四软件需要的能力集匹配。满足第二条件的示例可参见图7的S305中电子设备100的能力集和第二软件需要的能力集匹配的说明。In an optional embodiment, the second condition includes that the capability set of the electronic device 200 matches the capability set required by the fourth software. For an example of satisfying the second condition, see the description of matching the capability set of the electronic device 100 and the capability set required by the second software in S305 of FIG. 7 .
S408:网络设备300向电子设备100发送第六消息。S408 : The network device 300 sends a sixth message to the electronic device 100 .
在一种可选的实施例中,S408是可选的步骤。In an optional embodiment, S408 is an optional step.
在一种可选的实施例中,网络设备300可以根据上述是否满足第二条件的结果向电子设备100发送第六消息。在一种可选的实施例中,网络设备300可以根据上述是否满足第二条件的结果向电子设备100的第五软件发送第六消息。可选地,第六消息可以指示是否能向电子设备200分发第四软件。在一些示例中,上述满足第二条件时,第六消息指示能向电子设备200分发第四软件,在另一些示例中,上述不满足第二条件时,第六消息指示不能向电子设备200分发第四软件。In an optional embodiment, the network device 300 may send a sixth message to the electronic device 100 according to the result of whether the second condition is satisfied. In an optional embodiment, the network device 300 may send a sixth message to the fifth software of the electronic device 100 according to the result of whether the second condition is satisfied. Optionally, the sixth message may indicate whether the fourth software can be distributed to the electronic device 200. In some examples, when the second condition is satisfied, the sixth message indicates that the fourth software can be distributed to the electronic device 200, and in other examples, when the second condition is not satisfied, the sixth message indicates that the fourth software cannot be distributed to the electronic device 200.
在一种可选的实施例中,网络设备300可以存储第四软件的安装包,第六消息可以包括第四软件的安装包,并且,第六消息可以指示能向电子设备200分发第四软件。在另一种可选的实施例中,第四软件的安装包由网络设备300以外的其他设备存储,网络设备300可以存储第四软件的安装包的下载方式,第六消息可以包括第四软件的安装包的下载方式,并且,第六消息可以指示能向电子设备200分发第四软件。In an optional embodiment, the network device 300 may store the installation package of the fourth software, the sixth message may include the installation package of the fourth software, and the sixth message may indicate that the fourth software can be distributed to the electronic device 200. In another optional embodiment, the installation package of the fourth software is stored by another device other than the network device 300, the network device 300 may store the download method of the installation package of the fourth software, the sixth message may include the download method of the installation package of the fourth software, and the sixth message may indicate that the fourth software can be distributed to the electronic device 200.
S409:电子设备100向电子设备200分发第四软件。S409 : the electronic device 100 distributes the fourth software to the electronic device 200 .
在一种可选的实施例中,S409是可选的步骤。 In an optional embodiment, S409 is an optional step.
在一种可选的实施例中,电子设备100接收到第六消息后,当第六消息指示能向电子设备200分发第四软件时,电子设备100可以向电子设备200分发第四软件。在一种可选的实施例中,电子设备100的第五软件接收到第六消息后,当第六消息指示能向电子设备200分发第四软件时,电子设备100的第五软件可以向电子设备200分发第四软件。In an optional embodiment, after the electronic device 100 receives the sixth message, when the sixth message indicates that the fourth software can be distributed to the electronic device 200, the electronic device 100 can distribute the fourth software to the electronic device 200. In an optional embodiment, after the fifth software of the electronic device 100 receives the sixth message, when the sixth message indicates that the fourth software can be distributed to the electronic device 200, the fifth software of the electronic device 100 can distribute the fourth software to the electronic device 200.
在一种可选的实施例中,电子设备100可以根据接收到的第六消息得到第四软件的安装包,然后向电子设备200发送第四软件的安装包以分发第四软件。在另一种可选的实施例中,电子设备100可以根据接收到的第六消息得到第四软件的安装包的下载方式,然后向电子设备200发送第四软件的安装包的下载方式以分发第四软件。在另一种可选的实施例中,电子设备100可以向电子设备200发送电子设备100存储的第四软件的安装包或者第四软件的安装包的下载方式,以分发第四软件。In an optional embodiment, the electronic device 100 may obtain the installation package of the fourth software according to the received sixth message, and then send the installation package of the fourth software to the electronic device 200 to distribute the fourth software. In another optional embodiment, the electronic device 100 may obtain the download method of the installation package of the fourth software according to the received sixth message, and then send the download method of the installation package of the fourth software to the electronic device 200 to distribute the fourth software. In another optional embodiment, the electronic device 100 may send the installation package of the fourth software stored in the electronic device 100 or the download method of the installation package of the fourth software to the electronic device 200 to distribute the fourth software.
在一种可选的实施例中,电子设备100接收到第六消息后,当第六消息指示不能向电子设备200分发第四软件时,电子设备100可以不向电子设备200分发第四软件,例如,此时电子设备100可以显示提示信息,该提示信息用于提示用户电子设备200不具备运行第四软件的能力。In an optional embodiment, after the electronic device 100 receives the sixth message, when the sixth message indicates that the fourth software cannot be distributed to the electronic device 200, the electronic device 100 may not distribute the fourth software to the electronic device 200. For example, at this time, the electronic device 100 may display a prompt message, and the prompt message is used to prompt the user that the electronic device 200 does not have the ability to run the fourth software.
S410:电子设备200安装第四软件。S410: The electronic device 200 installs the fourth software.
在一种可选的实施例中,S410是可选的步骤。In an optional embodiment, S410 is an optional step.
S410与图7的S307类似,具体可参见图7的S307的说明,不再赘述。S410 is similar to S307 in FIG. 7 , and details of S307 in FIG. 7 may be referred to, and will not be described in detail.
S411:电子设备200显示第四软件的界面。S411: The electronic device 200 displays an interface of the fourth software.
在一种可选的实施例中,S411是可选的步骤。In an optional embodiment, S411 is an optional step.
S411与图7的S308类似,具体可参见图7的S308的说明,不再赘述。S411 is similar to S308 in FIG. 7 , and details of S308 in FIG. 7 may be referred to, and details will not be repeated here.
不限于图8所示的实施方式,在另一种可选的实施例中,S403-S404可以替换为:网络设备300向电子设备200请求获取电子设备200的能力集,电子设备200向网络设备300发送电子设备200的能力集。该可选的实施例可以处在S405之后,S406之前,具体说明和S405-S406的说明类似,不再赘述。Not limited to the implementation shown in FIG8 , in another optional embodiment, S403-S404 may be replaced by: the network device 300 requests the electronic device 200 to obtain the capability set of the electronic device 200, and the electronic device 200 sends the capability set of the electronic device 200 to the network device 300. This optional embodiment may be after S405 and before S406, and the specific description is similar to that of S405-S406, and will not be repeated here.
不限于图8所示的实施方式,在另一种可选的实施例中,S408-S409可以替换为:网络设备300向电子设备200分发第四软件,具体说明和S409的说明类似,不再赘述。Not limited to the implementation shown in FIG. 8 , in another optional embodiment, S408 - S409 may be replaced by: the network device 300 distributes the fourth software to the electronic device 200 , and the specific description is similar to that of S409 and will not be repeated herein.
在图8所示的方法中,跨设备流转软件是基于设备的能力集实现的,不依赖于设备类型,解决了基于设备类型流转软件时存在的软件支持的部分设备无法被流转软件等技术问题,扩大了可被流转软件的设备范围。被流转软件的电子设备200无需用户手动下载安装软件,即电子设备200可以自动安装被流转的软件,用户使用更加方便。In the method shown in FIG8 , cross-device software transfer is implemented based on the capability set of the device, and is independent of the device type, which solves the technical problem that some devices supported by the software cannot be transferred when transferring software based on the device type, and expands the range of devices that can be transferred. The electronic device 200 to which the software is transferred does not require the user to manually download and install the software, that is, the electronic device 200 can automatically install the transferred software, which is more convenient for the user to use.
下面介绍本申请实施例涉及的应用场景以及该场景下的用户界面实施例。The following introduces the application scenario involved in the embodiment of the present application and the user interface embodiment in this scenario.
图9示例性示出一种软件分发过程的用户界面示意图。FIG. 9 exemplarily shows a user interface diagram of a software distribution process.
如图9的(A)所示,电子设备100可以显示用户界面1000,例如,用户界面1000为电子设备100的桌面。用户界面1000可以包括控件1010,可以表征电子设备100已开启语音助手的功能。在一种可选的实施方式中,电子设备100可以接收用户操作,例如,该用户操作为语音输入,图9以该语音输入为“查一下我的快递”为例进行说明。电子设备100可以响应于该用户操作,获取和该用户操作相关的软件(图9以快递的原子化服务为例进行说明),例如执行图7的S301-S306,其中,快递的原子化服务为第二软件。电子设备100可以安装获取到的快递的原子化服务,例如执行图7的S307,此时电子设备100可以显示该原子化服务的用户界面,例如执行图7的S308,具体可参见图9的(B)所示的用户界面2000。As shown in (A) of FIG. 9 , the electronic device 100 may display a user interface 1000, for example, the user interface 1000 is the desktop of the electronic device 100. The user interface 1000 may include a control 1010, which may indicate that the electronic device 100 has turned on the function of a voice assistant. In an optional embodiment, the electronic device 100 may receive a user operation, for example, the user operation is a voice input, and FIG. 9 takes the voice input as "check my express delivery" as an example for explanation. The electronic device 100 may respond to the user operation and obtain software related to the user operation (FIG. 9 takes the atomic service of express delivery as an example for explanation), for example, executing S301-S306 of FIG. 7 , wherein the atomic service of express delivery is the second software. The electronic device 100 may install the atomic service of express delivery obtained, for example, executing S307 of FIG. 7 , at which time the electronic device 100 may display the user interface of the atomic service, for example, executing S308 of FIG. 7 , and specifically refer to the user interface 2000 shown in (B) of FIG. 9 .
如图9的(B)所示,用户界面2000例如为电子设备100的桌面。用户界面2000可以包括窗口2010,窗口2010可以包括语音信息2020、卡片控件2030和流转控件2040。其中,语音信息2020包括的字符为上述语音输入的具体内容,即“查一下我的快递”。卡片控件2030用于显示快递的原子化服务的具体内容,例如和上述语音输入相关的内容,即当前用户的快递信息2030A。流转控件2040可以用于流转原子化服务。在一种可选的实施方式中,电子设备100可以响应于针对流转控件2040的用户操作,例如,该用户操作为触摸操作,该触摸操作例如为点击操作,显示流转内容和流转对象的选择界面,具体可参见图9的(C)所示的用户界面3000。As shown in (B) of FIG. 9 , the user interface 2000 is, for example, the desktop of the electronic device 100. The user interface 2000 may include a window 2010, and the window 2010 may include a voice message 2020, a card control 2030, and a flow control 2040. Among them, the characters included in the voice message 2020 are the specific content of the above-mentioned voice input, namely, "check my express delivery". The card control 2030 is used to display the specific content of the atomic service of express delivery, such as the content related to the above-mentioned voice input, that is, the express information 2030A of the current user. The flow control 2040 can be used to circulate atomic services. In an optional embodiment, the electronic device 100 can respond to a user operation on the flow control 2040, for example, the user operation is a touch operation, and the touch operation is, for example, a click operation, to display a selection interface for the flow content and the flow object, and specifically refer to the user interface 3000 shown in (C) of FIG. 9 .
如图9的(C)所示,用户界面3000可以包括目标内容列表3010、目标设备列表3020。其中,目标内容列表3010可以包括至少一个可被分发的软件(即流转内容)的选项,例如:指示快递的原子化服务的选项3011(包括字符“快递查询服务”)。目标设备列表3020可以包括至少一个可被分发软件的目标设备(即流转对象)的选项,这至少一个可被分发软件的目标设备可以但不限于包括电子设备100通过近场和/或远场通信方式发现和/或连接的设备,例如包括:指示名称为“客厅的智慧屏”的设备的选项3021, 以及指示名称为“我的平板”的设备的选项3022。在一种可选的实施方式中,电子设备100可以响应于针对目标内容列表3010中的任意一个选项的用户操作,例如该用户操作为触摸操作,选择该选项指示的软件为流转内容。在一种可选的实施方式中,电子设备100可以响应于针对目标设备列表3020中的任意一个选项的用户操作,例如该用户操作为触摸操作,选择该选项指示的设备为流转对象。As shown in (C) of FIG. 9 , the user interface 3000 may include a target content list 3010 and a target device list 3020. The target content list 3010 may include at least one option for software that can be distributed (i.e., streaming content), for example: option 3011 indicating an atomic service for express delivery (including the characters “express query service”). The target device list 3020 may include at least one option for a target device (i.e., streaming object) to which software can be distributed. The at least one target device to which software can be distributed may include, but is not limited to, devices discovered and/or connected by the electronic device 100 through near-field and/or far-field communication methods, for example: option 3021 indicating a device named “Smart Screen in the Living Room”, and an option 3022 indicating a device named "My Tablet". In an optional implementation, the electronic device 100 may respond to a user operation on any one of the options in the target content list 3010, such as a touch operation, and select the software indicated by the option as the streaming content. In an optional implementation, the electronic device 100 may respond to a user operation on any one of the options in the target device list 3020, such as a touch operation, and select the device indicated by the option as the streaming object.
在一种可选的实施方式中,假设上述选择的流转内容为选项3011指示的快递的原子化服务,上述选择的流转对象为选项3022指示的电子设备200,电子设备100确定流转内容和流转对象后,可以执行向电子设备200分发快递的原子化服务的过程,例如执行图8的S401-S409,其中,快递的原子化服务为第四软件。电子设备200可以安装被分发的快递的原子化服务,例如执行图8的S410,此时电子设备200可以显示该原子化服务的用户界面,例如执行图8的S411。在这种情况下,电子设备100和电子设备200的显示界面可以参见下图10。In an optional embodiment, assuming that the selected flow content is the atomic service of express delivery indicated by option 3011, and the selected flow object is the electronic device 200 indicated by option 3022, after the electronic device 100 determines the flow content and the flow object, it can execute the process of distributing the atomic service of express delivery to the electronic device 200, such as executing S401-S409 of Figure 8, wherein the atomic service of express delivery is the fourth software. The electronic device 200 can install the distributed atomic service of express delivery, such as executing S410 of Figure 8, at which time the electronic device 200 can display the user interface of the atomic service, such as executing S411 of Figure 8. In this case, the display interface of the electronic device 100 and the electronic device 200 can refer to Figure 10 below.
如图10的(A)所示,电子设备100可以显示用户界面4000,用户界面4000与图9的(C)所示的用户界面3000类似,区别在于,选项3011和选项3022为选中状态。如图10的(B)所示,电子设备200可以显示用户界面5000,用户界面5000例如为电子设备200的桌面,用户界面5000可以包括卡片控件5010和流转控件5020。其中,卡片控件5010与图9的(B)所示的卡片控件2030一致,不再赘述。流转控件5020可以用于流转当前显示的快递的原子化服务。As shown in (A) of Figure 10, the electronic device 100 can display a user interface 4000, which is similar to the user interface 3000 shown in (C) of Figure 9, except that option 3011 and option 3022 are selected. As shown in (B) of Figure 10, the electronic device 200 can display a user interface 5000, which is, for example, the desktop of the electronic device 200, and the user interface 5000 may include a card control 5010 and a flow control 5020. Among them, the card control 5010 is consistent with the card control 2030 shown in (B) of Figure 9, and will not be repeated. The flow control 5020 can be used to circulate the atomic service of the currently displayed express delivery.
不限于图10所示的实施方式,在另一种可选的实施方式中,电子设备100向电子设备200分发快递的原子化服务后,电子设备100可以不再显示用户界面3000或用户界面4000,例如返回显示桌面,本申请对此不作限定。Not limited to the implementation shown in FIG. 10 , in another optional implementation, after the electronic device 100 distributes the express atomic service to the electronic device 200 , the electronic device 100 may no longer display the user interface 3000 or the user interface 4000 , for example, returning to display the desktop, which is not limited in the present application.
不限于图10所示的实施方式,在另一种可选的实施方式中,电子设备200显示的卡片控件5010可以和图9的(B)所示的卡片控件2030不同,例如,卡片控件5010用于显示快递的原子化服务的首页,本申请对此不作限定。Not limited to the implementation shown in FIG. 10 , in another optional implementation, the card control 5010 displayed by the electronic device 200 may be different from the card control 2030 shown in (B) of FIG. 9 . For example, the card control 5010 is used to display the homepage of the atomic service of express delivery, which is not limited in the present application.
本申请各实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DWD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD)等。以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。 The methods provided in the embodiments of the present application may be implemented in whole or in part 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 a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., 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 data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DWD), or a semiconductor medium (e.g., a solid state disk (SSD)). As described above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them. Although the present application is described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (19)

  1. 一种软件分发方法,其特征在于,应用于第一设备,所述方法包括:A software distribution method, characterized in that it is applied to a first device, and the method comprises:
    向网络设备发送第一消息,所述第一消息用于请求获取第一软件,所述第一消息包括用于指示所述第一设备的能力集的第一信息,所述第一设备的能力集包括所述第一设备支持的硬件能力和软件能力;Sending a first message to a network device, where the first message is used to request acquisition of first software, and the first message includes first information used to indicate a capability set of the first device, where the capability set of the first device includes hardware capabilities and software capabilities supported by the first device;
    当所述第一设备的能力集和所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,所述第一软件对应的能力集包括能运行所述第一软件的设备需要支持的硬件能力和软件能力;When the capability set of the first device matches the capability set corresponding to the first software, receiving the installation file of the first software or the download method of the installation file of the first software sent by the network device, the capability set corresponding to the first software includes the hardware capabilities and software capabilities that the device that can run the first software needs to support;
    根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的第一界面。According to the installation file of the first software or the downloading method of the installation file of the first software, the first interface of the first software is displayed.
  2. 如权利要求1所述的方法,其特征在于,所述向网络设备发送第一消息,包括:The method according to claim 1, wherein sending the first message to the network device comprises:
    当确定处于预设场景时,向所述网络设备发送所述第一消息,所述第一软件和所述预设场景相关。When it is determined that the system is in a preset scenario, the first message is sent to the network device, and the first software is related to the preset scenario.
  3. 如权利要求1所述的方法,其特征在于,所述第一设备的能力集和所述第一软件对应的能力集匹配,包括以下至少一种情况:The method according to claim 1, wherein the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations:
    所述第一设备的能力集包括所述第一软件对应的能力集中的能力;The capability set of the first device includes the capabilities in the capability set corresponding to the first software;
    所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力,所述强依赖的能力为被分发所述第一软件的设备要求具备的能力;The capability set of the first device includes a capability that is strongly dependent on the capability set corresponding to the first software, and the capability that is strongly dependent on is a capability that the device to which the first software is distributed is required to have;
    所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力的父能力。The capability set of the first device includes a parent capability of a strongly dependent capability in the capability set corresponding to the first software.
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同或不相同,所述当所述第一设备的能力集和所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,包括:The method according to any one of claims 1 to 3, characterized in that the first software includes multiple versions, and the capability sets corresponding to the different versions of the first software are the same or different, and when the capability set of the first device matches the capability set corresponding to the first software, receiving the installation file of the first software sent by the network device or the downloading method of the installation file of the first software comprises:
    当所述第一设备的能力集和第一版本的所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第一版本的第一软件的安装文件或所述第一版本的第一软件的安装文件的下载方式。When the capability set of the first device matches the capability set corresponding to the first version of the first software, an installation file of the first version of the first software or a download method of the installation file of the first version of the first software sent by the network device is received.
  5. 如权利要求1-3任一项所述的方法,其特征在于,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同或不相同,所述方法还包括:The method according to any one of claims 1 to 3, characterized in that the first software includes multiple versions, and the capability sets corresponding to different versions of the first software are the same or different, and the method further comprises:
    当所述第一设备的能力集和第二版本的所述第一软件对应的能力集匹配、以及第三版本的所述第一软件对应的能力集匹配时,接收所述网络设备发送的所述第二版本的第一软件的安装文件或所述第二版本的第一软件的安装文件的下载方式,其中,所述第二版本新于所述第三版本。When the capability set of the first device matches the capability set corresponding to the second version of the first software, and the capability set corresponding to the third version of the first software matches, a method for downloading the installation file of the second version of the first software sent by the network device is received, wherein the second version is newer than the third version.
  6. 如权利要求1-5任一项所述的方法,其特征在于,所述根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的第一界面,包括:The method according to any one of claims 1 to 5, characterized in that displaying the first interface of the first software according to the installation file of the first software or the download method of the installation file of the first software comprises:
    根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的第一界面;或者,installing the first software according to the installation file of the first software; displaying the first interface of the first software; or,
    根据所述第一软件的安装文件的下载方式,下载所述第一软件的安装文件;根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的第一界面。According to the downloading method of the installation file of the first software, download the installation file of the first software; according to the installation file of the first software, install the first software; and display the first interface of the first software.
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 6, characterized in that the method further comprises:
    获取第二设备的能力集;Obtaining a capability set of the second device;
    向所述网络设备发送第二消息,所述第二消息用于请求向所述第二设备分发第二软件,所述第二消息包括用于指示所述第二设备的能力集的第二信息,所述第二设备用于当所述第二设备的能力集和所述第二软件对应的能力集匹配时,接收所述第二软件的安装文件或所述第二软件的安装文件的下载方式,所述第二软件的安装文件或所述第二软件的安装文件的下载方式用于所述第二设备显示所述第二软件的第二界面。A second message is sent to the network device, where the second message is used to request distribution of second software to the second device, where the second message includes second information indicating a capability set of the second device, where the second device is used to receive an installation file of the second software or a download method of the installation file of the second software when the capability set of the second device matches the capability set corresponding to the second software, where the installation file of the second software or the download method of the installation file of the second software is used by the second device to display a second interface of the second software.
  8. 如权利要求7所述的方法,其特征在于,所述向所述网络设备发送第二消息之后,所述方法还包括:The method according to claim 7, characterized in that after sending the second message to the network device, the method further comprises:
    接收所述网络设备发送的第三消息,所述第三消息用于指示向所述第二设备分发所述第二软件;receiving a third message sent by the network device, wherein the third message is used to instruct distribution of the second software to the second device;
    向所述第二设备发送所述第二软件的安装文件或所述第二软件的安装文件的下载方式。 Send the installation file of the second software or the downloading method of the installation file of the second software to the second device.
  9. 如权利要求7所述的方法,其特征在于,所述向所述网络设备发送第二消息之后,所述方法还包括:The method according to claim 7, characterized in that after sending the second message to the network device, the method further comprises:
    接收所述网络设备发送的第四消息,所述第四消息用于指示不向所述第二设备分发所述第二软件;receiving a fourth message sent by the network device, wherein the fourth message is used to indicate that the second software is not to be distributed to the second device;
    显示提示信息,所述提示信息指示所述第二设备不具备运行所述第二软件的能力。A prompt message is displayed, where the prompt message indicates that the second device does not have the ability to run the second software.
  10. 如权利要求2所述的方法,其特征在于,所述第一软件和所述预设场景相关,包括:The method according to claim 2, wherein the first software is related to the preset scenario and includes:
    所述第一软件和所述预设场景中所处的位置、时间、用户画像、用户操作中的至少一项相关。The first software is related to at least one of the location, time, user portrait, and user operation in the preset scene.
  11. 一种软件分发方法,其特征在于,应用于第二设备,所述方法包括:A software distribution method, characterized in that it is applied to a second device, and the method comprises:
    接收第一设备发送的第一消息;receiving a first message sent by a first device;
    根据所述第一消息向所述第一设备发送所述第二设备的能力集,所述第二设备的能力集包括所述第二设备支持的硬件能力和软件能力,所述第二设备的能力集用于判断是否向所述第二设备分发第一软件;sending a capability set of the second device to the first device according to the first message, where the capability set of the second device includes hardware capabilities and software capabilities supported by the second device, and the capability set of the second device is used to determine whether to distribute the first software to the second device;
    当所述第二设备的能力集和所述第一软件对应的能力集匹配时,接收所述第一设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式,或,接收网络设备发送的所述第一软件的安装文件或所述第一软件的安装文件的下载方式;When the capability set of the second device matches the capability set corresponding to the first software, receiving the installation file of the first software sent by the first device or the download method of the installation file of the first software, or receiving the installation file of the first software sent by a network device or the download method of the installation file of the first software;
    根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的界面。The interface of the first software is displayed according to the installation file of the first software or the download method of the installation file of the first software.
  12. 如权利要求11所述的方法,其特征在于,所述根据所述第一软件的安装文件或所述第一软件的安装文件的下载方式,显示所述第一软件的界面,包括:The method according to claim 11, wherein displaying the interface of the first software according to the installation file of the first software or the download method of the installation file of the first software comprises:
    根据所述第一软件的安装文件,安装所述第一软件;Installing the first software according to the installation file of the first software;
    显示所述第一软件的界面;或者,displaying the interface of the first software; or,
    根据所述第一软件的安装文件的下载方式,下载所述第一软件的安装文件;根据所述第一软件的安装文件,安装所述第一软件;显示所述第一软件的界面。According to the downloading method of the installation file of the first software, download the installation file of the first software; according to the installation file of the first software, install the first software; and display the interface of the first software.
  13. 一种软件分发方法,其特征在于,应用于网络设备,所述方法包括:A software distribution method, characterized in that it is applied to a network device, and the method comprises:
    接收第一设备发送的第一消息,所述第一消息用于请求获取第一软件,所述第一消息包括用于指示所述第一设备的能力集的第一信息,所述第一设备的能力集包括所述第一设备支持的硬件能力和软件能力;receiving a first message sent by a first device, where the first message is used to request acquisition of first software, and the first message includes first information used to indicate a capability set of the first device, where the capability set of the first device includes hardware capabilities and software capabilities supported by the first device;
    根据所述第一消息判断所述第一设备的能力集和所述第一软件对应的能力集是否匹配,所述第一软件对应的能力集包括能运行所述第一软件的设备需要支持的硬件能力和软件能力;determining, according to the first message, whether a capability set of the first device matches a capability set corresponding to the first software, where the capability set corresponding to the first software includes hardware capabilities and software capabilities that a device capable of running the first software needs to support;
    当所述第一设备的能力集和所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一软件的安装文件或所述第一软件的安装文件的下载方式,所述第一软件的安装文件或所述第一软件的安装文件的下载方式用于所述第一设备显示所述第一软件的第一界面。When the capability set of the first device matches the capability set corresponding to the first software, the installation file of the first software or the download method of the installation file of the first software is sent to the first device, and the installation file of the first software or the download method of the installation file of the first software is used by the first device to display the first interface of the first software.
  14. 如权利要求13所述的方法,其特征在于,所述方法还包括:The method according to claim 13, characterized in that the method further comprises:
    接收所述第一设备发送的第二消息,所述第二消息用于请求向所述第二设备分发第二软件,所述第二消息包括用于指示所述第二设备的能力集的第二信息,所述第二设备的能力集包括所述第二设备支持的硬件能力和软件能力;receiving a second message sent by the first device, where the second message is used to request distribution of second software to the second device, and the second message includes second information used to indicate a capability set of the second device, where the capability set of the second device includes hardware capabilities and software capabilities supported by the second device;
    根据所述第二消息判断所述第二设备的能力集和所述第二软件对应的能力集是否匹配,所述第二软件对应的能力集包括能运行所述第二软件的设备需要支持的硬件能力和软件能力;determining, according to the second message, whether a capability set of the second device matches a capability set corresponding to the second software, where the capability set corresponding to the second software includes hardware capabilities and software capabilities that a device capable of running the second software needs to support;
    当所述第二设备的能力集和所述第二软件对应的能力集匹配时,向所述第一设备发送第三消息,所述第三消息用于指示所述第一设备向所述第二设备发送所述第二软件的安装文件或所述第二软件的安装文件的下载方式,或,向所述第二设备发送所述第二软件的安装文件或所述第二软件的安装文件的下载方式,所述第二软件的安装文件或所述第二软件的安装文件的下载方式用于所述第二设备显示所述第二软件的第二界面。When the capability set of the second device matches the capability set corresponding to the second software, a third message is sent to the first device, wherein the third message is used to instruct the first device to send the installation file of the second software or the download method of the installation file of the second software to the second device, or to send the installation file of the second software or the download method of the installation file of the second software to the second device, wherein the installation file of the second software or the download method of the installation file of the second software is used by the second device to display the second interface of the second software.
  15. 如权利要求13所述的方法,其特征在于,所述第一设备的能力集和所述第一软件对应的能力集匹配,包括以下至少一种情况:The method according to claim 13, wherein the capability set of the first device matches the capability set corresponding to the first software, including at least one of the following situations:
    所述第一设备的能力集包括所述第一软件对应的能力集中的能力;The capability set of the first device includes the capabilities in the capability set corresponding to the first software;
    所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力,所述强依赖的能力为被分发所述第一软件的设备要求具备的能力; The capability set of the first device includes a capability that is strongly dependent on the capability set corresponding to the first software, and the capability that is strongly dependent on is a capability that the device to which the first software is distributed is required to have;
    所述第一设备的能力集包括所述第一软件对应的能力集中强依赖的能力的父能力。The capability set of the first device includes a parent capability of a strongly dependent capability in the capability set corresponding to the first software.
  16. 如权利要求13或15所述的方法,其特征在于,所述第一软件包括多个版本,不同版本的所述第一软件对应的能力集相同或不相同,所述当所述第一设备的能力集和所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一软件的安装文件或所述第一软件的安装文件的下载方式,包括:The method according to claim 13 or 15, characterized in that the first software includes multiple versions, and the capability sets corresponding to the different versions of the first software are the same or different, and when the capability set of the first device matches the capability set corresponding to the first software, sending the installation file of the first software to the first device or the downloading method of the installation file of the first software comprises:
    当所述第一设备的能力集和第一版本的所述第一软件对应的能力集匹配时,向所述第一设备发送所述第一版本的第一软件的安装文件或所述第一版本的第一软件的安装文件的下载方式。When the capability set of the first device matches the capability set corresponding to the first version of the first software, the installation file of the first version of the first software or the download method of the installation file of the first version of the first software is sent to the first device.
  17. 一种电子设备,其特征在于,包括收发器、处理器和存储器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序,用于执行如权利要求1-10任一项或11-12任一项所述的方法。An electronic device, characterized in that it includes a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the method described in any one of claims 1-10 or any one of claims 11-12.
  18. 一种网络设备,其特征在于,包括收发器、处理器和存储器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序,用于执行如权利要求13-16任一项所述的方法。A network device, characterized in that it includes a transceiver, a processor and a memory, the memory is used to store a computer program, and the processor calls the computer program to execute the method according to any one of claims 13 to 16.
  19. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现如权利要求1-16任一项所述的方法。 A computer storage medium, characterized in that the computer storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
PCT/CN2023/124946 2022-10-20 2023-10-17 Software distribution method, electronic device, and system WO2024083114A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211287246.2 2022-10-20
CN202211287246.2A CN117950677A (en) 2022-10-20 2022-10-20 Software distribution method, electronic equipment and system

Publications (1)

Publication Number Publication Date
WO2024083114A1 true WO2024083114A1 (en) 2024-04-25

Family

ID=90736974

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/124946 WO2024083114A1 (en) 2022-10-20 2023-10-17 Software distribution method, electronic device, and system

Country Status (2)

Country Link
CN (1) CN117950677A (en)
WO (1) WO2024083114A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291496A (en) * 2017-06-06 2017-10-24 苏州小雨伞网络科技有限公司 A kind of issue installation method of software
CN110531990A (en) * 2019-07-26 2019-12-03 苏州浪潮智能科技有限公司 Software installation method and device
WO2021115112A1 (en) * 2019-12-11 2021-06-17 华为技术有限公司 Installation package downloading method, installation package distribution method, terminal device, server, and system
CN114500478A (en) * 2021-12-24 2022-05-13 奇安信科技集团股份有限公司 Software distribution method and device and electronic equipment
CN114610331A (en) * 2020-11-25 2022-06-10 网神信息技术(北京)股份有限公司 Software installation method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291496A (en) * 2017-06-06 2017-10-24 苏州小雨伞网络科技有限公司 A kind of issue installation method of software
CN110531990A (en) * 2019-07-26 2019-12-03 苏州浪潮智能科技有限公司 Software installation method and device
WO2021115112A1 (en) * 2019-12-11 2021-06-17 华为技术有限公司 Installation package downloading method, installation package distribution method, terminal device, server, and system
CN114610331A (en) * 2020-11-25 2022-06-10 网神信息技术(北京)股份有限公司 Software installation method and system
CN114500478A (en) * 2021-12-24 2022-05-13 奇安信科技集团股份有限公司 Software distribution method and device and electronic equipment

Also Published As

Publication number Publication date
CN117950677A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
EP4002108B1 (en) Application start method and electronic device
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
CN114461239B (en) Software upgrading system and software upgrading method
WO2021052167A1 (en) Method for realizing pluginization of application, and electronic apparatus
CN114124980B (en) Method, device, system, terminal and storage medium for starting application
WO2022156535A1 (en) Distributed application processing method and apparatus
WO2021073337A1 (en) Method and apparatus for installing plug-in, and storage medium
CN115309431B (en) Parameter updating method, readable medium and electronic equipment
CN116360725A (en) Display interaction system, display method and device
CN110865837A (en) Method and terminal for upgrading system
WO2021042991A1 (en) Non-intrusive interaction method and electronic device
WO2022253158A1 (en) User privacy protection method and apparatus
WO2022161024A1 (en) Upgrade prompt method, terminal device, and computer readable storage medium
WO2022121445A1 (en) Widget adding method, apparatus, and computer-readable storage medium
CN116048955B (en) Test method and electronic equipment
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
WO2024083114A1 (en) Software distribution method, electronic device, and system
CN113485709B (en) Application optimization method and device and electronic equipment
US20230259346A1 (en) Application Module Startup Method and Electronic Device
WO2024131823A1 (en) Installation-free application upgrading method and electronic device
CN117009023B (en) Method for displaying notification information and related device
CN114168115B (en) Communication system, application downloading method and device
WO2023165413A1 (en) Application development system and method, and device
WO2023142935A1 (en) Application component management method and related device
WO2024055875A1 (en) Method for adding service card, and electronic device and computer-readable storage medium

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: 23879102

Country of ref document: EP

Kind code of ref document: A1