Method and device for solving perception service conflict

By handling the resource conflict of intelligent interactive functions according to the execution priority of the sensing service, the conflict problem between multiple intelligent interactive function sensing services is solved, and the user experience and resource utilization efficiency are improved.

CN118550657APending Publication Date: 2024-08-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310208280.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Resource conflicts are prone to occur during the execution of perception services with multiple intelligent interactive functions. For example, cameras have different shooting requirements or algorithms cannot run in parallel. There is currently no effective solution to the conflict problem.

Method used

By determining the execution priority of the sensing service, when an execution instruction is received, it is decided which service to continue to execute according to the preset priority relationship. High-priority services are executed first, and low-priority services are canceled or suspended to release resources to Avoid conflict.

Benefits of technology

It effectively solves the conflict problem between multiple sensing services, improves user experience, and ensures reasonable allocation and efficient utilization of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550657A
    Figure CN118550657A
Patent Text Reader

Abstract

The invention provides a method and device for solving a perception service conflict, and the method comprises the steps: determining whether the execution priority of a second service is higher than the execution priority of a first service or not when an execution instruction of the second service is received during the execution of the first service, and the first service and the second service are services corresponding to a perception application; when the execution priority of the second service is higher than that of the first service, the second service is executed, and the first service is cancelled or suspended; or, when the execution priority of the second service is lower than or equal to the execution priority of the first service, the first service continues to be executed. In the scheme, when the execution instruction of another perception service is received during the execution period of one perception service, which service continues to be executed is determined according to the execution priority of the perception service, so that the problem of conflict among multiple services is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent interaction technology, and in particular to a method and device for resolving perception service conflicts. Background Art

[0002] With the development of technology, mobile phones, tablet computers and other terminal devices can provide users with more and more intelligent interactive functions. However, these intelligent interactive functions need to be equipped with a series of software and hardware resources, such as perception applications in the interaction process, processing modules that can perform internal process scheduling and data processing, perception units that can collect interactive data, and display units that output interactive results. For example, the face unlocking service requires an application that can provide human-computer interaction, so that users can enter faces, set face unlocking functions, and input faces when unlocking; it needs to process the collected images, schedule between processes, and coordinate the collaborative work between various modules of the terminal device; it needs a camera that can collect faces as a perception unit, and it also needs to provide hardware resources for the above internal processing and human-computer interaction processes. For another example, the business of watching the expansion notification information also requires a human-computer interaction application, so that users can enter eye information, set parameters and input sight information during actual application; it needs to process the collected images, schedule between processes, and coordinate the collaborative work between various modules of the terminal device; it needs to collect faces, especially cameras that can collect eye sight, as perception units, and it also needs to provide hardware resources for the above internal processing and human-computer interaction processes. However, the image resolution required for the gaze-expanding notification information service is different from the image resolution required for face unlocking. The computing resources of the algorithms that need to be called are also different, and the timing of calling the perception unit conflicts, which leads to conflicts in the use of the perception unit, the software and hardware resources for algorithm operation, etc.

[0003] In this case, during the execution of multiple intelligent interactive functions, conflicts may arise due to resource grabbing. For example, they all need to call the camera but have different shooting requirements, or they all need to run algorithms but the algorithms cannot run in parallel, which will cause conflicts.

[0004] In short, conflicts may arise between the perception services of multiple intelligent interactive functions, and there is currently no suitable solution to such conflict problems. Summary of the invention

[0005] The present application provides a method and device for resolving perception service conflicts, which can resolve conflicts between perception services of multiple intelligent interactive functions.

[0006] In a first aspect, a method for resolving conflicts in perception services is provided, the method comprising: when an execution instruction of a second service is received during the execution of a first service, determining whether the execution priority of the second service is higher than the execution priority of the first service, the first service and the second service are both services corresponding to the perception application; when the execution priority of the second service is higher than the execution priority of the first service, switching to executing the second service and canceling or suspending the first service; or, when the execution priority of the second service is lower than or equal to the execution priority of the first service, continuing to execute the first service.

[0007] In the technical solution of the present application, when an execution instruction of another perception service is received during the execution of one perception service, the execution priority of the perception service is used to determine which service to continue executing, thereby effectively resolving the conflict problem between multiple services.

[0008] According to the involved human body parts, perception services can include eye movement services, face perception services, gesture control services, etc.

[0009] Eye movement services may include services for recording eye movement parameters, experience services for eye movement control, gaze expansion services, and gaze point control services. Gaze expansion services may include services for increasing the expansion area of ​​a notification pop-up window by gazing at it, so that the user can read the detailed content in the pop-up window. For example, a notification pop-up window may be a pop-up window of a text message, a multimedia message, WeChat, or other communication application, or a memo reminder pop-up window, or a calendar schedule reminder pop-up window, etc. Gaze point control services may include services for recording human eye parameters, services for not turning off the screen by gazing, and services for reducing the volume of incoming call ringtones by gazing.

[0010] Face perception services may include services for entering face parameters, face remote adjustment services, and face orientation detection services. Face remote adjustment services can be understood as a service that sets and adjusts the working parameters, standard parameters, etc. of the controlled electronic device through the face at a location far away from the controlled electronic device. Face remote adjustment services can also be called face AO services. Common face remote adjustment services include services for waking up the screen by face in the screen-off state. Face orientation detection services can be understood as services that trigger related operations by detecting the orientation of the face relative to the electronic device as a trigger signal. Common face orientation detection services include intelligent switching between horizontal and vertical screen services, because the so-called horizontal and vertical screens are the difference in relative angles between the electronic device and the face. For example, assuming that the longitudinal direction of the face corresponds to the vertical screen direction, when it is detected that the longitudinal direction of the face is vertical or nearly vertical relative to the vertical screen direction of the electronic device, the screen display direction can be automatically switched, that is, switched to the horizontal screen. Traditional switching between horizontal and vertical screens also includes switching by sensing whether the electronic device is horizontal or vertical relative to the ground, or switching by changing the center of gravity. However, this type of switching obviously cannot meet the needs of users lying down, leaning sideways, or tilting their heads, and is not smart enough. The intelligent horizontal and vertical screen switching service (also known as the intelligent screen rotation service) can meet the needs of users in various postures.

[0011] It should be noted that although face payment is also a process that requires the collection of face images to complete a business. However, since face payment often relies on the processing of the cloud device of the supplier of the payment application used, the electronic device only plays the role of collecting face images and receiving processing results. In other words, the electronic device collects face images and uploads them to the cloud device corresponding to the payment application for identity verification, and receives the verification results. The perception service in the embodiment of the present application mainly refers to the perception service that needs to be responded to on the electronic device, which can be understood as some perception services that need to collect data and perform algorithm processing on the electronic device, or in some cases it can also be called a local perception service. Therefore, subsequent operations such as image processing and identity verification based on face payment will not occupy too many local computing resources of the electronic device, so the stage where conflicts may occur is only when the camera is called to shoot. In this case, the scheme of the embodiment of the present application can still be used for execution, for example, the execution priority is determined according to the preset priority relationship, and the corresponding service is executed.

[0012] Gesture services may include gesture control services. Gesture control services can also be understood as gesture remote control services, that is, when the hand does not touch the electronic device, the electronic device detects the user's gesture to achieve corresponding control. For example, it can be taking photos and screenshots through gestures, etc., which will not be listed one by one.

[0013] Each service will need to have a perception fence in the perception application to process the interaction process, that is, the processing of collecting data and outputting results, and it also requires the intermediate data processing process and the process of data collection by the perception unit. Therefore, the perception services can also be divided according to the perception fence.

[0014] Perception applications may include at least one of eye movement fences, gesture fences, face orientation fences, smart code recognition fences, face presence or absence fences, and eye gaze presence or absence fences, and may also include other perception fences for intelligent interaction.

[0015] The perception service may include services corresponding to various perception fences.

[0016] The execution period of the perception service can be understood as the period from the start of the perception service to the completion of the response, so it can include the process of calling the perception unit, the process of processing the data collected by the perception unit, and the process of responding to the processing results. The so-called execution instruction can be understood as the demand or request for executing the perception service, or the perception service has been triggered. For example, the execution instruction of the gesture control service may be received during the execution of the eye movement service, then the eye movement service is the first service mentioned above, and the gesture control service is the second service mentioned above. For another example, assuming that the above example is reversed, the execution instruction of the eye movement service may be received during the execution of the gesture control service, then the gesture control service is the first service mentioned above, and the eye movement service is the second service mentioned above. Other situations are not listed one by one.

[0017] In combination with the first aspect, in certain implementations of the first aspect, when an execution instruction of a second service is received during the execution of a first service, determining whether the execution priority of the second service is higher than the execution priority of the first service includes: determining whether the execution priority of the second service is higher than the execution priority of the first service based on a preset priority relationship of the perceived services.

[0018] It is determined by the preset priority relationship, which is simple and easy to implement. When adjustments are needed later, you only need to change the preset priority relationship. If there are new perception services, you only need to add them to the preset priority relationship.

[0019] The preset priority relationship can be set comprehensively according to the priority of the algorithm execution path and the algorithm priority.

[0020] The priority of the algorithm execution path can be determined according to the priority of the algorithm execution path calling the perception unit. Assuming that there are two algorithm execution paths, path A and path B, and path A has a higher priority in calling the front RGB camera, then it can be determined that the priority of path A is higher than the priority of path B, and then it can be determined that the execution priority of the perception service corresponding to path A is higher than the execution priority of the perception service corresponding to path B. Here, two paths are taken as an example. If there are three or more paths, this method is still applicable.

[0021] Algorithm priority can be considered as the priority of executing algorithms, that is, when multiple algorithms need to be executed, which algorithm should be executed first. Assuming there are two algorithms, Algorithm A and Algorithm B, and Algorithm A has a higher priority, it can be determined that Algorithm A will be executed first, and then it can be determined that the perception service corresponding to Algorithm A will be executed first.

[0022] In one example, the preset priority relationship includes: the execution priority of the gaze to reduce the volume of the incoming ringtone service is higher than the eye movement service, and the execution priority of the eye movement service is higher than the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart horizontal and vertical screen switching service and the smart assisted photography service. That is to say, when the eye movement service receives the execution instruction of the above-mentioned service with a lower execution priority during the execution of the eye movement service, the eye movement service preempts other services, that is, continues to execute the eye movement service. When the eye movement service receives the execution instruction of the gaze to reduce the volume of the incoming ringtone service during the execution of the eye movement service, it will switch to the execution of the gaze to reduce the volume of the incoming ringtone service.

[0023] In another example, the preset priority relationship includes: the execution priority of the eye movement service is higher than the gaze to reduce the incoming ringtone volume service, the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart switching between horizontal and vertical screens service and the smart assisted photo taking service.

[0024] In another example, the preset priority relationship includes: the execution priority of the eye movement service is higher than the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart switching between horizontal and vertical screens service and the smart assisted photo taking service; the execution priority of the eye movement parameter recording service and the eye movement control experience service in the eye movement service is lower than the gaze to reduce the incoming call ringtone volume service; the execution priority of the gaze expansion service in the eye movement service is higher than the gaze to reduce the incoming call ringtone volume service.

[0025] It should also be noted that when taking photos, playing games, watching videos, looking at pictures, reading novels, etc., users may use immersive mode, that is, full-screen mode (without a status bar), and can still use the functions of perception services according to execution priority. For example, in immersive mode, the eye movement service can still preempt the intelligent assisted photo service.

[0026] In conjunction with the first aspect, in some implementations of the first aspect, when an execution instruction of a second service is received during execution of the first service, determining whether an execution priority of the second service is higher than an execution priority of the first service includes:

[0027] When the first service and the second service are in the same algorithm execution path, determining whether the execution priority of the second service is higher than the execution priority of the first service according to the relationship between the algorithm priority of the second service and the algorithm priority of the first service; or,

[0028] When the first service and the second service are not in the same algorithm execution path, whether the execution priority of the second service is higher than the execution priority of the first service is determined based on the relationship between the priority of the algorithm execution path of the second service and the priority of the algorithm execution path of the first service.

[0029] That is to say, the priority of the algorithm execution path corresponds to the execution priority.

[0030] In this implementation, the priority level is determined mainly based on whether the two services correspond to the same algorithm execution path. When they are in the same path, the execution priority level can be further determined according to the algorithm priority. When they are not in the same path, the execution priority level can be determined according to the path priority. For example, assuming that the first service is the non-stop screen-watching service and the second service is the smart code recognition service, at this time, the algorithm execution path of the first service is the AP path, and the algorithm execution path of the second service is the sensorhub path. Since the AP path has a higher priority than the sensorhub path, it is determined that the execution priority of the first service is higher than the execution priority of the second service. For another example, assuming that the first service is the face perception service and the second service is the smart code recognition service, at this time, the algorithm execution paths of the first service and the second service are both the sensorhub path, then the algorithm priorities of the two services are further compared, but since all algorithm priorities in the sensorhub path are the same, it is determined that the algorithm priority of the first service is equal to the algorithm priority of the second service, and it is also determined that the execution priority of the first service is equal to the execution priority of the second service. For another example, assuming that the first service is an eye movement service and the second service is a non-stop screen gaze service, at this time, the algorithm execution path of the first service and the second service is the AP path. Then the algorithm priorities of the two services are further compared. The algorithm of the eye movement service is the eye movement algorithm, and the algorithm of the non-stop screen gaze service is the human eye gaze algorithm. The eye movement algorithm has a higher algorithm priority, so it is determined that the execution priority of the first service is higher than the execution priority of the second service.

[0031] In conjunction with the first aspect, in some implementations of the first aspect, when the first service and the second service are in the same algorithm execution path, determining whether the execution priority of the second service is higher than the execution priority of the first service according to a relationship between the algorithm priority of the second service and the algorithm priority of the first service includes:

[0032] When the algorithm priority of the second service is higher than the algorithm priority of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or,

[0033] When the algorithm priority of the second service is lower than or equal to the algorithm priority of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

[0034] In other words, the algorithm priority corresponds to the execution priority.

[0035] In conjunction with the first aspect, in some implementations of the first aspect, when an execution instruction of a second service is received during execution of the first service, determining whether an execution priority of the second service is higher than an execution priority of the first service includes:

[0036] When the priority of the algorithm execution path of the second service is higher than the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or,

[0037] When the priority of the algorithm execution path of the second service is lower than or equal to the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

[0038] That is, the execution priority can be determined by only considering the priority of the algorithm execution path without considering the algorithm priority. This implementation method can be used for the case where the algorithm priorities between algorithms in the path are the same.

[0039] In combination with the first aspect, in some implementations of the first aspect, after the first service is suspended, the method further includes: after executing the second service, switching to executing the first service.

[0040] Suspending the service first and then continuing to execute it after the higher priority service is completed can improve the user experience.

[0041] In combination with the first aspect, in some implementations of the first aspect, after the first service is canceled, the method further includes: releasing algorithm resources and / or hardware resources occupied by the first service.

[0042] In the case of the first service being cancelled, since it is no longer executed, resources can be released so that other perception services or various processes can still use the released resources. The algorithm resources here can be considered as the resources used when processing data and responding, and the hardware resources can be considered as the perception unit, processor and other hardware, which can include a camera, for example.

[0043] In combination with the first aspect, in some implementations of the first aspect, before determining whether the execution priority of the second service is higher than the execution priority of the first service, the method further includes:

[0044] When receiving an execution instruction of a second service invoking a perceptual unit during the execution of the first service invoking a perceptual unit, determining whether the perceptual unit invoking the first service is the same as the perceptual unit invoking the second service;

[0045] When the perception unit called by the first service is the same as the perception unit called by the second service, determining whether the execution priority of the second service is higher than the execution priority of the first service; or,

[0046] When the perception unit called by the first service is different from the perception unit called by the second service, the first service and the second service are executed simultaneously.

[0047] This implementation method adds the judgment of whether the same perception unit is called. First, it checks whether they are the same. If they are the same, it means there is a conflict. Then, the execution priority is used to determine which service continues to execute. The service that continues to execute will call the same perception unit. If they are different, it means there is no conflict. Then, they are called together and the perception services continue to execute together.

[0048] In combination with the first aspect, in some implementations of the first aspect, the perception application includes at least one of an eye movement fence, a gesture fence, a face direction fence, an intelligent code recognition fence, a face presence or absence fence, and an eye gaze fence; the services corresponding to the eye movement fence include at least one of an eye movement parameter recording service, an eye movement control experience service, and a gaze expansion service; the services corresponding to the gesture fence include an air gesture service; the services corresponding to the face direction fence include an intelligent screen rotation service; the services corresponding to the intelligent code recognition fence include an intelligent code recognition service; the services corresponding to the face presence or absence fence include a face remote adjustment AO service; the services corresponding to the eye gaze fence include at least one of an eye gaze without turning off the screen service and an eye gaze to reduce the incoming call ringtone volume service.

[0049] In combination with the first aspect, in certain implementations of the first aspect, the priority of the first path is higher than the priority of the second path; the first path includes at least one of the algorithm execution paths for services corresponding to the eye movement fence and the presence or absence of the eye gaze fence; the second path includes at least one of the algorithm execution paths for services corresponding to the gesture fence, the face orientation fence, the smart code recognition fence, and the presence or absence of the face fence.

[0050] In combination with the first aspect, in certain implementations of the first aspect, the algorithm priority of the first algorithm in the first path is higher than the algorithm priority of the second algorithm; the first algorithm includes an algorithm for a service corresponding to an eye movement fence; and the second algorithm includes an algorithm for a service corresponding to a fence with or without eye gaze.

[0051] In combination with the first aspect, in some implementations of the first aspect, the algorithm priority of the algorithm corresponding to each service in the second path is the same.

[0052] In a second aspect, a device for resolving perceived service conflicts is provided, the device comprising a unit composed of software and / or hardware for executing any one of the methods of the first aspect.

[0053] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any one of the methods of the first aspect can be implemented.

[0054] In a fourth aspect, a chip is provided, comprising a processor, wherein the processor is used to read and execute a computer program stored in a memory, and when the computer program is executed by the processor, any one of the methods of the first aspect can be implemented.

[0055] Optionally, the chip also includes a memory, and the memory is electrically connected to the processor.

[0056] Optionally, the chip may also include a communication interface.

[0057] According to a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the methods of the first aspect can be implemented.

[0058] According to a sixth aspect, a computer program product is provided. The computer program product comprises a computer program, and when the computer program is executed by a processor, any one of the methods of the first aspect can be implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic diagram of an applicable intelligent interaction scenario of an embodiment of the present application.

[0060] Figure 2It is a schematic flowchart of a method for resolving perceived service conflicts according to an embodiment of the present application.

[0061] Figure 3 It is a schematic diagram of an interactive process of a gaze-to-expand service in an embodiment of the present application.

[0062] Figure 4 It is a schematic diagram of another interactive process of the gaze-to-expand service according to an embodiment of the present application.

[0063] Figure 5 It is a schematic architecture diagram of the perception service of an embodiment of the present application.

[0064] Figure 6 It is a schematic architecture diagram of the perception service of an embodiment of the present application.

[0065] Figure 7 It is a schematic diagram of an execution process of a method for resolving perceived service conflicts according to an embodiment of the present application.

[0066] Figure 8 It is a schematic diagram of a device for resolving perceived service conflicts according to an embodiment of the present application.

[0067] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] The solution of the embodiment of the present application is introduced below in conjunction with the accompanying drawings. The method for resolving the perception service conflict provided by the present application can be applied to electronic devices such as mobile phones, tablet computers, and smart wearable devices.

[0069] Figure 1 is a schematic diagram of an applicable intelligent interaction scenario in an embodiment of the present application. Figure 1 As shown, when user A is using electronic device B, the camera C on electronic device B can capture images of user A, and then perception services of various intelligent interactive functions can be performed based on the captured images (for simplicity, referred to as perception services below).

[0070] The electronic device B may be a mobile phone, a tablet computer, a smart wearable device or other device capable of intelligent interaction.

[0071] Camera C can be regarded as an example of a perception unit, which is used to obtain input data for human-computer interaction, and the input data may be an image and / or voice, and the image may be a visible light image (RGB image) or an infrared image. The RGB image may be obtained using a visible light camera, and the infrared image may be obtained using a three-dimensional (3D) time of flight (TOF) sensor.

[0072] According to the involved human body parts, perception services can include eye movement services, face perception services, gesture control services, etc.

[0073] Eye movement services may include services for recording eye movement parameters, experience services for eye movement control, gaze expansion services, and gaze point control services. Gaze expansion services may include services for increasing the expansion area of ​​a notification pop-up window by gazing at it, so that the user can read the detailed content in the pop-up window. For example, a notification pop-up window may be a pop-up window of a text message, a multimedia message, WeChat, or other communication application, or a memo reminder pop-up window, or a calendar schedule reminder pop-up window, etc. Gaze point control services may include services for recording human eye parameters, services for not turning off the screen by gazing, and services for reducing the volume of incoming call ringtones by gazing.

[0074] Face perception services may include services for entering face parameters, face remote adjustment services, and face orientation detection services. Face remote adjustment services can be understood as a service that sets and adjusts the working parameters, standard parameters, etc. of the controlled electronic device through the face at a location far away from the controlled electronic device. Face remote adjustment services can also be called face AO services. Common face remote adjustment services include services for waking up the screen by face in the screen-off state. Face orientation detection services can be understood as services that trigger related operations by detecting the orientation of the face relative to the electronic device as a trigger signal. Common face orientation detection services include intelligent switching between horizontal and vertical screen services, because the so-called horizontal and vertical screens are the difference in relative angles between the electronic device and the face. For example, assuming that the longitudinal direction of the face corresponds to the vertical screen direction, when it is detected that the longitudinal direction of the face is vertical or nearly vertical relative to the vertical screen direction of the electronic device, the screen display direction can be automatically switched, that is, switched to the horizontal screen. Traditional switching between horizontal and vertical screens also includes switching by sensing whether the electronic device is horizontal or vertical relative to the ground, or switching by changing the center of gravity. However, this type of switching obviously cannot meet the needs of users lying down, leaning sideways, or tilting their heads, and is not smart enough. The intelligent horizontal and vertical screen switching service (also known as the intelligent screen rotation service) can meet the needs of users in various postures.

[0075] It should be noted that although face payment is also a process that requires the collection of face images to complete a business. However, since face payment often relies on the processing of the cloud device of the supplier of the payment application used, the electronic device only plays the role of collecting face images and receiving processing results. In other words, the electronic device collects face images and uploads them to the cloud device corresponding to the payment application for identity verification, and receives the verification results. The perception service in the embodiment of the present application mainly refers to the perception service that needs to be responded to on the electronic device, which can be understood as some perception services that need to collect data and perform algorithm processing on the electronic device, or in some cases it can also be called a local perception service. Therefore, subsequent operations such as image processing and identity verification based on face payment will not occupy too many local computing resources of the electronic device, so the stage where conflicts may occur is only when the camera is called to shoot. In this case, the scheme of the embodiment of the present application can still be used for execution, for example, the execution priority is determined according to the preset priority relationship, and the corresponding service is executed.

[0076] Gesture services may include gesture control services. Gesture control services can also be understood as gesture remote control services, that is, when the hand does not touch the electronic device, the electronic device detects the user's gesture to achieve corresponding control. For example, it can be taking photos and screenshots through gestures, etc., which will not be listed one by one.

[0077] Each service will need to have a perception fence in the perception application to process the interaction process, that is, the processing of collecting data and outputting results, and it also requires the intermediate data processing process and the process of data collection by the perception unit. Therefore, the perception services can also be divided according to the perception fence.

[0078] Perception applications may include at least one of eye movement fences, gesture fences, face orientation fences, smart code recognition fences, face presence or absence fences, and eye gaze presence or absence fences, and may also include other perception fences for intelligent interaction.

[0079] The perception service may include services corresponding to various perception fences. For example, the services corresponding to the eye movement fence may include at least one of the eye movement parameter recording service, the eye movement control experience service, and the gaze expansion service; the services corresponding to the gesture fence may include the air gesture service; the services corresponding to the face orientation fence may include the smart screen rotation service; the services corresponding to the smart code recognition fence may include the smart code recognition service; the services corresponding to the face presence or absence fence may include the face remote adjustment service; the services corresponding to the eye gaze fence may include at least one of the gaze non-off service and the gaze to reduce the incoming call ringtone volume service.

[0080] In an example, suppose that Figure 1In the scenario shown, a text message pop-up window pops up, and the gaze expansion service is started. Then, camera C collects user A's face image 1, and after a series of processing, it is determined from face image 1 that user A's gaze coordinates are within the preset range of the expansion position of the text message pop-up window, and then more content in the text message pop-up window is expanded by pulling down. However, if the user also makes a gesture to control the screenshot at this time, the gesture control service will be triggered, and camera C will also need to be called to collect images, and a series of processing is required to determine user A's gesture from the image. Assuming that the resolution of the face image required by the gaze expansion service is different from that of the image required by the gesture control service, and the algorithms of the two services cannot be executed at the same time, conflicts may occur whether it is when calling camera C to collect images, when performing algorithm processing on the collected images, or when displaying the response results. Assuming that the user's gesture to control the screenshot happens to be close to the time when the text message pop-up window is displayed, there may be a conflict in calling camera C. Assuming that during the processing of face image 1, the gesture control service calls camera C to collect face image 2, but because the algorithms of the two services cannot be executed at the same time, the processing of face image 2 conflicts with the processing of face image 1.

[0081] The above example mainly introduces the possible conflict between the gaze expansion service and the gesture control service as an example, and other conflict situations are not listed one by one.

[0082] In response to the conflict problem between the above-mentioned multiple perception services, the embodiment of the present application mainly determines which perception service to continue to execute according to the execution priority of the perception service, thereby effectively solving the conflict problem between multiple services. Taking the conflict between the above-mentioned gaze expansion service and the gesture control service as an example, assuming that the execution priority of the gaze expansion service is higher than the priority of the gesture control service, when the execution instruction of the gesture control service is received during the execution of the gaze expansion service, the gaze expansion service can be continued to be executed instead of the gesture control service; or when the execution instruction of the gaze expansion service is received during the execution of the gesture control service, the gaze expansion service can be executed instead, and the gesture control service can be canceled or suspended.

[0083] Figure 2 1 is a schematic flow chart of a method for resolving a perception service conflict in an embodiment of the present application. The method can be applied to any electronic device described in the embodiment of the present application. Figure 2 Each step is introduced.

[0084] S201. When an execution instruction of a second service is received during execution of a first service, determine whether an execution priority of the second service is higher than an execution priority of the first service.

[0085] The first service and the second service are both services corresponding to the perception application.

[0086] It should be noted that, unless otherwise specified, the services described in this application refer to perception services. Figure 1 The relevant introduction will not be repeated here.

[0087] The execution period of the perception service can be understood as the period from the start of the perception service to the completion of the response, so it can include the process of calling the perception unit, the process of processing the data collected by the perception unit, and the process of responding to the processing results. The so-called execution instruction can be understood as the demand or request for executing the perception service, or the perception service has been triggered. For example, the execution instruction of the gesture control service may be received during the execution of the eye movement service, then the eye movement service is the first service mentioned above, and the gesture control service is the second service mentioned above. For another example, assuming that the above example is reversed, the execution instruction of the eye movement service may be received during the execution of the gesture control service, then the gesture control service is the first service mentioned above, and the eye movement service is the second service mentioned above. Other situations are not listed one by one.

[0088] In one implementation, the perception application includes at least one of an eye movement fence, a gesture fence, a face direction fence, an intelligent code recognition fence, a face presence or absence fence, and an eye gaze fence; the service corresponding to the eye movement fence includes at least one of an eye movement parameter recording service, an eye movement control experience service, and a gaze expansion service; the service corresponding to the gesture fence includes an air gesture service; the service corresponding to the face direction fence includes an intelligent screen rotation service; the service corresponding to the intelligent code recognition fence includes an intelligent code recognition service; the service corresponding to the face presence or absence fence includes a face remote adjustment service; the service corresponding to the eye gaze fence includes at least one of an eye gaze without turning off the screen service and an eye gaze to reduce the incoming call ringtone volume service.

[0089] Each perception service requires a corresponding algorithm to execute, and needs to be executed in the algorithm execution path where the algorithm is located. With the development of technology, there are situations where the same electronic device includes multiple algorithm execution paths.

[0090] In the embodiment of the present application, the algorithm execution path may include an application processor (AP) path and a sensor hub path. The AP path can be understood as a path that uses the main central processing unit (CPU) of an electronic device to perform operations. The sensor hub path can be understood as a path that executes algorithms related to perception. The sensor hub path can support at least one of the gesture algorithm, the intelligent code recognition algorithm, the face orientation algorithm, and the face presence algorithm. For these algorithms, the same image accuracy can be used for processing, and they can be processed in parallel, so the operation of each algorithm in the sensor hub path will not conflict, but the services corresponding to each algorithm may still conflict when calling the perception unit to collect data. The AP path can support at least one of the human eye gaze algorithm and the eye movement algorithm. For the eye-related algorithm, higher image accuracy is required than for the face-related algorithm or gesture algorithm. In addition, the image accuracy required by the human eye gaze algorithm and the eye movement algorithm may be different, and the human eye gaze algorithm and the eye movement algorithm cannot be executed at the same time, so there is a possibility of conflict. In addition, only one of the sensorhub channel and the AP channel can work, so there is a possibility of conflict.

[0091] Since the priority of the AP channel to call the perception unit (such as the camera) is higher than that of the sensorhub channel, the execution priority of the perception service corresponding to the AP channel can be set higher than that of the perception service corresponding to the sensorhub channel. For example, the eye movement service is the perception service corresponding to the AP channel, and the face AO service is the perception service corresponding to the sensorhub channel. Therefore, based on the fact that the AP channel has a higher priority in calling the camera, it can be determined that the eye movement service has a higher execution priority. The situations of other perception services are similar and will not be listed one by one.

[0092] In one implementation, S201 may include:

[0093] According to the preset priority relationship of the perceived services, it is determined whether the execution priority of the second service is higher than the execution priority of the first service.

[0094] It is determined by the preset priority relationship, which is simple and easy to implement. When adjustments are needed later, you only need to change the preset priority relationship. If there are new perception services, you only need to add them to the preset priority relationship.

[0095] The preset priority relationship can be set comprehensively according to the priority of the algorithm execution path and the algorithm priority.

[0096] The priority of the algorithm execution path can be determined according to the priority of the algorithm execution path calling the perception unit. The higher the priority of calling the perception unit, the higher the priority of the algorithm execution path. Assuming that there are two algorithm execution paths, path A and path B, and path A has a higher priority in calling the front RGB camera, then it can be determined that the priority of path A is higher than the priority of path B, and then it can be determined that the execution priority of the perception service corresponding to path A is higher than the execution priority of the perception service corresponding to path B. Here, two paths are taken as an example. Assuming there are three or more paths, this method is still applicable.

[0097] Algorithm priority can be considered as the priority of executing algorithms, that is, when multiple algorithms need to be executed, which algorithm should be executed first. Assuming there are two algorithms, Algorithm A and Algorithm B, and Algorithm A has a higher priority, it can be determined that Algorithm A will be executed first, and then it can be determined that the perception service corresponding to Algorithm A will be executed first.

[0098] In one example, the preset priority relationship includes: the execution priority of the gaze to reduce the volume of the incoming ringtone service is higher than the eye movement service, and the execution priority of the eye movement service is higher than the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart horizontal and vertical screen switching service and the smart assisted photography service. That is to say, when the eye movement service receives the execution instruction of the above-mentioned service with a lower execution priority during the execution of the eye movement service, the eye movement service preempts other services, that is, continues to execute the eye movement service. When the eye movement service receives the execution instruction of the gaze to reduce the volume of the incoming ringtone service during the execution of the eye movement service, it will switch to the execution of the gaze to reduce the volume of the incoming ringtone service.

[0099] In another example, the preset priority relationship includes: the execution priority of the eye movement service is higher than the gaze to reduce the incoming ringtone volume service, the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart switching between horizontal and vertical screens service and the smart assisted photo taking service.

[0100] In another example, the preset priority relationship includes: the execution priority of the eye movement service is higher than the gaze without turning off the screen service, the face remote adjustment service, the smart code recognition service, the gesture control service, the smart switching between horizontal and vertical screens service and the smart assisted photo taking service; the execution priority of the eye movement parameter recording service and the eye movement control experience service in the eye movement service is lower than the gaze to reduce the incoming call ringtone volume service; the execution priority of the gaze expansion service in the eye movement service is higher than the gaze to reduce the incoming call ringtone volume service.

[0101] It should also be noted that in the process of taking photos, playing games, watching videos, looking at pictures, reading novels, etc., users may use immersive mode, that is, full-screen mode (without a status bar), and can still use the functions of the perception service according to the execution priority. For example, in immersive mode, the eye movement service can still preempt the intelligent assisted photography service. In addition, when the camera used by the face remote adjustment service is not the same as the camera used by the eye movement service, there is no conflict, and it can be executed according to steps S205-S206 of this article, but when the same camera is used, there may be a conflict, and it can still be executed according to steps S205-S206.

[0102] In one implementation, S201 may include:

[0103] S201A, when the first service and the second service are in the same algorithm execution path, determining whether the execution priority of the second service is higher than the execution priority of the first service according to the relationship between the algorithm priority of the second service and the algorithm priority of the first service; or,

[0104] S201B. When the first service and the second service are not in the same algorithm execution path, determine whether the execution priority of the second service is higher than the execution priority of the first service based on the relationship between the priority of the algorithm execution path of the second service and the priority of the algorithm execution path of the first service.

[0105] That is to say, the priority of the algorithm execution path corresponds to the execution priority.

[0106] The priority of the algorithm execution path can be determined according to the priority of the algorithm execution path calling the perception unit. The higher the priority of calling the perception unit, the higher the priority of the algorithm execution path. Assuming that there are two algorithm execution paths, path A and path B, and path A has a higher priority in calling the front RGB camera, then it can be determined that the priority of path A is higher than the priority of path B, and then it can be determined that the execution priority of the perception service corresponding to path A is higher than the execution priority of the perception service corresponding to path B. Here, two paths are taken as an example. Assuming there are three or more paths, this method is still applicable.

[0107] In this implementation, the priority level is determined based on whether the two services correspond to the same algorithm execution path. When they are in the same path, the execution priority level can be further determined according to the algorithm priority. When they are not in the same path, the execution priority level can be determined according to the path priority. For example, assuming that the first service is the "watch the screen" service and the second service is the "smart code recognition" service, at this time, the algorithm execution path of the first service is the AP path, and the algorithm execution path of the second service is the sensorhub path. Since the AP path has a higher priority than the sensorhub path, it can be understood here that the AP path has a higher priority than the sensorhub path in calling the camera, so the execution priority of the first service is determined to be higher than the execution priority of the second service. For another example, assuming that the first service is the face perception service and the second service is the "smart code recognition" service, at this time, the algorithm execution paths of the first service and the second service are both the sensorhub path, then the algorithm priorities of the two services are further compared, but since all algorithm priorities in the sensorhub path are the same, the algorithm priority of the first service is determined to be equal to the algorithm priority of the second service, and the execution priority of the first service is determined to be equal to the execution priority of the second service. For another example, assuming that the first service is an eye movement service and the second service is a non-stop screen gaze service, at this time, the algorithm execution path of the first service and the second service is the AP path. Then the algorithm priorities of the two services are further compared. The algorithm of the eye movement service is the eye movement algorithm, and the algorithm of the non-stop screen gaze service is the human eye gaze algorithm. The eye movement algorithm has a higher algorithm priority, so it is determined that the execution priority of the first service is higher than the execution priority of the second service.

[0108] In one example, S201A may include:

[0109] When the algorithm priority of the second service is higher than the algorithm priority of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or,

[0110] When the algorithm priority of the second service is lower than or equal to the algorithm priority of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

[0111] In other words, the algorithm priority corresponds to the execution priority.

[0112] In another implementation, S201 may include:

[0113] S201C: when the priority of the algorithm execution path of the second service is higher than the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or

[0114] S201D: When the priority of the algorithm execution path of the second service is lower than or equal to the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

[0115] That is, the execution priority can be determined by only considering the priority of the algorithm execution path without considering the algorithm priority. This implementation method can be used for the case where the algorithm priorities between algorithms in the path are the same.

[0116] In one example, the priority of the first path is higher than that of the second path; the first path includes at least one of the algorithm execution paths for services corresponding to the eye movement fence and the presence or absence of eye gaze fence; the second path includes at least one of the algorithm execution paths for services corresponding to the gesture fence, the face orientation fence, the smart code recognition fence, and the presence or absence of a face fence.

[0117] In this example, examples of paths with different priorities are given. The AP path mentioned above is an example of the first path, and the sensorhub path mentioned above is an example of the second path.

[0118] In another example, the algorithm priority of the first algorithm in the first path is higher than the algorithm priority of the second algorithm; the first algorithm includes algorithms for services corresponding to the eye movement fence; and the second algorithm includes algorithms for services corresponding to the human eye gaze fence. For example, the first path is the AP path, the first algorithm is the eye movement algorithm, and the second algorithm is the human eye gaze algorithm.

[0119] In another example, the algorithm priority of the algorithm corresponding to each service in the second path is the same. For example, the second path is a sensorhub path.

[0120] It should be noted that a perception service may correspond to multiple algorithms, and these multiple algorithms may be in different paths. If this happens, the execution priority can be determined according to the path with higher priority. In other words, the execution priority is determined based on the path with the highest priority that calls the perception unit among the paths corresponding to these multiple algorithms.

[0121] S202. When the execution priority of the second service is higher than the execution priority of the first service, switch to executing the second service and cancel or suspend the first service; or, when the execution priority of the second service is lower than or equal to the execution priority of the first service, continue to execute the first service.

[0122] That is, only when the second service has a higher execution priority will the second service be executed, and the first service can be cancelled or suspended. In other cases, the first service will continue to be executed.

[0123] When the execution priority of the second service is lower than or equal to the execution priority of the first service, there are two cases for continuing to execute the first service. Case 1: The execution priority of the second service is lower than the execution priority of the first service. In this case, the first service is continued to be executed according to the selection logic of executing the service with higher priority first. Case 2: The execution priority of the second service is equal to the execution priority of the first service. In this case, the first service is continued to be executed according to the selection logic of giving priority to the service executed first.

[0124] In another implementation, Figure 2 The method shown also includes: S203, after suspending the first service, after executing the second service, switching to executing the first service.

[0125] Suspending the service first and then continuing to execute it after the higher priority service is completed can improve the user experience.

[0126] In yet another implementation, Figure 2 The method shown also includes: S204, when the first service is canceled, releasing the algorithm resources and / or hardware resources occupied by the first service.

[0127] In the case of the first service being cancelled, since it is no longer executed, resources can be released so that other perception services or various processes can still use the released resources. The algorithm resources here can be considered as the resources used when processing data and responding, and the hardware resources can be considered as hardware such as perception units and processors, for example, cameras.

[0128] In yet another implementation, during step S201, Figure 2 The method shown also includes:

[0129] S205, when receiving an execution instruction of a second service calling a perception unit during the execution of the first service calling a perception unit, determining whether the perception unit called by the first service is the same as the perception unit called by the second service;

[0130] S206. When the perception unit called by the first service is the same as the perception unit called by the second service, execute S201; or, when the perception unit called by the first service is different from the perception unit called by the second service, execute the first service and the second service at the same time.

[0131] This implementation method adds the judgment of whether the same perception unit is called. First, it checks whether they are the same. If they are the same, it means there is a conflict. Then, the execution priority is used to determine which service continues to execute. The service that continues to execute will call the same perception unit. If they are different, it means there is no conflict. Then, they are called together and the perception services continue to execute together.

[0132] The description of the perception unit can be found above and will not be repeated here.

[0133] For example, suppose the first service calls the front camera and the second service calls the rear camera. There is no conflict in the calling process and they can continue to execute together. However, it should be understood that during the continued execution, since both services may need to perform algorithmic processing on the image, conflicts may still occur. In this case, the execution priority can be determined in the above way to determine which service to continue to execute.

[0134] Figure 2 The method shown, when receiving an execution instruction of another perception service during the execution of one perception service, will determine which service to continue executing based on the execution priority of the perception service, thereby effectively resolving the conflict problem between multiple services.

[0135] Figure 3 It is a schematic diagram of the interactive process of a gaze expansion service in an embodiment of the present application. Assume that the user is browsing the web page, as shown in interface 301. At this time, a text message is received, and the text message pop-up window is shown in interface 302. At this time, the electronic device starts the gaze expansion service, the front camera (an example of a perception unit) will collect images, or the TOF sensor (another example of a perception unit) will collect images of the user, and then the electronic device will process these collected images, extract the user's line of sight, determine the coordinate point on the screen corresponding to the user's line of sight, and display it on the screen. The gaze point shown in interface 303 is obtained after processing the collected user's image. After determining the gaze point, it is judged that the gaze point is on the text message pop-up window, and after meeting the preset trigger conditions, the text message pop-up window will expand to a larger size to display more content, as shown in interface 304. If after the above-mentioned operations of collecting images, processing, and determining the gaze point, it is found that the gaze point is no longer near the end of the content of the text message pop-up window, it means that the user does not need to continue reading the text message content, and the gaze expansion service can be stopped, the text message is no longer expanded, and the display of the text message pop-up window is canceled after the preset conditions are met. If, after the above operations of collecting images, processing, and determining the gaze point, the gaze point is found to be near the end of the content of the SMS pop-up window, as shown in interface 305, it means that the user still wants to continue reading the SMS content, and the SMS pop-up window can be expanded. However, since such repeated expansion will also affect the experience, the gaze expansion service can be stopped and the reading interface of the SMS application can be directly entered, as shown in interface 306.

[0136] Assume that Figure 3 During the execution of the gaze expansion service shown in the figure, the user also made a remote screenshot gesture, at which point a conflict would occur, because the image acquisition of the gesture also requires the front camera, which could lead to a possible conflict, and the process of processing and determining the gesture could also result in a conflict.

[0137] Figure 4 It is a schematic diagram of the interaction process of another gaze expansion service of an embodiment of the present application. As shown in the desktop interface of interface 401, at this time, because the reminder time has arrived, a pop-up window of an alarm reminder pops up, as shown in interface 402. At this time, the electronic device starts the gaze expansion service, the front camera (an example of a perception unit) will capture images, or the TOF sensor (another example of a perception unit) will capture images of the user, and then the electronic device will process these captured images, extract the user's line of sight, determine the coordinate point on the screen corresponding to the user's line of sight, and display it on the screen. The gaze point shown in interface 403 is obtained after processing the collected image of the user. After the gaze point is determined, it is judged that the gaze point is on the pop-up window of the alarm event reminder, and after the preset trigger condition is met, the gaze expansion service is stopped, and the display interface of the schedule in the calendar application is directly entered, as shown in interface 404.

[0138] Since the interaction process of other sensing services is more common, Figure 3 and Figure 4 The description is mainly made using eye movement service as an example, but it should be understood that in actual application, the perception service of the embodiment of the present application is not limited to the eye movement service and any of the above-mentioned perception services, and may also be new perception services that appear in the future, as long as they are perception services.

[0139] Figure 5 is a schematic architecture diagram of the perception service of the embodiment of the present application. Figure 5 As shown, the application layer includes perception applications. Perception applications can be understood as background applications that are used to process interactive data related to perception services. For example, in the smart code recognition service, the perception application can display the smart code on the screen. Others are not listed one by one. Figure 5 The perception application includes multiple perception fences. Here, fence 1 to fence 5 are taken as examples. Each perception fence corresponds to one or more perception services. Here, perception services are taken as examples of services 1 to 6, among which fence 1 corresponds to service 1, fence 2 corresponds to service 2, fence 3 corresponds to service 3, fence 4 corresponds to service 4 and service 5, and fence 5 corresponds to service 6.

[0140] The framework layer includes the algorithm execution path, which can be understood as the place where the algorithm is executed. Here, the algorithm execution path includes two paths, path 1 and path 2. Each path can support at least one algorithm. Here, path 1 supports algorithms 11, 12, and 13, and path 2 supports algorithms 21 and 22.

[0141] It should be noted that the framework layer here refers to the layer between the application layer and the hardware layer, which can include the application framework layer (framework, FWK) layer, the camera framework (HAL) layer, and other layers involved in the algorithm execution path, etc., and can also include other layers. The algorithm execution path is located in the framework layer. An algorithm execution path can be considered as a path from hardware perception to application response for a perception service.

[0142] The hardware layer includes a sensing unit, which may be an image sensor such as a camera or TOF, or a voice sensor, etc., which are not listed one by one. Here, the sensing unit includes sensing units 1-3 as an example.

[0143] Assume that the corresponding relationship among sensing services, sensing fences, and sensing units is shown in Table 1.

[0144] Table 1

[0145]

[0146] As can be seen from Table 1, each perception service requires a perception unit to collect data, an algorithm execution path to perform corresponding algorithm operations, and a fence to respond to the operation results. It can also be seen here that the perception service in this application is a completely different concept from the SIM card service mentioned in dual SIM dual standby, and it requires a human-computer interaction perception process.

[0147] As can be seen from Table 1, service 1 needs to use perception unit 1 to collect data, use algorithm 11 in path 1 for calculation, and use fence 1 for response; service 2 needs to use perception unit 2 to collect data, use algorithm 12 in path 1 for calculation, and use fence 2 for response; therefore, there will be no conflict between service 1 and service 2 in the call of perception unit, and there will be no conflict in the response of fence. In the operation of algorithms, conflicts may or may not occur because they are in the same path. There will be no conflict when the algorithms in this path can be executed in parallel, but conflicts may occur when they cannot be executed in parallel.

[0148] Service 4 needs to use sensor unit 1 to collect data, use algorithm 21 in channel 2 to calculate, and use fence 4 to respond; service 5 needs to use sensor unit 1 or sensor unit 2 to collect data, use algorithm 21 in channel 2 to calculate, and use fence 4 to respond; therefore, service 4 and service 5 may or may not conflict in the calling of sensor units. Conflict will only occur when sensor unit 1 is called at the same time, and will not conflict in other calling situations. Conflict may also occur in the response of the fence, and conflict may also occur in the algorithm operation because they are in the same channel and use the same algorithm.

[0149] The analysis of possible conflicts between other services will not be listed one by one.

[0150] It should be understood that Figure 5 It only gives an example of a possible inter-layer structure, and only involves the layers that are most relevant to the execution process of the entire perception service and may conflict. In practice, there may be other layers, and the content included in each layer may be different, and there is no limitation.

[0151] When the solution of the embodiment of the present application is applied to Figure 5 The electronic device shown can effectively avoid the conflict problem between multiple perception services. Assuming that the first service is service 5 and the second service is service 6, although the instruction of service 6 calling perception unit 3 is received when service 5 calls perception unit 1, since the two do not conflict, they can both be executed, which is an example of steps S205-S206. Assuming that the first service is service 4 and the second service is service 5, when service 4 runs algorithm 21, it receives the execution instruction of service 5. Since the same algorithm under the same path is used, the algorithm priority is the same, and service 4 can continue to be executed at this time, which is an example of the equal execution priority in step S202. Assuming that the first service is service 3 and the second service is service 4, the execution instruction of service 4 is received during the execution of service 3, and then it is determined that the priority of service 3 in path 1 is lower than the priority of service 4 in path 2. According to the above method, it is determined that service 4 is executed at this time, and service 3 is canceled or suspended. Assume that the first service is service 2, the second service is service 6, and during the execution of service 5, the execution instruction of service 6 is received. It is determined that the algorithm required by service 5 is algorithm 21 in path 2, and the algorithm required by service 6 is algorithm 22 in path 2 and algorithm 13 in path 1. According to the priority of the path, path 2 is higher than path 1, so it is necessary to further determine the priority of algorithm 21 and algorithm 22. Assuming that algorithm 22 is higher, the final execution is to switch to executing service 6. Other situations are not listed one by one.

[0152] Figure 6 is a schematic architecture diagram of the perception service of the embodiment of the present application. Figure 6 As shown, the perception application in the application layer includes multiple perception fences. Here, the perception application includes eye movement fence, gesture fence, face orientation fence, smart code recognition fence, face presence fence and eye gaze fence. Each perception fence corresponds to one or more perception services. Here, the service corresponding to the eye movement fence is the eye movement service, the service corresponding to the gesture fence is the air gesture service, the service corresponding to the face orientation fence is the smart screen rotation service, the service corresponding to the smart code recognition fence is the smart code recognition service, the service corresponding to the face presence fence is the face AO service, and the services corresponding to the eye gaze fence are the gaze without turning off the screen service and the gaze to reduce the incoming call ringtone volume service.

[0153] Eye movement services may include services for recording eye movement parameters, experience services for eye movement control, and gaze expansion services.

[0154] Take the framework layer as an example, including the sensorhub path and the AP path, which are two algorithm execution paths. Each path can support at least one algorithm. Here, the sensorhub path supports gesture algorithms, intelligent code recognition algorithms, face orientation algorithms, and face presence algorithms, and the AP path includes eye gaze algorithms and eye movement algorithms. Among them, the gesture algorithm is used for air gesture services (that is, gesture control services), the intelligent code recognition algorithm is used for intelligent code recognition services, the face orientation algorithm is used for intelligent screen rotation services, the face presence algorithm is used for face AO services, the eye gaze algorithm is used for gaze without turning off the screen and gaze to reduce the incoming call ringtone volume services, and the eye movement algorithm is used for eye movement services. Other situations are not listed one by one.

[0155] As mentioned above, the framework layer refers to the layer between the application layer and the hardware layer, which may include the framework layer, HAL layer, and other layers involved in the algorithm execution path, etc. An algorithm execution path can be considered as a path from hardware perception to application response for a perception service.

[0156] In the hardware layer, the perception unit includes image sensors such as the front RGB camera, the front TOF camera and the rear camera as an example.

[0157] Each perception service requires a perception unit to collect data, an algorithm execution path to perform the corresponding algorithm operations, and a fence to respond to the operation results.

[0158] It should be understood that Figure 6 It only gives an example of a possible inter-layer structure, and only involves the layers that are most relevant to the execution process of the entire perception service and may conflict. In practice, there may be other layers, and there is no limitation.

[0159] In one example, when the first service is an eye movement parameter recording service or an eye movement control experience service, and the second service is a gaze without screen turning off service, the execution result is that the gaze without screen turning off service is not effective, that is, the execution priority of the first service is higher than that of the second service, so the first service continues to be executed.

[0160] In another example, when the first service is an eye movement parameter recording service or an eye movement control experience service, and the second service is a gaze to reduce the incoming call ringtone volume service, since when a call comes in, a reminder interface prompting to answer the call will jump out, so it can be set to have a higher execution priority for the gaze to reduce the incoming call ringtone volume service, so the execution result is the cancellation or suspension of the first service, that is, the second service has a higher execution priority than the first service, so the second service is executed instead, and the first service is canceled or suspended. Cancellation is equivalent to terminating the recording or experience process, and the user needs to reopen the setting interface to record or experience. Suspension is equivalent to pause. When the user completes the second service, the first service can be hot-started from the background. For the recording suspension, it can be that after the user hot-starts again, what he sees is the interface of the setting application, and the user needs to click again to record. For the experience suspension, it can be that after the user hot-starts again, what he sees is the experience interface of eye tracking.

[0161] In another example, when the first service is an eye movement parameter input service or an eye movement control experience service, and the second service is a face AO service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is equal to the second service, so the first service is continued to be executed according to the principle of first execution first.

[0162] In another example, when the first service is an eye movement parameter input service or an eye movement control experience service, and the second service is a face AO service, the execution result is simultaneous execution, that is, there will be no conflict between the first service and the second service, so they are executed simultaneously, refer to step S206.

[0163] In another example, when the first service is an eye movement parameter input service or an eye movement control experience service, and the second service is a smart code recognition service, the execution result is to cancel the first service based on the wrist flip action, that is, the execution priority of the second service is higher than the first service, so the second service is executed instead and the first service is canceled.

[0164] In another example, when the first service is an eye movement parameter input service or an eye movement control experience service, and the second service is a smart code recognition service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service continues to execute.

[0165] It can be seen that, since the priority relationship between the execution priorities of the first service and the second service can be preset, the execution results may be different depending on the settings within the preset priority relationship.

[0166] In another example, when the first service is an eye movement parameter entry service or an eye movement control experience service, and the second service is an intelligent screen rotation service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service continues to execute. The eye movement parameter entry service or the eye movement control experience service can be restricted to be executed only in portrait mode. In this case, in the preset priority relationship, the execution priority of the eye movement parameter entry service and the eye movement control experience service is higher than that of the intelligent screen rotation service.

[0167] In another example, when the first service is an eye movement parameter input service or an eye movement control experience service, and the second service is an intelligent assisted photography service, the execution result is to continue to execute the first service, that is, the execution priority of the second service is lower than or equal to the first service, so the first service continues to execute.

[0168] In another example, when the first service is an eye movement parameter recording service or an eye movement control experience service, and the second service is an air gesture service, the execution result is to continue executing the first service, that is, the execution priority of the second service is lower than or equal to the first service, so the first service continues to execute.

[0169] In another example, when the first service is the gaze expansion service and the second service is the gaze non-stop service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service is continued to execute. In addition, the eye movement result in the gaze expansion service can replace the gaze non-stop service, that is, the gaze point has been detected, which means that there is definitely a gaze line of sight, so the gaze non-stop service can be enabled based on this, but the triggering information source is changed from the original gaze non-stop service to the eye movement service.

[0170] In another example, when the first service is a gaze-expand service and the second service is a gaze-reduced call ringtone volume service, the execution result is that the second service is executed instead, and the first service is canceled or suspended. That is to say, the execution priority of the second service is higher than that of the first service, so the second service is executed instead, and the first service is canceled or suspended.

[0171] In another example, when the first service is the gaze expansion service and the second service is the gaze reduction service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service is continued to execute. This situation can be understood in this way: the user is already looking at the screen, so he can quickly determine whether to answer the call, so if the user operates to answer or hang up, the line of sight will naturally leave the pop-up window area, but if the user's line of sight is still in the pop-up window area, it means that the user now wants to continue to read the message instead of handling the incoming call. In this case, whether the incoming call ringtone is reduced is relatively unimportant. Therefore, based on this consideration, in the preset priority relationship, the priority of the gaze expansion service can be higher than the gaze reduction service.

[0172] In another example, when the first service is a gaze expansion service and the second service is a face AO service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is equal to the second service, so the first service is continued to be executed according to the principle of first execution first.

[0173] In another example, when the first service is a gaze expansion service and the second service is a face AO service, the execution result is simultaneous execution, that is, there is no conflict between the first service and the second service, so they are executed simultaneously, refer to step S206.

[0174] In another example, when the first service is a gaze-expanding service and the second service is a smart code recognition service, the execution result is to cancel the first service according to the wrist-flipping action, that is, the execution priority of the second service is higher than the first service, so the second service is executed instead and the first service is canceled.

[0175] In another example, when the first service is the gaze expansion service and the second service is the smart code recognition service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service continues to execute.

[0176] In another example, when the first service is the gaze expansion service and the second service is the smart screen rotation service, the execution result is to continue to execute the first service, that is, the execution priority of the first service is higher than that of the second service, so the first service continues to execute.

[0177] In another example, when the first service is a gaze expansion service and the second service is an intelligent assisted photography service, the execution result is to continue to execute the first service, that is, the execution priority of the second service is lower than or equal to the first service, so the first service continues to execute.

[0178] In another example, when the first service is a gaze expansion service and the second service is an air gesture service, the execution result is to continue executing the first service, that is, the execution priority of the second service is lower than or equal to the first service, so the first service continues to execute.

[0179] Combine the following Figure 3 and Figure 7 Give an example of a conflict resolution process. Figure 7 It is a schematic diagram of an execution process of a method for resolving perceived service conflicts according to an embodiment of the present application. Figure 7 The interface shown can be considered to occur after interface 302, that is, the start of the gaze expansion service is triggered by receiving a text message pop-up window. At this time, it is in the execution period of the gaze expansion service, that is, the first service here is the gaze expansion service. For the convenience of display, Figure 7 Taking the case where an incoming call is received at interface 303 as an example, it should be understood that the solution of the present application can be executed as long as the second service is received during the entire execution period of the first service, without limitation.

[0180] like Figure 7 As shown, assuming that the user is about to respond in interface 303 and expand the content of the text message, and just receives an incoming call, as shown in interface 307, the service of reducing the volume of the incoming ringtone by looking at it will be triggered. That is to say, the second service here is the service of reducing the volume of the incoming ringtone by looking at it, and then S201 is executed to determine that the execution priority of the second service is higher than that of the first service, and S202 is executed to switch to executing the second service, and cancel or suspend the first service. Since the user is looking at the screen at this time, when executing the service of reducing the volume of the incoming ringtone by looking at it, the volume of the incoming ringtone will inevitably be reduced because of the detection of human eye gaze. For the sake of understanding, interface 308 is used as an example here. Interface 308 is still an incoming call interface, but the ringtone volume is reduced compared to interface 307. For intuitiveness, the ringtone volume is marked in the figure, but it should be understood that such a volume display is not necessarily required in practice.

[0181] Assuming that the second service is being executed, the user clicks hang up or answers the call in interface 308, or clicks the physical power button, or looks away from the screen, and the service of reducing the ringtone volume of incoming calls will end. At this time, if the first service was canceled before, it will not jump back to the interface of the first service, that is, the text message will not continue to be expanded, but if the first service was suspended before, it will jump back. According to normal usage habits, it is generally more likely to answer the call, and if the call is answered, keeping the first service suspended will occupy resources, and the user may open the text message to check after answering the call, especially Figure 7In the case shown, the caller and the texter are the same person. At this time, the text message may have been finished on the phone, or there may be new changes in the text message, so there is no need to read the text message again. Therefore, it can be set here to cancel the first service. That is, when the second service is executed, the first service is canceled.

[0182] However, it should also be understood that, based on the above, when an incoming call is received in interface 303, the incoming call may also appear in the interface in the form of a pop-up window, that is, the situation shown in interface 309 appears, and there are two pop-ups at the same time. At this time, the user can still continue to expand the text message. So in this case, when interface 309 appears, that is, the pop-up window of the incoming call reminder triggers the service of looking at the lowering of the incoming call ringtone volume. At this time, S201 can be executed to determine that the execution priority of the second service is lower than or equal to the first service, and S202 is executed to continue to execute the first service. In other words, if the user operates to answer or hang up, or to see the incoming call pop-up window, the line of sight will naturally leave the SMS pop-up window area, but if the user's line of sight is still in the SMS pop-up window area, it means that the user now hopes to continue to read the SMS instead of handling the incoming call. In this case, whether the incoming call ringtone is reduced is relatively less important. In this case, the incoming call reminder also needs to appear in the form of a pop-up window, or the original SMS pop-up window will not be covered by the incoming call, resulting in the user not being able to see the pop-up window.

[0183] Assuming that the user clicks hang up or answers the call in interface 309, or moves away from the SMS pop-up window area, the eye tracking service will end. However, since the user is looking at the screen, he can quickly handle the incoming call, so it is not important whether to continue to reduce the ringtone volume. Assuming that the user is still looking at the SMS pop-up window area in interface 309, the SMS will continue to expand, as shown in interface 304.

[0184] Figure 8 Schematic diagram of a device for resolving perception service conflicts according to an embodiment of the present application. Figure 8 As shown, the device 2000 includes an acquisition unit 2001 and a processing unit 2002. The device 2000 can be integrated in electronic devices such as mobile phones, tablet computers, and smart wearable devices.

[0185] The device 2000 can be used to execute any of the above methods for resolving perceived service conflicts. For example, the acquisition unit 2001 can be used to execute step S201, and the processing unit 2002 can be used to execute step S202. For another example, the processing unit 2002 can be used to execute Figure 2 For another example, the apparatus 2000 can be used to perform Figure 3 , Figure 4 or Figure 7 interaction process.

[0186] In one implementation, the apparatus 2000 may further include a storage unit for storing data such as images, execution priorities, etc. The storage unit may be integrated in any one of the above units, or may be a unit independent of all the above units.

[0187] Fig. 9 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Fig. 9 As shown, the electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc. Among them, the sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, etc.

[0188] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0189] For example, Fig. 9The processor 910 shown may include one or more processing units, for example, the processor 910 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0190] The controller may be the nerve center and command center of the electronic device 900. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0191] The processor 910 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. The memory may store instructions or data that the processor 910 has just used or cyclically used. If the processor 910 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 910, and thus improves the efficiency of the system.

[0192] In some embodiments, the processor 910 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0193] In some embodiments, the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The processor 910 may include multiple groups of I2C buses. The processor 910 may be coupled to the touch sensor 980K, the charger, the flash, the camera 993, etc. through different I2C bus interfaces. For example, the processor 910 may be coupled to the touch sensor 980K through the I2C interface, so that the processor 910 communicates with the touch sensor 980K through the I2C bus interface to realize the touch function of the electronic device 900.

[0194] In some embodiments, the I2S interface can be used for audio communication. The processor 910 can include multiple I2S buses. The processor 910 can be coupled to the audio module 970 via the I2S bus to achieve communication between the processor 910 and the audio module 970.

[0195] In some embodiments, the audio module 970 can transmit audio signals to the wireless communication module 960 through the I2S interface to implement the function of answering calls through a Bluetooth headset.

[0196] In some embodiments, the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. The audio module 970 and the wireless communication module 960 can be coupled via a PCM bus interface.

[0197] In some embodiments, the audio module 970 can also transmit audio signals to the wireless communication module 960 through the PCM interface to implement the function of answering calls through a Bluetooth headset. It should be understood that both the I2S interface and the PCM interface can be used for audio communication.

[0198] In some embodiments, the UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The UART interface is generally used to connect the processor 910 and the wireless communication module 960. For example, the processor 910 communicates with the Bluetooth module in the wireless communication module 960 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 970 can transmit an audio signal to the wireless communication module 960 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0199] In some embodiments, the MIPI interface can be used to connect the processor 910 with peripheral devices such as the display screen 994 and the camera 993. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. The processor 910 and the camera 993 communicate through the CSI interface to realize the shooting function of the electronic device 900. The processor 910 and the display screen 994 communicate through the DSI interface to realize the display function of the electronic device 900.

[0200] In some embodiments, the GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. The GPIO interface can be used to connect the processor 910 with the camera 993, the display screen 994, the wireless communication module 960, the audio module 970, the sensor module 980, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0201] Exemplarily, the USB interface 930 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 900, and can also be used to transfer data between the electronic device 900 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0202] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0203] The charging management module 940 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 940 may receive charging input from a wired charger through the USB interface 930. In some wireless charging embodiments, the charging management module 940 may receive wireless charging input through a wireless charging coil of the electronic device 900. While the charging management module 940 is charging the battery 942, it may also power the electronic device through the power management module 941.

[0204] The power management module 941 is used to connect the battery 942, the charging management module 940 and the processor 910. The power management module 941 receives input from the battery 942 and / or the charging management module 940, and supplies power to the processor 910, the internal memory 921, the external memory, the display screen 994, the camera 993, and the wireless communication module 960. The power management module 941 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 941 can also be set in the processor 910. In other embodiments, the power management module 941 and the charging management module 940 can also be set in the same device.

[0205] The wireless communication function of the electronic device 900 can be implemented through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor and baseband processor.

[0206] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0207] The mobile communication module 950 can provide a wireless communication solution applied to the electronic device 900, such as at least one of the following solutions: a second generation (2G) mobile communication solution, a third generation (3G) mobile communication solution, a fourth generation (5G) mobile communication solution, and a fifth generation (5G) mobile communication solution. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 950 can receive electromagnetic waves from the antenna 1, and filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 950 can also amplify the signal modulated by the modulation and demodulation processor, and the amplified signal is converted into an electromagnetic wave and radiated out through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 910. In some embodiments, at least some of the functional modules of the mobile communication module 950 can be set in the same device as at least some of the modules of the processor 910.

[0208] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 970A, a receiver 970B, etc.), or displays an image or video through a display screen 994. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 910 and be set in the same device as the mobile communication module 950 or other functional modules.

[0209] The wireless communication module 960 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 900. The wireless communication module 960 can be one or more devices integrating at least one communication processing module. The wireless communication module 960 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 910. The wireless communication module 960 can also receive the signal to be sent from the processor 910, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0210] In some embodiments, the antenna 1 of the electronic device 900 is coupled to the mobile communication module 950, and the antenna 2 of the electronic device 900 is coupled to the wireless communication module 960, so that the electronic device 900 can communicate with the network and other electronic devices through wireless communication technology. The wireless communication technology may include at least one of the following communication technologies: global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technology. The GNSS may include at least one of the following positioning technologies: global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and satellite based augmentation systems (SBAS).

[0211] The electronic device 900 implements the display function through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 910 may include one or more GPUs, which execute program instructions to generate or change display information.

[0212] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-Led, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 900 may include 1 or N display screens 994, where N is a positive integer greater than 1.

[0213] The electronic device 900 can realize the shooting function through an ISP, a camera 993, a video codec, a GPU, a display screen 994, and an application processor.

[0214] ISP is used to process the data fed back by camera 993. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 993.

[0215] The camera 993 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 900 may include 1 or N cameras 993, where N is a positive integer greater than 1.

[0216] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 900 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0217] Video codecs are used to compress or decompress digital videos. The electronic device 900 may support one or more video codecs. Thus, the electronic device 900 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0218] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 900 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0219] The external memory interface 920 can be used to connect an external memory card, such as a secure digital (SD) card, to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 910 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0220] The internal memory 921 can be used to store computer executable program codes, which include instructions. The processor 910 executes various functional applications and data processing of the electronic device 900 by running the instructions stored in the internal memory 921. The internal memory 921 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 900 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 921 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0221] The electronic device 900 can implement audio functions such as music playing and recording through the audio module 970, the speaker 970A, the receiver 970B, the microphone 970C, the headphone jack 970D, and the application processor.

[0222] The audio module 970 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 970 can also be used to encode and decode audio signals. In some embodiments, the audio module 970 can be arranged in the processor 910, or some functional modules of the audio module 970 can be arranged in the processor 910.

[0223] The speaker 970A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 900 can listen to music or listen to a hands-free call through the speaker 970A.

[0224] The receiver 970B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 900 receives a call or voice message, the voice can be received by placing the receiver 970B close to the human ear.

[0225] Microphone 970C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 970C to input the sound signal into the microphone 970C. The electronic device 900 can be provided with at least one microphone 970C. In other embodiments, the electronic device 900 can be provided with two microphones 970C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 900 can also be provided with three, four or more microphones 970C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0226] The earphone interface 970D is used to connect a wired earphone and can be the USB interface 930 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0227] The pressure sensor 980A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 980A can be set on the display screen 994. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 980A, the capacitance between the electrodes changes. The electronic device 900 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 994, the electronic device 900 detects the touch operation intensity according to the pressure sensor 980A. The electronic device 900 can also calculate the touch position according to the detection signal of the pressure sensor 980A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0228] The gyroscope sensor 980B can be used to determine the motion posture of the electronic device 900. In some embodiments, the angular velocity of the electronic device 900 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 980B. The gyroscope sensor 980B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 980B detects the angle of the electronic device 900 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 900 through reverse movement to achieve anti-shake. The gyroscope sensor 980B can also be used for navigation and somatosensory game scenes.

[0229] The air pressure sensor 980C is used to measure air pressure. In some embodiments, the electronic device 900 calculates the altitude through the air pressure value measured by the air pressure sensor 980C to assist in positioning and navigation.

[0230] The magnetic sensor 980D includes a Hall sensor. The electronic device 900 can use the magnetic sensor 980D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 900 is a flip phone, the electronic device 900 can detect the opening and closing of the flip cover according to the magnetic sensor 980D; according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, set the flip cover to automatically unlock and other features.

[0231] The acceleration sensor 980E can detect the magnitude of the acceleration of the electronic device 900 in all directions (generally three axes). When the electronic device 900 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0232] The distance sensor 980F is used to measure the distance. The electronic device 900 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 900 can use the distance sensor 980F to measure the distance to achieve fast focusing.

[0233] The proximity light sensor 980G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 900 emits infrared light outward through the light-emitting diode. The electronic device 900 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 900. When insufficient reflected light is detected, the electronic device 900 can determine that there is no object near the electronic device 900. The electronic device 900 can use the proximity light sensor 980G to detect that the user holds the electronic device 900 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 980G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0234] The ambient light sensor 980L is used to sense the ambient light brightness. The electronic device 900 can adaptively adjust the brightness of the display screen 994 according to the perceived ambient light brightness. The ambient light sensor 980L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 980L can also cooperate with the proximity light sensor 980G to detect whether the electronic device 900 is in a pocket to prevent accidental touches.

[0235] The fingerprint sensor 980H is used to collect fingerprints. The electronic device 900 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0236] The temperature sensor 980J is used to detect temperature. In some embodiments, the electronic device 900 uses the temperature detected by the temperature sensor 980J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 980J exceeds a threshold, the electronic device 900 reduces the performance of the processor located near the temperature sensor 980J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 900 heats the battery 942 to avoid abnormal shutdown of the electronic device 900 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 900 performs a boost on the output voltage of the battery 942 to avoid abnormal shutdown caused by low temperature.

[0237] The touch sensor 980K is also called a "touch panel". The touch sensor 980K can be set on the display screen 994, and the touch sensor 980K and the display screen 994 form a touch screen, also called a "touch screen". The touch sensor 980K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 994. In other embodiments, the touch sensor 980K can also be set on the surface of the electronic device 900, which is different from the position of the display screen 994.

[0238] The bone conduction sensor 980M can obtain a vibration signal. In some embodiments, the bone conduction sensor 980M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 980M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 980M can also be set in an earphone and combined into a bone conduction earphone. The audio module 970 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 980M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 980M to realize a heart rate detection function.

[0239] The key 990 includes a power key, a volume key, etc. The key 990 may be a mechanical key or a touch key. The electronic device 900 may receive key input and generate key signal input related to user settings and function control of the electronic device 900.

[0240] Motor 991 can generate vibration prompts. Motor 991 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 994, motor 991 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0241] Indicator 992 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0242] The SIM card interface 995 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 900 by inserting it into the SIM card interface 995 or pulling it out from the SIM card interface 995. The electronic device 900 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 995 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 995 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 995 can also be compatible with different types of SIM cards. The SIM card interface 995 can also be compatible with external memory cards. The electronic device 900 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 900 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 900 and cannot be separated from the electronic device 900.

[0243] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0244] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0245] An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor can implement the steps in any of the above methods when executing the computer program.

[0246] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0247] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0248] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0249] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0250] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0251] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0252] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0253] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0254] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0255] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0256] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0257] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0258] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for resolving a perception service conflict, characterized in that: include: When an execution instruction of a second service is received during the execution of the first service, determining whether an execution priority of the second service is higher than an execution priority of the first service, the first service and the second service being both services corresponding to the perception application; When the execution priority of the second service is higher than the execution priority of the first service, the second service is executed instead, and the first service is canceled or suspended; or When the execution priority of the second service is lower than or equal to the execution priority of the first service, the first service continues to be executed.

2. The method according to claim 1, characterized in that: The step of determining whether the execution priority of the second service is higher than the execution priority of the first service when receiving an execution instruction of the second service during the execution of the first service comprises: According to a preset priority relationship of the perception services, it is determined whether the execution priority of the second service is higher than the execution priority of the first service.

3. The method according to claim 1, characterized in that The step of determining whether the execution priority of the second service is higher than the execution priority of the first service when receiving an execution instruction of the second service during the execution of the first service comprises: When the first service and the second service are in the same algorithm execution path, determining whether the execution priority of the second service is higher than the execution priority of the first service according to the relationship between the algorithm priority of the second service and the algorithm priority of the first service; or When the first service and the second service are not in the same algorithm execution path, whether the execution priority of the second service is higher than the execution priority of the first service is determined based on the relationship between the priority of the algorithm execution path of the second service and the priority of the algorithm execution path of the first service; the priority of the algorithm execution path is determined based on the priority of the algorithm execution path calling the perception unit.

4. The method according to claim 3, characterized in that The determining whether the execution priority of the second service is higher than the execution priority of the first service according to the relationship between the algorithm priority of the second service and the algorithm priority of the first service when the first service and the second service are in the same algorithm execution path includes: When the algorithm priority of the second service is higher than the algorithm priority of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or, When the algorithm priority of the second service is lower than or equal to the algorithm priority of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

5. The method according to any one of claims 2 to 4, characterized in that The step of determining whether the execution priority of the second service is higher than the execution priority of the first service when receiving an execution instruction of the second service during the execution of the first service comprises: When the priority of the algorithm execution path of the second service is higher than the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is higher than the execution priority of the first service; or, When the priority of the algorithm execution path of the second service is lower than or equal to the priority of the algorithm execution path of the first service, it is determined that the execution priority of the second service is lower than or equal to the execution priority of the first service.

6. The method according to any one of claims 1 to 5, characterized in that After suspending the first service, the method further includes: After executing the second service, switch to executing the first service.

7. The method according to any one of claims 1 to 5, characterized in that After the first service is canceled, the method further includes: Release the algorithm resources and / or hardware resources occupied by the first service.

8. The method according to any one of claims 1 to 5, characterized in that Before determining whether the execution priority of the second service is higher than the execution priority of the first service, the method further includes: When receiving an execution instruction of the second service calling perception unit during the execution of the first service calling perception unit, determining whether the perception unit called by the first service is the same as the perception unit called by the second service; When the perception unit called by the first service is the same as the perception unit called by the second service, determining whether the execution priority of the second service is higher than the execution priority of the first service; or, When the perception unit called by the first service is different from the perception unit called by the second service, the first service and the second service are executed simultaneously.

9. The method according to any one of claims 1 to 5, characterized in that The perception application includes at least one of an eye movement fence, a gesture fence, a face orientation fence, an intelligent code recognition fence, a face presence fence, and an eye gaze fence; the service corresponding to the eye movement fence includes at least one of an eye movement parameter input service, an eye movement control experience service, and a gaze expansion service; The service corresponding to the gesture fence includes an air gesture service; The service corresponding to the face facing the fence includes a smart screen rotation service; The service corresponding to the smart code recognition fence includes the smart code recognition service; the service corresponding to the presence or absence of the face fence includes the face remote adjustment AO service; the service corresponding to the presence or absence of the eye gaze fence includes at least one of the eye gaze without turning off the screen service and the eye gaze to reduce the incoming call ringtone volume service.

10. The method according to claim 9, characterized in that The priority of the first path is higher than that of the second path; the first path includes at least one of the algorithm execution paths of the service corresponding to the eye movement fence and the eye gaze fence; the second path includes at least one of the algorithm execution paths of the service corresponding to the gesture fence, the face orientation fence, the smart code recognition fence and the face presence or absence fence.

11. The method according to claim 10, characterized in that The algorithm priority of the first algorithm in the first path is higher than the algorithm priority of the second algorithm; the first algorithm includes the algorithm of the service corresponding to the eye movement fence; the second algorithm includes the algorithm of the service corresponding to the eye gaze fence.

12. The method according to claim 10, characterized in that The algorithm priority of the algorithm corresponding to each service in the second path is the same.

13. A device for resolving perception service conflicts, characterized in that: include: an acquisition unit, configured to determine, when receiving an execution instruction of a second service during execution of a first service, whether an execution priority of the second service is higher than an execution priority of the first service, wherein both the first service and the second service are services corresponding to the perception application; A processing unit, configured to switch to executing the second service and cancel or suspend the first service when the execution priority of the second service is higher than the execution priority of the first service; or to continue executing the first service when the execution priority of the second service is lower than or equal to the execution priority of the first service.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 12 is implemented.

15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.