Atomic service implementation method and device, and storage medium

By encapsulating the capabilities of electronic devices into atomic services and scheduling by a unified manager, the problems of complex capabilities in the existing technology and inconsistent interface protocols are solved, and a lightweight and unified atomic service framework is realized, which simplifies the development process and reduces costs.

CN119938567APending Publication Date: 2025-05-06HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311408752.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The capability calls provided by existing electronic devices need to be nested through multiple layers, and interfaces with different capabilities use different protocols, resulting in long development cycles, high implementation costs, and complex access.

Method used

By encapsulating the capabilities provided by electronic devices into atomic services and being managed and scheduled by a unified atomic service manager, different applications can directly realize the scheduling and use of various atomic services through the atomic service manager, without paying attention to interface protocols or adaptation processing.

Benefits of technology

It realizes atomic service framework that is lightweight, functional atomization, unified interface, and updated service parameter information in the cloud, simplifies the binding and calling process between applications and atomic services, and reduces development complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938567A_ABST
    Figure CN119938567A_ABST
Patent Text Reader

Abstract

The invention provides an atomic service implementation method and device and a storage medium. The capabilities provided by the electronic equipment are individually packaged into atomic services. Therefore, when any application program in the electronic equipment receives a task execution request triggered by a user, the intention corresponding to the task execution request is determined, the corresponding target atomic service information is inquired according to the intention, the target atomic service to be called can be determined, and finally the target atomic service is called according to the target atomic service information. The target atomic service and the application program are bound, so that the application program can directly call the target atomic service to execute the corresponding task execution request. The application program does not need to be directly butted with the interface corresponding to each capability, so that when different capabilities are called, adaptation processing does not need to be carried out, and only the corresponding atomic service needs to be called.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method, device and storage medium for implementing an atomic service. Background Art

[0002] With the continuous development of the Internet and communication technologies, as well as the increasing performance of electronic devices such as mobile phones, the capabilities that electronic devices can provide are endless, bringing various conveniences to users' lives and work.

[0003] However, the entry points corresponding to these capabilities are currently deep, so the invocation of these capabilities requires multiple layers of nesting to access and use. In addition, the interfaces corresponding to different capabilities usually use different interface protocols, which requires complex adaptation processing to use the interfaces corresponding to these capabilities. In other words, the capabilities currently provided by electronic devices have the problems of long development cycles, high implementation costs, and complex access. Summary of the invention

[0004] In order to solve the above-mentioned technical problems, the present application provides an implementation method, device and storage medium of an atomic service, aiming to provide an atomic service framework that is lightweight, functionally atomic, has a unified interface, and service parameter information can be configured and updated in the cloud. By encapsulating capabilities into atomic services, which are then managed and scheduled by a unified atomic service manager, different applications can directly schedule and use various atomic services through the atomic service manager without paying attention to interface protocols or performing adaptation processing.

[0005] In the first aspect, the present application provides a method for implementing an atomic service. The method is applied to an electronic device, and the method includes: in response to a task execution request triggered by a user, determining the intent corresponding to the task execution request; querying the corresponding target atomic service information according to the intent, the target atomic service information is used to identify the target atomic service that executes the task execution request, and the target atomic service includes a corresponding service interface; after querying the target atomic service information corresponding to the intent, binding the application that triggers the task execution request with the target atomic service according to the target atomic service information; after binding with the target atomic service, executing the task execution request through the target atomic service.

[0006] The task execution request may be a trigger instruction for calling any function supported by the electronic device, and the trigger instruction may be an action, a voice, or a text.

[0007] Among them, each capability provided by the electronic device can be individually packaged into an atomic service (which can be referred to as: atomic service).

[0008] For example, the brightness adjustment capability is encapsulated into the brightness adjustment atomic service, the volume adjustment capability is encapsulated into the volume adjustment atomic service, the font size adjustment capability is encapsulated into the font size adjustment atomic service, the navigation capability is encapsulated into the navigation atomic service, and so on.

[0009] Among them, the target atomic service can be regarded as the service interface of the capability to be called to execute the task execution request.

[0010] The task execution request triggered by the user is, for example, voice data about adjusting screen brightness spoken by the user. Accordingly, the target atomic service is, for example, the brightness adjustment atomic service.

[0011] The application may be any application installed in the electronic device, such as a voice assistant (application) that can perform human-computer interaction through voice commands.

[0012] The determination of intent may be accomplished by an intent management service, for details please refer to step 403 in the following embodiment, which will not be described in detail here.

[0013] The query of the target atomic service may be completed by the atomic service manager. For details, please refer to step 405 and step 406 in the following embodiment, which will not be described in detail here.

[0014] The binding of the application program and the target atomic service may refer to steps 408 to 416 in the following embodiment, which will not be described in detail here.

[0015] Among them, executing the task execution request through the target atomic service can refer to steps 417 to 420 in the following embodiment, which will not be repeated here.

[0016] Therefore, the capabilities provided by the electronic device are individually encapsulated into atomic services, and are managed uniformly by the atomic service manager and the atomic service lifecycle management service. In this way, when any application in the electronic device receives a task execution request triggered by a user, by determining the intent corresponding to the task execution request, and then querying the corresponding target atomic service information according to the intent, the target atomic service to be called can be determined, and finally the target atomic service and the application are bound according to the target atomic service information, so that the application can directly call the target atomic service to execute the corresponding task execution request. Since the application does not need to directly connect to the interface corresponding to each capability, there is no need to do adaptation processing when calling different capabilities, and only the corresponding atomic service needs to be called.

[0017] According to the first aspect, according to the intent, the corresponding target atomic service information is queried, including: according to the first mapping relationship, querying the atomic service information that has a corresponding relationship with the intent in the local storage space; wherein the first mapping relationship records the corresponding relationship between each intent and each atomic service information; the queried atomic service information that has a corresponding relationship with the intent is determined as the target atomic service information.

[0018] The local storage space may be, for example, the local cache mentioned in the following embodiments, or may be a storage space in an internal memory.

[0019] The specific implementation details can be found in step 4006 in the following embodiment, which will not be described here in detail.

[0020] According to the first aspect, or any implementation of the first aspect above, the method also includes: when atomic service information that corresponds to the intent is not queried from the local storage space, synchronizing the atomic service information managed in the cloud server to the local storage space; based on the first mapping relationship, re-querying the local storage space for the atomic service information that corresponds to the intent; and determining the queried atomic service information that corresponds to the intent as the target atomic service information.

[0021] The specific implementation details can be found in step 406 in the following embodiment, which will not be described in detail here.

[0022] According to the first aspect, or any implementation of the first aspect above, the method further includes: periodically interacting with the cloud server to synchronize the atomic service information managed in the cloud server to the local storage space.

[0023] In this way, by setting up the electronic device to interact with the cloud server, the atomic service information of different atomic services can be updated through the cloud server for easy management.

[0024] According to the first aspect, or any implementation method of the first aspect above, the application that triggers the task execution request is bound to the target atomic service according to the target atomic service information, including: determining the target atomic service according to the unique identifier in the target atomic service information; querying the binding status of the target atomic service; when the target atomic service is in an unbound state, starting the process of the target atomic service; after starting the process of the target atomic service, establishing a communication connection between the application and the target atomic service based on the binding mechanism; after establishing the communication connection between the application and the target atomic service, updating the binding status of the target atomic service to a bound state, and encapsulating the target atomic service into an application-oriented proxy object; and feeding back the proxy object to the application.

[0025] That is, in a possible implementation, the validity and availability of the target atomic service may not be considered, and subsequent processing may be performed directly according to the binding state. Specific implementation details may be found in step 408 in the following embodiment, and steps 411 to 416 are not described here in detail.

[0026] According to the first aspect, or any implementation of the first aspect above, querying the binding status of the target atomic service includes: performing a legitimacy check on the target atomic service; and when the target atomic service is legal, querying the binding status of the target atomic service.

[0027] According to the first aspect, or any implementation of the first aspect above, when the target atomic service is legal, query the binding status of the target atomic service, including: performing availability detection on the target atomic service; when the target atomic service is available, query the binding status of the target atomic service.

[0028] The specific implementation details can be found in steps 409 to 411 in the following embodiment, which will not be described in detail here.

[0029] According to the first aspect, or any implementation of the first aspect above, the method further includes: when the target atomic service is in a bound state, querying whether there is a proxy object; when the proxy object exists, feeding back the proxy object to the application.

[0030] The specific implementation details can be found in step 411 in the following embodiment, which will not be described here in detail.

[0031] Therefore, when the target atomic service to be called has been bound, there is no need to bind it again. You can directly query whether there is a corresponding proxy object. If not, you only need to encapsulate the appropriate proxy object. This can not only ensure the processing speed, but also avoid unnecessary redundant operations and reduce the occupation of electronic device resources.

[0032] According to the first aspect, or any implementation of the first aspect above, the method also includes: when there is no proxy object, establishing a communication connection between the application and the target atomic service based on a binding mechanism; after establishing the communication connection between the application and the target atomic service, encapsulating the target atomic service into an application-oriented proxy object; and feeding back the proxy object to the application.

[0033] Among them, the binding mechanism is such as the Binder mechanism.

[0034] For specific implementation details, please refer to step 411, step 413 to step 416 in the following embodiment, which will not be described here in detail.

[0035] According to the first aspect, or any implementation of the first aspect above, after executing the task execution request through the target atomic service, the method also includes: after the processing corresponding to the task execution request is completed, clearing the binding status corresponding to the recorded target atomic service; and unbinding the application from the target atomic service.

[0036] According to the first aspect, or any implementation of the first aspect above, unbinding the application from the target atomic service includes: disconnecting the communication connection between the application and the target atomic service.

[0037] According to the first aspect, or any implementation method of the first aspect above, disconnecting the communication connection between the application and the target atomic service includes: starting a scheduled unbinding task; when no binding request for the target atomic service is received within a set time, disconnecting the communication connection between the application and the target atomic service; when a binding request for the target atomic service is received within a set time, canceling the scheduled unbinding task.

[0038] The specific implementation details can be found in steps 421 to 423 in the following embodiment, which will not be described in detail here.

[0039] According to the first aspect, or any implementation of the first aspect above, determining the intent corresponding to the task execution request includes: determining keywords corresponding to the task execution request; and determining the intent corresponding to the task execution request based on the keywords.

[0040] The specific implementation details can be found in steps 401 to 404 in the following embodiment, which will not be described in detail here.

[0041] According to the first aspect, or any implementation method of the first aspect above, determining the keywords corresponding to the task execution request includes: when the task execution request is triggered by the user's voice, obtaining the voice data that triggers the task execution request; converting the voice data into text information; and extracting the keywords corresponding to the task request from the text information.

[0042] The specific implementation details can be found in step 401 in the following embodiment, which will not be described in detail here.

[0043] According to the first aspect, or any implementation method of the first aspect above, executing a task execution request through a target atomic service includes: filling a slot corresponding to the target atomic service according to a keyword; and executing the task execution request through the target atomic service after the slot is filled.

[0044] The specific implementation details can be found in steps 417 to 420 in the following embodiment, which will not be described in detail here.

[0045] According to the first aspect, or any implementation of the first aspect above, before receiving a task execution request triggered by a user, the method also includes: when installing an application, obtaining atomic service information recorded in an extensible markup language file of the application, the atomic service information including: a unique identifier that identifies the uniqueness of the atomic service corresponding to the atomic service information, an icon resource identifier of the atomic service, a tag name of the atomic service, and a description of the capabilities provided by the atomic service; and saving the atomic service information to a local storage space.

[0046] The unique identifier is, for example, the uuid mentioned in the following embodiment.

[0047] The image resource identifier is, for example, the icon mentioned in the following embodiment.

[0048] The label name is, for example, the label mentioned in the following embodiment.

[0049] The capability description information includes, for example, the action mentioned in the following embodiments.

[0050] The specific implementation details can be found in steps 301 to 303 and step 307 in the following embodiment, which will not be described in detail here.

[0051] According to the first aspect, or any implementation method of the first aspect above, the atomic service information is saved to the local storage space, including: sending the atomic service information to the cloud server; receiving the detection result of the cloud server for the atomic service information; when the detection result indicates that the atomic service information is legal, the atomic service information is saved to the local storage space.

[0052] The specific implementation details can be found in steps 301 to 407 in the following embodiment, which will not be described in detail here.

[0053] In the second aspect, the present application provides an atomic service device. The device includes an atomic service manager, an atomic service lifecycle management service and an intent management service; the atomic service manager is used to manage the atomic service information corresponding to each atomic service; the atomic service lifecycle service is used to manage the lifecycle of each atomic service; the intent management service is used to determine the intent corresponding to the task execution request initiated by the application; wherein, when receiving the keywords determined by the application according to the task execution request triggered by the user, the intent management service determines the intent corresponding to the task execution request according to the keywords; the application obtains the target atomic service information of the target atomic service from the atomic service manager according to the intent, and requests the atomic service lifecycle service to bind the target atomic service according to the target atomic service information; the atomic service lifecycle service binds the target atomic service and encapsulates the target atomic service into an application-oriented proxy object; the application fills the slot corresponding to the target atomic service according to the keywords corresponding to the task execution request, and calls the target atomic service through the proxy object.

[0054] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0055] In a third aspect, the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes instructions of the method in the first aspect or any possible implementation of the first aspect.

[0056] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0057] In a fourth aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0058] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0059] In a fifth aspect, the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0060] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0061] In a sixth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.

[0062] The sixth aspect and any implementation of the sixth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the sixth aspect and any implementation of the sixth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0063] In the seventh aspect, the present application provides an atomic service implementation system, which includes an electronic device and a cloud server; the atomic service device provided by the second aspect and any one of the implementation methods of the second aspect is integrated into the operating system of the electronic device; wherein, when an application installed in the electronic device responds to a task execution request triggered by a user, the electronic device and the cloud server schedule the atomic service in accordance with the instructions of the method in the first aspect or any possible implementation method of the first aspect.

[0064] The seventh aspect and any implementation of the seventh aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 is a schematic diagram of the hardware structure of an electronic device shown as an example;

[0066] Figure 2A The hierarchical architecture of software of an electronic device is shown as an example;

[0067] Figure 2BA schematic diagram of the software structure of an electronic device is shown as an example;

[0068] Figure 3A This is a schematic diagram of a user interface for calling up a voice assistant;

[0069] Figure 3B A schematic diagram of a user interface for exemplarily illustrating a method for implementing an atomic service provided in an embodiment of the present application, in which a voice assistant is used to call the brightness adjustment atomic service to adjust brightness;

[0070] Figure 3C The following is a schematic diagram of the interaction of the functional modules involved when the brightness adjustment atomic service is called by a voice assistant to adjust the brightness, which is an exemplary implementation method of the atomic service provided in the embodiment of the present application;

[0071] Figure 4A A schematic diagram of a user interface for adjusting volume by calling the volume adjustment atomic service with the help of a voice assistant is shown as an exemplary method for implementing the atomic service provided in an embodiment of the present application;

[0072] Figure 4B The following is a schematic diagram of the interaction of the functional modules involved when the volume adjustment atomic service is called by a voice assistant to adjust the volume, which is an exemplary implementation method of the atomic service provided in an embodiment of the present application;

[0073] Figure 5 A schematic diagram of the interaction of various functional modules in the registration phase of the atomic service in the implementation method of the atomic service provided in the embodiment of the present application is exemplified;

[0074] Figure 6 A schematic diagram of the interaction of various functional modules in the calling link of the atomic service in the implementation method of the atomic service provided in the embodiment of the present application is exemplified;

[0075] Fig. 7A This is another user interface schematic diagram for exemplarily illustrating a method for implementing the atomic service provided in an embodiment of the present application, in which a voice assistant is used to call the brightness adjustment atomic service to adjust brightness;

[0076] Figure 7B This is another user interface schematic diagram for exemplarily illustrating a method for implementing the atomic service provided in an embodiment of the present application, in which a voice assistant is used to call the brightness adjustment atomic service to adjust brightness;

[0077] Fig. 8A A schematic diagram of a user interface for navigating by calling a navigation atomic service with the help of a voice assistant is provided to exemplarily illustrate a method for implementing an atomic service provided in an embodiment of the present application;

[0078] Figure 8BThis is another user interface diagram for illustrative purposes, showing a method for implementing the atomic service provided in an embodiment of the present application, and using a voice assistant to call a navigation atomic service for navigation;

[0079] Fig. 9 The present invention is a flowchart illustrating a method for implementing an atomic service provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0081] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0082] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0083] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0084] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0085] Some of the terms used in this application are explained below to facilitate understanding by those skilled in the art.

[0086] (1) Atomic service (atomic service)

[0087] An atomic service is an abstract service that is the smallest unit of a service and provides a single-function service interface to the upper layer through an application programming interface (API).

[0088] Specifically in the embodiments provided in the present application, the atomic service is a service interface provided to the application in the application layer, such as the brightness adjustment atomic service and volume adjustment atomic service provided for the voice assistant application in the following embodiments.

[0089] Understandably, atomic services can be understood as encapsulation of capabilities, which can be called repeatedly, thereby maximizing development efficiency.

[0090] For developers, atomic services only need to be developed once and can be deployed on different electronic devices using the same operating system. In this way, for the same application, when the application is installed on different electronic devices, it can access and use the same capabilities without re-adaptation.

[0091] Specifically in the embodiments provided in the present application, atomic services may include, for example, a brightness adjustment atomic service, a calendar setting atomic service, a volume adjustment atomic service, a font size adjustment atomic service, etc., which are not listed one by one here and the present application does not impose any restrictions on this.

[0092] Among them, the brightness adjustment atomic service is an atomic service obtained by encapsulating the brightness adjustment capability (function); the calendar setting atomic service is an atomic service obtained by encapsulating the calendar setting capability; the volume adjustment atomic service is an atomic service obtained by encapsulating the volume adjustment capability; the font size adjustment atomic service is an atomic service obtained by encapsulating the font size adjustment capability.

[0093] In addition, it should be noted that, in one embodiment, the atomic service may also be referred to as an application sub-service, or an atomic service API.

[0094] (2) Service Center

[0095] The service middle platform is designed to support agile application development and operation, and is formed by integrating or at least integrating resources, data, platforms, technologies, tools, businesses, etc. to form a single interface service platform.

[0096] At present, applications belonging to the service middle platform include voice assistant (smart voice), smart vision, smart screen recognition, etc., which are not listed here one by one, and this application does not impose any restrictions on this.

[0097] Among them, when the voice assistant is awakened, it can have natural conversations and instant questions and answers with the user, and then by recognizing keywords in the user's voice, it can adjust the brightness, volume, font, etc., as well as make calls, set alarms, reminders, instant searches and other functions.

[0098] Among them, after the smart vision is turned on, it can support one-click scanning of various QR codes, barcodes, and multi-function codes, as well as support the purchase of identified products on multiple shopping platforms, obtain product names, prices and other information, and support real-time translation and photo translation in multiple languages, as well as support for the identification of flowers, trees, cars, animals and other functions.

[0099] Among them, after the smart screen recognition is turned on, it can support the recognition of content on the screen, such as recognizing foreign languages ​​displayed on the screen and automatically translating them, recognizing products displayed on the screen and automatically comparing prices, recognizing pictures displayed on the screen and automatically extracting text information from pictures, etc.

[0100] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0101] (3) Intent

[0102] meaning Figure 1 The word can be understood as a specific purpose or motivation that people have when they act or speak. Specifically in the field of human-computer interaction, intent can be used to define an intention expressed by the user during the human-computer interaction process, that is, what the electronic device is expected to do, such as adjusting the brightness, adjusting the volume, adjusting the font size, setting the calendar, checking the weather, playing music, buying air tickets, etc., which will not be listed here one by one, and this application does not limit this.

[0103] (4) Slot information

[0104] In the technical solution provided in the embodiment of the present application, the slot information is pre-registered in the cloud server and is used to limit the slot name and type of each slot that need to be filled when calling the corresponding atomic service.

[0105] Taking the slot information of the brightness adjustment atomic service pre-registered in the cloud server as an example, the slot name in the slot information may include setting brightness value, increment setting, and decrement setting. The type of each slot in the slot information may be, for example, that the slot "setting brightness value" is a mandatory type, and the slots "increment setting" and "decrement setting" are optional types.

[0106] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0107] (5) Filling slots

[0108] Filling the slot (filling the slot, or slot filling) is the process of collecting user information by the called atomic service, and is the process of completing the vague or missing intent. For example, in step 417 of the following embodiment, the voice assistant application fills the slot according to the keywords extracted from the user's voice. The specific implementation details can be found in step 417, which will not be repeated here.

[0109] The method for implementing the atomic service provided in the embodiment of the present application can be applied to any electronic device that can perform human-computer interaction with a user.

[0110] In order to better understand the technical solution provided by the embodiments of the present application, before describing the technical solution of the embodiments of the present application, the hardware structure of the electronic device to which the embodiments of the present application are applicable is first described in conjunction with the accompanying drawings.

[0111] The electronic device may be, for example, a mobile phone, a tablet computer, a smart wearable device, a smart home device, etc., which are not listed here one by one and are not limited in this application. The following description will take the mobile phone as an example to illustrate the solution.

[0112] See also Figure 1 Exemplarily, the mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0113] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor (Modem), a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc., which are not listed one by one here and the present application does not limit this.

[0114] In addition, the processor 110 may further include one or more interfaces. The interfaces 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., which are not listed here one by one, and the present application does not limit this.

[0115] In addition, the processor 110 may also be provided with a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0116] The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, etc. For example, the mobile phone 100 can implement audio functions through the application processor and the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, etc. in the audio module 170. For example, the recording and video recording function, and the implementation method of the atomic service provided in the embodiment of the present application, through the voice assistant and the mobile phone 100 to perform human-computer interaction, thereby realizing the adjustment of brightness, volume, font, etc.

[0117] Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, 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., which are not listed here one by one and the present application does not impose any limitation on this.

[0118] Among them, the display screen 194 is used to display images, videos, etc. Specifically, in the technical solution provided in the embodiment of the present application, for example, during the human-computer interaction between the voice assistant and the mobile phone 100, the result of calling the atomic service can be displayed on the display screen for further communication with the user.

[0119] The hardware structure of the mobile phone 100 is introduced here. It should be understood that: Figure 1 The hardware structure of the mobile phone is only an example and does not constitute a specific limitation on the hardware structure of mobile phones and other electronic devices. In specific implementations, the electronic device may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently.

[0120] In addition, it should be noted that the components shown in the figures can be implemented in hardware, software, or a combination of software and hardware.

[0121] Currently, a large number of applications and the capabilities they provide can be provided for the electronic devices with the illustrated structure. However, the entry points corresponding to these capabilities are usually deep. For example, the interface corresponding to capability A is usually nested in the interface corresponding to capability B, and the interface corresponding to capability B is nested in the interface corresponding to capability C. This means that if you want to call the interface corresponding to capability A, you must call the interface corresponding to capability C, then call the interface corresponding to capability B in the interface corresponding to capability C, and finally call the interface corresponding to capability A in the interface corresponding to capability B.

[0122] To facilitate understanding, the following description is given with examples.

[0123] For example, for the ability to adjust brightness, in one possible implementation method, it is necessary to first swap out the drop-down notification bar, that is, it is necessary to first call the interface corresponding to the drop-down notification bar, and then after the drop-down notification bar is displayed on the user interface, the ability to adjust brightness is realized by operating the brightness adjustment function option provided in the drop-down notification bar, thereby realizing the adjustment of the screen brightness of the electronic device.

[0124] For example, in another possible implementation method, you need to first click on the icon of the settings application to start the settings application, then find the entrance to open the brightness adjustment interface in the settings interface, operate the entrance to jump to the brightness adjustment interface (a secondary interface of the settings interface), and then operate the brightness adjustment function options provided in the interface to realize the use of the brightness adjustment capability and thus realize the adjustment of the screen brightness of the electronic device.

[0125] Obviously, whether calling the interface corresponding to the brightness adjustment capability from the pull-down notification bar or calling the interface corresponding to the brightness adjustment capability through the settings application, multiple operations are required. In this way, not only is the access complicated, but the calling of redundant interfaces will also seriously affect the performance of the electronic device.

[0126] In addition, different interface protocols are usually used for interfaces corresponding to different capabilities. This means that when an application, such as a voice assistant application, accesses multiple capabilities, such as adjusting brightness, volume, font size, setting alarms, reminders, etc., complex adaptation processing needs to be performed for the interface corresponding to each capability before it can be applied to its own business.

[0127] In addition, for the interfaces corresponding to the same set of capabilities, even if they are applied to the same application, since the applications are installed on different electronic devices, such as application A is installed on a mobile phone and a tablet computer respectively, the interfaces corresponding to the capabilities accessed in application A also need to be re-adapted in a complex manner according to the type of electronic device.

[0128] It can be seen that the existing capability access method is complex, and the complexity of the access leads to a long development cycle, which in turn causes high implementation costs.

[0129] In view of this, an embodiment of the present application provides a method for implementing atomic services, aiming to provide an atomic service framework that is lightweight, functionally atomic, has a unified interface, and service parameter information can be configured and updated in the cloud. By encapsulating capabilities into atomic services, which are then managed and scheduled by a unified atomic service manager, different applications can directly schedule and use various atomic services through the atomic service manager without paying attention to interface protocols or performing adaptation processing.

[0130] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments.

[0131] Before describing in detail the implementation method of the atomic service provided by the embodiment of the present application, the software structure of the electronic device to which the embodiment of the present application is applicable, that is, the architecture that can be adopted, is first described.

[0132] Specifically, in practical applications, the software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. Among them, the software system used by the electronic device includes but is not limited to the Windows system, the Android system, and the iOS system. For the sake of convenience, the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.

[0133] In addition, it should be understood that the subsequent implementation scheme of the atomic service provided in the embodiment of the present application can also be applied to other systems in the specific implementation.

[0134] See also Figure 2A and Figure 2B , exemplarily illustrating a software layered architecture of an electronic device, and a software structure block diagram of the electronic device based on the layered architecture.

[0135] like Figure 2A As shown, the layered architecture of the electronic device divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some implementations, the Android system is divided into five layers, from top to bottom: application layer (Applications, APP), application framework layer (Application Framework, FWK), system resident service layer (Native layer), hardware abstraction layer (HAL), kernel layer (Linux Kernel, hereinafter referred to as: Kernel).

[0136] It should be noted that FWK can also be understood as a system service framework. The Native layer refers to the local framework and runtime environment, which is also commonly known as the Android runtime and system library.

[0137] Among them, the APP layer may include a series of application packages, such as applications implemented based on the service middle platform, that is, they can access and call various capabilities supported by electronic devices. The FWK layer provides an application programming interface (API) and a programming framework for applications in the APP layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. The Native layer provides some local services and commonly used system libraries. HAL is used to encapsulate hardware drivers and provide a unified interface to the upper-level framework. The Kernel layer is the kernel layer of the operating system, which includes various hardware drivers.

[0138] Specifically in the embodiments of the present application, in order to solve the above technical problems, namely, the access mode of capability access is complex, and due to the complex access, the development cycle is long, which in turn causes the problem of high implementation cost. Based on the native Android architecture, an atomic service framework with lightweight, atomic functions, unified interfaces, and service parameter information that can be configured and updated in the cloud is expanded.

[0139] Continue to see Figure 2AFor example, the extended atomic service framework specifically includes an atomic service application API (also referred to as atomic service) extended in the FWK layer for various applications in the APP layer to call, and an atomic service manager extended in the Native layer.

[0140] Among them, the various atomic services expanded in the FWK layer can provide accessible framework protocols for various applications in the APP layer. The atomic service manager in the Native layer manages various atomic services in a unified manner, and implements a series of activities such as querying, synchronizing, binding, and scheduling these atomic services.

[0141] It should be noted that, in actual applications, the atomic service manager can also be expressed as an atomic service management service, or an atomic service management framework, or an atomic service management module, and this application does not impose any restrictions on this.

[0142] about Figure 2A The specific contents that may be included in the hierarchical architecture of the electronic device shown may be as follows in a possible implementation manner: Figure 2B shown.

[0143] See also Figure 2B For example, the application packages included in the APP layer may include voice assistant, smart vision, smart screen recognition, settings and other applications.

[0144] For details about the functions that can be achieved by voice assistant, smart vision, and smart screen recognition, please refer to the introduction of these three applications in the above embodiments, which will not be repeated here.

[0145] In addition, it should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the APP layer may include more or fewer application programs, and this application does not limit this.

[0146] Continue to see Figure 2B Exemplarily, the FWK layer provides an API and programming framework for the application in the APP layer, which may include various atomic service application APIs expanded by the present application, such as an atomic service for adjusting brightness (hereinafter referred to as: atomic service for adjusting brightness), an atomic service for adjusting volume (hereinafter referred to as: atomic service for adjusting volume), an atomic service for adjusting font size (hereinafter referred to as: atomic service for adjusting font size), an atomic service for adjusting calendar (setting) calendar (hereinafter referred to as: atomic service for adjusting calendar), etc., which are not listed one by one here and the present application does not impose any limitation on this.

[0147] It should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, any capability provided by the operating system of an electronic device can be encapsulated into a corresponding atomic service so that various applications at the APP layer can be called according to the implementation method of the atomic service provided in the embodiment of this application.

[0148] Continue to see Figure 2B , exemplarily, the FWK layer provides the API and programming framework for the applications in the APP layer, and may also include the Android native window manager, resource manager, view system, etc.

[0149] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0150] The view system includes visual controls, such as controls for displaying text and controls for displaying pictures. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures.

[0151] Among them, the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc., which are not listed here one by one and this application does not impose any restrictions on this.

[0152] It should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the FWK layer may also include other Android native APIs and programming frameworks, such as a phone manager, a notification manager, a content provider, etc., which are not listed here one by one, and this application does not limit this.

[0153] Continue to see Figure 2B Exemplarily, the local services and commonly used system libraries provided by the Native layer may include, for example, the Android native Android runtime (Android Runtime) and system libraries.

[0154] Among them, Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The APP layer and FWK layer run in the virtual machine. The virtual machine executes the APP layer and FWK layer Java files as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.

[0155] Among them, the system library can include multiple functional modules. For example: surface manager, media library, three-dimensional (3D) graphics processing library (for example: OpenGL ES), two-dimensional (2D) graphics engine (for example: SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio and video format playback and recording, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.

[0156] In addition, it can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.

[0157] Continue to see Figure 2B For example, specifically in the implementation scheme of the atomic service provided in the embodiment of the present application, the local service extended in the Native layer may include an atomic service manager for managing various atomic services in the FWK layer.

[0158] In addition, it should be noted that in order to be able to obtain the capabilities that the application needs to call in the APP layer, the embodiment of the present application also expands the intent management service in the Native layer.

[0159] In addition, it should be noted that in order to reasonably manage atomic services and reduce the occupation of system resources, the embodiment of the present application also expands the atomic service lifecycle management service in the Native layer.

[0160] In addition, it should be noted that applications usually provide user interfaces to achieve human-computer interaction with users. The interfaces / windows involved in applications can be regarded as Activities in Android. Therefore, the Native layer also needs to include Activity Manager Service (AMS).

[0161] In addition, it should be noted that when installing an application, the APP layer needs to use the Package Manager Service (PMS) to manage all package information, as well as the installation, uninstallation, update, and parsing of AndroidManifest.xml of the application. Therefore, the Native layer also needs to include PMS.

[0162] It can be understood that AndroidManifest.xml is a core file that controls the permissions of various functions in Android program development. The file describes in detail the name and function of each parameter item of Android Manifest.

[0163] In addition, it should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the Native layer may include more or fewer applications in addition to the AMS, PMS, atomic service manager, intent management service, and atomic service lifecycle management service required to implement this case, and this application does not limit this.

[0164] Continue to see Figure 2B For example, the HAL layer encapsulates the hardware driver and provides a unified interface to the upper-level framework, which may include, for example, a camera hardware abstraction layer (interface) for the camera driver, an audio hardware abstraction layer for the audio driver, etc.

[0165] It should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the HAL layer may include more or less unified interfaces corresponding to hardware drivers, and this application does not limit this.

[0166] Continue to see Figure 2B For example, the hardware drivers included in the Kernel layer include sensor drivers, display drivers, audio drivers, etc.

[0167] It should be understood that the above description is only an example listed for better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the Kernel layer may include more or fewer hardware drivers, and this application does not limit this.

[0168] This is the end of the introduction to the software structure of electronic devices. It can be understood that: Figure 2A and Figure 2BThe layers in the software structure shown, and the components contained in each layer, do not constitute a specific limitation on the electronic device. In a specific implementation, the electronic device may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in this application.

[0169] exist Figure 2B Based on the software structure of the electronic device shown, the implementation method of the atomic service provided by the embodiment of the present application is described below in combination with specific embodiments.

[0170] It is understandable that the following specific embodiments may be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0171] In addition, it should be noted that the following embodiments are still described by taking the electronic device as a mobile phone as an example. However, it should be understood that these examples do not constitute a limitation on the technical solution of the present application.

[0172] See also Figure 3A and 3B , exemplifying an application scenario of a method for implementing an atomic service provided in an embodiment of the present application.

[0173] For example, in this embodiment, taking the scenario in which a user adjusts the brightness of a mobile phone through a voice assistant application as an example, the specific scheduling of the atomic service for adjusting brightness during the implementation of the atomic service is explained.

[0174] See also Figure 3A In (1), a mobile phone interface 10a is shown as an example. The interface 10a displays icons of multiple applications, such as an icon 10a-1 of a voice assistant application, and icons of applications such as camera, address book, phone, information, clock, calendar, gallery, memo, file management, email, music, calculator, video, settings, weather, browser, etc.

[0175] It should be noted that in some possible implementations, Figure 3A The interface 10a shown in (1) can be referred to as the main interface. When the user clicks the icon 10a-1 in the interface 10a, the voice assistant application can be awakened, and then the brightness, volume, font size, etc. can be adjusted through voice interaction.

[0176] In addition, it should be noted that in some other possible implementations, the user can also long press the power button to set the duration, such as 1s, to wake up the voice assistant application.

[0177] In addition, it should be noted that in other possible implementations, users can also wake up the voice assistant application through specific wake-up words.

[0178] In addition, it should be noted that in some other possible implementations, the user can also wake up the voice assistant application in the mobile phone through other electronic devices that establish a Bluetooth connection with the mobile phone, such as a smart wearable device.

[0179] In addition, it should be noted that in some other possible implementations, the user can also wake up the voice assistant application in the mobile phone through the play control button of the currently connected wired headset.

[0180] In addition, it should be noted that in some other possible implementations, the voice assistant application can be set to wake up when the phone detects a specified action. The specified action is, for example, the phone is brought to the mouth, and the microphone of the phone senses the user's breath within a short period of time, that is, breath wake-up.

[0181] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0182] When the user wakes up the voice assistant application in the mobile phone through any of the above methods, the mobile phone responds to the corresponding user operation and displays the human-computer interaction window provided by the voice assistant on the current interface, such as Figure 3A Window 10b-1 in interface 10b is shown in (2).

[0183] See also Figure 3A In (2), illustratively, the window 10b-1 may display icons of multiple controls, such as control 10b-11, control 10b-12, control 10b-13, and control 10b-14.

[0184] For example, in a possible implementation, when the user clicks on the control 10b-11, the mobile phone responds to the operation by canceling the window 10b-1 displayed on the current interface, such as Figure 3A The interface 10b shown in (2) is restored to Figure 3A Interface 10a shown in (1).

[0185] Exemplarily, in another possible implementation, when the user slides upward from the control 10b-11, the mobile phone will jump to the recommendation interface of the voice assistant application in response to the operation.

[0186] The so-called recommendation interface can specifically display some popular business entrances or business entrances that users may like, so that users can quickly find the business they want to view in the recommendation interface.

[0187] For example, in one possible implementation, when the user clicks on the control 10b-12, the mobile phone will jump to the recommendation interface of the voice assistant application in response to the operation. That is, the user can slide upward at the control 10b-11, or click on the control 10b-12 to make the mobile phone jump from Figure 3A The interface 10b shown in (2) switches to the recommendation interface of the voice assistant application (which can be regarded as the homepage of the voice assistant application). Regarding the recommendation interface of the voice assistant application, this application will not show it again. This application also does not limit the content included in the voice assistant recommendation interface.

[0188] For example, in a possible implementation, when the user clicks on the control 10b-13, the mobile phone will jump to the personal information interface of the voice assistant (also referred to as: my interface) in response to the operation. The interface may generally include an entrance to view the conversation history, an entrance to the recent traffic content, and an entrance to the voice setting of the voice assistant. The specific style of my interface and the content included are not specifically limited in this application.

[0189] For example, in a possible implementation, the control 10b-14 may be a dynamic icon. The control 10b-14 may change dynamically during the process of collecting user voice information to remind the user that voice information is currently being collected, thereby improving the user experience.

[0190] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0191] For example, when the user displays Figure 3A During the process of window 10b-1 shown in (2), when a voice such as "help me adjust the brightness to 30" is spoken, the audio module of the mobile phone, such as the microphone, can transmit the voice data to the corresponding voice recognition module through the microphone driver after collecting the voice data, so that the voice recognition module can extract keywords, or process the voice to text. In this way, the text content corresponding to the voice data can be displayed in window 10b-1. The voice assistant application will respond to the user's needs and make an answer (such as "OK"), and determine its corresponding intention through the text content corresponding to the voice data, and then call the brightness adjustment atomic service based on the implementation method of the atomic service provided in the embodiment of the present application to achieve brightness adjustment.

[0192] In addition, in order to improve user experience and participation, in some possible implementations, the window 10b-1 will also display related controls related to brightness.

[0193] See also Figure 3BThe interface 10c shown in (1) exemplarily shows a change of the window 10b-1 when making an exemplary feedback in response to a user's brightness adjustment request.

[0194] like Figure 3B As shown in (1), illustratively, during the process of human-computer dialogue interaction between the user and the voice assistant application through voice, the dialogue content of both parties during the entire interaction process can be displayed in the window 10b-1. For example, when the user says the voice "help me adjust the brightness to 30", the text content "help me adjust the brightness to 30" recognized from the voice data can be displayed in the message box 10b-16 on the right side of the window 10b-1, and the answer made by the voice assistant application to this sentence, such as "OK", is displayed in the message box 10b-17 on the left side.

[0195] Continue to see Figure 3B In the interface 10c shown in (1), for example, after the voice assistant application makes a reply, it will determine the corresponding intention through the text content corresponding to the voice data, and then call the brightness adjustment atomic service based on the implementation method of the atomic service provided in the embodiment of the present application to adjust the brightness. At the same time, the relevant controls about brightness are displayed in the window 10b-1, such as the window 10b-2.

[0196] Continue to see Figure 3B In the interface 10c shown in (1), for example, the window 10b-2 may display text and icons related to system settings, as well as a brightness bar 10b-21 and an entrance 10b-23 to an interface for more brightness-related settings.

[0197] It should be noted that the interface entered through the entry 10b-23 may be, for example, a "display and brightness" setting interface corresponding to a "display and brightness" entry provided by a mobile phone setting application. The specific content of the interface is not described in detail here, and this application does not limit it.

[0198] Continue to see Figure 3B In the interface 10c shown in (1), for example, a control 10b-22 for adjusting brightness may be displayed in the brightness bar 10b-21. It is understandable that the position (corresponding brightness) of the control 10b-22 in the brightness bar 10b-21 represents the current brightness. Figure 3B As shown in (1), the position of the control 10b-22 represents that the brightness is adjusted to 30.

[0199] It should be noted that, in one possible implementation, the user can adjust the brightness by manually dragging the control 10b-22. In another possible implementation, the user can also continuously interact with the voice assistant application by voice, and the voice assistant application adjusts the brightness according to the recognized information.

[0200] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0201] Continue to see Figure 3B In (1), illustratively, when the user performs voice interaction with the voice assistant application, window 10b-1 will not display control 10b-11, but will display control 10b-15.

[0202] For example, in a possible implementation, when the user clicks on the control 10b-15, the mobile phone responds to the operation and the window 10b-1 will cover the entire display interface. Figure 3B The interface 10c shown in (1) becomes Figure 3B Interface 10d shown in (2).

[0203] See also Figure 3B In (2), for example, the interface 10d includes Figure 3B Most of the controls and contents in the window 10b-1 shown in (1) are the same as those in the interface 10b-1. The difference is that the control 10b-15 will not be displayed in the interface 10d, but the control 10b-18 will be displayed in the interface 10d.

[0204] Exemplarily, in a possible implementation, when the user clicks on the control 10b-18, the mobile phone responds to the operation. Figure 3B The interface 10d shown in (2) will be restored to Figure 3B Interface 10c shown in (1).

[0205] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0206] In addition, it can be understood that the interface provided in the embodiments of the present application is only used as an example and does not constitute a limitation on the embodiments of the present application.

[0207] based on Figure 2B In the software structure of the electronic device shown in the figure, in the scenario where the user interacts with the voice assistant application (hereinafter referred to as: voice assistant) by voice, as a possible implementation method, the voice assistant application implements the calling process of the brightness adjustment atomic service based on the implementation method of the atomic service provided in the embodiment of the present application as follows Figure 3C shown.

[0208] See also Figure 3C For example, when the voice assistant is awakened, the user sends a voice command to adjust the brightness to the voice assistant, such as "help me adjust the brightness to 30", the voice assistant will parse the voice command and extract keywords. In this embodiment, it can be determined based on the keywords that the atomic service to be called this time is the atomic service for adjusting brightness. Therefore, in response to the voice command, the voice assistant can send a request to the atomic service manager. Specifically, a request is sent to bind the atomic service for adjusting brightness, that is, step 101 is executed.

[0209] Continue to see Figure 3C For example, since all the expanded atomic services are uniformly managed by the atomic service manager, the atomic service manager will query the atomic services under management according to the request sent by the voice assistant, and then query the brightness adjustment atomic service, and bind the brightness adjustment atomic service, that is, execute step 102.

[0210] Continue to see Figure 3C For example, after completing the operation of step 102, the atomic service manager will dispatch the brightness adjustment atomic service to the voice assistant, that is, execute step 103 to provide the voice assistant with the API of the brightness adjustment atomic service. In this way, the voice assistant does not need to adapt the interface that implements the brightness adjustment function, but directly executes step 104 to fill the slot of the brightness adjustment atomic service API according to the brightness adjustment keyword recognized from the voice command, and then the brightness adjustment atomic service can be called to achieve brightness adjustment.

[0211] See also Figure 4A The interface 10e shown in (1) exemplarily illustrates an application scenario of the method for implementing the atomic service provided in an embodiment of the present application.

[0212] For example, in this embodiment, taking the scenario in which a user adjusts the volume of a mobile phone through a voice assistant application as an example, the specific scheduling of the volume adjustment atomic service during the implementation of the atomic service is explained.

[0213] For example, the voice assistant application in the mobile phone is awakened by any of the methods described in the above embodiments, so that the display interface of the mobile phone is displayed as follows: Figure 3AIn the window 10b-1 shown in (2), if the user says "help me adjust the volume to 50", the audio module of the mobile phone, such as the microphone, after collecting the voice data, transmits the voice data to the corresponding voice recognition module through the microphone driver, so that the voice recognition module can extract keywords, or process the voice to text. In this way, the text content corresponding to the voice data can be displayed in the window 10b-1, for example, the recognized text content "help me adjust the volume to 50" can be displayed on the Figure 4A In the message box 10b-16 displayed in the interface 10e shown in (1), the answer made by the voice assistant application to this sentence, such as "OK", is displayed in the message box 10b-17.

[0214] Continue to see Figure 4A In (1), for example, after the voice assistant application makes a reply, it will determine the corresponding intention through the text content corresponding to the voice data, and then call the volume adjustment atomic service based on the implementation method of the atomic service provided in the embodiment of the present application to adjust the volume. At the same time, the relevant controls about the volume are displayed in the window 10b-1, such as the window 10b-3 shown in the interface 10e.

[0215] Continue to see Figure 4A In (1), illustratively, the window 10b-3 may display text and icons related to system settings, as well as a volume bar 10b-31 and an entry 10b-33 for entering an interface for more volume-related settings.

[0216] It should be noted that the interface entered through the entry 10b-33 may be, for example, a "sound and vibration" setting interface corresponding to the "sound and vibration" entry provided by the mobile phone setting application. The specific content of the interface is not described in detail here, and this application does not limit it.

[0217] Continue to see Figure 4A In (1), for example, a volume control 10b-32 for adjusting the volume may be displayed in the volume bar 10b-31. It is understandable that the position (corresponding volume) of the control 10b-32 in the volume bar 10b-31 represents the current volume. Figure 4A As shown in (1), the position of the control 10b-32 represents that the volume is adjusted to 50.

[0218] It should be noted that, in one possible implementation, the user can adjust the volume by manually dragging the control 10b-32. In another possible implementation, the user can also continuously interact with the voice assistant, and the voice assistant adjusts the volume according to the recognized information.

[0219] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0220] Continue to see Figure 4A In (1), illustratively, when the user performs voice interaction with the voice assistant application, the control 10b-11 will no longer be displayed in the window 10b-1, but the control 10b-15 can be displayed.

[0221] For example, in a possible implementation, when the user clicks on the control 10b-15, the mobile phone responds to the operation and the window 10b-1 will cover the entire display interface. Figure 4A The interface 10e shown in (1) becomes Figure 4B Interface 10f shown in (2).

[0222] See also Figure 4A In (2), for example, the interface 10d includes most of the controls and contents in the window 10b-1 shown in the interface 10e. The difference is that the control 10b-15 will no longer be displayed in the interface 10f, but the control 10b-18 will be displayed in the interface 10d.

[0223] Exemplarily, in a possible implementation, when the user clicks on the control 10b-18, the mobile phone responds to the operation. Figure 4A The interface 10d shown in (2) will be restored to Figure 4A Interface 10e shown in (1).

[0224] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0225] In addition, it can be understood that the interface provided in the embodiments of the present application is only used as an example and does not constitute a limitation on the embodiments of the present application.

[0226] based on Figure 2B The software structure of the electronic device shown in the figure, in the scenario where the user interacts with the voice assistant by voice, as a possible implementation method, the voice assistant implements the calling process of the volume adjustment atomic service based on the implementation method of the atomic service provided in the embodiment of the present application as follows Figure 4B shown.

[0227] See also Figure 4BFor example, when the voice assistant is awakened, the user sends a voice command to the voice assistant to adjust the brightness, such as "help me adjust the volume to 50", the voice assistant will parse the voice command and extract the keywords. In this embodiment, it can be determined based on the keywords that the atomic service to be called this time is the volume adjustment atomic service. Therefore, in response to the voice command, the voice assistant can send a request to the atomic service manager. Specifically, a request is sent to bind the volume adjustment atomic service, that is, step 201 is executed.

[0228] Continue to see Figure 4B For example, since all the expanded atomic services are uniformly managed by the atomic service manager, the atomic service manager will query the atomic services under management according to the request sent by the voice assistant, and then query the volume adjustment atomic service, and bind the volume adjustment atomic service, that is, execute step 202.

[0229] Continue to see Figure 4B For example, after completing the operation of step 202, the atomic service manager dispatches the volume adjustment atomic service to the voice assistant, that is, executes step 203 to provide the voice assistant with the API of the volume adjustment atomic service. In this way, the voice assistant does not need to adapt the interface for implementing the volume adjustment function again, and directly executes step 204 to fill the slot of the volume adjustment atomic service API according to the volume adjustment keyword recognized from the voice command, and then the volume adjustment atomic service can be called to achieve volume adjustment.

[0230] The above embodiments only describe the calls of various atomic services by the voice assistant in different scenarios. However, in a specific implementation, when the application in the APP layer calls the atomic service, it is necessary to fill the slot according to the slot information pre-registered by the application (such as steps 104 and 204 in the above example). Therefore, the implementation method of the atomic service provided in the embodiment of the present application may include the registration link (registration slot information) of the atomic service and the calling link of the atomic service.

[0231] Combine the following Figure 5 and Figure 6 Taking the example of a user adjusting the brightness of a mobile phone through a voice assistant, the registration link and the calling link of the atomic service are explained in detail.

[0232] The following is the content of the registration process of the atomic service:

[0233] 301. PMS (Package Manager Service) receives a request to install a voice assistant application.

[0234] Understandably, PMS is a package management system service provided by Android, which is used to manage all package information, as well as application installation, uninstallation, update, and parsing of AndroidManifest.xml and other operations.

[0235] Therefore, when any application is installed in the mobile phone, the PMS will receive a request for the application to be installed. Specifically, in this embodiment, taking the installation of a voice assistant as an example, the installation request received by the PMS is for the voice assistant application.

[0236] Regarding which application the installation request is for, in a possible implementation, it is determined, for example, through package information of the received installation package.

[0237] For example, usually, the package information will carry the package name of the application to be installed, the binary code of the application, resources (application resource files), configuration files, etc. Therefore, the PMS can determine the application currently to be installed according to the package information.

[0238] 302, when the PMS determines that the application to be installed is a voice assistant application, it will perform parsing based on the package information and then install it. Specifically in this embodiment, when the PMS installs the application, it will also issue a broadcast about the currently installed application, such as a voice assistant application. In this way, when the atomic service manager receives the broadcast issued by the PMS, it can know that the application to be installed is a voice assistant application based on the broadcast content.

[0239] Understandably, since the broadcast sent by the PMS carries relevant information of the voice assistant application, such as package information, the atomic service manager can parse the detailed information of various atomic services that the voice assistant application can call from the eXtensible Markup Language (XML) in the application resource file (hereinafter referred to as: atomic service information) after passing the legality check, and then cache them.

[0240] In addition, it should be noted that these atomic service information and intents have established a corresponding relationship. In this way, in the subsequent response to the task execution request triggered by the user, the atomic service information of the atomic service to be called can be determined according to the intent corresponding to the task execution request. Then, according to the atomic service information, the atomic service corresponding to the atomic service information is bound.

[0241] In addition, it should be noted that in actual applications, for the applications that come with electronic devices, the installation packages of these applications are pre-installed in the electronic devices. When the electronic device is turned on for the first time, the PMS will be triggered for installation. For this usage scenario, the atomic service manager can actively obtain the atomic service information in the XML file of the application that needs to be installed by PMS when it is determined that the electronic device is turned on for the first time, and then interact with the cloud server to complete the detection of the legitimacy of the atomic service information, and then cache the atomic service information according to the legal detection structure returned by the cloud server.

[0242] In addition, it should be noted that, in the subsequent use of the electronic device, when the user obtains the installation package of the application from a third party and installs it, the PMS will actively broadcast. In this way, the atomic service manager can register the atomic service information provided by the embodiment of the present application after receiving the broadcast.

[0243] For the specific implementation details of the above-mentioned legality detection, please refer to step 305, which will not be repeated here.

[0244] The relationship between atomic service information and intent can be established in advance according to business needs and stored in a cloud server, or it can be synchronized to the local electronic device according to business needs.

[0245] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0246] 303. The atomic service manager parses the XML file of the voice assistant application and obtains the atomic service information of the atomic service that can be called by the voice assistant application.

[0247] For ease of explanation, the embodiment of the present application uses appclip_infos.xml to represent an XML file that can parse out atomic service information.

[0248] Specifically, appclip_infos.xml declares the basic information of various capabilities supported by the voice assistant application (ie, various atomic services supported for invocation). For ease of explanation, the embodiment of the present application is represented by atomic service information.

[0249] For example, in one possible implementation, the atomic service information included in appclip_infos.xml of the voice assistant application may include atomic service information such as adjusting brightness, adjusting volume, adjusting font size, setting calendar, etc.

[0250] Specifically, in the technical solution provided in the embodiment of the present application, these capabilities are pre-packaged into corresponding atomic services, such as the brightness adjustment atomic service, volume adjustment atomic service, font size adjustment atomic service, calendar setting atomic service, etc. mentioned in the above embodiment.

[0251] Exemplarily, in a possible implementation, the atomic service information corresponding to the atomic service may include at least uuid, icon, label, and action.

[0252] Still taking the voice assistant application as an example, uuid is the unique ID number (identity document, id) of the atomic service that the voice assistant application can dispatch. Using the universally unique identifier (uuid) format, developers can use the uuid generator to generate values ​​by themselves and ensure that this id remains unchanged throughout life.

[0253] Among them, icon is the icon resource id of the atomic service that can be scheduled by the voice assistant application, which can be used when displaying information of the atomic service.

[0254] Among them, label is the label name of the atomic service that can be scheduled by the voice assistant application, which can be used when displaying the information of the atomic service so that the atomic service manager can query the atomic service based on the label name.

[0255] Among them, action is a description of the capabilities provided by the atomic service that can be called by the voice assistant application, that is, the intent (what the user expects the electronic device to do) mentioned in the embodiment of this application. It should be noted that the value of action is the intent value defined in the intent management service (platform).

[0256] The information about the above four atomic services included in appclip_infos.xml may be as follows:

[0257]

[0258]

[0259] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0260] In addition, it should be noted that the above four atomic service information included in appclip_infos.xml can include multiple groups according to the capabilities supported by the voice assistant application. That is, each capability can correspond to a group of atomic service information including uuid, icon, label, and action.

[0261] For example, if the voice assistant supports the following capabilities: adjusting brightness, adjusting volume, adjusting font size, and setting calendar, the intents defined in the intent management service may include adjusting brightness, adjusting volume, adjusting font size, and setting calendar. The names of these four intents may be represented by "SET_BRIGHTNESS", "SET_VOLUME", "SET_FONT_SIZE", and "SET_CALENDAR", for example.

[0262] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0263] 304, the atomic service manager sends the atomic service information parsed from appclip_infos.xml to the cloud server, which performs a legitimacy check.

[0264] Exemplarily, in a possible implementation, the atomic service manager may not send the parsed atomic service information to the cloud server, that is, it does not execute step 305 and step 306, but directly executes step 307.

[0265] 305, the cloud server performs a legitimacy check on the atomic service information.

[0266] Understandably, any application that can be installed in a mobile phone can pre-register the atomic service information of the atomic service that can be normally dispatched in the cloud server when releasing the version. In this way, by sending the atomic service information parsed locally by the mobile phone to the cloud server, the cloud server detects whether the atomic service information parsed locally by the mobile phone matches the atomic service information pre-registered in the cloud server (if the same), and its legitimacy can be determined.

[0267] Exemplarily, after completing the legitimacy check, the cloud server may execute step 306. That is, after completing the legitimacy check, the cloud server may return the legitimacy check result of the atomic service information to the atomic service manager of the electronic device to inform the atomic service manager whether the atomic service information is legal.

[0268] Exemplarily, in a possible implementation, it may be agreed that a certain value is returned, such as "0" for legality and "1" for illegality.

[0269] Exemplarily, in another possible implementation, it may be agreed that returning "true" indicates legality, and returning "false" indicates illegality.

[0270] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0271] It should be noted that for scenarios where the detection result is that the atomic service information is legal, the atomic service manager will execute step 307. For scenarios where the detection result is that the atomic service information is illegal, the atomic service manager will not execute step 307. In the case where the atomic service information is illegal, the voice assistant will not be able to query and bind the atomic service corresponding to the illegal atomic service information through the atomic service manager. For example, when the atomic service information corresponding to the brightness adjustment atomic service is illegal, the electronic device will not be able to call the brightness adjustment atomic service through the atomic service manager, but will need to implement the call through the current separate adaptation processing method, such as by pulling down the notification bar or setting the application to adjust the brightness.

[0272] To facilitate explanation of the implementation method of the atomic service provided in the embodiment of the present application, the detection result obtained in step 305 is that the atomic service information is legal, that is, step 307 is executed as an example.

[0273] 306 , the cloud server sends the atomic service information legality detection result to the atomic service manager.

[0274] 307, the atomic service manager caches the legal atomic service information parsed from the XML file.

[0275] That is, the atomic service manager caches the legal atomic service information parsed from appclip_infos.xml, such as uuid, icon, label, action, and other information.

[0276] Thus, the registration of atomic services is realized, that is, during the application installation phase, the cloud server performs a legality check on the atomic service information of the atomic services that the application can call, and when the atomic service information is legal, the atomic service manager caches the legal atomic service information. In this way, when the application is successfully installed later, during the user's use of the application, the atomic service manager can be used to call the legal atomic services according to the user's needs.

[0277] Understandably, this embodiment only takes the application to be installed as a voice assistant application as an example. In actual applications, the same processing logic can be used to implement the registration of atomic services for any application. For the registration of atomic services that can be called by other applications, this application will not go into details.

[0278] The following still takes the voice assistant application as an example to explain how the voice assistant application calls the brightness adjustment atomic service:

[0279] 401. After receiving the voice data of the user speaking about adjusting the brightness, the voice assistant converts the voice data into text information and extracts keywords from the text information.

[0280] Exemplarily, in a possible implementation, the voice data for adjusting brightness spoken by the user may include a clear brightness value, such as “help me adjust the brightness to 30” or “help me adjust the brightness to 5”.

[0281] For the voice data of “Help me adjust the brightness to 30”, the keywords extracted by the voice assistant after voice-to-text processing may include, for example, “adjust the brightness” and “30”.

[0282] For the voice data of “Help me adjust the brightness to 5”, the keywords extracted by the voice assistant after voice-to-text processing may include, for example, “adjust the brightness” and “5”.

[0283] Exemplarily, in another possible implementation, the voice data for adjusting brightness uttered by the user may include only instruction content for adjusting brightness, but not a specific brightness value, such as “adjust brightness”.

[0284] For the voice data of “adjust brightness”, the keywords extracted by the voice assistant after voice-to-text processing may include “adjust brightness”, for example.

[0285] In addition, it should be noted that, in order to improve the user experience, after the voice assistant converts the voice data into text information, the converted text information can be displayed in the message box 10b-16 in the window 10b-1. Figure 3B Zhong (1) and Figure 3B (2) shows the message box 10b-16 showing "Help me adjust the brightness to 30", Fig. 7A Zhong (1) and Fig. 7A "Help me adjust the brightness to 5" in the message box 10b-16 shown in (2) Figure 7B Zhong (1) and Figure 7B "Adjust brightness" is displayed in the message box 10b-16 shown in (2).

[0286] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0287] 402, the voice assistant sends the extracted keywords to the intent management service.

[0288] For ease of explanation, this embodiment takes the extracted keyword "adjust brightness" as an example, that is, the keyword sent by the voice assistant to the intent management service is "adjust brightness".

[0289] 403. The intent management service determines the corresponding intent based on the keywords sent by the voice assistant.

[0290] Exemplarily, when the keyword is "adjust brightness", the intent management service can determine the intent corresponding to the keyword based on the pre-established relationship between the keyword and the intent.

[0291] For example, in some possible implementations, the relationship between a keyword and an intent may be a one-to-one relationship, that is, one keyword corresponds to one intent.

[0292] For example, in some other possible implementations, the relationship between keywords and intents can also be a many-to-one relationship. That is, multiple keywords correspond to one intent. For example, keywords such as adjust brightness and brightness all correspond to the intent of adjust brightness (later represented by brightness intent).

[0293] For example, in some other possible implementations, the relationship between keywords and intents can also be a one-to-many relationship. That is, one keyword corresponds to multiple intents. For example, the keyword shopping may correspond to the intent of opening a shopping application installed in a mobile phone, or may correspond to the intent of opening a navigation software to view an attached mall.

[0294] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0295] For ease of explanation, this embodiment takes the one-to-one relationship between keywords and intents as an example.

[0296] In addition, it should be noted that the pre-established relationship between keywords and intents can be stored in the cloud server. For this implementation, the intent management service can send the keywords to the cloud server to implement the query of the corresponding intent.

[0297] For example, in some other possible implementations, the relationship between the keyword and the intent stored in the cloud server can also be synchronized to the electronic device according to business needs. In this way, the intent management service can determine the intent corresponding to the currently determined keyword based on the relationship between the keyword and the intent stored locally.

[0298] It should be noted that the intent corresponding to the atomic service may include information such as intent type, intent value, etc. Specifically in this embodiment, taking the atomic service to be called as the brightness adjustment atomic service as an example, when the keyword is "adjust brightness", the determined intent type is, for example, brightness intent.

[0299] It is understandable that, since the target brightness value that needs to be adjusted is not extracted from the voice data this time, the determined intention may only include the intention type, specifically the brightness intention.

[0300] Exemplarily, in another possible implementation, when the keywords are “adjust brightness” and “30”, the determined intent may include brightness intent and brightness value (30).

[0301] Exemplarily, in another possible implementation, when the voice data is "Help me increase the brightness to 50", the extracted keywords are, for example, "brightness", "increase", and "50". For this scenario, the determined intent may include intent type (such as brightness intent), intent value (such as 50), and increment. Conversely, when the voice data is "Help me reduce the brightness to 20", the extracted keywords are, for example, "brightness", "reduce", and "20". For this scenario, the determined intent may include intent type (such as brightness intent), intent value (such as 20), and decrement.

[0302] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0303] In addition, it should be noted that, since the final adjustment can be achieved as long as the intent type and intent value are known, the intention information of increment or decrement can be used as an option.

[0304] In addition, it should be noted that for scenarios where only the intent type can be determined, that is, when the user does not express a clear intent value, based on the implementation method of the atomic service provided in the embodiment of the present application, in one possible implementation, a window 10b-2 of the current brightness value can be displayed in window 10b-1. The corresponding user interface, for example Figure 7B In another possible implementation, the brightness can be automatically adjusted to a suitable value according to the current environment. The corresponding user interface, for example Figure 7B Regarding the interaction logic between the voice assistant, the intent management service, the atomic service manager, the atomic service lifecycle management service, the AMS, and the brightness adjustment atomic service during the process from the user speaking the voice command to the display of the interaction result in the window 10b-1, the specific reference is made to Figure 6 Steps 401 to 423 shown in FIG.

[0305] In addition, it should be noted that the intent management service involved in the embodiments of the present application can be a separate functional module / service, or it can be integrated into a certain functional module / service, or it can be integrated into an application that needs to call an atomic service (for example, integrated into the voice assistant application mentioned in the embodiments of the present application). This application does not impose any restrictions on this.

[0306] 404. The intent management service feeds back the determined intent to the voice assistant.

[0307] Exemplarily, still taking the keyword "adjust brightness" as an example, the determined intent may be, for example, brightness intent.

[0308] 405. The voice assistant sends a brightness intent to the atomic service manager, requesting the atomic service manager to query the atomic service information corresponding to the brightness intent.

[0309] 406. The atomic service manager queries the corresponding atomic service information from the local cache according to the brightness intent sent by the voice assistant.

[0310] From the description of the registration of atomic services above, we can know that during the installation phase of the voice assistant, the atomic service manager will cache the legal atomic service information, such as uuid, icon, label, action, etc., to local management when the atomic service information of the atomic service that the voice assistant can call is legal. The action is used to describe the capabilities of the atomic service, specifically the intent registered in the intent management service. Therefore, the atomic service manager can query the matching atomic service information based on the brightness intent sent by the voice assistant.

[0311] In addition, it should be noted that the atomic service information of various atomic services is pre-registered in the cloud server. Therefore, in order to ensure the synchronization of local information of the mobile phone and the cloud server, the atomic service manager can periodically synchronize the atomic service information from the cloud server.

[0312] For example, in a possible implementation, the atomic service manager synchronizes the atomic service information from the cloud server, for example, the atomic service manager on the mobile phone side can actively request the cloud server at a certain period. In this way, when the atomic service information managed by the cloud server is updated, it can be synchronized to the atomic service manager on the mobile phone side in a timely manner.

[0313] Exemplarily, in another possible implementation, the atomic service manager synchronizes the atomic service information from the cloud server. For example, when the atomic service information is updated, the cloud server actively pushes the changed atomic service information to the atomic service manager on the mobile phone.

[0314] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0315] In addition, it should be noted that after the atomic service manager receives the brightness intent sent by the voice assistant, if the corresponding atomic service information is not found in the local cache, it can actively trigger the operation of synchronizing the atomic service information from the cloud server, and then continue to query the local cache according to the brightness intent. After completing the query, the query result is fed back to the voice assistant.

[0316] Understandably, if the atomic service manager does not query the corresponding atomic service information, in one possible implementation, it can return an agreed invalid value so that the voice assistant knows that the brightness adjustment atomic service cannot be called at present, that is, the user cannot adjust the brightness of the mobile phone screen through the voice assistant. If the atomic service manager queries the corresponding atomic service information, it can directly feed back the queried atomic service information to the voice assistant.

[0317] 407: The atomic service manager feeds back the query result to the voice assistant.

[0318] Specifically in this embodiment, take the atomic service manager querying the atomic service information of the brightness adjustment atomic service corresponding to the brightness intent as an example. That is, the query result fed back by the atomic service manager to the voice assistant includes the atomic service information of the brightness adjustment atomic service, such as the uuid, icon, label, action and other information corresponding to the brightness adjustment atomic service.

[0319] 408. The voice assistant requests the atomic service lifecycle management service to bind the brightness adjustment atomic service according to the uuid of the brightness adjustment atomic service.

[0320] It should be understood that in Android, any service has a corresponding life cycle, so in order to reasonably manage atomic services, the embodiment of the present application will Figure 3C , Figure 4B Some functions implemented by the atomic service manager are implemented by the atomic service lifecycle management service, so as to achieve reasonable management of the lifecycle of the atomic service that needs to be called.

[0321] 409. After receiving the request for binding the brightness adjustment atomic service sent by the voice assistant, the atomic service lifecycle management service requests the atomic service manager to confirm the legitimacy of the brightness adjustment atomic service and whether it is currently available.

[0322] For example, the voice assistant can send the uuid in the queried atomic service information to the atomic service manager for legitimacy.

[0323] For example, when the uuid sent by the voice assistant matches the uuid managed by the atomic service manager (such as the same), it can be determined that the brightness adjustment atomic service to be called by the voice assistant is legal. In this way, it is possible to avoid malicious modification of the voice assistant, resulting in unreasonable calls to the brightness adjustment atomic service.

[0324] It should be noted that at a certain moment, the brightness adjustment atomic service may be called. Therefore, in order to avoid multi-task calls and abnormal usage, the atomic service manager also needs to determine the atomic service to be called based on the uuid, such as whether the brightness adjustment atomic service is currently available.

[0325] For example, in some possible implementations, it may be agreed that when the brightness adjustment atomic service is currently being called, its status is unavailable. Otherwise, it is available.

[0326] For example, in some other possible implementations, it can be agreed that when the brightness adjustment atomic service is called by a set number of tasks (including cases greater than or equal to the set number), its status is unavailable. Otherwise, it is available.

[0327] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0328] 410 , the atomic service manager feeds back the confirmation result to the atomic service lifecycle management service.

[0329] This embodiment takes the brightness adjustment atomic service as an example, which is legal and available.

[0330] It is understandable that if the brightness adjustment atomic service is illegal and / or unavailable, in one possible implementation, the atomic service lifecycle management service will not pull up the brightness adjustment atomic service, bind it, or record the binding status, but will directly feedback to the voice assistant that the brightness adjustment atomic service is unavailable.

[0331] 411, the atomic service lifecycle management service confirms whether the brightness adjustment atomic service is in a bound state.

[0332] Specifically, in a possible implementation, it can be determined by querying the status recorded in the local cache.

[0333] Exemplarily, if the brightness adjustment atomic service is not bound, that is, the recorded status is unbound, step 412 is executed.

[0334] In addition, it should be noted that if the brightness adjustment atomic service has been bound, that is, the process of the brightness adjustment atomic service has been started, in this case, the atomic service lifecycle management service does not need to execute step 412 again.

[0335] Furthermore, if the brightness adjustment atomic service is a request initiated by the voice assistant, the binding is triggered. If this request is still initiated by the voice assistant, directly execute step 416. Anyway, if this request is not initiated by the voice assistant, but by an unrecorded application, step 412 can be skipped and step 413 can be executed.

[0336] This embodiment takes the result of step 411 being unbound as an example.

[0337] 412, the atomic service lifecycle management service requests the AMS to start the process of the brightness adjustment atomic service.

[0338] Specifically, the atomic service lifecycle management service needs to first find the process of the AMS brightness adjustment atomic service to start it, so that the atomic service lifecycle management service can be bound to the brightness adjustment atomic service.

[0339] Accordingly, after starting the process of the brightness adjustment atomic service, the AMS will inform the atomic service lifecycle management service of the starting result so that the atomic service lifecycle management service can perform subsequent processing.

[0340] Understandably, AMS is a key component in the Android system, responsible for managing the application lifecycle, task stack, and interactions between applications. Therefore, if the brightness adjustment atomic service is not called by any application, if you want to access the brightness adjustment atomic service and then implement brightness adjustment, you need to first use AMS to pull up its corresponding process, and then you can bind the brightness adjustment atomic service. In this way, the atomic service lifecycle management service can manage the lifecycle of the brightness adjustment atomic service.

[0341] 413, Atomic Service Lifecycle Management Service Request Binding Brightness Adjustment Atomic Service.

[0342] 414, the brightness adjustment atomic service is successfully bound, and binding status information indicating successful binding is fed back to the atomic service lifecycle management service.

[0343] 415, the atomic service lifecycle management service records the binding state of the brightness adjustment atomic service and encapsulates the brightness adjustment atomic service into a proxy object.

[0344] Specifically, the atomic service lifecycle management service records the binding status information fed back by the brightness adjustment atomic service, such as the two different binding states of bound or unbound, so that when the atomic service manager receives a scheduling request for the brightness adjustment atomic service again in the future, it can first query the binding status of the brightness adjustment atomic service recorded in the local cache to determine whether it is necessary to request the AMS to pull up the brightness adjustment atomic service (when the brightness adjustment atomic service is not bound), or directly initiate a binding request to the brightness adjustment atomic service (the application sending the binding request is different from the record), or directly feed back the previously encapsulated proxy object to the application that needs to call the brightness adjustment atomic service (when the brightness adjustment atomic service is already bound), thereby avoiding repeated requests to the AMS to pull up the brightness adjustment atomic service and repeated encapsulation of proxy objects, thereby reducing resource occupation.

[0345] It should be noted that when recording the binding status information of the brightness adjustment atomic service, the relevant information of the application currently calling the brightness adjustment atomic service can also be recorded, and a corresponding relationship between the two can be established. In this way, if other applications want to call the brightness adjustment atomic service later, they can directly query in the local cache corresponding to the atomic service lifecycle management service. When the brightness adjustment atomic service to be called is already in a bound state, and the application currently calling the brightness adjustment atomic service has been recorded in the local cache and has a corresponding relationship with the brightness adjustment atomic service, the proxy object for calling the brightness adjustment atomic service previously encapsulated for the application can be directly sent to the application.

[0346] For example, if the brightness adjustment atomic service to be called is already in a bound state, but the application that is currently calling the brightness adjustment atomic service is not recorded in the local cache, or has not established a corresponding relationship with the brightness adjustment atomic service, then the relationship between the two can be established and recorded, and at the same time, a proxy object suitable for the application can be separately encapsulated and sent to the application for use.

[0347] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the calling of any atomic service can refer to the calling process of the brightness adjustment atomic service, which will not be repeated here.

[0348] 416, the atomic service lifecycle management service notifies the voice assistant that the brightness adjustment atomic service has been successfully bound, and sends the encapsulated proxy object to the voice assistant for scheduling and use by the voice assistant.

[0349] It should be noted that in Android, each application is an independent process with an independent virtual machine, and the memory between applications cannot share data. However, there are many data transmission operations between applications. In order to achieve communication between application processes, it is necessary to bind applications and services. For example, through the Binder mechanism, the voice assistant and the brightness adjustment atomic service are bound. In this way, after completing the communication connection between the voice assistant and the brightness adjustment atomic service based on the Binder mechanism, the voice assistant can call the brightness adjustment atomic service through the proxy object of the brightness adjustment atomic service encapsulated for it.

[0350] 417, the voice assistant fills the slots according to the keywords extracted from the voice data spoken by the user, and calls the brightness adjustment atomic service through the proxy object.

[0351] For example, in this embodiment, the keywords used when filling the slots are, for example, a specific target brightness value, such as Figure 3B (1) 30 shown in message box 10b-16, or Fig. 7A (1) 5 shown in message box 10b-16.

[0352] According to the above explanation of the slot information, the target brightness value needs to be filled in the slot named "set brightness value".

[0353] In addition, since the "Set brightness value" slot is a mandatory type, when the brightness adjustment atomic service is called to adjust the brightness according to the filled target brightness value, such as 30, the screen brightness can be adjusted to 30.

[0354] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0355] 418, the brightness adjustment atomic service parses the information filled in by the voice assistant according to the template and slot defined on the atomic service framework side, and then adjusts the brightness according to the parsed information.

[0356] Specifically, the purpose of each slot can be determined according to the slot information pre-registered in the cloud server, and then the information required for adjusting the brightness can be parsed from the corresponding slot to achieve brightness adjustment processing.

[0357] 419, the brightness adjustment atomic service feeds back the brightness processing result to the voice assistant.

[0358] Specifically, in some possible implementations, the brightness processing results returned to the voice assistant may include, for example, slots that require further confirmation, brightness cards that can be displayed and adjusted after the setting is completed, text that requires voice prompts, the status after calling the brightness adjustment atomic service, and other information.

[0359] Regarding the scenario where the slot needs to be further confirmed, for example, the brightness value required to be adjusted in the voice data is not suitable for the current environment. In order not to affect the user's use, the user can be further asked whether he wants to adjust the brightness to this brightness value. Fig. 7A As shown in (1), when the user wants to adjust the brightness to 5, the voice assistant senses through the ambient light sensor that the current ambient light is strong (such as daytime). If the brightness is adjusted to 5, the interface may be too dark, which is not conducive to the user viewing the content displayed on the screen. In this case, the voice assistant can make a voice prompt, such as "It's daytime now, is it too dark?", and display the text content of the prompt information in the message box 10b-17 of the window 10b-1.

[0360] At the same time, in order to facilitate further interaction with the user, in this scenario, window 10b-2 may not be displayed first, but window 10b-4 may be displayed.

[0361] Continue to see Fig. 7A In (1), illustratively, the window 10b-4 may display prompt content, such as "Please confirm whether to continue adjusting?", and corresponding functional controls, such as a confirmation control 10b-41 and a cancel control 10b-42.

[0362] Exemplarily, in a possible implementation, the user can click the confirmation control 10b-41 to notify the voice assistant to continue adjusting the brightness to 5. The user can also click the cancel control 10b-42 to notify the voice assistant to cancel the current brightness adjustment operation.

[0363] Exemplarily, in another possible implementation, the user may continue to interact with the voice assistant by voice, telling the voice assistant whether to continue to adjust the brightness to 5, or to cancel the brightness adjustment operation.

[0364] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0365] For example, if the user notifies the voice assistant to continue the operation of adjusting the brightness to 5 through any of the above methods, the voice assistant will respond to the operation and adjust the brightness atomic service through the corresponding proxy object, thereby adjusting the brightness to 5.

[0366] For example, after the voice assistant calls the brightness adjustment atomic service to implement brightness adjustment, the window 10b-1 will not display Fig. 7A The window 10b-4 shown in (1) is displayed instead. Fig. 7A Window 10b-2 (which can be regarded as a brightness card) is shown in (2).

[0367] See also Fig. 7A In (2), illustratively, in window 10b-2, the current brightness value displayed is 5 as required by the user.

[0368] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0369] For example, for a scene in which there is no brightness value in the voice data, in a possible implementation, the following may be directly displayed in the window 10b-1: Figure 7B Window 10b-2 shown in (1). The brightness value displayed in window 10b-2 is the brightness value before the brightness adjustment. In this way, by displaying window 10b-2, the user can directly manually drag control 10b-22 to adjust the brightness. It is also possible to further interact with the voice assistant by voice, and the voice assistant adjusts the brightness according to the brightness value extracted in the new round of interaction.

[0370] For example, for a scenario where there is no brightness value in the voice data, in another possible implementation, the prompt information can be directly displayed in the message box 10b-17 shown in the window 10b-1, and a voice prompt can be given at the same time. For example, the user is prompted to adjust the brightness to a certain value. In this way, by further interacting with the voice assistant through voice, the voice assistant can adjust the brightness according to the brightness value extracted in the new round of interaction.

[0371] For example, for a scenario where there is no brightness value in the voice data, in another possible implementation, the voice assistant may also determine a suitable brightness value according to the current environment, and display the adjusted brightness value in the message box 10b-17, while providing a voice prompt, such as Figure 7B "The brightness has been adjusted to 50 for you" is shown in (2) in the window 10b-1. At the same time, a window 10b-2 with a brightness value of 50 is displayed in the window 10b-1.

[0372] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0373] 420. The voice assistant further calls the brightness adjustment atomic service to adjust the brightness according to the brightness processing result and the user behavior.

[0374] Since the brightness adjustment atomic service has been bound, and the proxy object of the brightness adjustment atomic service encapsulated for the voice assistant has been recorded in the local cache corresponding to the atomic service lifecycle management service, when the voice assistant subsequently adjusts the brightness, it can directly fill the slot according to the keywords extracted each time, and call the proxy object to call the brightness adjustment atomic service, thereby triggering the brightness adjustment atomic service to adjust the brightness and return the corresponding brightness processing result.

[0375] 421, the voice assistant notifies the atomic service lifecycle management service that the brightness adjustment service is completed and requests to unbind the brightness adjustment atomic service.

[0376] Exemplarily, in a possible implementation, the mobile phone window 10b-1 may be set to determine that the brightness adjustment service is completed when no further instructions from the user are received within a set time (such as 5 seconds).

[0377] Exemplarily, in another possible implementation, it may also be configured that after the user clicks on other function controls or a designated area of ​​the mobile phone, it is determined that the brightness adjustment service is completed.

[0378] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0379] 422. After receiving the unbinding request, the atomic service lifecycle management service clears the binding status of the brightness adjustment atomic service recorded in the cache and triggers a scheduled unbinding task. When the scheduled time is reached, the brightness adjustment atomic service is automatically unbound.

[0380] The set timing time is, for example, 5s.

[0381] Understandably, when receiving an unbinding request, unbinding immediately will cause the process corresponding to the brightness adjustment atomic service to enter a frozen state (or dormant state), and it will take a long time to wake up the process from this state and operate normally. Therefore, by triggering a scheduled unbinding task and performing the unbinding operation after the scheduled time is reached, it is possible to avoid the waiting time of the application triggering the unbinding request and then triggering the call request.

[0382] In addition, it should be noted that if a call request triggered by any application is received within the time limit, the unbinding task can be automatically canceled. In this way, the brightness adjustment atomic service will not be unbound after the time limit is reached.

[0383] In addition, it should be noted that in some possible implementations, the atomic service lifecycle management service can also be set to directly trigger the operation of unbinding the brightness adjustment atomic service after receiving the unbinding request, thereby reducing the occupation of device resources by the brightness adjustment atomic service.

[0384] 423. After unbinding the brightness adjustment atomic service, the atomic service lifecycle management service notifies the brightness adjustment atomic service to unbind.

[0385] For example, after the brightness adjustment atomic service is unbound, the process of the brightness adjustment atomic service can be killed, or the priority of the brightness adjustment atomic service process can be reduced to enter a frozen state, thereby reducing the occupation of mobile phone resources.

[0386] It should be noted that in actual applications, there may be anomalies in the process of the brightness adjustment atomic service, that is, the brightness adjustment atomic service cannot be called normally. Therefore, the atomic service lifecycle management service can not only monitor the process status of the voice assistant, but also monitor the process status of the brightness adjustment atomic service process. In this way, the atomic service lifecycle management service can perform cache-related processing in a timely manner according to the process status of both parties.

[0387] In addition, it should be noted that in actual applications, for the same capability (function), electronic devices may integrate multiple implementation entrances, that is, encapsulate different atomic services. For example, for navigation capabilities, there may be a navigation atomic service provided by map application 1 (for the sake of distinction, it is subsequently described as: the first navigation atomic service), and a navigation atomic service provided by map application 2 (for the sake of distinction, it is subsequently described as: the second navigation atomic service). For the sake of convenience, taking the scenario in which the voice assistant can implement the call of these two navigation atomic services through the atomic service manager as an example, the voice assistant's call to multiple atomic services of the same capability is specifically described.

[0388] For example, when the user wakes up the voice assistant, the phone screen displays the following Figure 3A In the process of the interface 10b shown in (2), if the user says "Help me navigate to the train station", the voice assistant will convert the voice data into text and display it in the message box 10b-16, such as Fig. 8A At the same time, the voice assistant will extract keywords from the converted text information. That is, when the mobile phone collects the user's voice saying "help me navigate to the train station", the voice assistant will follow similar Figure 6 In step 401 of the illustrated embodiment, voice data is converted into text information, and keywords are extracted from the converted text information.

[0389] Exemplarily, after the voice assistant extracts the keywords according to step 401 of the above embodiment, it will Figure 6 The processing logic of step 402 to step 404 of the illustrated embodiment determines the corresponding intent.

[0390] Exemplarily, when it is determined that the intention is navigation (subsequently expressed as navigation intention), the voice assistant will initiate a request to the atomic service manager to query the atomic service information corresponding to the navigation intention, that is, perform the operation of step 405 in the above embodiment.

[0391] Specifically in the embodiment of the present application, since two navigation atomic services, namely the first navigation atomic service and the second navigation atomic service, are encapsulated in the operating system of the mobile phone, in a possible implementation, for example, when the mobile phone locally caches the atomic service information of the first navigation atomic service (hereinafter referred to as the first navigation atomic service information) and the atomic service information of the second navigation atomic service (hereinafter referred to as the second navigation atomic service information), when the atomic service manager performs an operation similar to step 406, it can query the first navigation atomic service information and the second navigation atomic service information from the cache according to the navigation intention.

[0392] Exemplarily, in a possible implementation, the atomic service manager may feed back both the queried first navigation atomic service information and the second navigation atomic service information to the voice assistant, that is, perform an operation similar to step 407 .

[0393] Exemplarily, in one possible implementation, the atomic service manager may display the icons of the navigation applications that provide these two available navigation atomic services in window 10b-1 according to the icons respectively carried in the first navigation atomic service information and the second navigation atomic service information, so that the user can confirm which navigation atomic service to call.

[0394] Continue to see Fig. 8A In (1), for example, a window 10b-5 may be displayed in the window 10b-1. The window 10b-5 may display prompt information, such as "Please select a map application", and the icon and name of each determined navigation atomic service. Fig. 8A (1) shows information that the icon is icon1 and the name is map application 1, and the icon is icon2 and the name is map application 2.

[0395] For example, in one possible implementation, the user can manually click on the map application option to be selected. In another possible implementation, the user can also tell the voice assistant which map application to select through voice commands. In this way, the voice assistant can request the atomic service lifecycle management service to bind the navigation atomic service corresponding to the map application selected by the user according to the uuid of the navigation atomic service.

[0396] Continue to see Fig. 8A In (1), for example, when the user determines the navigation atomic service to be selected by any of the above methods, for example, the first navigation atomic service corresponding to the map application 1 is selected, the navigation atomic service is selected in a similar manner. Figure 6 In the steps 408 to 419 of the embodiment shown in the figure, the voice assistant will call the first navigation atomic service, and then directly Fig. 8A The interface 10k shown in (1) jumps to the navigation interface provided by the map application 1, such as Fig. 8A Interface 10m shown in (2).

[0397] See also Fig. 8A In (2), for example, the interface 10m may include multiple controls, such as a control 10m-1 for exiting the interface 10m, and a control 10m-2 for prompting the user to listen to further voice instructions from the user. When the user clicks the control 10m-1, the mobile phone responds to the operation and can return to Fig. 8A The interface 10k shown in (1) can also be returned to Figure 3A Interface 10b shown in (2).

[0398] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0399] Continue to see Fig. 8A In (2), for example, in the interface 10m, multiple locations related to the destination, such as a train station, may also be displayed, such as four destination points displayed in the map area, as well as the specific names of the four destination points, and the distances from the user's current location.

[0400] For example, in one possible implementation, the user may manually select the destination (end point) or determine it through voice instructions, and this application does not limit this.

[0401] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0402] In addition, it should be noted that, when the intention is determined to be navigation, for a scenario where the mobile phone's operating system encapsulates two navigation atomic services, the first navigation atomic service and the second navigation atomic service. In another possible implementation, the voice assistant may only return the atomic service information of a default navigation atomic service. For this implementation, the voice assistant may directly answer in window 10b-1, such as Figure 8B "OK" shown in (1). And send the uuid in the atomic service information of the navigation atomic service returned by default to the atomic service lifecycle management service. Taking the atomic service information of the navigation atomic service returned by default as the first navigation atomic service information as an example, the atomic service manager will query the first navigation atomic service information and the second navigation atomic service information from the local cache according to the navigation intent, and then perform an operation similar to step 407. Specifically, return the first navigation atomic service information to the voice assistant.

[0403] For example, after receiving the first navigation atomic service information fed back by the atomic service manager, the voice assistant will initiate a request to bind the first navigation atomic service to the atomic service lifecycle management service according to the uuid of the first navigation atomic service carried in the first navigation atomic service information, so that Figure 6 Steps 408 to 419 of the illustrated embodiment implement the call to the first navigation atomic service, thereby directly Figure 8B The interface 10n shown in (1) jumps to the navigation interface provided by the map application 1, such as Figure 8B Interface 10m shown in (2).

[0404] about Figure 8B The interface 10m shown in (2) is Fig. 8A The interface 10m shown in (2) is similar and will not be described again here.

[0405] In addition, for the unbinding of the First Navigation Atomic Service, Figure 6 The operation of unbinding the brightness adjustment atomic service in the embodiment shown is similar, and can be referred to in detail. Figure 6 Steps 421 to 423 of the illustrated embodiment are not described in detail here.

[0406] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0407] Therefore, based on the lightweight, functionally atomic, interface-unified, service parameter information cloud-configurable and updateable atomic service framework provided in the embodiment of the present application, by encapsulating capabilities into atomic services, which are then managed and scheduled by a unified atomic service manager, and managed by a unified atomic service lifecycle management service for their lifecycle, different applications can directly schedule and use various atomic services through the atomic service manager and the atomic service lifecycle management service, without paying attention to interface protocols or performing adaptation processing.

[0408] Based on the description of the above embodiments, the implementation method of the atomic service provided by the present application can be processed as follows in the actual implementation process: Fig. 9 shown.

[0409] See also Fig. 9 , a flow chart showing an implementation method of an atomic service is exemplified. In this embodiment, the implementation method of the atomic service may include:

[0410] 501 , the application program responds to a task execution request triggered by a user and determines a keyword corresponding to the task execution request.

[0411] Among them, the application program that responds to the task execution request triggered by the user can be any application program installed in the electronic device, such as a voice assistant (application) that can perform human-computer interaction through voice commands.

[0412] The task execution request may be a trigger instruction for calling any function supported by the electronic device, and the trigger instruction may be an action, a voice, or a text.

[0413] Among them, each capability provided by the electronic device can be individually packaged into an atomic service application programming interface (which can be referred to as: atomic service).

[0414] For example, the brightness adjustment capability is encapsulated into the brightness adjustment atomic service, the volume adjustment capability is encapsulated into the volume adjustment atomic service, the font size adjustment capability is encapsulated into the font size adjustment atomic service, the navigation capability is encapsulated into the navigation atomic service, and so on.

[0415] The target atomic service application programming interface may be regarded as the atomic service application programming interface corresponding to the capability currently required to be called.

[0416] Exemplarily, when the application is the voice assistant mentioned in the above embodiments, the task execution request triggered by the user can be voice data spoken by the user about adjusting the screen brightness, such as "Help me adjust the brightness to 30", or "Help me adjust the brightness to 5", or "Adjust the brightness" etc. mentioned in the above embodiments.

[0417] Correspondingly, when the task execution request triggered by the user may be voice data spoken by the user regarding adjusting the screen brightness, the target atomic service application programming interface may be the aforementioned brightness adjustment atomic service application programming interface.

[0418] Exemplarily, when the application is the voice assistant mentioned in the above embodiment, the task execution request triggered by the user may also be voice data spoken by the user about adjusting the volume, such as "help me adjust the volume to 50".

[0419] Correspondingly, when the task execution request triggered by the user may also be voice data about adjusting the volume spoken by the user, the target atomic service application programming interface may be the aforementioned atomic service application programming interface for adjusting the volume.

[0420] Exemplarily, when the application is the voice assistant mentioned in the above embodiment, the task execution request triggered by the user may also be voice data about navigation spoken by the user, such as "Help me navigate to the train station."

[0421] Correspondingly, when the task execution request triggered by the user can also be the voice data about navigation spoken by the user, the target atomic service application programming interface can be the above-mentioned navigation atomic service application programming interface, such as the first navigation atomic service and the second navigation atomic service mentioned in the above embodiments.

[0422] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0423] For details on how to determine the corresponding keywords based on voice data, see Figure 6 The description of step 401 in the illustrated embodiment will not be repeated here.

[0424] 502. The intent management service determines the intent corresponding to the task execution request based on the keyword.

[0425] For example, the application is a voice assistant, and the task execution request is a voice command to adjust the screen brightness. The specific implementation details of the intent management service in step 502 determining the intent corresponding to the task execution request based on the keyword can be found in Figure 6 The description of step 402 to step 404 in the illustrated embodiment will not be repeated here.

[0426] 503. The application queries the target atomic service information corresponding to the intent through the atomic service manager according to the intent.

[0427] Among them, in the specific implementation, the interaction logic between the application and the atomic service manager is, for example: first, the application sends the intent to the atomic service manager; then, the atomic service manager queries the local storage space corresponding to the atomic service manager for atomic service information whose capability described by the action matches the intent based on the intent, and when there is atomic service information matching the intent in the local storage space, the queried atomic service information is fed back to the application as the target atomic service information.

[0428] Exemplarily, in another possible implementation, when there is no atomic service information matching the intent in the local storage space, the atomic service manager can synchronize the atomic service information managed by the cloud server; then after synchronizing the atomic service information from the cloud server, the atomic service manager re-queries the atomic service information matching the intent in the local storage space. Similarly, when atomic service information matching the intent is queried, the atomic service manager feeds the queried atomic service information back to the application as the target atomic service information.

[0429] It is understandable that if no atomic service information matching the intent is found through the query, in one possible implementation, the atomic service manager may feedback a default invalid instruction / message to the application to inform the application that the target atomic service corresponding to the task execution request cannot be called at present, that is, the corresponding capability cannot be called for processing.

[0430] For specific implementation details of step 503, please refer to Figure 6 The description of steps 405 to 407 in the illustrated embodiment will not be repeated here.

[0431] In addition, the atomic service manager can also periodically interact with the cloud server to synchronize the atomic service information managed by the cloud server.

[0432] For details on how the atomic service periodically interacts with the cloud server and synchronizes the atomic service information managed by the cloud server, see Figure 6 The embodiments shown will not be described in detail here.

[0433] 504. The application requests the atomic service lifecycle management service to bind the target atomic service to the application according to the target atomic service information.

[0434] Among them, the target atomic service information is the atomic service information corresponding to the atomic service currently required to be called. Exemplarily, the target atomic service information needs to at least include the uuid, icon, label, action and other information mentioned in the above embodiment. For the specific description of these atomic service information, please refer to the above embodiment, which will not be repeated here.

[0435] Specifically in this embodiment, the application sends the unique identifier (ie, uuid) of the target atomic service to the atomic service lifecycle management service to request the atomic service lifecycle management service to learn which atomic service currently needs to be bound.

[0436] For specific implementation details of step 504, please refer to Figure 6 The description of step 408 in the illustrated embodiment will not be repeated here.

[0437] 505, the atomic service lifecycle management service binds the target atomic service to the application and encapsulates the target atomic service into an application-oriented proxy object.

[0438] In a specific implementation, the specific logic of the atomic service lifecycle management service implementation step 505 is, for example:

[0439] First, the atomic service lifecycle management service sends the unique identifier to the atomic service manager and requests the atomic service manager to verify the target atomic service, for example, requesting the atomic service manager to verify whether the target atomic service is legal and currently available.

[0440] Then, after the target atomic service passes the verification, the atomic service lifecycle management service binds the target atomic service and encapsulates the target atomic service into a proxy object for the application that triggers the task execution request. For example, when the target atomic service is legal and available, the atomic service lifecycle management service obtains the status information of the target atomic service; when the target atomic service is in an unbound state, the atomic service lifecycle management service requests the activity management service to pull up the process corresponding to the target atomic service; after the process corresponding to the target atomic service is pulled up, the atomic service lifecycle management service binds the target atomic service.

[0441] In addition, it should be noted that when the target atomic service is in a bound state, the atomic service lifecycle management service queries the proxy object corresponding to the application; when there is a proxy object corresponding to the application, the atomic service lifecycle management service notifies the application that the target atomic service application interface is successfully bound, and provides the proxy object to the application; when there is no proxy object corresponding to the application, the atomic service lifecycle management service encapsulates the target atomic service into the proxy object corresponding to the application encapsulation, notifies the application that the target atomic service application interface is successfully bound, and provides the proxy object to the application.

[0442] In addition, it should be noted that after the atomic service lifecycle management service binds the target atomic service, the atomic service lifecycle management service records the state information of the target atomic service as the binding state and encapsulates the target atomic service into a proxy object corresponding to the application encapsulation.

[0443] For specific implementation details of step 505, please refer to Figure 6 The description of steps 409 to 416 in the illustrated embodiment will not be repeated here.

[0444] 506 , the application fills the slot corresponding to the target atomic service according to the keyword, and calls the target atomic service through the proxy object to execute the task execution request.

[0445] For specific implementation details of step 506, please refer to Figure 6 The description of step 417 in the illustrated embodiment will not be repeated here.

[0446] After the target atomic service is called through the proxy object, the target atomic service performs the processing corresponding to the task request and feeds back the processing result to the application. The application will give corresponding feedback on the user interface of the electronic device according to the processing result. For details, please refer to Figure 6 Step 418 and step 419 in the illustrated embodiment will not be described in detail here.

[0447] In addition, it should be noted that as a possible implementation method, after the processing corresponding to the task request is executed, the application sends an unbinding request to the atomic service lifecycle management service; the atomic service lifecycle management service clears the recorded status information of the target atomic service and triggers a scheduled unbinding task; after the set time is reached, the atomic service lifecycle management service unbinds the target atomic service and notifies the target atomic service to unbind.

[0448] For details on how to unbind the bound target atomic service, see Figure 6 The description of steps 421 to 423 in the illustrated embodiment will not be repeated here.

[0449] Therefore, the capabilities provided by the electronic device are individually encapsulated into atomic services, and are uniformly managed by the atomic service manager and the atomic service lifecycle management service. In this way, when any application in the electronic device receives a task execution request triggered by a user, the keyword corresponding to the task execution request is determined, and then the target atomic service information corresponding to the keyword is determined with the help of the intent management service. Finally, the target atomic service is bound according to the target atomic service information through the atomic service manager and the atomic service lifecycle management service that uniformly manage the atomic service. Since the application does not need to directly connect to the interface corresponding to each capability, there is no need to do adaptation processing when calling different capabilities. It is only necessary to call the corresponding atomic service according to the corresponding proxy object provided by the atomic service lifecycle management service.

[0450] It should be noted that in order to ensure that electronic equipment can achieve Fig. 9 The implementation method of the atomic service shown requires that when the package management service in the operating system of the electronic device receives a request to install the application, it broadcasts the installation of the application to the atomic service manager, and the broadcast carries the package information of the application. In this way, the atomic service manager can parse the package information, and send the parsed atomic service information of the callable atomic services registered by the application to the cloud server for verification. Finally, when the verification passes, the atomic service manager saves the parsed atomic service information of each callable atomic service registered by the application to the local storage space corresponding to the atomic service manager, so that when the atomic service is called later, the atomic service information corresponding to the atomic service can be obtained in time, so as to realize the scheduling of capabilities based on the implementation method of the atomic service provided in the embodiment of the present application.

[0451] For the implementation logic of this part, please refer to Figure 5 The description of the registration process of the atomic service given in the illustrated embodiment will not be repeated here.

[0452] In addition, it is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0453] In addition, it should be noted that the implementation method of the atomic service provided by the above embodiments implemented by the electronic device in the actual application scenario can also be performed by a chip system included in the electronic device, wherein the chip system may include a processor. The chip system can be coupled to the memory so that the chip system calls the computer program stored in the memory when it is running to implement the steps performed by the above electronic device. Among them, the processor in the chip system can be an application processor or a processor other than an application processor.

[0454] In addition, the embodiment of the present application also provides an atomic service device. The device includes an atomic service manager, an atomic service lifecycle management service and an intent management service; the atomic service manager is used to manage the atomic service information corresponding to each atomic service; the atomic service lifecycle service is used to manage the lifecycle of each atomic service; the intent management service is used to determine the intent corresponding to the task execution request initiated by the application; wherein, when receiving the keywords determined by the application according to the task execution request triggered by the user, the intent management service determines the intent corresponding to the task execution request according to the keywords; the application obtains the target atomic service information of the target atomic service from the atomic service manager according to the intent, and requests the atomic service lifecycle service to bind the target atomic service according to the target atomic service information; the atomic service lifecycle service binds the target atomic service and encapsulates the target atomic service into an application-oriented proxy object; the application fills the slot corresponding to the target atomic service according to the keywords corresponding to the task execution request, and calls the target atomic service through the proxy object.

[0455] For example, in a possible implementation, the atomic service device can be regarded as the atomic service framework mentioned in the above embodiment, such as Figure 2B The service framework is composed of various atomic services expanded in the FWK layer and the atomic service manager, intent management service, atomic service lifecycle management service, etc. expanded in the Native layer.

[0456] For details about the functions of each service in the atomic service framework, see Figure 2B ,as well as Figure 5 and Figure 6 , I will not go into details here.

[0457] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the implementation method of the atomic service in the above-mentioned embodiment.

[0458] In addition, an embodiment of the present application also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the implementation method of the atomic service in the above-mentioned embodiment.

[0459] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the implementation method of the atomic service in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.

[0460] In addition, an embodiment of the present application also provides an atomic service implementation system, which includes an electronic device and a cloud server; an atomic service device is integrated into the operating system of the electronic device, and the atomic service device includes an atomic service manager, an atomic service lifecycle management service, and an intent management service; wherein, when an application installed in the electronic device responds to a task execution request triggered by a user, the application, the atomic service manager, the atomic service lifecycle management service, the intent management service, and the cloud server schedule the atomic service in accordance with the instructions of the method in the first aspect or any possible implementation of the first aspect.

[0461] For example, in the atomic service implementation system, the interaction logic of each functional module and device device when the electronic device and the cloud server implement the atomic service implementation method provided by the present application can be found in Figure 5 and Figure 6 , I will not go into details here.

[0462] In addition, it can be seen from the above description that the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0463] 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 implementing an atomic service, characterized in that: Applied to electronic equipment, the method comprises: In response to a task execution request triggered by a user, determining an intent corresponding to the task execution request; According to the intention, query corresponding target atomic service information, where the target atomic service information is used to identify the target atomic service that executes the task execution request, and the target atomic service includes a corresponding service interface; After querying the target atomic service information corresponding to the intention, binding the application that triggers the task execution request with the target atomic service according to the target atomic service information; After binding with the target atomic service, the task execution request is executed through the target atomic service.

2. The method according to claim 1, characterized in that The querying of the corresponding target atomic service information according to the intention includes: According to the first mapping relationship, querying the atomic service information corresponding to the intent in the local storage space; wherein the first mapping relationship records the corresponding relationship between each intent and each atomic service information; The queried atomic service information that has a corresponding relationship with the intention is determined as the target atomic service information.

3. The method according to claim 2, characterized in that The method further comprises: When no atomic service information corresponding to the intention is found in the local storage space, synchronizing the atomic service information managed in the cloud server to the local storage space; According to the first mapping relationship, re-searching the local storage space for the atomic service information that has a corresponding relationship with the intention; The queried atomic service information that has a corresponding relationship with the intention is determined as the target atomic service information.

4. The method according to claim 2, characterized in that: The method further comprises: Periodically interact with the cloud server to synchronize the atomic service information managed in the cloud server to the local storage space.

5. The method according to claim 1, characterized in that Binding the application that triggers the task execution request with the target atomic service according to the target atomic service information includes: Determining the target atomic service according to the unique identifier in the target atomic service information; Query the binding status of the target atomic service; When the target atomic service is in an unbound state, starting a process of the target atomic service; After starting the process of the target atomic service, a communication connection between the application and the target atomic service is established based on a binding mechanism; After establishing a communication connection between the application and the target atomic service, updating the binding state of the target atomic service to a bound state, and encapsulating the target atomic service into a proxy object oriented to the application; The proxy object is fed back to the application.

6. The method according to claim 5, characterized in that The querying the binding status of the target atomic service includes: Performing a legitimacy check on the target atomic service; When the target atomic service is legal, query the binding state of the target atomic service.

7. The method according to claim 6, characterized in that When the target atomic service is legal, querying the binding state of the target atomic service includes: Performing availability detection on the target atomic service; When the target atomic service is available, query the binding state of the target atomic service.

8. The method according to claim 5, characterized in that The method further comprises: When the target atomic service is in a bound state, querying whether the proxy object exists; When the proxy object exists, feeding the proxy object back to the application; When the proxy object does not exist, establishing a communication connection between the application and the target atomic service based on a binding mechanism; After establishing a communication connection between the application and the target atomic service, encapsulating the target atomic service into the proxy object oriented to the application; The proxy object is fed back to the application.

9. The method according to claim 5, characterized in that After executing the task execution request through the target atomic service, the method further includes: After the processing corresponding to the task execution request is completed, clearing the recorded binding state corresponding to the target atomic service; Unbind the application from the target atomic service.

10. The method according to claim 9, characterized in that The unbinding the application from the target atomic service includes: Start the scheduled unbinding task; When no binding request to the target atomic service is received within a set time, disconnecting the communication connection between the application and the target atomic service; When a binding request for the target atomic service is received within a set time, the scheduled unbinding task is released.

11. The method according to claim 1, characterized in that: The determining the intention corresponding to the task execution request includes: Determining a keyword corresponding to the task execution request; The intent corresponding to the task execution request is determined according to the keyword.

12. The method according to claim 11, characterized in that The determining of the keyword corresponding to the task execution request includes: When the task execution request is triggered by the user's voice, acquiring voice data triggering the task execution request; Converting the voice data into text information; The keyword corresponding to the task request is extracted from the text information.

13. The method according to claim 11, characterized in that The executing the task execution request through the target atomic service includes: Filling the slot corresponding to the target atomic service according to the keyword; The task execution request is executed by the target atomic service after the slot is filled.

14. The method according to any one of claims 1 to 13, characterized in that: Before receiving the task execution request triggered by the user, the method further includes: When installing the application, obtaining atomic service information recorded in an extensible markup language file of the application, the atomic service information including: a unique identifier that identifies the uniqueness of the atomic service corresponding to the atomic service information, an icon resource identifier of the atomic service, a tag name of the atomic service and capability description information provided by the atomic service; The atomic service information is saved in a local storage space.

15. The method according to claim 14, characterized in that The step of saving the atomic service information to a local storage space includes: Sending the atomic service information to a cloud server; Receiving a detection result of the cloud server for the atomic service information; When the detection result indicates that the atomic service information is legal, the atomic service information is saved in the local storage space.

16. An electronic device, characterized in that: The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the implementation method of the atomic service as described in any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that: It includes a computer program, which, when running on an electronic device, enables the electronic device to execute the method for implementing the atomic service as described in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Atomic service presentation method and device

    CN110855826A

  • Terminal equipment and cross-process communication method thereof

    CN111443961A

  • Voice interaction processing method and related device

    CN114694646A

  • Equipment interaction method, electronic equipment and system

    CN115729392A

  • Vehicle-mounted service display method, vehicle and program product

    CN115826802A