A control method for external accessories of electronic equipment, electronic equipment, chip system, computer program product, and computer readable storage medium
By detecting and downloading required software resources, controlling the functional coordination of external accessories and electronic equipment, the problem of poor coordination between electronic equipment and external accessories in the prior art has been solved, and more efficient function expansion and adaptability have been achieved.
Patent Information
- Application Number
- CN202210112581.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-01-29
AI Technical Summary
In the prior art, electronic equipment and external accessories cannot cooperate well, resulting in obstacles to the implementation of expansion functions, and electronic equipment cannot adapt to the diversity functions and updates of external accessories.
By detecting whether the electronic device has the software resources required to perform the target function, download the software resources if it is missing, control external accessories to perform the expansion function, and at the same time cooperate to perform the target function in the electronic device to achieve better functional coordination.
It improves the coordination effect between electronic equipment and external accessories, reduces application obstacles, adapts to the diversity and updates of external accessories, and expands the application depth and breadth of external accessories of electronic equipment.
Smart Images

Figure CN116567134B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a control method for external accessories of an electronic device and an electronic device. Background Art
[0002] Since terminal devices need to be small or portable, the functions that can be carried in a terminal device are limited, so external accessories that expand the functions of terminal devices have emerged. External accessories can bring more possibilities to terminal devices and can meet user needs to a certain extent. For example, fragrance accessories, wide-angle or macro lens accessories, etc., can meet users' needs for functions that mobile phones cannot provide.
[0003] At present, most of the use of external accessories is to use the inherent characteristics of electronic devices to cooperate with external accessories to achieve extended functions. For example, for fragrance accessories, the terminal device can charge the external accessories by connecting the heat conduction unit in the fragrance accessories with the charging unit in the fragrance accessories. When the terminal device charges the external accessories through the charging unit, the heat conduction unit can conduct heat to the fragrance unit so that the fragrance accessories emit the corresponding fragrance, so that the electronic device can obtain direct use rights of the fragrance accessories.
[0004] With this usage method, the electronic device and the external accessories cannot cooperate well to achieve the expanded functions. Summary of the invention
[0005] Based on this, it is necessary to provide a control method for external accessories of an electronic device and an electronic device to address the above technical problems. When it is necessary to cooperate in executing a corresponding target function in the electronic device in order to control the external accessories to realize an extended function, it is detected whether the electronic device has software resources corresponding to the target function. If not, the software resources are downloaded; so that the electronic device can control the external accessories to execute the extended function while cooperating in executing the corresponding function in the electronic device based on the software resources, so that the electronic device and the external accessories can better cooperate to realize the extended function and reduce the obstacles to applying external accessories to electronic devices.
[0006] In a first aspect, the present application provides a method for controlling an external accessory of an electronic device, which is applied to the electronic device, and the method includes: establishing a communication connection with a first external accessory, the first external accessory being used to provide a first extended function for the electronic device; obtaining configuration information of the first external accessory based on the communication connection, the configuration information including the accessory category of the first external accessory; determining a target function corresponding to the first external accessory according to the accessory category, the target function including a function that needs to be executed in the electronic device in order to control the first external accessory to implement the first extended function; detecting whether the electronic device has a target software resource required to execute the target function; if it is determined that the electronic device does not have the target software resource, obtaining the target software resource; controlling the first external accessory to execute the first extended function, and at the same time, executing the target function in the electronic device based on the target software resource.
[0007] Thus, it is detected whether the above software resources are installed in the electronic device, and if not, the corresponding software resources are installed in the electronic device. So that the electronic device can control the external accessories to perform the extended functions, and can cooperate to perform the corresponding target functions in the electronic device based on the software resources. Thus, the electronic device and the external accessories can better cooperate to realize the extended functions and reduce the dependency restrictions existing in the application of external accessories to the electronic device. In addition, the electronic device can also adapt to the diverse functions of the external accessories and update and upgrade to configure or update the software resources of the external accessories of the electronic device, thereby helping to increase the depth and breadth of the application of the external accessories of the electronic device to the electronic device.
[0008] In one possible implementation, before controlling the first external accessory to execute the first extended function and executing the target function in the electronic device based on the target software resource, the method further includes: determining, based on the configuration information, whether there are one or more functions among the functions locally supported by the electronic device that conflict with the functional effect of the first extended function; and if it is determined that the one or more functions exist, shutting down each of the one or more functions locally in the electronic device.
[0009] Exemplarily, the configuration information includes one or more first identification information, the first identification information is identification information of a function that conflicts with the first extended function, and determining whether there are one or more functions locally supported by the electronic device that conflict with the functional effect of the first extended function based on the configuration information includes: determining whether there are one or more target identification information, the target identification information is identification information of a function supported by the electronic device among one or more functions corresponding to the one or more first identification information; and when it is determined that the one or more target identification information exist, turning off the function in the electronic device corresponding to each item of target identification information in the one or more target identification information.
[0010] Exemplarily, the first extended function includes at least one function, the configuration information is used to indicate the identification information corresponding to each of the at least one function, and the determining whether there are one or more first functions in the functions locally supported by the electronic device that conflict with the functional effect of the first extended function according to the configuration information includes: determining whether there are one or more first identification information corresponding to the identification information of the first function in the conflicting function association relationship, the conflicting function association relationship is used to indicate the association relationship of identification information of two different functions that have a conflicting relationship and whose functional effects affect each other; when it is determined that the one or more first identification information exist, shutting down the function corresponding to each of the one or more first identification information in the electronic device. The conflicting function association relationship can be stored in the electronic device or in the cloud of the electronic device, which is not limited herein.
[0011] Thus, the function in the electronic device that conflicts with the function of the external accessories of the electronic device (target conflict function) is turned off, and the user's right to use the target conflict function is restricted, so that the electronic device and the external accessories can better cooperate to realize the extended function; at the same time, it can also avoid that when the user uses the target conflict function, the electronic device presents to the user an erroneous effect that is inconsistent with the functional effect of the target conflict function, causing trouble to the user because the erroneous functional effect is inconsistent with the user's expectations.
[0012] In one possible implementation, when it is determined that the one or more functions exist, turning off each of the one or more functions in the electronic device specifically includes: when it is determined that the one or more functions exist, outputting a prompt message, wherein the prompt message is used to prompt a user to determine whether to turn off the one or more functions in the electronic device; after receiving a confirmation instruction to turn off the one or more functions, turning off each of the one or more functions locally in the electronic device.
[0013] Thus, a prompt message for closing the conflicting function is output to the user, thereby preventing the electronic device and external accessories from failing to cooperate well to realize the extended functions due to user's misoperation, and improving the human-computer interaction experience.
[0014] In a possible implementation, the accessory category is a fragrance accessory category, the target function includes displaying a picture, audio or video corresponding to a first system theme in the electronic device, the first system theme is any one of the one or more system themes corresponding to the configuration information, the first extended function includes that when the electronic device displays the image, audio or video corresponding to the first system theme, the fragrance accessory emits a preset fragrance corresponding to the first system theme, and the target software resources include the one or more system themes; the detecting whether the electronic device lacks the target software resources required to execute the target function specifically includes: determining the one or more system themes corresponding to the configuration information; determining whether there is at least one second system theme, the second The system theme is a system theme that has not been downloaded in the electronic device among the one or more system themes; the obtaining of the target software resource in the case of determining that the target software resource is missing specifically includes: downloading each system theme in the at least one second system theme in the case of determining that the at least one second system theme exists; the controlling the first external accessory to execute the first extended function and, at the same time, executing the target function in the electronic device based on the target software resource specifically includes: controlling the first external accessory to execute the first extended function and, at the same time, executing the target function in the electronic device based on the one or more system themes downloaded in the electronic device, the one or more system themes including each system theme in the at least one second system theme.
[0015] Therefore, by using the method provided in the embodiment of the present application, the electronic device and the fragrance accessory can cooperate better to realize the fragrance function. For example, the electronic device and the fragrance accessory can cooperate to realize that when the wallpaper corresponding to the first system theme is used in the electronic device, the external accessory can emit the corresponding preset fragrance, thereby bringing more possibilities for the diversified functions of the external accessory. At the same time, the problem that the software resources of known or unknown external accessories cannot be preset in the electronic device is solved.
[0016] In one possible implementation, the configuration information includes the accessory category and accessory model of the fragrance accessory, and determining the one or more system themes corresponding to the configuration information specifically includes: determining the one or more system themes corresponding to the accessory category and accessory model of the fragrance accessory in a first association relationship, wherein the first association relationship is used to represent the association relationship between the accessory category, accessory model and system theme of the fragrance accessory.
[0017] It can be understood that the configuration information includes the accessory category and accessory model of the fragrance accessory, and it can also be understood that: the configuration information also includes the accessory model of the fragrance accessory, and the accessory category of the first external accessory included in the configuration information specifically includes: the accessory category included in the configuration information is a fragrance accessory.
[0018] Optionally, the first association relationship may be stored in the electronic device or in a cloud corresponding to the electronic device, which is not limited in this document.
[0019] In a possible implementation, the method also includes: determining whether it is necessary to enable the fragrance function of the fragrance accessory; when it is determined that the fragrance function of the fragrance accessory needs to be enabled, determining that the fragrance function of the fragrance accessory is in an on state; controlling the first external accessory to execute the first extended function, and at the same time, executing the target function in the electronic device based on the one or more system themes downloaded to the electronic device, specifically includes: when the fragrance function of the fragrance accessory is in an on state, controlling the first external accessory to execute the first extended function, and at the same time, executing the target function in the electronic device based on the one or more system themes downloaded to the electronic device.
[0020] In one possible implementation, the determining whether the fragrance function of the fragrance accessory needs to be enabled specifically includes: determining whether the electronic device is in use, the in-use state includes that the screen of the electronic device is on, or the electronic device is playing video or audio; when it is determined that the electronic device is in use, determining that the fragrance function of the fragrance accessory needs to be enabled; or, when it is determined that the electronic device is in use and the power of the electronic device is greater than a preset threshold, determining that the fragrance function of the fragrance accessory needs to be enabled.
[0021] In one possible implementation, the method further includes: determining that the fragrance function of the fragrance accessory needs to be enabled when it is determined that the electronic device is in use, the electronic device is not in pocket mode, and the battery level of the electronic device is greater than a preset threshold; or determining that the fragrance function of the fragrance accessory needs to be enabled when it is determined that the electronic device is in use, the electronic device is not in pocket mode, the user is not in an anaerobic exercise state according to a sports application in the electronic device or a wearable device that establishes communication with the electronic device, and the battery level of the electronic device is greater than a preset threshold.
[0022] Therefore, when the fragrance function needs to be turned on, the fragrance accessories are controlled to realize the fragrance function, which meets the user's needs while saving unnecessary performance overhead.
[0023] In one possible implementation, each of the one or more system themes includes a control instruction, and the controlling the first external accessory to perform the first extended function specifically includes: controlling the first external accessory to perform the first extended function based on the one or more system themes and the control instruction.
[0024] In one possible implementation, the accessory category is a fragrance accessory, the target function includes displaying a picture, audio or video corresponding to a first system theme in the electronic device, the first system theme is any one of the one or more system themes corresponding to the configuration information, the first extended function includes when the electronic device displays the image, audio or video corresponding to the first system theme, the fragrance accessory emits a preset fragrance corresponding to the first system theme, the target software resources include control software and the one or more system themes, and detecting whether the electronic device lacks the target software resources required to execute the target function specifically includes: determining whether the control software is installed in the electronic device; determining whether there is at least one second system theme, the second system theme for a system theme among the one or more system themes that has not been downloaded in the electronic device; when it is determined that the target software resource is missing, obtaining the target software resource specifically includes: when it is determined that the control software is not installed in the electronic device, installing the control software; and when it is determined that at least one second system theme exists, downloading each system theme of the at least one second system theme; controlling the first external accessory to execute the first extended function and, at the same time, executing the target function in the electronic device based on the target software resource specifically includes: controlling the first external accessory to execute the first extended function based on the control software and, at the same time, executing the target function in the electronic device based on the control software and the one or more system themes.
[0025] Exemplarily, the configuration information includes second identification information of the first external accessory, and determining whether the control software is installed in the electronic device specifically includes: determining the third identification information of the first control software corresponding to the second identification information in a third association relationship, the third association relationship being used to represent the association relationship between the identification information of the external accessory of the electronic device and the identification information of the control software; determining whether the control software is installed in the electronic device based on the third identification information.
[0026] Exemplarily, the configuration information includes second identification information of the first external accessory, and determining whether the control software is installed in the electronic device specifically includes: sending the second identification information to a cloud corresponding to the electronic device; receiving the third identification information sent by the cloud, the third identification information being determined by the cloud based on the second identification information and a third association relationship, the third association relationship being used to represent the association relationship between the identification information of the external accessory of the electronic device and the identification information of the control software; determining whether the control software is installed in the electronic device based on the third identification information.
[0027] Exemplarily, the configuration information includes third identification information of the control software, and determining whether the control software is installed in the electronic device specifically includes: determining whether the control software is installed in the electronic device according to the third identification information in the configuration information.
[0028] In one possible implementation, the first external accessory is a wide-angle lens accessory, the target software resource is a functional software corresponding to the configuration information, and the controlling the first external accessory to execute the first extended function and, at the same time, executing the target function in the electronic device based on the target software resource specifically include: controlling the first external accessory to execute the first extended function based on the functional software, and executing the target function in the electronic device based on the functional software.
[0029] In one possible implementation, the target function includes controlling the electronic device to detect an operation command issued by a user through the electronic device to perform wide-angle photography using the wide-angle lens, and the first extended function includes providing a wide-angle function effect for a camera application of the electronic device.
[0030] As a result, electronic devices and wide-angle lens accessories can better cooperate to achieve wide-angle functions. For example, electronic devices and wide-angle lens accessories can also achieve functions such as wide-angle zoom through the above-mentioned functional software, thereby bringing more possibilities for the diverse functions of wide-angle lens accessories.
[0031] In one possible implementation, the accessory category is a wide-angle lens, the first extended function includes providing a wide-angle function effect for a camera application of the electronic device, and the configuration information is also used to indicate identification information of a macro function that conflicts with the function effect of the first extended function; determining according to the configuration information whether there are one or more functions that conflict with the function effect of the first extended function among the functions locally supported by the electronic device, specifically includes: determining whether the electronic device locally supports the macro function according to the identification information of the macro function; and turning off each of the one or more functions in the electronic device when it is determined that the one or more functions exist, specifically includes: turning off the macro function locally in the electronic device when it is determined that the electronic device locally supports the macro function.
[0032] In a possible implementation, the configuration information is also used to indicate identification information of a macro function that conflicts with a functional effect of the first extended function, specifically including: the configuration information includes identification information of the macro function; or the configuration information includes identification information of the wide-angle lens accessory, and a second association relationship is stored in the electronic device or the cloud corresponding to the electronic device, and the second association relationship is used to indicate an association relationship between two functions whose functional effects have a conflicting relationship, and the second association relationship includes an association relationship between the identification information of the wide-angle lens accessory and the identification information of the macro function.
[0033] It can be understood that the configuration information includes the identification information of the macro function, and it can also be understood that the configuration information also includes the identification information of the macro function. The configuration information includes the identification information of the wide-angle lens accessory, and it can also be understood that the configuration information also includes the identification information of the wide-angle lens accessory.
[0034] It is understandable that when the configuration information includes identification information of the macro function that conflicts with the above-mentioned first extended function, the electronic device can directly obtain the identification information of the macro function through the configuration information, thereby simplifying some steps of the electronic device to determine the macro function that conflicts with the first extended function through association relationships, thereby reducing the performance loss of the electronic device.
[0035] It is understandable that, when the configuration information includes the identification information of the wide-angle lens accessory, and the electronic device or the cloud corresponding to the electronic device stores the second association relationship, if the second association relationship is stored in the electronic device, or the electronic device can obtain the second association relationship from the cloud, the electronic device can determine the macro function according to the second association relationship, and the external accessory does not need to occupy additional storage capacity to store the identification information of the conflicting function, thereby improving the storage space utilization in the external accessory. Alternatively, the electronic device can send the identification information of the wide-angle lens accessory to the cloud, and the cloud will then feed back the identification information of the macro function to the electronic device based on the second association relationship, which can save the storage overhead of storing the second association relationship in the electronic device and the performance overhead of determining the identification information of the macro function according to the second association relationship.
[0036] In a possible implementation, the configuration information is also used to indicate a download address of the target software resource, and obtaining the target software resource specifically includes: determining the download address of the target software resource according to the configuration information; and downloading the target software resource according to the download address.
[0037] In a possible implementation, the configuration information is also used to indicate the download address of the target software resource, specifically including: the configuration information includes the download address of the target software resource; or, the configuration information includes identification information of the first external accessory, and the electronic device or the cloud corresponding to the electronic device stores the download address corresponding to the identification information of the first external accessory.
[0038] It can be understood that the configuration information includes the download address of the target software resource, and it can also be understood that the configuration information also includes the download address of the target software resource. The configuration information includes the identification information of the first external accessory, and it can also be understood that the configuration information also includes the identification information of the first external accessory.
[0039] Exemplarily, determining the download address of the target software resource based on the configuration information specifically includes: determining a preset installation address corresponding to the target software resource based on the third identification information and a fifth association relationship, wherein the fifth association relationship is used to represent the association relationship between the identification information of the software resource and the preset installation address of the software resource.
[0040] Exemplarily, determining the download address of the target software resource based on the configuration information specifically includes: sending the third identification information to a cloud corresponding to the electronic device; receiving the preset installation address sent by the cloud, wherein the preset installation address is determined by the cloud based on the third identification information and a fifth association relationship, and the fifth association relationship is used to represent the association relationship between the identification information of the software resource and the preset installation address of the software resource.
[0041] In a possible implementation, it is characterized in that, after installing the first control software according to the preset installation address, the method further includes: charging the first external accessory through a wireless charging protocol.
[0042] Therefore, by using the electronic device to wirelessly power external accessories, the electronic device and the external accessories can better cooperate to achieve extended functions. At the same time, based on wireless power supply, the external accessories do not need to be equipped with battery accessories, which can further save the hardware cost of the external accessories, and can also save the hardware volume of the external accessories, thereby improving the user experience of using the external accessories.
[0043] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method in the first aspect or any possible implementation of the first aspect.
[0044] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the method shown in the first aspect or any possible implementation of the first aspect.
[0045] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method shown in the first aspect or any possible implementation of the first aspect.
[0046] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, characterized in that when the instructions are executed on an electronic device, the electronic device executes the method shown in the first aspect or any possible implementation of the first aspect.
[0047] It can be understood that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer program product provided in the fourth aspect, and the computer storage medium provided in the fifth aspect are all used to execute the method shown in the first aspect of the embodiment of the present application or any implementation of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a use scenario of a method for controlling an external accessory of an electronic device provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a usage scenario in which the external accessory of the electronic device provided in the embodiment of the present application is an A123 fragrance accessory;
[0050] Figure 3 A schematic diagram of a user interface for an electronic device to output prompt information after an A123 fragrance accessory provided in an embodiment of the present application is connected to the electronic device;
[0051] Figure 4 A user interface diagram of an installation page of the fragrance theme 01 corresponding to the A123 fragrance accessory provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of a scenario in which an electronic device provided in an embodiment of the present application cooperates with an A123 fragrance accessory;
[0053] Figure 6 A schematic diagram of a usage scenario in which the external accessory of the electronic device provided in the embodiment of the present application is a B123 wide-angle lens;
[0054] Figure 7 A schematic diagram of a user interface in which a B123 wide-angle lens provided in an embodiment of the present application is connected to an electronic device and the electronic device outputs prompt information after the electronic device uses a camera application;
[0055] Figure 8 A user interface diagram of an installation page of the auxiliary control software corresponding to the B123 wide-angle lens provided in an embodiment of the present application;
[0056] Fig. 9 A schematic diagram of a user interface for outputting a prompt message after the electronic device provided in the embodiment of the present application turns off the target conflict function in the camera application that conflicts with the function provided by the B123 wide-angle lens;
[0057] Fig.10 A schematic diagram of a flow chart of a method for controlling an external accessory of an electronic device provided in an embodiment of the present application;
[0058] Fig.11A schematic diagram of a process flow of a certificate chain for verifying the legitimacy of configuration information of an external accessory A provided in an embodiment of the present application;
[0059] Fig.12 A flowchart of another method for controlling an external accessory of an electronic device provided in an embodiment of the present application;
[0060] Fig.13 A flowchart of another method for controlling an external accessory of an electronic device provided in an embodiment of the present application;
[0061] Fig.14 A schematic diagram of a process for determining whether an electronic device needs to turn on a fragrance function provided in an embodiment of the present application;
[0062] Fig.15 A flowchart of another method for controlling an external accessory of an electronic device provided in an embodiment of the present application;
[0063] Fig.16 A schematic diagram of the hardware structure of an electronic device 200 provided in an embodiment of the present application;
[0064] Fig.17 A software structure block diagram of the electronic device 200 according to an embodiment of the present application;
[0065] Fig.18 This is a hardware structure block diagram of an external accessory 300 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described below in conjunction with the accompanying drawings.
[0067] The terms "first" and "second" in the specification, claims and drawings of this application are only used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0068] The "embodiment" mentioned in this article means that the specific features, structures or characteristics described in conjunction with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0069] In the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".
[0070] The advantages of the control method for external accessories of electronic devices provided in the embodiments of the present application are compared and explained below in combination with implementation methods of control methods for external accessories of other electronic devices.
[0071] In some implementations, the inherent characteristics of the electronic device are used in conjunction with external accessories to achieve extended functions, that is, the inherent hardware or software in the electronic device is used in conjunction with external accessories of the electronic device to achieve extended functions; for example, a fragrance accessory, using the characteristic that the electronic device can charge the external accessories, connects the heat conduction unit in the fragrance accessory with the charging unit, and when the electronic device charges the charging unit in the fragrance accessory, the heat conduction unit can transfer heat to the fragrance unit in the fragrance accessory so that the fragrance accessory emits the corresponding fragrance, thereby the electronic device can obtain direct use rights of the fragrance accessory. Another example is a wide-angle lens accessory, which is simply overlapped and combined with the camera lens of the electronic device, and the wide-angle principle is used to realize the wide-angle function of the electronic device, thereby the electronic device can obtain direct use rights of the wide-angle lens accessory.
[0072] Understandably, external accessories for electronic devices emerge in endlessly, are diverse, and are updated or upgraded at a fast speed. However, according to the above external accessories control method, the external accessories rely too much on the inherent characteristics of the electronic device to achieve extended functions. For example, the fragrance accessories must rely on the inherent characteristics of the electronic device that can charge the external accessories wirelessly or by wire to achieve the fragrance function. In other words, electronic devices cannot adapt to the diverse functions of external accessories and the configuration or update of the software resources of the external accessories of electronic devices to update and upgrade. Electronic devices and external accessories cannot cooperate well to achieve extended functions, and there are great obstacles to applying external accessories to electronic devices.
[0073] However, using the control method for external accessories of an electronic device provided in an embodiment of the present application, when the electronic device is used in combination with the external accessory of the electronic device, after the electronic device discovers the external accessory of the electronic device, it determines the target function that needs to be executed in the electronic device corresponding to the accessory category of the external accessory based on the configuration information of the external accessory of the electronic device, and then determines whether the electronic device has the software resources required to execute the target function (the software resources may be an application that controls the operation of the external accessory of the electronic device, or the software resources may also be resources required to control the electronic device to execute the function that needs to be executed in the electronic device corresponding to the external accessory). If the software resources corresponding to the external accessory of the electronic device are not installed, the software resources corresponding to the external accessory of the electronic device are installed through a preset installation address, so that the electronic device can execute the function that needs to be executed in the electronic device corresponding to the external accessory according to the software resources while controlling the operation of the external accessory of the electronic device.
[0074] Thus, on the one hand, it is detected whether the above-mentioned software resources are installed in the electronic device, and if not, the corresponding software resources are installed in the electronic device. This allows the electronic device to control the external accessories to perform extended functions, and can cooperate to perform the corresponding target functions in the electronic device based on the software resources, so that the electronic device and the external accessories can better cooperate to achieve the extended functions, and reduce the dependency restrictions existing in the application of external accessories to the electronic device. In addition, the electronic device can also adapt to the diverse functions of the external accessories and update and upgrade to configure or update the software resources of the external accessories of the electronic device, thereby helping to increase the depth and breadth of the application of the external accessories of the electronic device to the electronic device.
[0075] On the other hand, the control method for external accessories of electronic devices provided in the embodiments of the present application can bring more possibilities for the diverse functions of external accessories. For example, the software resources corresponding to the fragrance accessories can be implemented to determine the corresponding preset fragrance emitted by the fragrance accessories according to the theme of the desktop wallpaper of the electronic device on which the software resources are installed, or to determine the concentration of the fragrance emitted by the fragrance accessories according to the fragrance concentration set by the user (the fragrance concentration set by the user through the personalized setting function of the software resources), etc.
[0076] On the other hand, using the control method for external accessories of electronic devices provided by the embodiments of the present application, when the electronic device uses the function of the external accessory, it can also determine whether the electronic device has a target conflict function that conflicts with the function provided by the external accessory. If so, the target conflict function is turned off. For example, the functional effects of the wide-angle function and the macro function are opposite (that is, there is a conflict relationship). If the external accessory of the electronic device is a wide-angle lens accessory, and the camera application of the electronic device supports the macro function, the macro function in the camera application is turned off. Thereby limiting the user's right to use the target conflict function, avoiding the electronic device presenting to the user an erroneous effect that is inconsistent with the functional effect of the target conflict function when the user uses the target conflict function, causing trouble to the user because the erroneous functional effect is inconsistent with the user's expectations.
[0077] The present application is further described below in conjunction with the accompanying drawings.
[0078] like Figure 1 As shown, the embodiments of the present application are applicable to scenarios in which an electronic device and an external accessory of the electronic device can communicate with each other.
[0079] Among them, the electronic device can be any electronic device with communication function, for example, the electronic device includes mobile terminals, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers and ultra-mobile personal computers (UMPC) and other electronic devices with communication function. This article does not limit the specific form of the electronic device.
[0080] External accessories of electronic devices can be accessories with communication functions, such as fragrance accessories, mobile phone cases, wide-angle lenses or macro lenses with communication functions, etc., and this document does not limit the specific form of external accessories. It is understandable that external accessories of electronic devices can also be called terminal external accessories, terminal external accessories or electronic device external accessories, etc., and this document does not limit the specific name of external accessories of electronic devices.
[0081] The communication between the above-mentioned electronic device and the external accessories of the electronic device can be wired communication or wireless communication. The wired communication can be a communication method in which information is transmitted by tangible media such as metal wires and optical fibers. The wireless communication can include Bluetooth communication, near field communication (NFC), coil transmission communication, wireless fidelity WiFi communication, radio frequency identification technology (RFID) communication, ZigBee communication or mobile communication, etc.
[0082] The above-mentioned external accessories of the electronic device can communicate with the electronic device to cooperate in realizing some extended functions. These extended functions may be those that the electronic device itself cannot provide, or these extended functions may be those that the electronic device itself can provide but the effect is poor and the external accessories can enhance the corresponding functional effects. Exemplarily, the electronic device itself does not have a fragrance function for emitting fragrance, and the external accessory of the electronic device is a fragrance accessory with a fragrance function. The fragrance accessory communicates with the electronic device to realize the extended functions of the electronic device (for example, the extended function may be a fragrance function that controls the fragrance accessory to emit different fragrances according to the theme type of the desktop wallpaper of the electronic device). Exemplarily, the camera application of the electronic device does not have a macro function (or the macro function effect is poor), and the external accessory of the electronic device is a macro lens with a macro function. The macro lens communicates with the electronic device to realize the extended functions of the electronic device (the extended function is a macro function), and the zoom of the macro function can be realized through the communication between the electronic device and the macro lens.
[0083] In the implementation of this application, an electronic device is used in conjunction with an external accessory of the electronic device. The electronic device and the external accessory of the electronic device can cooperate to implement the extended functions of the electronic device, and the electronic device and the external accessory of the electronic device can provide software and / or hardware support for the extended functions.
[0084] Exemplarily, the electronic device and the external accessory of the electronic device can communicate through at least one communication method to cooperate in executing the control method of the external accessory of the electronic device provided in the embodiment of the present application. For example, after the electronic device discovers the external accessory of the electronic device through coil adsorption, the electronic device executes the control method of the external accessory of the electronic device provided in the embodiment of the present application, and the external accessory cooperates with the electronic device to execute the control method of the external accessory of the electronic device provided in the embodiment of the present application.
[0085] Generally speaking, coil adsorption means that when the magnet part of an external accessory of an electronic device is adsorbed with the magnet part of the electronic device, the magnetic sensor (also called a magnetic sensor) on the electronic device side can detect the adsorption event (also understood as magnetic attraction), thereby discovering the external accessory of the electronic device. After detecting the adsorption event, the electronic device can obtain the identification information of the external accessory of the electronic device through coil transmission communication (also understood as the communication method of the wireless charging protocol). In some other possible implementations, the above-mentioned adsorption event may also include the identification information of the external accessory of the electronic device, which is not limited in this article.
[0086] Scenario 1:
[0087] Combine the following Figure 2-Figure 5The user interface schematic diagram shown introduces the application scenario in which the external accessory of the electronic device is a fragrance accessory, and how to implement the control method of the external accessory of the electronic device provided by the embodiment of the present application.
[0088] Taking the fragrance accessory as the external accessory of the electronic device as an example, the control method of the external accessory of the electronic device provided in this article is described in detail.
[0089] For example, Figure 2 As shown, communication between the electronic device and the fragrance accessory model A123 can be triggered by coil adsorption.
[0090] It is understandable that the model number A123 is only an example, and other suitable model numbers may also be used, which is not limited in this article. For ease of description, the fragrance accessory with model number A123 is referred to as the A123 fragrance accessory. Exemplarily, when the electronic device and the A123 fragrance accessory trigger communication through coil adsorption, the electronic device and the A123 fragrance accessory can communicate wirelessly through coil adsorption, Bluetooth, or NFC.
[0091] Exemplarily, after the electronic device and the A123 fragrance accessory trigger communication by coil adsorption, the electronic device sends a request message to the fragrance accessory to obtain the configuration information of the fragrance accessory; the A123 fragrance accessory sends the configuration information of the A123 fragrance accessory to the electronic device in response to the request message; the electronic device receives the configuration information of the A123 fragrance accessory, and determines whether a system theme (which can also be understood as a software application or software tool) that controls the operation of the A123 fragrance accessory is installed in the electronic device based on the configuration information of the A123 fragrance accessory. If it is determined that the system theme is not installed in the electronic device, a prompt message is output in a pop-up window (such as Figure 3 When receiving the instruction initiated by the user to jump to the installation page, the electronic device determines the preset installation address (such as an application store or website) according to the configuration information of the A123 fragrance accessory and outputs the following information: Figure 4 The installation page shown in FIG. 10 is displayed. When the user confirms the installation instruction, the system theme is installed. In some embodiments, the system theme may not be output to the user. Figure 3 The prompt information shown is directly output as follows Figure 4 Alternatively, the user may not be prompted for input. Figure 3 He Ru Figure 4 The prompt information shown is not the electronic device directly installing the system theme, but this article does not limit this.
[0092] For example, Figure 5As shown, after the A123 fragrance accessory is installed in the electronic device, the fragrance function of the fragrance accessory can be used. For example, when the desktop wallpaper of the electronic device is a rose theme, the fragrance accessory emits a preset rose fragrance corresponding to the rose theme; when the desktop wallpaper of the electronic device is a jasmine theme, the fragrance accessory emits a preset jasmine fragrance corresponding to the jasmine theme.
[0093] Scenario 2:
[0094] Combine the following Figure 6-Figure 9 The user interface schematic diagram shown introduces the application scenario in which the external accessory of the electronic device is a wide-angle lens accessory, and how to implement the control method of the external accessory of the electronic device provided by the embodiment of the present application.
[0095] For example, Figure 6 As shown, communication between the electronic device and the wide-angle lens accessory model B123 can be triggered by coil adsorption.
[0096] It is understandable that the model of B123 is only an example, and it can also be other suitable model identifications, which is not limited in this article. For the convenience of description below, the wide-angle lens accessory with model B123 is referred to as the B123 wide-angle lens. It is understandable that the communication between the B123 wide-angle lens and the electronic device can be triggered by coil adsorption for example only as an example, and the triggering method for triggering the communication between the B123 wide-angle lens and the electronic device can also be an insertion trigger, such as inserting the B123 wide-angle lens into a pre-set metal socket of the electronic device to trigger the communication between the B123 wide-angle lens and the electronic device. This article does not limit the specific triggering method for triggering the communication between the B123 wide-angle lens and the electronic device. In addition, the B123 wide-angle lens can be fixed to the electronic device by coil adsorption, or it can be fixed to the electronic device by inserting the hole, or it can be fixed to the electronic device by clip fixing. There is no limitation on the fixing method of the B123 wide-angle lens.
[0097] Exemplarily, after the electronic device and the B123 wide-angle lens trigger communication (such as NFC communication) by coil adsorption, the electronic device sends a request message to the wide-angle lens to obtain the configuration information of the wide-angle lens; the B123 wide-angle lens sends the configuration information of the B123 wide-angle lens to the electronic device in response to the request message; the electronic device receives the configuration information of the B123 wide-angle lens, and determines whether the electronic device is installed with auxiliary control software that controls the operation of the B123 wide-angle lens according to the configuration information of the B123 wide-angle lens. If it is determined that the electronic device is not installed with the auxiliary control software, such as Figure 7When receiving the instruction initiated by the user to jump to the installation page, the electronic device determines the preset installation address (such as an application store or website) according to the configuration information of the B123 wide-angle lens, and outputs the following information: Figure 8 The installation page shown will install the auxiliary control software after receiving the user's instruction to confirm the installation.
[0098] Exemplarily, after the auxiliary control software is installed in an electronic device, the wide-angle function can be realized by combining the camera application, the B123 wide-angle lens and the auxiliary control software in the electronic device.
[0099] Therefore, when the electronic device is not pre-installed with the control software corresponding to the external accessories of the electronic device or when the control software corresponding to the external accessories of the electronic device is updated or optimized, the electronic device can install the corresponding control software or update the corresponding control software as needed to cope with the diversity or constantly updated characteristics of the external accessories of the electronic device, thereby solving the problem that the control software for known or unknown external accessories cannot be pre-installed in the electronic device.
[0100] In some implementations, the control method of the external accessories of the electronic device provided in the embodiment of the present application further includes: determining whether there is a function in the camera application of the electronic device that conflicts with the function of the B123 wide-angle lens, and if so, turning off the function in the camera application that conflicts with the function of the B123 wide-angle lens, and outputting a corresponding prompt message. Exemplarily, if the macro function supported in the camera application of the electronic device conflicts with the function of the B123 wide-angle lens, the macro function in the camera application is turned off, and an output such as Fig. 9 The prompt message shown is to inform the user that the macro function has been turned off.
[0101] Thus, the target conflict function in the electronic device that conflicts with the function of the external accessories of the electronic device is turned off, and the user's right to use the target conflict function is restricted, so as to avoid the situation where the electronic device presents an erroneous effect inconsistent with the functional effect of the target conflict function to the user when the user uses the target conflict function, thereby causing trouble to the user because the erroneous functional effect is inconsistent with the user's expectations.
[0102] Embodiment 1:
[0103] The following is a combination of the above term descriptions and Fig.10 The method flow chart shown introduces in detail the control method of external accessories of an electronic device provided in an embodiment of the present application.
[0104] It is understandable that the control method of the external accessory of the electronic device provided in the embodiment of the present application can be executed by the electronic device, and the control module of the external accessory of the electronic device in the electronic device can also execute the control method of the external accessory of the electronic device provided in the embodiment of the present application. Among them, the control module of the external accessory of the electronic device can be a hardware component in the electronic device. For example, the control module of the external accessory of the electronic device can be a chip in the electronic device for executing the control method of the external accessory of the electronic device provided in the present application. Alternatively, the control module of the external accessory of the electronic device can also be a software function module provided by the existing hardware component in the electronic device that can execute the control method of the external accessory of the electronic device provided in the present application. Exemplarily, the control module of the external accessory of the electronic device can be an application. The embodiment of the present application does not limit the specific form of the control module of the external accessory of the electronic device.
[0105] S1001, the electronic device discovers external accessory A.
[0106] Exemplarily, the electronic device may discover the external accessory A in the following manner:
[0107] 1) Coil adsorption method, specifically, external accessory A is adsorbed on the electronic device to trigger an adsorption event, and the electronic device detects the adsorption event through a magnetic sensor, so that the electronic device finds the external accessory A adsorbed on the electronic device through magnetism.
[0108] 2) NFC communication method, specifically, an electronic device operating in an active NFC mode identifies an external accessory A operating in a passive NFC mode, so that the electronic device discovers the external accessory A.
[0109] It is understandable that the electronic device in active mode can act as a card reader, emitting a radio frequency field, thereby discovering the external accessory A in the radio frequency field, or identifying the NFC device information of the external accessory A. In passive mode, the external accessory A only responds passively in the radio frequency field emitted by other NFC devices, for example, the external accessory A responds passively in the radio frequency field emitted by an electronic device other than the external accessory A, specifically, information can be read or written.
[0110] 3) Bluetooth proximity discovery communication method. Specifically, the electronic device can also discover external accessory A by scanning the broadcast packet published by external accessory A within the preset Bluetooth communication range of the electronic device (the preset Bluetooth communication range is smaller than the Bluetooth communication range of the electronic device, for example, within 20 cm of the electronic device), which can also be understood as proximity discovery.
[0111] It is understandable that there may be many methods for discovering the external accessory A, which are not limited to the above communication methods of coil adsorption, NFC communication or Bluetooth proximity discovery.
[0112] In an embodiment of the present application, discovering external accessory A may refer to obtaining the identification information of the external accessory A. Discovering external accessory A may also refer to only discovering the external accessory A without obtaining the identification information of the external accessory A. The identification of the external accessory A refers to the communication identification of the external accessory A.
[0113] Exemplarily, the external accessory A is discovered by coil adsorption, and the adsorption event may not include the identification information of the external accessory A. The adsorption event may only be used to trigger the electronic device to obtain the identification information of the external accessory A through a preset communication method (such as coil transmission communication, Bluetooth communication, or NFC communication). Alternatively, the adsorption event may only be used to trigger the electronic device to obtain the configuration information of the external accessory A through a preset communication method.
[0114] It is understandable that the coil adsorption method can be to detect the adsorption event through a magnetic sensor, and the adsorption event may not include the identification information of external accessory A. The coil transmission communication requires that both parties of the communication support or are configured with the wireless charging communication protocol, and the communicating parties can transmit data through the wireless charging protocol. Exemplarily, the electronic device can act as a transmitter in the wireless charging protocol communication and send a pulse signal to the external accessory A (it can also be understood as the electronic device sending a request message to the external accessory A to obtain the identification information of the external accessory A). The external accessory A acts as a receiving end, and after receiving the pulse signal, it sends an identity recognition packet signal to the electronic device (the identity recognition packet signal includes the identification information of the external accessory A).
[0115] Exemplarily, discovering the external accessory A through NFC communication means that identification information of the external accessory A may be acquired through NFC communication, or identification information of the external accessory A may not be acquired.
[0116] Exemplarily, the external accessory A is discovered through a Bluetooth proximity discovery communication method, and the broadcast packet released by the external accessory A may include identification information of the external accessory A.
[0117] S1002: The electronic device obtains configuration information of external accessory A.
[0118] In the embodiment of the present application, after discovering the external accessory A, the electronic device can establish a communication connection (specifically, a communication channel) with the external accessory A, so that the electronic device can obtain the configuration information of the external accessory A based on the communication connection. It is understandable that the communication between the electronic device and the external accessory A may or may not require a communication identifier.
[0119] Exemplarily, when the electronic device and the external accessory A communicate point-to-point via NFC, the communication between the electronic device and the external accessory may not require a communication identifier. Specifically, both the electronic device and the external accessory A may operate in NFC active mode (also understood as NFC bidirectional mode), so that both the electronic device and the external accessory A may actively emit a radio frequency field to establish point-to-point communication. For example, when the electronic device acts as a device to initiate communication, the electronic device is an NFC initiating device (master device), which can provide a communication radio frequency field and send a request message (a request message requesting to obtain the configuration information of external accessory A) to external accessory A (slave device) at a transmission speed. External accessory A uses load modulation technology, that is, it can transmit the configuration information of external accessory A back to the electronic device at the same transmission speed. The implementation method of the external accessory A as a master device is consistent with the implementation method of the electronic device as a master device, which will not be described in detail here.
[0120] Exemplarily, when the electronic device and the external accessory A communicate via Bluetooth, the communication between the electronic device and the external accessory may require a communication identifier. For example, the electronic device scans a broadcast packet sent by the external accessory A through proximity discovery, and the broadcast packet includes the communication identifier of the external accessory A; the electronic device sends a request message (a request message for obtaining the configuration information of the external accessory A) to the external accessory A corresponding to the communication identifier; and the electronic device then receives the above configuration information sent by the external accessory A.
[0121] It is understandable that, in the case where the communication between the electronic device and the external accessory A does not require a communication identifier, when the external accessory A is found in the above step S1001, it is not necessary to obtain the ID of the external accessory A, and the electronic device can obtain the configuration information of the external accessory A through a preset communication method. For example, the preset communication method is the NFC communication method, that is, the electronic device with NFC working in the active mode can directly read the configuration information of the external accessory A in the radio frequency field.
[0122] It is understandable that communication between an electronic device and external accessory A may require a communication identifier, and when the ID of external accessory A has been obtained when external accessory A is discovered in the above step S1001, the electronic device can obtain other information in the configuration information of external accessory A except the ID of external accessory A through the following steps: 1) The electronic device sends a request message to the external accessory A for obtaining partial configuration information based on the ID of external accessory A, and the partial configuration information is other information in the configuration information of the external accessory A except the ID of external accessory A; 2) The electronic device receives the partial configuration information, thereby obtaining the above-mentioned configuration information of external accessory A.
[0123] It is understandable that communication between an electronic device and external accessory A may require a communication identification, and when the ID of external accessory A is not obtained when external accessory A is found in the above step S1001, the electronic device can obtain the configuration information of the external accessory A through the following steps: 1) Obtain the ID of the external accessory A through a preset communication method; for example, the electronic device sends a pulse signal to the external accessory A requesting to obtain the identification through wireless charging protocol communication (coil transmission communication); 2) The electronic device sends a request message to the external accessory A requesting to obtain part of the configuration information based on the ID of the external accessory A; 3) The electronic device receives the part of the configuration information, thereby obtaining the above-mentioned configuration information of the external accessory A.
[0124] In some possible implementations, in order to ensure that the configuration information of the external accessories of the electronic device will not be used by unauthorized electronic devices, the configuration information of the external accessory A obtained by the above electronic device may also be configuration information processed by asymmetric encryption. Exemplarily, the configuration information of the above external accessory A is encrypted using a preset public key, and a preset private key corresponding to the preset public key is required to decrypt the encrypted configuration information of the external accessory A to obtain the data content of the configuration information of the external accessory A. In other words, only when the above preset private key exists in the electronic device can the electronic device obtain the data content in the encrypted configuration information of the external accessory A. Optionally, the preset private key can be stored in the electronic device or in the cloud of the electronic device, and the electronic device obtains the preset private key by accessing the cloud. Optionally, the configuration information of the above external accessory A can also be encrypted using symmetric encryption. This article does not limit the conversion method used to encrypt the configuration information of the external accessory A to ensure that the configuration information of the external accessory A will not be used by unauthorized electronic devices.
[0125] In some possible implementations, in order to ensure the integrity of the configuration information of the external accessories of the electronic device, the integrity of the configuration information of the external accessories of the electronic device may be verified by using a certificate chain. Fig.11 As shown, specifically including:
[0126] S1101 , external accessory A requests a certification authority (CA) to issue a digital certificate of configuration information of external accessory A. Correspondingly, the CA receives the request for configuration information of external accessory A.
[0127] The configuration information of the external accessory A may be the configuration information processed by asymmetric encryption (ie, the configuration information of the external accessory A encrypted by the public key of the external accessory A).
[0128] S1102, CA sends the digital certificate of the configuration information of external accessory A to external accessory A, and correspondingly, external accessory A receives the digital certificate of the configuration information of external accessory A sent by CA.
[0129] In the embodiment of the present application, after receiving the request for the configuration information of the external accessory A, the CA calculates and generates a digital summary A using a known or preset algorithm for the metadata (the metadata may include one or more of the information such as the issuer, the issuing address, the issuing time, and the validity period of the digital certificate), and encrypts the digital summary A using the private key of the CA to obtain the encrypted digital summary A, i.e., the digital signature; then the digital signature and the configuration information of the external accessory A are attached to the digital certificate to obtain the digital certificate of the configuration information of the external accessory A. Then, the CA sends the digital certificate of the configuration information of the external accessory A to the external accessory A.
[0130] S1103, external accessory A sends the public key of the external accessory and the digital certificate of the external accessory A to the electronic device, and correspondingly, the electronic device receives the public key of the external accessory and the digital certificate of the external accessory A sent by the external accessory A.
[0131] In the embodiment of the present application, the electronic device acquiring the configuration information of the external accessory A can also be understood as the electronic device acquiring (receiving) the public key of the external accessory A and the digital certificate of the external accessory A.
[0132] In an embodiment of the present application, after the electronic device receives the public key of the external accessory and the digital certificate of external accessory A, it decompresses the digital certificate to obtain the certificate metadata, the digital signature and the digital certificate of external accessory A, and generates a digital summary B using the above-mentioned publicly known or preset algorithm; and uses the CA public key to decrypt the digital signature to obtain the decrypted digital summary A, and compares the digital summary B with the digital summary A. If they are the same, it indicates that the information in the digital certificate is credible (that is, the digital summary A and the configuration information of the external accessory A are credible). The electronic device then decrypts the configuration information of external accessory A using the private key corresponding to the public key of external accessory A, and can obtain the data content in the configuration information of external accessory A.
[0133] It can be understood that the configuration information of external accessory A in the digital certificate of the configuration information of external accessory A is encrypted using the public key of external accessory A in order to ensure that the configuration information of external accessory A will not be used by unauthorized electronic devices. In some possible implementations, the configuration information of external accessory A may not be encrypted using the public key of external accessory A in the digital certificate of the configuration information of external accessory A, and this document does not limit this.
[0134] It is understandable that the integrity of the configuration information of the external accessories of the electronic device can also be ensured by other verification methods besides the certificate chain, which is not limited in this article. For example, a preset private identifier is agreed upon, and if the configuration information of the external accessory A obtained by the electronic device includes the preset private identifier, it means that the configuration information of the external accessory A is credible.
[0135] S1003: The electronic device determines a target function corresponding to the external accessory A according to the configuration information.
[0136] In the embodiment of the present application, the external accessory A can provide extended functions for the electronic device. In order to control the external accessory A to realize the extended functions, the electronic device needs to cooperate in executing the target function in the electronic device accordingly.
[0137] Exemplarily, when external accessory A is a fragrance accessory, the extended function that the fragrance accessory can provide to the electronic device is the function of emitting fragrance according to the wallpaper type set for the electronic device. In order for the electronic device to realize the fragrance function of the fragrance accessory, the target function that needs to be executed in the electronic device is: displaying (also understood as displaying) the corresponding wallpaper in the electronic device. Exemplarily, when external accessory A is a wide-angle lens accessory, the extended function that the wide-angle lens accessory can provide to the electronic device is the wide-angle function; accordingly, in order to realize the wide-angle function of the wide-angle lens accessory, the target function that needs to be executed in the electronic device is: detecting the operation command issued by the user through the electronic device to use the wide-angle lens to perform wide-angle photography.
[0138] In the embodiment of the present application, the configuration information at least includes the accessory category of the external accessory A. The electronic device can determine the target function corresponding to the external accessory A according to the accessory category. The target function includes the function that needs to be executed in the electronic device in order to control the first external accessory to realize the extended function. Exemplarily, the accessory category of the external accessory A can be a fragrance accessory or a wide-angle lens accessory. The specific accessory category can be represented by a category identifier.
[0139] It is understandable that the target function may be a set of functions. For example, for external accessory A, the electronic device needs to control the extended functions of external accessory A to be executed, including functions x1, x2 and x3. In the electronic device, functions y1, y2 and y3 (that is, target functions) need to be executed respectively, and the execution of functions y1, y2 and y3 requires some necessary software resources.
[0140] Exemplarily, for fragrance accessories, the function of the fragrance accessories is that when the electronic device displays the target wallpaper, the fragrance accessories emit the corresponding fragrance. For example, it can be controlled that when the electronic device uses the y1 wallpaper, the fragrance accessories emit the corresponding x1 fragrance; when the electronic device uses the y2 wallpaper, the fragrance accessories emit the corresponding x2 fragrance; when the electronic device uses the y3 wallpaper, the fragrance accessories emit the x3 fragrance. The corresponding target functions that need to be executed in the electronic device are: displaying the y1, y2 or y3 wallpapers respectively, or playing the music z1, z2 and z3 respectively. Therefore, wallpaper resources and music resources are required to execute the target function.
[0141] S1004, the electronic device detects whether the electronic device has installed therein software resources required to execute the target function.
[0142] In the embodiment of the present application, the data communication method provided in the embodiment of the present application can be executed by the electronic device itself; or, the data communication method provided in the embodiment of the present application can also be executed by the control software preinstalled in the electronic device, and the control software can control the external accessory A to realize the extended function, and control the electronic device to execute the function corresponding to the external accessory A that needs to be executed in the electronic device; or, the data communication method provided in the embodiment of the present application is executed by the electronic device and the control software preinstalled in the electronic device in cooperation. The above-mentioned control of the electronic device to execute the function corresponding to the external accessory A that needs to be executed in the electronic device can also be understood as executing in the electronic device the function that needs to be executed in the electronic device in order to control the first external accessory to realize the extended function.
[0143] Exemplarily, the external accessory A is a fragrance accessory, and the control software can control the fragrance accessory to emit a fragrance corresponding to the theme of the wallpaper used in the electronic device. At the same time, the control software can display images, audio or video corresponding to the theme wallpaper selected by the user in the electronic device based on the theme wallpaper resources (that is, the control software controls the electronic device to perform the function that needs to be performed in the electronic device corresponding to the external accessory A). Exemplarily, the control software can control the wide-angle lens accessory to provide a wide-angle function effect for the camera application of the electronic device. The external accessory A is a wide-angle lens accessory. The control software can also control the electronic device to detect an operation command issued by the user through the camera application of the electronic device to use the wide-angle lens to perform wide-angle photography (that is, the control software controls the electronic device to perform the function that needs to be performed in the electronic device corresponding to the external accessory A).
[0144] Exemplarily, if the above-mentioned control software has been pre-installed in the electronic device, the data communication method provided in the embodiment of the present application is executed by the above-mentioned control software pre-installed in the electronic device, or the data communication method provided in the embodiment of the present application is executed by the electronic device and the control software pre-installed in the electronic device. Among them, the above-mentioned electronic device determines whether the software resources corresponding to the external accessory A are installed in the electronic device according to the configuration information, specifically including: the electronic device determines whether the electronic device is installed with the resources (such as theme resources) required to execute the function corresponding to the external accessory A that needs to be executed in the electronic device according to the configuration information. The resources required for the function corresponding to the external accessory A that needs to be executed in the electronic device can also be understood as the software resources that are missing in the electronic device when the function corresponding to the external accessory A is executed in the electronic device so that the external accessory A is controlled by the above-mentioned control software to realize the extended function.
[0145] Exemplarily, if the above control software is not pre-installed in the electronic device, the electronic device itself executes the data communication method provided in the embodiment of the present application, wherein the above electronic device determines whether the software resources corresponding to the external accessory A are installed in the electronic device according to the configuration information, specifically including: the electronic device determines whether the above control software is installed in the electronic device according to the configuration information, and whether the electronic device is installed with the resources required to execute the function corresponding to the external accessory A that needs to be executed in the electronic device. If neither is installed, the control software and the resources are obtained, and then the electronic device controls the external accessory A to realize the extended function based on the control software, and executes the function corresponding to the external accessory A that needs to be executed in the electronic device in the electronic device based on the control software and the resources.
[0146] It is understandable that the electronic device can control the above-mentioned software in the electronic device by scanning a QR code or contact triggering, etc., which is not limited in this document.
[0147] That is to say, the software resources corresponding to the above-mentioned external accessory A can be control software that controls external accessory A to realize extended functions and controls the electronic device to execute the functions corresponding to the external accessory A that need to be executed in the electronic device, or it can be all or part of the resources required to execute the functions corresponding to the external accessory A that need to be executed in the electronic device.
[0148] In the embodiment of the present application, the configuration information of the external accessory A includes the identification information of the external accessory A and / or the identification of the software resource corresponding to the external accessory A. The identification information of the external accessory A includes at least the accessory category and the identification information that can uniquely identify the external accessory A.
[0149] In the embodiment of the present application, the electronic device determines whether the software resources corresponding to the external accessory A required to execute the above-mentioned target function are installed in the electronic device according to the configuration information, which can be specifically in the following two ways:
[0150] 1. Exemplarily, the configuration information includes the identifier of the software resource corresponding to the external accessory A. The electronic device can determine the identifier of the software resource corresponding to the external accessory A according to the configuration information.
[0151] For example, the configuration information of the external accessory A includes an identifier a1 of a software resource corresponding to the external accessory A. The electronic device determines whether the software resource corresponding to the identifier a1 is installed in the electronic device according to the identifier a1 included in the configuration information.
[0152] 2. Exemplarily, the configuration information of the external accessory A includes identification information of the external accessory A. The identification information of the external accessory A at least includes identification information that can uniquely identify the external accessory A. The electronic device can determine the identification of the software resource corresponding to the external accessory A according to the identification information of the external accessory A.
[0153] For example, when the configuration information of the above-mentioned external accessory A includes the identification information of the external accessory A, and the above-mentioned electronic device stores an association relationship A (the association relationship A is the association relationship between the identification information of the external accessory and the identification of the software resource), the electronic device can determine the identification of the software resource corresponding to the external accessory A (for example, the a1 identification) based on the association relationship A and the identification information of the above-mentioned external accessory A, so that the electronic device can determine whether the software resource corresponding to the identification a1 is installed in the electronic device based on the identification a1.
[0154] In the embodiment of the present application, the identification information of the external accessory A at least includes identification information that can uniquely identify the external accessory A. Optionally, an accessory identification (Identity document, ID) (understandably, the accessory ID is the communication identification of the accessory) can be used to uniquely identify the external accessory A, and the identification information of the external accessory A at least includes: accessory ID. Alternatively, the identification information of the external accessory A can also be uniquely identified by the accessory model, and the identification information of the external accessory A at least includes the accessory model. Alternatively, the identification information of the external accessory A can also be uniquely identified by the accessory category and the accessory model, and the identification information of the external accessory A at least includes the accessory category and the accessory model.
[0155] It is understandable that the identification information of the external accessory A may include other information in addition to at least the identification information that can uniquely identify the external accessory A, which is not limited herein.
[0156] It is understandable that the above-mentioned association relationship A can be an association relationship between an accessory ID and the identification of a software resource, or an association relationship between an accessory model and the identification of a software resource, or an association relationship between an accessory category, an accessory model, and the identification of a software resource. Specifically, when an accessory ID is used to uniquely identify an external accessory A, the association relationship A is an association relationship between an accessory ID and the identification of the software resource. When an accessory model is used to uniquely identify an external accessory A, the association relationship A is an association relationship between an accessory model and the identification of the software resource. When an accessory category and an accessory model are used to uniquely identify an external accessory A, the association relationship A is an association relationship between an accessory category, an accessory model, and the identification of a software resource.
[0157] For example, as shown in Table 1 below, the association relationship A is an association relationship between an accessory identifier and an identifier of a software resource, and the electronic device can determine the identifier of the software resource corresponding to the external accessory A according to the association relationship A and the identifier of the external accessory A (the identifier of the external accessory A included in the configuration information of the external accessory A). For example, if the accessory identifier of the external accessory A is H1, then the identifier of the software resource corresponding to the external accessory A is a1.
[0158] Table 1
[0159] Accessory ID Identification of software resources H1 a1 H2 a2
[0160] For example, as shown in Table 2 below, the association relationship A is an association relationship between an accessory model and an identifier of a software resource, and the electronic device can determine the identifier of the software resource corresponding to the external accessory A according to the association relationship A and the model of the external accessory A (the model of the external accessory A included in the configuration information of the external accessory A). For example, if the accessory model of the external accessory A is X1, the identifier of the software resource corresponding to the external accessory A is a1.
[0161] Table 2
[0162] Accessory Model Identification of software resources X1 a1 X2 a2
[0163] In some possible implementations, there may be a situation where two external accessories of different categories have the same model, and the model of the external accessory cannot uniquely identify an external accessory; for example, a lens accessory and a fragrance accessory have different accessory categories but the same accessory model, as shown in Table 3 below, the above-mentioned association relationship A can also be an association relationship of the accessory category, accessory model and identification of the software resource.
[0164] Table 3
[0165]
[0166] In the embodiment of the present application, an external accessory of an electronic device may correspond to the identification of one or more software resources, which is not limited in this document.
[0167] Exemplarily, the association relationship A between the identifiers of the external accessory and the software resource may also be stored in the cloud, and the electronic device may communicate with the cloud, so that the electronic device may obtain the identifier of the software resource corresponding to the configuration information of the external accessory A from the cloud (e.g., identifier a1), so that the electronic device may determine whether the software resource corresponding to the identifier a1 is installed in the electronic device based on the identifier a1. The cloud may be a server or a cloud server of the electronic device. In the embodiment of the present application, the electronic device is used in conjunction with the external accessory A. The cloud corresponding to the electronic device and the cloud corresponding to the external accessory A may be the same cloud or two different clouds, and the association relationship A is stored in both the cloud corresponding to the electronic device and the cloud corresponding to the external accessory A, and the data content of the association relationship A stored in the two clouds is consistent.
[0168] In some descriptions, software resources may also be referred to as functional software, etc., which is not limited in this document.
[0169] If it is determined that the above software resource is not installed in the electronic device, step S1005 is executed; if it is determined that the above software resource is installed in the electronic device, step S1007 is executed.
[0170] S1005: The electronic device determines a preset installation address corresponding to the software resource according to the configuration information.
[0171] In an embodiment of the present application, the above-mentioned preset installation address can be an installation address for installing or downloading software resources of external accessory A. The installation address can be a website or an application store in the electronic device, which is not limited in this document.
[0172] In the embodiment of the present application, the electronic device determines the preset installation address corresponding to the software resource of the external accessory A according to the configuration information, which can be specifically in the following ways:
[0173] Method 1: Exemplarily, the configuration information of the external accessory A also includes a preset installation address corresponding to the software resource of the external accessory A. Thus, the electronic device can determine the preset installation address of the software resource of the external accessory A according to the configuration information.
[0174] Method 2: Exemplarily, the configuration information includes the identifier of the software resource corresponding to the external accessory A. The electronic device can determine the identifier of the software resource corresponding to the external accessory A according to the configuration information, and then determine the preset installation address of the software resource corresponding to the external accessory A according to the association relationship B (the association relationship B is the association relationship between the identifier of the software resource and the preset installation address).
[0175] For example, the electronic device stores the association relationship B, and the association relationship B is shown in Table 4 below. After the electronic device determines the identifier (e.g., identifier a1) of the software resource corresponding to the external accessory A according to the association relationship A, it determines the preset installation address corresponding to the identifier a1 according to the identifier a1 and the association relationship B. Alternatively, the association relationship B may also be stored in the cloud of the electronic device, and the electronic device may request the cloud to obtain the preset installation address corresponding to the identifier (a1) of the software resource of the external accessory A.
[0176] Table 4
[0177] Identification of software resources Default installation address a1 http: / / xiangfen.X1.com.cn a2 http: / / xiangfen.X2.com.cn
[0178] Method 3: Exemplarily, the configuration information of the external accessory A includes the identification information of the external accessory A. The electronic device may determine the identification of the software resource corresponding to the external accessory A according to the identification information of the external accessory A, and then determine the preset installation address corresponding to the identification of the software resource of the external accessory A according to the above association relationship B. Alternatively, the electronic device may determine the preset installation address corresponding to the software resource of the external accessory A according to the identification information of the external accessory A and the association relationship C (the association relationship C is the association relationship between the identification information of the external accessory and the preset installation address).
[0179] For example, the above-mentioned association relationship C is stored in the above-mentioned electronic device. Specifically, the association relationship C can be an association relationship between an accessory model and a preset installation address (as shown in Table 5 below), or an association relationship between an accessory ID and a preset installation address, or an association relationship between an accessory category, an accessory model, and a preset installation address, which is not limited in this document. Alternatively, the above-mentioned association relationship C can also be stored in the cloud of the electronic device, and the electronic device can request the cloud to obtain the preset installation address corresponding to the identification information of the external accessory A.
[0180] Table 5
[0181] Accessory Model Default installation address X1 http: / / xiangfen.X1.com.cn X2 http: / / xiangfen.X2.com.cn
[0182] It is understandable that the identification information of the external accessories described in the above-mentioned association relationship A and association relationship C can be the identification information of the external accessory that uniquely identifies an external accessory, or it can be all the identification information in the identification information of the external accessory, and this document does not limit this.
[0183] Optionally, before determining the preset installation address corresponding to the software resource of the external accessory A, the electronic device may output a prompt message, wherein the prompt message is used to inquire the user whether the software resource corresponding to the external accessory A needs to be installed. When it is determined that the user indicates that the software resource corresponding to the external accessory A needs to be installed, the electronic device then executes step S1005 (determining the preset installation address corresponding to the software resource of the external accessory A). Figure 3 or Figure 7 The prompt information shown.
[0184] In the implementation of the above-mentioned methods 1 to 3, an identifier of a software resource corresponds to a preset installation address. That is, when an external accessory of an electronic device corresponds to an identifier of a software resource, the software resource of the external accessory of the electronic device corresponds to a preset installation address, and when an external accessory of an electronic device corresponds to identifiers of multiple software resources, the software resource of the external accessory of the electronic device corresponds to multiple preset installation addresses, and the multiple preset installation addresses correspond to the identifiers of the multiple software resources one by one.
[0185] Method 4: Exemplarily, in a possible implementation, when an external accessory of an electronic device corresponds to the identifiers of multiple software resources, the identifiers of the multiple software resources may also correspond to the same preset installation address. Exemplarily, the data of multiple software resources are included in the same installation address, and the user chooses to download the corresponding software resource according to his or her needs; or, the data of multiple software resources are included in the same installation address, and in the address, only the software resources corresponding to the identifiers of one or more software resources that the current electronic device needs to obtain have download permissions (for example, optional download items), and the others have no download permissions (for example, non-optional download items), which is not limited in this article.
[0186] It is understandable that the preset installation address described in this article may also be other names. For example, the preset installation address may also be called a preset download method, which is not limited in this article.
[0187] S1006, the electronic device installs the software resource through the preset installation address.
[0188] It is understandable that installing the software resources corresponding to the external accessory A can also be understood as downloading or obtaining the software resources corresponding to the external accessory A.
[0189] Exemplarily, the installation address indicated by the preset installation address indicates the software resource corresponding to the external accessory A, so that the electronic device can download the software resource corresponding to the external accessory A through the above preset installation address. Or the installation address indicated by the preset installation address indicates the installation package of the software resource corresponding to the external accessory A, and the electronic device downloads the installation package through the above preset installation address, and then installs the software resource corresponding to the external accessory A according to the installation package.
[0190] Optionally, before installing the software resources corresponding to the external accessory A through the preset installation address, the electronic device may output a prompt message, and the prompt message is used to display the installation page of the preset installation address to the user, and the user can determine whether to install the software resources corresponding to the external accessory A through the installation page; after receiving the user's confirmation instruction to install the software resources corresponding to the external accessory A, the electronic device executes step S1006 (installing the software resources corresponding to the external accessory A through the preset installation address). Exemplarily, the output is as above Figure 4 or Figure 8 The installation page is shown.
[0191] Optionally, when the software resource of external accessory A is updated, for example, software resource version 1 is updated to version 2, and the identifier of the software resource is also changed from a1 to aa1, the configuration information of the external accessory A or the association relationship A table can synchronously update the identifier of the software resource of the external accessory A. Thus, if the electronic device stores the software resource corresponding to the external accessory A with the identifier a1, but the identifier of the software resource corresponding to the external accessory A stored in the association relationship A is the identifier of the updated software resource (for example, aa1), the electronic device can delete (also understood as uninstall) the software resource corresponding to the a1 identifier, and install the software resource corresponding to the aa1 identifier according to the preset installation address corresponding to the aa1 identifier of the software resource of the external accessory A.
[0192] Optionally, when the software resource of external accessory A is updated, if the identification of the software resource is not modified, the identification of the software resource of external accessory A in the above-mentioned association relationship table A may not be modified. The cloud of external accessory A may send an update notification to the electronic device through the software resource (old version) of the external accessory A installed in the electronic device. After receiving the update notification of the software resource of external accessory A, the electronic device may directly update it, or output a prompt message to the user to confirm whether to update. For example, the prompt message is: "A new version of the software resource of fragrance accessory A is available. To avoid affecting normal use, please go to update." After receiving the instruction input by the user to confirm to go to update, step S1006 is executed (the electronic device installs the software resource corresponding to the external accessory A through the preset installation address).
[0193] It is understandable that the software resources of the external accessories of the electronic device installed in the electronic device can also be updated by other methods besides the identification of the software resources in the above-mentioned update association relationship A table and the above-mentioned sending of update notifications by the cloud of external accessory A to the electronic device through the software resources of the external accessory A, and this article does not limit this.
[0194] S1007, the electronic device controls the external accessory A to implement the extended function, and at the same time, cooperates to execute the above target function in the electronic device through the software resource.
[0195] In the embodiment of the present application, the electronic device controls the operation of the external accessory A through the software resources corresponding to the external accessory A, which can also be understood as the electronic device and the software resources corresponding to the external accessory A cooperate to control the operation of the external accessory A. Specifically, the software resources corresponding to the external accessory A installed in the electronic device can determine the control command to be sent to the external accessory A according to the state of the electronic device, and then the electronic device communicates with the external accessory A and sends the control command to the external accessory A.
[0196] Exemplarily, the external accessory A is a fragrance accessory. The software resources of the fragrance accessory installed in the electronic device can automatically determine the preset control command corresponding to the theme of the desktop wallpaper according to the theme of the desktop wallpaper currently set for the electronic device, and communicate with the fragrance accessory through the electronic device to send the preset control command to the fragrance accessory, thereby controlling the fragrance accessory to emit a preset fragrance consistent with the theme of the desktop wallpaper.
[0197] Therefore, when the electronic device is not pre-installed with software resources corresponding to the external accessories of the electronic device or when the software resources corresponding to the external accessories of the electronic device are updated or optimized, the electronic device can install the corresponding software resources or update the corresponding software resources as needed to cope with the diversity or constantly updated characteristics of the external accessories of the electronic device. That is, the electronic device and the external accessories can better cooperate to realize the expanded functions and reduce the dependency restrictions existing in the application of external accessories to the electronic device. At the same time, it can also solve the problem that the software resources of known or unknown external accessories cannot be pre-installed in the electronic device.
[0198] In some possible implementations, after the above step S1006 (the electronic device installs the software resource through the preset installation address) and before the above step S1007 (the electronic device controls the external accessory A to implement the extended function, and at the same time, cooperates with the electronic device to execute the above target function through the software resource), as Fig.12 As shown, the control method of the external accessories of the electronic device provided in the embodiment of the present application also includes the following steps:
[0199] S1201 , the electronic device determines whether there is a target conflict function in the electronic device according to the software resources of the external accessory A, and the target conflict function conflicts with the function of the external accessory A.
[0200] Exemplarily, the configuration information of the external accessory A includes a conflict function set (specifically, a set of identification information of the conflict function), and the conflict function set is used to indicate one or more functions that conflict with the function of the external accessory A, so that the electronic device can determine whether one or more functions in the conflict function set exist in the electronic device according to the conflict function set, that is, the target conflict function can be obtained. Alternatively, the conflict function set can also be included in the software resources of the external accessory A.
[0201] Exemplarily, the configuration information of external accessory A also includes a capability parameter, which is used to indicate the functions supported by external accessory A. The electronic device stores a conflicting function association relationship, which is used to indicate two conflicting functions, or the cloud corresponding to the electronic device stores the conflicting function association relationship. Thus, the electronic device can determine the above-mentioned target conflicting function according to the capability parameter and the conflicting function association relationship, that is, the function among the functions supported by the electronic device that conflicts with the function supported by external accessory A.
[0202] In some descriptions of the present application, the above-mentioned conflicting functional association relationship is also referred to as a first association relationship.
[0203] If it is determined that the above-mentioned target conflict function exists, step S1202 is executed; if it is determined that the above-mentioned target conflict function does not exist, step S1007 is executed.
[0204] S1202, the electronic device turns off the target conflict function.
[0205] Therefore, according to the functions supported by the electronic device and the functions supported by the external accessories of the electronic device, the target conflict function in the electronic device that conflicts with the functions of the external accessories of the electronic device is turned off, and the user's right to use the target conflict function is restricted, so as to avoid the electronic device presenting a functional effect inconsistent with the target conflict function to the user when using the function of the external accessory and the target conflict function at the same time, resulting in erroneous functional effects that are inconsistent with user expectations and causing trouble to the user.
[0206] In an embodiment of the present application, the external accessory A may include a battery accessory, which can provide energy for the external accessory A.
[0207] In some possible implementations, the electronic device may also charge the external accessory A through a wireless charging protocol. This can further save the hardware cost of the external accessory A, and can also save the hardware volume of the external accessory A, thereby improving the user experience.
[0208] It is understandable that the external accessory A may also have other power supply modes besides the battery power supply and electronic device power supply, which is not limited in this document.
[0209] Embodiment 2:
[0210] Combine the following Fig.13 The method flow chart shown takes the fragrance accessory as the external accessory of the electronic device as an example to illustrate the control method of the external accessory of the electronic device provided in the embodiment of the present application.
[0211] In the embodiment of the present application, after the electronic device discovers the fragrance accessory, it determines whether all system themes (system themes can also be understood as theme resources) in one or more system themes corresponding to the fragrance accessory are installed in the electronic device. If not, the electronic device installs the corresponding system theme that is not installed. Thus, the electronic device can use the system theme corresponding to the fragrance accessory to control the fragrance accessory to emit a preset fragrance corresponding to the system theme used when the electronic device uses the wallpaper corresponding to the system theme supported by the fragrance accessory. The preset fragrance can make people feel comfortable or have the effect of refreshing and invigorating, and the decorativeness of the fragrance accessory is enhanced when it is matched with the wallpaper pattern.
[0212] like Fig.13 As shown, the control method of the external accessories of the electronic device includes:
[0213] S1301, the electronic device discovers fragrance accessory A.
[0214] Exemplarily, the electronic device detects the fragrance accessory A adsorbed on the electronic device through a magnetic sensor.
[0215] It is understandable that the electronic device may also discover the fragrance accessory A in other ways. For details, please refer to the method of discovering the external accessory A described in the above step S1001, which will not be described in detail here.
[0216] S1302: The electronic device obtains configuration information of the fragrance accessory A.
[0217] For details on how to obtain the configuration information of the fragrance accessory A, please refer to the relevant instructions on obtaining the configuration information of the external accessory A described in the above step S1002, which will not be described in detail here.
[0218] Exemplarily, the identification information of the fragrance accessory A includes: accessory category, accessory model and accessory ID.
[0219] S1303: The electronic device determines one or more system themes corresponding to the fragrance accessory A according to the configuration information of the fragrance accessory A.
[0220] In an embodiment of the present application, the configuration information of the fragrance accessory A includes the identification information of the fragrance accessory A. The configuration information of the fragrance accessory A may also include the identification of one or more system themes corresponding to the external accessory A. Among them, the identification information of the fragrance accessory A includes at least the accessory category (that is, the accessory category is a fragrance accessory) and the identification information that can be used to uniquely identify a fragrance accessory. For a detailed explanation of the identification information of the fragrance accessory A, please refer to the relevant explanation in step S1004 above that the identification information of the external accessory A at least includes the identification information that can uniquely identify the external accessory A, which will not be described in detail here.
[0221] In the embodiment of the present application, the fragrance accessory can realize the function of emitting a corresponding preset fragrance according to the theme of the desktop wallpaper (or lock screen wallpaper) of the electronic device. A fragrance accessory can support one or more different fragrance functions. For example, a fragrance accessory A can support one or more of the preset fragrance functions corresponding to the rose theme, the preset fragrance function corresponding to the jasmine theme, and the preset fragrance function corresponding to the sunflower theme.
[0222] One or more system themes corresponding to the fragrance accessory A can be understood as part of the resources required to execute the function corresponding to the external accessory A in the electronic device, that is, a system theme is a theme resource provided by the system theme platform. For example, if the fragrance accessory A supports a preset fragrance function corresponding to a rose, then the system theme corresponding to the fragrance accessory A includes a rose system theme. If the electronic device is installed with the resources of the rose system theme, the electronic device can trigger the fragrance accessory A to implement the corresponding fragrance function (it can be understood that the electronic device controls the external accessory A to implement the fragrance extension function through the preset control software) by displaying the rose system theme resources in the electronic device (it can be understood that the electronic device controls the external accessory A through the preset control software to implement the fragrance extension function). For example, when the electronic device uses a rose-themed wallpaper, the electronic device controls the fragrance accessory A to emit the preset fragrance corresponding to the rose theme through the rose system theme.
[0223] In a possible implementation, the system theme resource may also include control instructions for controlling the operation of the fragrance accessory A (specifically, control instructions for controlling the operation of the fragrance accessory A when the electronic device connected to the fragrance accessory A uses the wallpaper corresponding to the theme resource). Thus, the electronic device can directly use the system theme to control the operation of the external accessory A, and at the same time, display the corresponding wallpaper in the electronic device based on the system theme.
[0224] In one possible implementation, one or more system themes corresponding to the fragrance accessory A may also be control software (applications or tools) for controlling the operation of the fragrance accessory A, that is, a system theme may also be an application, which is not limited in this document.
[0225] In the embodiment of the present application, the electronic device determines one or more system themes corresponding to the fragrance accessory A according to the configuration information of the fragrance accessory A, which can be specifically in the following two ways:
[0226] 1. Exemplarily, the configuration information of the fragrance accessory A includes identifications of one or more system themes corresponding to the fragrance accessory A. Thus, the electronic device can determine the one or more system themes corresponding to the fragrance accessory A according to the configuration information of the fragrance accessory A.
[0227] 2. Exemplarily, the configuration information of the fragrance accessory A includes the identification information of the fragrance accessory A, and the electronic device stores an association relationship D (the association relationship D is the association relationship between the identification information of the fragrance accessory and the identification of one or more system themes). Specifically, the association relationship D can be an association relationship between the accessory ID of the fragrance accessory and the identification of one or more system themes, or an association relationship between the accessory model of the fragrance accessory and the identification of one or more system themes, or an association relationship between the accessory category, accessory model and the identification of one or more system themes of the fragrance accessory. Therefore, the electronic device can determine one or more system themes corresponding to the fragrance accessory A based on the configuration information of the fragrance accessory A and the association relationship D.
[0228] For example, as shown in Table 6 below, the association relationship D is an association relationship between the accessory category, accessory model, and identification of one or more system themes of the fragrance accessory.
[0229] Table 6
[0230]
[0231] Optionally, the above association relationship D can also be stored in the cloud corresponding to the electronic device, and the electronic device can request the cloud to obtain one or more system themes corresponding to the fragrance accessory. For example, one or more system themes corresponding to the accessory category and accessory model of the fragrance accessory. Thus, the electronic device can determine one or more system themes corresponding to the fragrance accessory A based on the configuration information of the fragrance accessory A.
[0232] S1304, the electronic device determines whether there is at least one target system theme, where the target system theme is a system theme that is not installed in the electronic device among the one or more system themes corresponding to the fragrance accessory A.
[0233] Specifically, after the electronic device determines the identification of one or more system themes corresponding to the fragrance accessory A, it determines the identification of the system themes not installed in the electronic device, that is, determines the target system themes. It is understandable that the number of target system themes not installed in the electronic device among the one or more system themes corresponding to the fragrance accessory A is greater than or equal to 1.
[0234] If it is determined that there is at least one of the above-mentioned target system topics, step S1305 is executed; if it is determined that there is not at least one of the above-mentioned target system topics, step S1307 is executed.
[0235] S1305: The electronic device determines, according to the configuration information of the fragrance accessory A, a preset installation address corresponding to each system theme in the at least one target system theme.
[0236] In an embodiment of the present application, the above-mentioned preset installation address can be an installation address for installing or downloading software resources for fragrance accessory A. The installation address can be a website or an application store in an electronic device. This document does not limit the specific expression of the installation method.
[0237] In the embodiment of the present application, the electronic device determines the preset installation address corresponding to each system theme in the at least one target system theme according to the configuration information of the fragrance accessory A in the following two ways:
[0238] 1. Exemplarily, the configuration information of the fragrance accessory A also includes: the preset installation address corresponding to each of the one or more system themes of the fragrance accessory A. Exemplarily, the accessory model of the fragrance accessory A is F1, and the configuration information of the fragrance accessory A also includes the association relationship between the identifier of the system theme and the preset installation address as shown in Table 7 below. Thus, the electronic device can determine the preset installation address corresponding to each system theme in the target system theme according to the association relationship in the configuration information of the fragrance accessory A.
[0239] Table 7
[0240] Identifier of the system topic Default installation address b1 http: / / xiangfen.B1.com.cn b2 http: / / xiangfen.B2.com.cn
[0241] 2. Exemplarily, the electronic device may also store an association relationship E between the identifier of the system theme and the preset installation address. Alternatively, the cloud corresponding to the electronic device stores the association relationship E. Exemplarily, the association relationship E is shown in Table 8 below. Thus, the electronic device can determine the preset installation method corresponding to each system theme in the target system theme according to the identifier of the system theme corresponding to the fragrance accessory A in the configuration information and the association relationship E.
[0242] Table 8
[0243] Identifier of the system topic Default installation address b1 http: / / xiangfen.B1.com.cn b2 http: / / xiangfen.B2.com.cn b3 http: / / xiangfen.B3.com.cn b4 http: / / xiangfen.B4.com.cn b5 http: / / xiangfen.B5.com.cn b6 http: / / xiangfen.B6.com.cn ... ...
[0244] Exemplarily, if the accessory model of the fragrance accessory is F1, the identifiers of the system theme corresponding to the fragrance accessory include b1 (system theme b1) and b2 (system theme b2), and the system theme corresponding to the b1 identifier is installed in the electronic device, but the system theme corresponding to the b2 identifier is not installed; then the above-mentioned target system theme includes the system theme b2, and the preset installation address (which can also be understood as the installation address or download address) corresponding to the system theme b1 is http: / / xiangfen.B2.com.cn.
[0245] 3. Exemplarily, when the identification information of the fragrance accessory A corresponds to only one system theme, the electronic device may also store the association relationship E between the identification information of the fragrance accessory A and the preset installation address. Specifically, the association relationship E may be the association relationship between the accessory model and the preset installation address, or the association relationship between the accessory identification and the preset installation address, or the association relationship between the accessory category, the accessory model and the preset installation address, which is not limited in this document. Alternatively, the association relationship E may also be stored in the cloud corresponding to the electronic device, and the electronic device may request the cloud to obtain the preset installation address corresponding to the target system theme corresponding to the fragrance accessory A.
[0246] S1306: The electronic device installs the corresponding system theme according to the preset installation address corresponding to each system theme in the at least one target system theme.
[0247] Exemplarily, the accessory model of the fragrance accessory A is F3, and the identifiers of the system theme corresponding to the fragrance accessory A include b4, b5, and b6, and the system themes corresponding to the fragrance accessory A that are not installed in the electronic device include b5 and b6. The electronic device then determines the preset installation addresses corresponding to the b5 identifier and the b6 identifier in turn, and installs the system themes corresponding to the b5 identifier and the b6 identifier in turn through the corresponding preset installation addresses. For example, the electronic device first determines the preset installation address corresponding to the b5 identifier, and installs the system theme through the preset installation address corresponding to the b5 identifier. Then, it determines the installation method corresponding to the b6 identifier, and installs the system theme through the preset installation address corresponding to the b6 identifier.
[0248] Regarding how the electronic device specifically installs the corresponding system theme through the preset installation address, please refer to the relevant description of other embodiments of this document (such as the above-mentioned step S1006), which will not be described in detail here.
[0249] S1307, the electronic device controls the external accessory A to operate according to one or more system themes corresponding to the fragrance accessory A.
[0250] In the embodiment of the present application, the electronic device controls the operation of the external accessory A according to one or more system themes corresponding to the fragrance accessory A, which can also be understood as the electronic device and one or more system themes corresponding to the fragrance accessory A cooperate to control the operation of the fragrance accessory A. Specifically, the one or more system themes corresponding to the fragrance accessory A installed in the electronic device can determine the control command to be sent to the fragrance accessory A according to the state of the wallpaper of the electronic device, and then the electronic device communicates with the fragrance accessory A and sends the control command to the fragrance accessory A.
[0251] In some possible implementations, the configuration information of the fragrance accessory A may also include wallpaper information. It is understandable that the wallpaper (desktop wallpaper or lock screen wallpaper) used by the electronic device may be the original wallpaper information of the electronic device, or may be the wallpaper information included in the configuration information of the fragrance accessory A, which is not limited herein.
[0252] Exemplarily, the accessory model of fragrance accessory A is F1, and the system themes corresponding to the fragrance accessory A include system theme b1 (e.g., rose system theme) and system theme b2 (e.g., jasmine system theme). The system theme b1 can detect whether the electronic device is currently using the wallpaper corresponding to the rose system theme (the wallpaper can be a rose wallpaper or other preset wallpapers, such as a mountain wallpaper); if so, the system theme b1 determines the control command that needs to be sent to the fragrance accessory A (the control command can make the fragrance unit corresponding to the rose system theme in the fragrance accessory A work and emit the preset fragrance corresponding to the rose system theme), and then the electronic device communicates with the fragrance accessory A and sends the control command to the fragrance accessory A. Alternatively, the system theme b can also send the above control command to the fragrance accessory A (that is, the control command that makes the fragrance unit corresponding to the rose system theme in the fragrance accessory A work) when the electronic device meets other preset conditions. The other preset conditions may be other conditions in addition to the fact that the electronic device is currently using the wallpaper corresponding to the rose system theme. This document does not limit this. For example, the other conditions may also be that a music application in the electronic device is playing music, or that the calendar in the electronic device indicates that it is currently in a preset season (for example, spring), or that the calendar in the electronic device indicates that it is currently a special holiday (for example, Valentine's Day, Children's Day, etc.).
[0253] It is understandable that the wallpaper currently used by the electronic device may be one type of wallpaper, or the wallpaper currently used by the electronic device may also include multiple types of wallpapers, and the multiple types of wallpapers are played or displayed in turn on the screen of the electronic device. The fragrance emitted by the fragrance accessory A corresponds to the wallpaper currently being played or displayed by the electronic device.
[0254] It is understandable that the wallpaper currently used by the electronic device may refer to the desktop wallpaper currently used by the electronic device, or may refer to the lock screen wallpaper of the electronic device. Exemplarily, when the screen of the electronic device is in the lock screen state, the wallpaper currently used by the electronic device is the lock screen wallpaper of the electronic device. When the screen of the electronic device is in the desktop state (which can also be understood as the electronic device is unlocked, and the screen interface of the electronic device is the system desktop interface or a certain application interface), the wallpaper currently used by the electronic device is the desktop wallpaper of the electronic device.
[0255] In the embodiment of the present application, the theme wallpaper of the electronic device may include theme wallpapers corresponding to one or more system themes supported by the fragrance accessory A, and may also include other theme wallpapers. When the electronic device uses the other theme wallpaper, the fragrance accessory A may not emit the corresponding fragrance, or may emit a default preset fragrance, which is not limited herein. In the embodiment of the present application, the theme wallpaper of the electronic device may be a static theme wallpaper or a dynamic theme wallpaper, which is not limited herein.
[0256] In an embodiment of the present application, the electronic device can also receive a numerical value of the fragrance concentration set by the user in any target system theme of one or more system themes (software resources) of the above-mentioned fragrance accessory A. The target system theme can determine the control instruction that needs to be sent to the fragrance accessory A based on the numerical value of the fragrance concentration. The control instruction is used to instruct the fragrance accessory A to heat the fragrance unit corresponding to the target system theme to a heating temperature consistent with the fragrance concentration.
[0257] In some descriptions of the embodiments of the present application, when the association relationship D is specifically an association relationship between the accessory category, accessory model and identification of one or more system themes of a fragrance accessory, the association relationship D is the same association relationship as the first association relationship described in other embodiments of this document.
[0258] In some descriptions of the embodiments of the present application, association relationship A is also referred to as the third association relationship, association relationship B is also referred to as the fifth association relationship, association relationship C is also referred to as the fourth association relationship, and association relationship F is also referred to as the second association relationship.
[0259] like Fig.13 The control method of the external accessories of the electronic device shown in the embodiment of the present application may further include, before the above step S1307, the control method of the external accessories of the electronic device provided by the embodiment of the present application may further include: the electronic device determines whether the fragrance function needs to be turned on; if it is determined that the fragrance function needs to be turned on, the electronic device turns on the fragrance function. The above step S1307 (the electronic device controls the operation of the external accessory A according to one or more system themes corresponding to the fragrance accessory A) specifically includes: when the fragrance function is turned on, the electronic device controls the operation of the external accessory A according to one or more system themes corresponding to the fragrance accessory A.
[0260] The following is for ease of description, such as Fig.14 The control method of the electronic device external accessory shown in the figure omits the execution subject of the method provided in the embodiment of the present application. Specifically, the execution subject of the method provided in the embodiment of the present application can be an electronic device or a control module of the electronic device external accessory. For the specific description of the control module of the electronic device external accessory, please refer to other embodiments of this document (for example, Fig.10) will not be described in detail here.
[0261] In an embodiment of the present application, the above-mentioned electronic device can determine whether the fragrance function needs to be turned on according to the usage status of the electronic device, such as being in use, near the user, far away from the user, in a closed environment (such as pocket mode), etc.
[0262] For example, Fig.14 As shown, the electronic device determines whether the fragrance function needs to be turned on, which may specifically include:
[0263] S1401, determining whether the electronic device is in use.
[0264] Exemplarily, whether the electronic device is in use can be determined based on the screen light state of the electronic device. That is, when it is determined that the screen of the electronic device is in the screen light state, it indicates that the electronic device is in use.
[0265] Exemplarily, it is also possible to determine whether the electronic device is in use according to the use status of the application of the electronic device. For example, if it is determined that the music application in the electronic device is in the state of playing music, it indicates that the electronic device is in use.
[0266] It is understandable that whether an electronic device is in use may be determined by other means besides the screen light status of the electronic device and the use status of the application of the electronic device, which is not limited in this document.
[0267] If it is determined that the electronic device is not in use, step S1402 is executed; if it is determined that the electronic device is not in use, step S1406 is executed.
[0268] S1402, determining whether the electronic device is in a closed environment.
[0269] Exemplarily, when it is determined that the electronic device is in pocket mode (for example, the electronic device is in an upright state and the distance sensor is blocked, or the infrared proximity sensor in the electronic device is blocked), it is determined that the electronic device is in a closed environment. It is understandable that the closed environment described in the embodiment of the present application can be a bag (single-shoulder bag or double-shoulder bag, etc.) or a clothing pocket. The embodiment of the present application can also determine whether the electronic device is in a closed environment by other methods besides the above-mentioned pocket mode, which is not limited herein.
[0270] If it is determined that the electronic device is not in a closed environment, step S1403 is executed; if it is determined that the electronic device is in a closed environment, step S1408 is executed.
[0271] S1403, determining whether the user is within a preset range of the electronic device.
[0272] In the embodiment of the present application, the above determination of whether the user is within the preset range of the electronic device can also be understood as determining whether the user is far away from the electronic device. The user can be the user of the electronic device or any other user other than the electronic device, which is not limited herein.
[0273] Exemplarily, a distance sensor or infrared sensor in the electronic device can be used to determine whether there is a human body within the above-mentioned preset range of the electronic device. If so, it is determined that the user using the electronic device is within the preset range of the electronic device. Otherwise, it is determined that the user using the electronic device is not within the preset range of the electronic device.
[0274] If it is determined that the user using the electronic device is within the preset range of the electronic device, step S1404 is executed; if it is determined that the user using the electronic device is not within the preset range of the electronic device, step S1408 is executed.
[0275] S1404, determining whether the user is in an anaerobic exercise state.
[0276] Understandably, the oxygen uptake of the human body during anaerobic exercise is very low. If other fragrances are mixed in the air, the oxygen content in the air inhaled by the user will decrease, which will have an adverse effect on the user. Therefore, when the user is in an anaerobic exercise state, the electronic device should not turn on the fragrance function.
[0277] In the embodiment of the present application, anaerobic exercise may include one or more of sprinting, weightlifting, throwing, high jump, long jump, tug-of-war, push-ups, diving or muscle strength training.
[0278] Exemplarily, whether the user is in an anaerobic exercise state can be detected through a sports-related application (such as a sports application or a health application, etc.) in the electronic device.
[0279] Exemplarily, it is also possible to detect whether the user is in an anaerobic exercise state through a wearable device that establishes communication with the electronic device. In the embodiment of the present application, the wearable device that establishes communication with the electronic device can also be understood as a wearable device worn by the user, such as a Bluetooth sports bracelet or a Bluetooth fitness bracelet.
[0280] If it is determined that the user is not in the anaerobic exercise state, step S1405 is executed; if it is determined that the user is in the anaerobic exercise state, step S1408 is executed.
[0281] S1405, determining whether the user is in an aerobic exercise state.
[0282] In the embodiment of the present application, the aerobic exercise state may include one or more of walking, jogging, cycling, Tai Chi, rhythmic gymnastics or yoga.
[0283] Exemplarily, whether the user is in an aerobic exercise state can be detected through a sports application in the electronic device, or through a wearable device that establishes communication with the electronic device.
[0284] If it is determined that the user is in an aerobic exercise state, step S1406 is executed; if it is determined that the user is not in an aerobic exercise state, step S1408 is executed.
[0285] S1406, determining whether the power level of the electronic device is greater than a threshold.
[0286] Exemplarily, the threshold is 25%, that is, it is determined whether the power of the electronic device is greater than 25%. It is understandable that the threshold may also be other appropriate values, which are not limited in this document.
[0287] If it is determined that the power level of the electronic device is greater than the threshold, step S1407 is executed; if it is determined that the power level of the electronic device is not greater than the threshold, step S1408 is executed.
[0288] S1407, determining that the fragrance function needs to be turned on.
[0289] S1408, determining that the fragrance function does not need to be turned on.
[0290] In the embodiment of the present application, the above steps S1401 to S1408 can be executed cyclically. For example, after determining that the fragrance function does not need to be turned on, the electronic device periodically or irregularly executes the above steps S1401 to S1408 cyclically. Or after determining that the fragrance function needs to be turned on and the electronic device turns on the fragrance function, the electronic device can also periodically or irregularly execute the above steps S1401 to S1408 cyclically.
[0291] In some other implementations, after the electronic device turns on the fragrance function and executes the above-mentioned step S1307 (the electronic device controls the operation of the external accessory A according to one or more system themes corresponding to the fragrance accessory A), it may also include: the electronic device determines whether the fragrance function needs to be continuously turned on; if it is determined that the fragrance function needs to be continuously turned on, the electronic device continuously controls the operation of the external accessory A according to one or more system themes corresponding to the fragrance accessory A; if it is determined that the fragrance function does not need to be continuously turned on, the electronic device turns off the fragrance function, which can also be understood as the electronic device does not control the operation of the external accessory A, and even if the electronic device uses the wallpaper corresponding to the system theme supported by the fragrance accessory A, the fragrance accessory A will not emit fragrance.
[0292] The above electronic device determines whether the fragrance function needs to be turned on continuously in the same manner as the above electronic device determines whether the fragrance function needs to be turned on, that is, the electronic device can determine whether the electronic device needs to turn on the fragrance function continuously through the method shown in the above steps S1401 to S1408, wherein the above step S1407 determines that the fragrance function needs to be turned on, including: determining that the fragrance function needs to be turned on continuously. The above step S1408 determines that the fragrance function does not need to be turned on, including: determining that the fragrance function does not need to be turned on continuously.
[0293] In some implementations, after turning off the fragrance function, the electronic device may also determine whether the electronic device needs to turn on the fragrance function again by executing the above steps S1401 to S1408.
[0294] It is understandable that in actual applications, the conditional judgment of determining whether the fragrance function needs to be turned on (or whether the fragrance function needs to be turned on continuously) in the control method of the external accessories of the electronic device may include the above Fig.14 One or more of the judgment steps S1401, S1402, S1403, S1404, S1405 and S1406 shown in the figure, and the one or more steps can be executed simultaneously or sequentially, which is not limited in this document. If the one or more steps are executed sequentially, the sequence of the one or more steps can be arbitrarily combined and is not limited to the following. Fig.14 in the order shown.
[0295] In the embodiment of the present application, the solution content in the above embodiment 1, for example, uses asymmetric encryption to ensure that the configuration information of the external accessory of the electronic device (fragrance accessory A) will not be used by unauthorized electronic devices, such as Fig.11 The scheme for verifying the integrity of the configuration information of the external accessory of the electronic device (fragrance accessory A) is shown as follows: Fig.12 The solution contents of shutting down the target conflicting function in the electronic device that conflicts with the function of the external accessory of the electronic device (fragrance accessory A) and the solution contents of charging the external accessory of the electronic device (fragrance accessory A) by charging the electronic device are also applicable to the following Fig.13 or Fig.14 In the scheme shown, the details can be referred to the relevant description above, which will not be described in detail here.
[0296] about Fig.13 or Fig.14 The execution subject of the control method of the external accessories of the electronic device shown is consistent with the execution subject of the above embodiment 1. For details, please refer to the relevant description in the above embodiment 1, which will not be described in detail here.
[0297] Embodiment 3:
[0298] Combine the following Fig.15 The method flow chart shown in the figure takes the wide-angle lens accessory A as the external accessory of the electronic device as an example to illustrate the control method of the external accessory of the electronic device provided by the embodiment of the present application. Fig.15 As shown, the control method of the external accessories of the electronic device includes:
[0299] S1501, electronic device finds wide-angle lens accessory A.
[0300] Exemplarily, the electronic device detects the wide-angle lens accessory A adsorbed on the electronic device through a magnetic sensor.
[0301] It is understandable that the electronic device may also discover the wide-angle lens accessory A in other ways. Specifically, the method for discovering the external accessory A described in the above step S1001 may be referred to, which will not be described in detail here.
[0302] S1502: The electronic device obtains configuration information of the wide-angle lens accessory A.
[0303] For details on how to obtain the configuration information of the wide-angle lens accessory A, please refer to the relevant instructions on obtaining the configuration information of the external accessory A described in the above step S1002, which will not be described in detail here.
[0304] Exemplarily, the identification information of the wide-angle lens accessory A includes: accessory category, accessory model and accessory ID.
[0305] S1503: The electronic device determines an auxiliary control tool corresponding to the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A.
[0306] In the embodiment of the present application, the electronic device has a photo taking function, and a camera application is stored in the electronic device. The auxiliary control tool corresponding to the wide-angle lens accessory A can be used in conjunction with the camera application in the electronic device to achieve the wide-angle function. Exemplarily, the auxiliary control tool can cooperate with the camera application to receive the user's zoom operation instruction and change different focal lengths to achieve different wide-angle ranges.
[0307] In the embodiment of the present application, the configuration information of the wide-angle lens accessory A includes the identification information of the wide-angle lens accessory A, and the configuration information of the wide-angle lens accessory A may also include the identification of the auxiliary control tool corresponding to the wide-angle lens accessory A. The identification information of the wide-angle lens accessory A includes at least the accessory category (that is, the accessory category is a wide-angle lens accessory) and the identification information for uniquely identifying a wide-angle lens accessory. For the detailed description of the identification information of the wide-angle lens accessory A, please refer to the relevant description in step S1004 above that the identification information of the external accessory A includes at least the identification information that can uniquely identify the external accessory A, which will not be described in detail here.
[0308] In the embodiment of the present application, the electronic device determines the auxiliary control tool corresponding to the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A, specifically in the following two ways:
[0309] 1. Exemplarily, the configuration information of the wide-angle lens accessory A includes an identifier of an auxiliary control tool corresponding to the wide-angle lens accessory A. Thus, the electronic device determines the auxiliary control tool corresponding to the wide-angle lens accessory A according to the identifier of the auxiliary control tool in the configuration information of the wide-angle lens accessory A.
[0310] 2. Exemplarily, the configuration information of the wide-angle lens accessory A includes the identification information of the wide-angle lens accessory A, and the electronic device stores an association relationship F (the association relationship F is the association relationship between the wide-angle lens accessory and the identification of the auxiliary control tool). Specifically, the association relationship F can be an association relationship between the accessory ID of the wide-angle lens accessory and the identification of the auxiliary control tool, or an association relationship between the accessory model of the wide-angle lens accessory and the identification of the auxiliary control tool, or an association relationship between the accessory category, accessory model and identification of the auxiliary control tool of the wide-angle lens accessory. Therefore, the electronic device can determine the auxiliary control tool corresponding to the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A and the association relationship F.
[0311] For example, as shown in Table 9 below, the association relationship E is an association relationship among the accessory category, accessory model, and auxiliary control basis identifier of the wide-angle accessory.
[0312] Table 9
[0313]
[0314] Optionally, the association relationship F may also be stored in a cloud corresponding to the electronic device, and the electronic device may request the cloud to obtain the auxiliary control tool corresponding to the accessory and accessory model of the wide-angle lens accessory A. Thus, the electronic device may determine the auxiliary control tool corresponding to the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A and the association relationship E.
[0315] S1504: The electronic device determines whether an auxiliary control tool for the wide-angle lens accessory A is installed in the electronic device.
[0316] If it is determined that the auxiliary control tool for the wide-angle lens accessory A is not installed in the electronic device, step S1505 is executed; if it is determined that the auxiliary control tool for the wide-angle lens accessory A is installed in the electronic device, step S1507 is executed.
[0317] S1505: The electronic device determines a preset installation address corresponding to the auxiliary control tool of the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A.
[0318] In an embodiment of the present application, the above-mentioned preset installation address can be the installation address of the control tool for installing or downloading the wide-angle lens accessory A. The installation address can be a website or an application store in an electronic device. This document does not limit the specific expression of the installation method.
[0319] In the embodiment of the present application, the electronic device determines the preset installation address corresponding to the auxiliary control tool of the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A, which can be specifically in the following ways:
[0320] 1. Exemplarily, the configuration information of the wide-angle lens accessory A also includes: a preset installation address corresponding to an auxiliary control tool of the wide-angle lens accessory A. Thus, the electronic device can determine the preset installation address of the control tool of the wide-angle lens accessory A according to the configuration information.
[0321] 2. Exemplarily, the configuration information of the wide-angle lens accessory A includes the identifier of the auxiliary control tool corresponding to the wide-angle lens accessory A. After the electronic device determines the identifier of the auxiliary control tool corresponding to the wide-angle lens accessory A according to the configuration information of the wide-angle lens accessory A, it determines the preset installation address corresponding to the auxiliary control tool of the wide-angle lens accessory A according to the identifier of the auxiliary control tool and the association relationship G (the association relationship G is the association relationship between the identifier of the auxiliary control tool and the preset installation address). The association relationship G can be stored in the electronic device or in the cloud corresponding to the electronic device.
[0322] 3. Exemplarily, the configuration information of the wide-angle lens accessory A includes the identification information of the wide-angle lens accessory A, and the electronic device stores the association relationship H between the identification information of the wide-angle lens accessory and the preset installation address. Specifically, reference may be made to the relevant description of the association relationship H between the identification information of the external accessory and the preset installation address in step S1005 above, which will not be described in detail here. Alternatively, the association relationship H may also be stored in the cloud corresponding to the electronic device, and the electronic device may request the cloud to obtain the preset installation address of the auxiliary control tool corresponding to the identification information of the wide-angle lens accessory.
[0323] S1506: The electronic device installs the control tool corresponding to the wide-angle lens accessory A through the preset installation address corresponding to the wide-angle lens accessory A.
[0324] For instructions on how to install the control tool corresponding to the wide-angle lens accessory A in the electronic device or on updating the control tool corresponding to the wide-angle lens accessory A in the electronic device, please refer to the relevant descriptions of other embodiments of this document (such as the above-mentioned step S1006), which will not be described in detail here.
[0325] S1507, the electronic device detects whether a camera application in the electronic device is enabled.
[0326] If it is determined that the camera application in the electronic device is enabled, step S1508 is executed; if it is determined that the camera application in the electronic device is not enabled, step S1507 is executed in a loop.
[0327] S1508 , the electronic device determines whether there is a target conflicting function among the functions supported by the camera application that conflicts with the functions provided by the wide-angle lens accessory A.
[0328] Exemplarily, if the camera application in the electronic device supports a macro function, and the macro function conflicts with the wide-angle function provided by the wide-angle lens accessory A, the electronic device determines that the target conflicting function includes the macro function.
[0329] It is understandable that the camera application may also have other functions besides the macro function that conflict with the wide-angle function provided by the wide-angle lens accessory A, and this document does not limit this.
[0330] If it is determined that the above-mentioned target conflict function exists, step S1509 is executed; if it is determined that the above-mentioned target conflict function does not exist, step S1510 is executed.
[0331] S1509, the electronic device turns off the target conflict function in the camera application.
[0332] S1510, the electronic device controls the operation of the wide-angle lens accessory A through the auxiliary control tool corresponding to the wide-angle lens accessory A and the camera application.
[0333] Thereby, the problem that the software resources of known or unknown external accessories cannot be pre-installed in the electronic device is solved, and the situation is avoided where the electronic device presents a functional effect inconsistent with the target conflict function to the user when using the function of the external accessory and the above-mentioned target conflict function at the same time, resulting in erroneous functional effects being inconsistent with the user's expectations and causing trouble to the user.
[0334] In the embodiment of the present application, the solution content in the above embodiment 1, for example, uses asymmetric encryption to ensure that the configuration information of the external accessories of the electronic device (wide-angle lens accessory A) will not be used by unauthorized electronic devices, such as Fig.11 The scheme for verifying the integrity of the configuration information of the external accessory of the electronic device (wide-angle lens accessory A) is shown as follows: Fig.12 The solution contents of shutting down the target conflicting function in the electronic device that conflicts with the function of the external accessory of the electronic device (wide-angle lens accessory A), and the solution contents of charging the external accessory of the electronic device (wide-angle lens accessory A) by charging the electronic device are also applicable to the following Fig.15 In the scheme shown, the details can be referred to the relevant description above, which will not be described in detail here.
[0335] about Fig.13 or Fig.14 The execution subject of the control method of the external accessories of the electronic device shown is consistent with the execution subject of the above embodiment 1. For details, please refer to the relevant description in the above embodiment 1, which will not be described in detail here.
[0336] The following is an example of the above electronic device. Fig.16 The embodiment is specifically described by taking the electronic device 200 as an example. It should be understood that the electronic device 200 may have more Fig.16 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Fig.16 The various components shown in the EMBODIMENTS 2000 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.
[0337] The electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, a sensor module 270, an audio module 280, a subscriber identification module (SIM) card interface 290, cameras (1 to N, N is a positive integer greater than or equal to 1) 291, a button 292, and a display screen (1 to N, N is a positive integer greater than or equal to 1) 293, etc. The sensor module 270 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor 270A, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0338] Exemplarily, the electronic device 200 may further include components such as a motor and / or an indicator, which is not limited herein.
[0339] 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 200. In other embodiments of the present application, the electronic device 200 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.
[0340] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, 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 into one or more processors.
[0341] The processor 210 may be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 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 210, and thus improves the efficiency of the system.
[0342] In some embodiments, the processor 210 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.
[0343] Exemplarily, the processor 210 may be used to execute the above Figure 10-15 The method or steps of any one of the method embodiments shown in the method embodiments may also be performed by the processor 210 and other modules in the electronic device 200 in cooperation with each other. Figure 10-15 The method or steps of any one of the method embodiments in the embodiments shown are not limited in this document. For example, the magnetic sensor 270A in the electronic device detects an external accessory of the electronic device, and the processor 210 in the electronic device obtains configuration information in the external accessory of the electronic device to execute the control method of the external accessory of the electronic device provided in the embodiment of the present application.
[0344] It should be noted that the specific implementation process can be found in Fig.10 or Fig.17 The specific description of the illustrated embodiment will not be repeated here.
[0345] It is understandable that the electronic device 200 implements the display function through a GPU, a display screen 293, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 293 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0346] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0347] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0348] In the embodiment of the present application, the configuration information of the external accessory A, the fragrance accessory A or the wide-angle lens accessory A may be stored in the internal memory 221, and one or more of the association relationship A, association relationship B, association relationship C, association relationship D, association relationship E, association relationship F and association relationship G may also be stored in the internal memory 221. For the description of the configuration information of the external accessory A, the fragrance accessory A or the wide-angle lens accessory A, the association relationship A, the association relationship B, the association relationship C, the association relationship D, the association relationship E, the association relationship F and the association relationship G, please refer to the relevant description of other method embodiments of the present application, which will not be repeated here.
[0349] The USB interface 230 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the electronic device 200, and can also be used to transfer data between the electronic device 200 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0350] Illustratively, in the embodiment of the present application, the first external accessory and the electronic device may also establish a wired communication connection via USB.
[0351] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0352] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the wireless charging module 243 included in the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device 200. While the charging management module 240 is charging the battery 242, it may also power the electronic device through the power management module 241.
[0353] Illustratively, in the embodiment of the present application, the electronic device can charge the first external accessory through the wireless charging module 243 .
[0354] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory 220, the display screen 293, the camera 291, and the wireless communication module 243. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 241 can also be set in the processor 210. In other embodiments, the power management module 241 and the charging management module 240 can also be set in the same device.
[0355] Exemplarily, in the embodiment of the present application, the power management module 241 may be used to determine whether the power level of the electronic device is greater than the preset threshold.
[0356] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0357] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0358] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 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 250 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 some embodiments, some functional modules of the mobile communication module 250 may be set in the processor 210. In some embodiments, some functional modules of the mobile communication module 250 may be set in the same device as some modules of the processor 210.
[0359] 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, a receiver, etc.), or displays an image or video through a display screen 293. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0360] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0361] In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 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, etc. 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).
[0362] The display screen 293 is used to display images, videos, etc. The display screen 293 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, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 293, where N is a positive integer greater than 1.
[0363] The electronic device 200 can realize the shooting function through ISP, camera 291, video codec, GPU, display screen 293 and application processor.
[0364] The ISP is used to process the data fed back by the camera 291. 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 the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 291.
[0365] The camera 291 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes 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 some embodiments, the electronic device 200 may include 1 or N cameras 291, where N is a positive integer greater than 1.
[0366] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 200 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0367] Video codecs are used to compress or decompress digital videos. The electronic device 200 may support one or more video codecs. Thus, the electronic device 200 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0368] In the embodiment of the present application, the display screen 293 may display the above-mentioned prompt content, and the display screen 293 may display the above-mentioned Figure 2-Figure 4 as well as Figure 6-Figure 9 One or more of the user interfaces shown in .
[0369] The audio module 280 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 280 can also be used to encode and decode audio signals. In some embodiments, the audio module 280 can be arranged in the processor 210, or some functional modules of the audio module 280 can be arranged in the processor 210.
[0370] The electronic device 200 can implement audio functions through the speaker, receiver, microphone, headphone interface, and application processor in the audio module 280. For example, making and receiving calls, playing music, recording, etc. The speaker, also known as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 200 can listen to hands-free calls or music through the speaker. The receiver, also known as a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 200 answers a call or voice message, the voice can be answered by placing the receiver close to the human ear. The microphone, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 260C with the human mouth to input the sound signal into the microphone. The electronic device 200 can be provided with at least one microphone. In other embodiments, the electronic device 200 can be provided with two microphones, which can not only collect sound signals, but also realize noise reduction function. In other embodiments, the electronic device 200 can also be provided with three, four or more microphones to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0371] Fig.17 It is a software structure block diagram of the electronic device 200 according to an embodiment of the present application.
[0372] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, runtime and system library, and kernel layer.
[0373] The application layer can include a series of application packages. Fig.17 As shown, the application package may include applications such as call, camera, gallery, calendar, map, navigation, WLAN, Bluetooth, music, video, short message, etc. (also referred to as application (App)).
[0374] In the embodiment of the present application, the application layer may further include a control module for an external accessory of an electronic device, and the control module for an external accessory of an electronic device is used to execute the control method for an external accessory of an electronic device in the embodiment of the present application (eg Figure 10-Figure 17 steps or methods shown).
[0375] In some embodiments of the present application, the control module of the external accessories of the electronic device may also be located in other layers of the software architecture, such as the application framework layer, the system library, the kernel layer, etc., which is not limited here.
[0376] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0377] like Fig.17 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0378] The window manager is used to manage window programs. The content provider is used to store and obtain data and make the data accessible to applications. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The phone manager is used to provide communication functions for the electronic device 200. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction.
[0379] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.
[0380] The core library consists of two parts: one part is the function that the programming language (for example, Java language) needs to call, and the other part is the core library of the system.
[0381] The application layer and the application framework layer can run in a virtual machine. The virtual machine can execute the programming files (e.g., 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.
[0382] The system library may 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.
[0383] The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, camera drivers, audio drivers, sensor drivers, virtual card drivers, etc.
[0384] Please refer to Fig.18 , please refer to Fig.18 , the following is an example of external accessories of electronic equipment Fig.18 The external accessory 300 shown in the figure is used as an example to illustrate the hardware structure of the external accessory. Fig.18 As shown, the external accessory 300 may include:
[0385] The communication bus 310 is used to realize the connection and communication between these components.
[0386] The magnetic attraction module 320 may specifically include a magnet. The magnetic attraction module 320 may enable the fragrance accessory to contact the electronic device through magnetic attraction, thereby triggering the magnetic sensor of the electronic device to detect an attraction event.
[0387] The storage module 330 is used to store the configuration information of the fragrance accessories.
[0388] The wireless communication module 340 can be used to achieve wireless communication connection with electronic devices.
[0389] Communication interface 350, optionally, the communication interface 350 may include a standard wired interface and / or a wireless interface (such as a USB interface, a WI-FI interface or a Bluetooth interface, etc.).
[0390] The charging module 360 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging module 360 may receive charging input from a wired charger through a USB interface. In some wireless charging embodiments, the charging module 360 includes a wireless charging module, which may receive wireless charging input from an electronic device through a wireless charging coil by means of a wireless charging coil.
[0391] Exemplarily, the external accessory 300 may also include one or more components such as a microprocessor, an operating system, a network communication module, and program instructions, which is not limited herein.
[0392] It is understandable that the external accessory 300 may also include corresponding functional modules. For example, when the external accessory 300 is a fragrance accessory, the external accessory 300 may also include a fragrance module, which may specifically include a fragrance unit; for example, when the external accessory 300 is a wide-angle lens accessory, the external accessory 300 may also include a wide-angle lens module, which may specifically include a wide-angle lens, etc.
[0393] It is understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the external accessory 300. In other embodiments of the present application, the external accessory 300 may include more or fewer components than shown in the figure, or combine some components, or separate 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.
[0394] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0395] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0396] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0397] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling external accessories of an electronic device, applied to the electronic device, characterized in that: The method comprises: Establishing a communication connection with a first external accessory, wherein the first external accessory is used to provide a first extended function for the electronic device; Acquire configuration information of the first external accessory based on the communication connection, wherein the configuration information includes an accessory category of the first external accessory; Determine a target function corresponding to the first external accessory according to the accessory category, the target function including a function that needs to be executed in the electronic device in order to control the first external accessory to implement the first extended function; the accessory category is a fragrance accessory category, the target function includes displaying a picture, audio or video corresponding to a first system theme in the electronic device, the first system theme is any one of one or more system themes corresponding to the configuration information, and the first extended function includes that when the electronic device displays the image, audio or video corresponding to the first system theme, the fragrance accessory emits a preset fragrance corresponding to the first system theme; determining the one or more system themes corresponding to the configuration information; Determine whether there is at least one second system theme, where the second system theme is a system theme among the one or more system themes that has not been downloaded in the electronic device; In the case where it is determined that the target software resource is missing, the target software resource is acquired, the target software resource including the one or more system themes, and the acquiring of the target software resource specifically includes: In the case where it is determined that the at least one second system theme exists, downloading each system theme of the at least one second system theme; The first external accessory is controlled to execute the first extended function, and at the same time, the target function is executed in the electronic device based on the one or more system themes downloaded in the electronic device, and the one or more system themes include each system theme of the at least one second system theme.
2. The method according to claim 1, characterized in that Before controlling the first external accessory to execute the first extended function and executing the target function in the electronic device based on the one or more system themes downloaded in the electronic device, the method further includes: Determine, according to the configuration information, whether there is one or more functions among the functions locally supported by the electronic device that conflict with the functional effect of the first extended function; When it is determined that the one or more functions exist, each of the one or more functions in the local area of the electronic device is turned off.
3. The method according to claim 2, characterized in that The step of, in the case of determining that the one or more functions exist, shutting down each of the one or more functions in the local area of the electronic device specifically includes: In the case of determining that the one or more functions exist, outputting prompt information, wherein the prompt information is used to prompt a user to determine whether to turn off the one or more functions in the electronic device; After receiving a determination instruction to shut down the one or more functions, each of the one or more functions in the local area of the electronic device is shut down.
4. The method according to claim 1, characterized in that: The configuration information includes the accessory category and accessory model of the fragrance accessory, and the determining the one or more system themes corresponding to the configuration information specifically includes: Determine the one or more system themes corresponding to the accessory category and the accessory model of the fragrance accessory in the first association relationship, where the first association relationship is used to represent the association relationship between the accessory category, the accessory model and the system theme of the fragrance accessory.
5. The method according to claim 4, characterized in that The method further comprises: Determine whether to enable the fragrance function of the fragrance accessory; In the case where it is determined that the fragrance function of the fragrance accessory needs to be enabled, determining that the fragrance function of the fragrance accessory is in an enabled state; The controlling the first external accessory to execute the first extended function and executing the target function in the electronic device based on the one or more system themes downloaded in the electronic device specifically includes: When the fragrance function of the fragrance accessory is turned on, the first external accessory is controlled to execute the first extended function, and at the same time, the target function is executed in the electronic device based on the one or more system themes downloaded in the electronic device.
6. The method according to claim 5, characterized in that The determination of whether the fragrance function of the fragrance accessory needs to be enabled specifically includes: Determining whether the electronic device is in use, where the in use state includes that the screen of the electronic device is in a lighted state, or the electronic device is playing a video or audio; When it is determined that the electronic device is in use, determining that the fragrance function of the fragrance accessory needs to be enabled; or, When it is determined that the electronic device is in use and the power level of the electronic device is greater than a preset threshold, it is determined that the fragrance function of the fragrance accessory needs to be enabled.
7. The method according to claim 6, characterized in that The method further comprises: When it is determined that the electronic device is in use, the electronic device is not in pocket mode, and the power level of the electronic device is greater than a preset threshold, determining that the fragrance function of the fragrance accessory needs to be enabled; or, When it is determined that the electronic device is in use, the electronic device is not in pocket mode, the user is not in anaerobic exercise based on a sports application in the electronic device or a wearable device that establishes communication with the electronic device, and the power of the electronic device is greater than a preset threshold, it is determined that the fragrance function of the fragrance accessory needs to be enabled.
8. The method according to claim 1, characterized in that Each of the one or more system themes includes a control instruction, and the controlling the first external accessory to perform the first extended function specifically includes: The first external accessory is controlled to execute the first extended function based on the one or more system themes and the control instruction.
9. A method for controlling external accessories of an electronic device, applied to the electronic device, characterized in that: The method comprises: Establishing a communication connection with a first external accessory, wherein the first external accessory is used to provide a first extended function for the electronic device; Acquire configuration information of the first external accessory based on the communication connection, wherein the configuration information includes an accessory category of the first external accessory; Determine a target function corresponding to the first external accessory according to the accessory category, the accessory category is a fragrance accessory category, the target function includes displaying a picture, audio or video corresponding to a first system theme in the electronic device, the first system theme is any one of one or more system themes corresponding to the configuration information, and the first extended function includes that when the electronic device displays the image, audio or video corresponding to the first system theme, the fragrance accessory emits a preset fragrance corresponding to the first system theme; Determining whether control software is installed in the electronic device; Determine whether there is at least one second system theme, where the second system theme is a system theme among the one or more system themes that has not been downloaded in the electronic device; If it is determined that the control software is not installed in the electronic device, installing the control software; and, In the case where it is determined that the at least one second system theme exists, downloading each system theme of the at least one second system theme; Based on the control software, the first external accessory is controlled to execute the first extended function. Meanwhile, based on the control software and the one or more system themes, the target function is executed in the electronic device.
10. A method for controlling external accessories of an electronic device, applied to the electronic device, characterized in that: The method comprises: Establishing a communication connection with a first external accessory, wherein the first external accessory is used to provide a first extended function for the electronic device; Acquire configuration information of the first external accessory based on the communication connection, the configuration information including an accessory category of the first external accessory, the accessory category being a wide-angle lens, the first extended function including providing a wide-angle function effect for a camera application of the electronic device, and the configuration information further being used to indicate identification information of a macro function that conflicts with a function effect of the first extended function; Determine a target function corresponding to the first external accessory according to the accessory category, the target function including a function that needs to be executed in the electronic device in order to control the first external accessory to implement the first extended function; Detecting whether the electronic device has target software resources required to execute the target function; If it is determined that the electronic device does not have the target software resource, acquiring the target software resource; Determining whether the electronic device locally supports the macro function according to the identification information of the macro function; In the case where it is determined that the electronic device locally supports the macro function, the macro function in the electronic device locally is turned off.
11. The method according to claim 10, characterized in that The configuration information is also used to indicate identification information of a macro function that conflicts with the functional effect of the first extended function, specifically including: The configuration information includes identification information of the macro function; or, The configuration information includes identification information of the wide-angle lens accessory. A second association relationship is stored in the electronic device or the cloud corresponding to the electronic device. The second association relationship is used to represent an association relationship between two functions whose functional effects have a conflicting relationship. The second association relationship includes an association relationship between the identification information of the wide-angle lens accessory and the identification information of the macro function.
12. An electronic device, characterized in that: The electronic device comprises: one or more processors, a memory and a display screen; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 11.
13. A chip system, applied to an electronic device, the chip system comprising one or more processors, the processors being used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-11.
14. A computer program product comprising instructions, characterized in that When the computer program product is run on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 11.
15. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Method and electronic device for identifying accessory
CN104077247A
Method for providing contents corresponding to accessory devices and electronic device thereof
CN108696631A