Equipment resource scheduling method, control device and storage medium
By obtaining and monitoring the scene information that the business party is concerned about and sending feedback information to it, the problem of inconvenience of the business party in obtaining scene information is solved, the accurate scheduling of equipment resources is achieved, and the equipment performance and user experience are improved.
Patent Information
- Application Number
- CN202311373350.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, the business party cannot easily and accurately obtain scenario information, resulting in inflexible and accurate policy execution, which in turn affects the scheduling of equipment resources and fails to achieve the optimal balance between performance and power consumption.
By obtaining the scene information that multiple business parties need to pay attention to and monitoring the status of each scene information, for each scene information, when its status changes, feedback information is sent to the business parties concerned about the scene information, so that they can schedule device resources based on the feedback information.
It realizes convenient and accurate acquisition of the scenario information status that the business parties are concerned about, ensuring that each business parties can accurately understand the current status of the scenario information they are concerned about, thereby performing resource scheduling more accurately, improving the smoothness of equipment operations, reducing equipment power consumption, and improving user experience.
Smart Images

Figure CN119862024A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device resource scheduling, and specifically provides a device resource scheduling method, a control device and a storage medium. Background Art
[0002] Computer devices generally have specific operating systems, and the architecture of a certain operating system is usually divided into several layers, each layer of which contains several business parties for executing various strategies. When executing strategies, each business party may not be able to obtain the current scenario information for various reasons. For example, the business party at the bottom layer cannot obtain the scenario information that can only be obtained at the upper layer, and the business party at the framework layer cannot obtain the scenario information inside the application.
[0003] In addition, since there are many business parties and they need to obtain more scene information, if each business party implements its own scene information needs, it will not only be a large workload, but also generate a lot of redundant code. This is because the scene information needs of different business parties are actually quite similar.
[0004] The above situation where scene information cannot be obtained or the workload of obtaining scene information is large will cause the business side to be unable to flexibly and accurately execute various strategies. The inability to flexibly and accurately execute various strategies will lead to excessive use or excessive restriction of device resources (such as CPU, GPU, memory, network, frame rate, backlight, touch sampling frequency, etc.), resulting in the inability to achieve the optimal balance between device performance and power consumption, affecting user experience. Summary of the invention
[0005] In order to solve the above technical problems, the present application proposes a device resource scheduling method, a control device and a storage medium, which can more conveniently and accurately obtain the scene information status of the business party, so as to more accurately schedule the device resources.
[0006] To achieve the above purpose, the technical solution of this application is implemented as follows:
[0007] In a first aspect, the present application provides a device resource scheduling method, wherein the device includes an operating system; the architecture of the operating system includes multiple service parties; the method includes:
[0008] Acquire at least one type of scenario information that the multiple business parties need to pay attention to;
[0009] Monitoring the status of each of the scene information;
[0010] For each type of scenario information, when the state of the scenario information changes, feedback information is sent to a business party that pays attention to the scenario information, so that the business party schedules the resources of the device based on the feedback information.
[0011] In some embodiments, the operating system includes an Android system; and the obtaining of at least one scenario information that the multiple business parties need to pay attention to includes:
[0012] The scene information is obtained by at least one of the following methods: inserting a stub in the Android source code, embedding a point in the Android application program, registering a listener, registering a broadcast, and registering a content observer.
[0013] In some embodiments, the scenario information is recorded via a preset configuration file; and the attention status of each of the business parties to each type of scenario information is recorded via the configuration file.
[0014] In some embodiments, the device has at least one application installed; the scenario information includes at least one of the following items: current state information of the application, current state information of the device, and current behavior information of the user.
[0015] In some embodiments, the method further comprises:
[0016] Detect whether the operation of the device is stuck;
[0017] Detecting whether the temperature of the device is greater than a preset temperature threshold;
[0018] When the operation of the device freezes, or the temperature of the device is greater than the preset temperature threshold, obtaining the currently running scene information;
[0019] The currently running scenario information is added to a list of scenario information that the multiple business parties need to pay attention to.
[0020] In some embodiments, for each type of the scenario information, when the state of the scenario information changes, sending feedback information to a business party concerned about the scenario information so that the business party schedules resources of the device based on the feedback information includes:
[0021] For each type of scenario information, when the scenario information starts to run, the start time of the scenario information is sent to the business party that pays attention to the scenario information; when the scenario information ends to run, the end time of the scenario information is sent to the business party that pays attention to the scenario information, so that the business party can schedule the resources of the device based on the start time and / or the end time.
[0022] In some embodiments, before obtaining at least one type of scenario information that the multiple business parties need to pay attention to, the method further includes:
[0023] Establishing a business connection with each of the business parties;
[0024] The method further comprises:
[0025] Disconnect the business connection with the business party that no longer needs to pay attention to the scene information.
[0026] In some embodiments, establishing a business connection with each of the business parties includes:
[0027] For each of the business parties, a business connection is established with the business party through a listener class pre-built by the business party for monitoring the state of scene information; or,
[0028] For each of the business parties, a preset interface provided by the business party is called to establish a business connection with the business party.
[0029] In a second aspect, the present application provides a control device, which includes a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute the device resource scheduling method described in any one of the above technical solutions.
[0030] In a third aspect, the present application provides a computer-readable storage medium, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the device resource scheduling method described in any one of the above technical solutions.
[0031] The device resource scheduling method, control device and storage medium provided in the embodiment of the present application obtain at least one scene information that multiple business parties need to pay attention to, and monitor the status of each scene information. For each scene information, when the status of the scene information changes, feedback information is sent to the business party paying attention to the scene information, so that the business party can schedule the resources of the device based on the feedback information, so that the scene information that all business parties need to pay attention to can be uniformly obtained, and avoid each business party separately obtaining the scene information that it needs to pay attention to. In addition, when the status of a certain scene information changes, the business party paying attention to the scene information can be notified in time, so that each business party can accurately know the current status of various scene information it pays attention to, so that resource scheduling can be performed more accurately. It can be seen that the technical solution provided in the embodiment of the present application can more conveniently and accurately obtain the state of the scene information that the business party pays attention to, so as to more accurately schedule the device resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only used for the purpose of illustrating the present application and are not intended to limit the scope of protection of the present application. In addition, similar numbers in the drawings are used to represent similar components, among which:
[0033] Figure 1 A flow chart of the main steps of a device resource scheduling method according to an embodiment of the present application;
[0034] Figure 2 A system structure diagram of a method for implementing device resource scheduling according to an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a scene combination in an embodiment of the present application;
[0036] Figure 4 This is a main structural block diagram of a device resource scheduling apparatus according to an embodiment of the present application.
[0037] Reference numerals list :
[0038] 11: scene acquisition unit; 12: monitoring unit; 13: sending unit. DETAILED DESCRIPTION
[0039] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0040] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.
[0041] In order to enable the business party to obtain scene information conveniently and accurately, so as to accurately execute various strategies and then accurately schedule device resources, the present application provides a device resource scheduling method, wherein the device includes an operating system, and the architecture of the operating system includes multiple business parties, such as Figure 1As shown, the device resource scheduling method in the embodiment of the present application mainly includes the following steps S101 to S103.
[0042] Step S101, obtaining at least one type of scenario information that the multiple business parties need to pay attention to;
[0043] In this embodiment, the device refers to a device that has an operating system and can install application programs, such as a mobile phone, a tablet, a smart watch and other electronic devices.
[0044] In this embodiment, the business party refers to the business party in each layer of the device operating system architecture for executing various computing strategies or operation strategies. Each business party will execute corresponding strategies based on the scenarios it is concerned about, and then schedule device resources.
[0045] The device described in this embodiment is installed with at least one application. In order to fully obtain scenario information and more accurately execute corresponding strategies, the scenario information includes at least one of the following items: current state information of the application, current state information of the device, and current behavior information of the user.
[0046] Among them, the current status information of the application may include: application package name, application type, foreground and background status of the application, whether the application is recording, whether the application is recording, whether the application is playing audio, whether the application is playing video, whether the application is using Bluetooth, whether the application is using the camera, whether the application is in a small window state, whether the application is in a plug-in state, whether the application turns on notifications, whether the application turns on foreground services, whether the application is downloading, whether the application is frozen, application internal scenes, etc.; the current status information of the device may include: whether the device has entered low power mode, whether the device is charging, whether the device has turned on power saving mode, whether the device has turned on flight mode, whether the device has turned on network hotspot, whether the device is on a call, whether the device has turned on the screen projection function, whether the device has turned on the flash, the device screen status, the device heating status, the network connection status, etc.; the user's current behavior information may include: whether the user is asleep, whether the user is exercising, whether the user is driving, whether the user is taking an elevator, etc.
[0047] Of course, the specific content included in the current status information of the above application, the current status information of the device, and the current behavior information of the user is not limited to the items listed above. In actual applications, other information can be added according to actual needs, and this embodiment does not impose specific restrictions on this.
[0048] The operating system described in this embodiment includes an Android system. In order to obtain various scene information more comprehensively and accurately, the acquisition of at least one scene information that the multiple business parties need to pay attention to described in this embodiment includes: obtaining the scene information in at least one of the following ways: inserting a stub in the Android source code, in the Android application package embedding point, registering a listener, registering a broadcast, and registering a content observer.
[0049] That is, in this embodiment, one or more of the above methods may be used to obtain various scenario information that each business party needs to pay attention to.
[0050] Step S102, monitoring the status of each type of scene information;
[0051] In this embodiment, the status of each scenario information includes: whether the scenario information is running. After obtaining various scenario information that each business party needs to pay attention to, the current status of each scenario information is monitored in real time. When the status of a certain scenario information changes, for example, from a non-running state to a running state, or from a running state to a non-running state, the system will promptly notify the business party paying attention to the scenario information.
[0052] In order to make the acquired scene information and the needs of each business party easy to expand, and to effectively monitor the status of each scene information, the scene information described in this embodiment is recorded through a preset configuration file, and the attention status of each business party to each scene information is also recorded through the configuration file. When it is necessary to increase the scene of interest, it is only necessary to add the corresponding scene information to the configuration file, and the change in the state of the scene / scene information can also be reflected through the configuration file.
[0053] Step S103: for each type of the scenario information, when the state of the scenario information changes, feedback information is sent to the business party paying attention to the scenario information, so that the business party schedules the resources of the device based on the feedback information.
[0054] In order to enable the business party to more accurately execute the corresponding strategy and thus schedule the device resources more accurately, the embodiment described that for each type of scenario information, when the state of the scenario information changes, feedback information is sent to the business party paying attention to the scenario information, so that the business party can schedule the resources of the device based on the feedback information, including: for each type of scenario information, when the scenario information starts to run, the start time of the scenario information is sent to the business party paying attention to the scenario information, and when the scenario information ends, the end time of the scenario information is sent to the business party paying attention to the scenario information, so that the business party can schedule the resources of the device based on the start time and / or the end time.
[0055] That is, in this embodiment, when the scenario that the business party is concerned about appears and ends, it will be fed back to the business party, so that the business party's strategy can be executed very accurately, that is, the device resources can be accurately scheduled, which maximizes the smoothness of device operation, reduces the power consumption of the device, and improves the user experience.
[0056] Furthermore, in order to more accurately schedule device resources and avoid device jamming or heating, the method described in this embodiment also includes: detecting whether the operation of the device jams; detecting whether the temperature of the device is greater than a preset temperature threshold; when the operation of the device jams, or the temperature of the device is greater than the preset temperature threshold, obtaining the currently running scene information; and adding the currently running scene information to the list of scene information that the multiple business parties need to pay attention to.
[0057] The scene information list may be the configuration file mentioned above.
[0058] The device freeze mentioned above refers to the phenomenon that when the user is operating the device, the screen displayed by the device has frame lag, which makes the user's operation of the device not smooth enough and affects the user's operating experience.
[0059] That is, in this embodiment, when the device freezes or heats up, it means that the current device resource scheduling is not very reasonable. The currently running scenario information is added to the configuration file described above as the scenario that each business party needs to pay attention to, so that each business party can execute the corresponding strategy more accurately, that is, schedule device resources more accurately, thereby avoiding the above-mentioned freeze or heat phenomenon.
[0060] In order to reduce the amount of data processing and the power consumption of the system, before acquiring at least one scenario information that the multiple business parties need to pay attention to, the method described in this embodiment also includes: establishing a business connection with each of the business parties. In order to further reduce the amount of data processing and the power consumption of the system, the method described in this embodiment also includes: disconnecting the business connection with the business party that no longer needs to pay attention to the scenario information.
[0061] That is, in this embodiment, a business connection is established with the system only when the business party needs to pay attention to certain scenarios, and the business connection is disconnected with the system when the business party no longer needs to pay attention to the scenarios. In this way, the system's data processing volume can be effectively reduced and the system power consumption can be effectively reduced.
[0062] In order to establish a business connection with the business party conveniently and effectively, the establishment of a business connection with each of the business parties described in this embodiment includes: for each of the business parties, establishing a business connection with the business party through a listener class pre-built by the business party for monitoring the status of scene information; or, for each of the business parties, calling a preset interface provided by the business party to establish a business connection with the business party.
[0063] That is, in this embodiment, the system can establish a business connection with the business party in two ways. One way is for the business party to implement it through a listener class, and the other way is to directly call the interface provided by the business party. The above two methods only require a very small amount of code to implement, and can conveniently and effectively establish a business connection between the system and the business party.
[0064] The following uses actual applications as an example to further illustrate the device resource scheduling method provided by this embodiment:
[0065] In order to enable business parties to obtain scene information conveniently and accurately, so that strategies can be executed flexibly and accurately, the device system requires a unified, easy-to-expand, flexible, accurate, and easy-to-access module for acquiring, identifying, and distributing scene information, also known as a scene recognition module.
[0066] In a specific implementation, the device resource scheduling method is implemented by the scene recognition module. Figure 2 As shown in FIG. 1 , the scene recognition module includes five submodules, namely, the configuration file parsing module ConfigParser, the scene receiving module SceneReceiver, the information registration module DataRegister, the information receiving module DataReceiver and the scene sending module SceneDispatcher. Based on these five submodules, the scene recognition module has the following technical features:
[0067] (1) Unification: The workload of obtaining scene information is concentrated;
[0068] (2) Easy to expand: The source of scenario information is easy to expand, and the needs of business parties are also easy to expand;
[0069] (3)Flexible: Supports business parties to focus on any single scenario or combination of scenarios;
[0070] (4) Accuracy: When the scenarios that the business side is concerned about occur and end, callbacks will be sent to notify the business side;
[0071] (5) Easy access: Business parties only need to write a small amount of code (no more than 10 lines) and add simple parameters in the configuration file to access the scene recognition module.
[0072] With respect to the above technical features, their implementation methods and advantages will be described below respectively.
[0073] 1. Unification
[0074] 1.1 Implementation
[0075] As a system service, the scene recognition module is located in the system_server process of the operating system and runs when the system is turned on. Through binder communication, LocalService communication, write nodes, etc., business parties at the application layer (app layer), framework layer (framework layer), native layer (native layer), and kernel layer (kernel layer) can all use the scene recognition module.
[0076] The scene recognition module is a general term for a large module, which includes five sub-modules: configuration file parsing module, scene receiving module, information registration module, information receiving module and scene sending module. The connection relationship between these five sub-modules is as follows: Figure 2 shown.
[0077] Among them, the configuration file parsing module is used to parse the configuration file; the scene receiving module is used to process the registration and deregistration operations of the business party. The information registration module and the information receiving module are used to collect scene information; the scene sending module is used to identify whether the scene concerned by the business party appears or ends, and callback to notify the business party. Based on these five sub-modules, the scene recognition module can realize the functions of obtaining, identifying, and distributing scene information.
[0078] 1.2 Advantages
[0079] The scene recognition module uniformly realizes the acquisition of various scene information. As long as each business party is connected to the scene recognition module, they can pay attention to various scenes and no longer need to obtain scene information on their own, which greatly reduces the workload of the business party and the redundant code in the system.
[0080] 2. Easy to expand
[0081] 2.1 Implementation
[0082] The ease of expansion is mainly reflected in two aspects: the easy expansion of scene information sources and the easy expansion of business needs.
[0083] Among them, the scene information source is easy to expand, as shown in the following: the main ways to obtain scene information are "inserting in Android source code", "embedding in Android application package", "registering listeners", "registering broadcasts", and "registering content observers". Among them, the information registration module mainly obtains scene information through "registering listeners", "registering broadcasts", and "registering content observers". The information receiving module mainly obtains scene information through "inserting in Android source code" and "embedding in Android application package".
[0084] Since the information sources are various, the data structures used to record scene information are also various. The information registration module and the information receiving module both use the adapter mode, creating different adapters for different information sources. After passing through these adapters, the scene information from various information sources will be converted into scene information with a unified data structure, and then passed to the scene sending module for use.
[0085] All the scenario information obtained in the above way will be recorded in a configuration file for the business party to choose to pay attention to. The following example shows two types of scenario information recorded in the configuration file (whether the device is in a low-battery state and whether the device is in a charging state):
[0086] <!--From broadcast-->
[0087] <single_scene id=“10001”battery_low=“false” / >
[0088] <single_scene id=“10002”battery_low=“true” / >
[0089] <!--Maximum id:100002-->
[0090] <!--From broadcast-->
[0091] <single_scene id=“10003”charging=“false” / >
[0092] <single_scene id=“10004”charging=“true” / >
[0093] <!--Maximum id:100004-->
[0094] The business side's needs are easy to expand as shown in the following: In addition to recording the scene information supported by the scene recognition module, the configuration file also records the needs of each business side. If the business side wants to focus on certain scenes, it selects the scene information supported by the scene recognition module in the configuration file and records it in the configuration file.
[0095] 2.2 Advantages
[0096] Since various scene information sources can be converted into a unified data format by the adapters of the information registration module and the information receiving module, when the scene information source is expanded later, it is only necessary to create the corresponding adapter and add records to the configuration file to support the scene information to be obtained. The code of other sub-modules does not need to be modified. The addition, deletion, and modification of scene information required by the business side only requires modifying the configuration file, and the code of other sub-modules does not need to be modified.
[0097] 3. Flexibility
[0098] 3.1 Implementation
[0099] Scenes can be divided into single scenes and combined scenes.
[0100] The so-called single scene is the scene information with the smallest granularity that can be obtained. It can be roughly divided into three categories: single scenes related to application status, single scenes related to device (such as mobile phone) status, and single scenes related to user behavior, as shown in Table 1.
[0101] Table 1
[0102]
[0103]
[0104] The so-called combined scenario is any combination of the above single scenarios. Since the single scenario related to the application status belongs to a certain application, when discussing the combined scenario, the combined scenario composed of all the single scenarios related to the application status of an application can be called a combined scenario. The combined scenario composed of multiple applications, single scenarios related to device status, and single scenarios related to user behavior can also be called a combined scenario. In order to distinguish the two, the former is temporarily called the combined scenario of the first dimension, and the latter is called the combined scenario of the second dimension, such as Figure 3 shown.
[0105] The information registration module records the single scenario related to the current application status, the single scenario related to the device status, and the single scenario related to the user behavior through the Map data structure, so that the scenario sending module can identify whether the scenario of interest recorded by the business party in the configuration file has appeared or ended.
[0106] In addition, in combination with the jamming detection tool, fever detection tool (or other detection tools), when the device jams or heats up, the scene information in the current information receiving module can be queried by using the dumpsys command for the business party to focus on, and then recorded in the configuration file.
[0107] 3.2 Advantages
[0108] Business parties can focus on either a single scenario or a combination of scenarios.
[0109] The business party can not only choose to focus on the scenarios they think are important based on previous work experience, but also choose to focus on the key scenarios queried from the information receiving module (such as scenarios that are likely to cause device freezes and heat generation).
[0110] Because of this, the business side's strategy can be flexibly tailored to any scenario.
[0111] 4. Accuracy
[0112] 4.1 Implementation
[0113] When the information receiving module receives a changed single scene, it triggers the scene sending module to identify it. As mentioned above, the configuration file records the scenes that each business party is concerned about. The scene sending module monitors and identifies which scenes the business party is concerned about have appeared or ended based on the latest single scene, and then calls back to notify the business party through the interface obtained by the scene receiving module or the interface provided by the business party.
[0114] In addition, only the start and end time points of the scenarios that the business party is concerned about will be called back respectively. No callback will be made in other situations, and no callback will be made repeatedly.
[0115] 4.2 Advantages
[0116] Because the business side can obtain the start and end time points of the scenarios of interest, the effective time point and duration of the business side's strategy can be accurately controlled, that is, the device resources can be accurately scheduled.
[0117] 5. Easy access
[0118] 5.1 Implementation
[0119] If the business side wants to access the scene recognition module, it only needs two steps. Step 1 is to record the scene of interest in the configuration file, and step 2 is registration.
[0120] Step 1 has been described above and will not be repeated here. Step 2 can be divided into two ways.
[0121] Code 1:
[0122]
[0123] Code 2:
[0124] SceneUserManager sceneUserManager=new SceneUserManager( / *true orfalse* / );
[0125] sceneUserManager.register( / *your name* / ,new SceneUserCallBackImpl());
[0126] Method 1: The business side implements the listener class (as shown in the above code 1, num is the scene number of interest in the configuration file. isExist is true, indicating that the scene of interest appears, and false, indicating that the scene of interest ends. packageName is the package name involved in the scene related to the application status, and is empty if it is a scene related to the device status and user behavior). Through the registration interface encapsulated by the scene recognition module (as shown in the above code 2, the parameter passed in when instantiating SceneUserManager, if true, use binder communication registration, and if false, use LocalService communication registration), pass the instance of the listener class to the scene recognition module for registration (the scene receiving module is mainly responsible for processing the registration logic of this method).
[0127] Method 2: directly provide an interface to the scene recognition module, and let the scene recognition module actively call the interface to notify the business party (the interface implementation form is discussed by the business party and the scene recognition module, for example, an interface for writing nodes can be provided).
[0128] 5.2 Advantages
[0129] The workload for the business side to access the scene recognition module is very small, requiring only a very small amount of code and simple parameters in the configuration file.
[0130] In addition, regarding method 1 in step 2, the scene recognition module actually provides not only a registration interface, but also a deregistration interface. When the business party no longer needs to use the scene recognition module, it can cancel the registration. After the business party cancels the registration, the scene recognition module can stop obtaining the scene information that the business is concerned about. This can not only reduce the amount of data that the scene recognition module needs to process, but also reduce the power consumption generated by the scene recognition module (such as stopping registering certain sensors), ensuring that the scene recognition module itself does not have a negative impact on the performance and power consumption of the system.
[0131] The above-mentioned technical solution of the present application is a scene recognition solution that helps the business party to flexibly and accurately execute strategies. The present application uses methods such as "inserting in Android source code", "embedding in Android application program", "registering listeners", "registering broadcasts", and "registering content observers" to collect scene information from various information sources, and then combine them. At the time points when the scenes concerned by the business party appear and end, the business party is notified by callback, so that the business party can easily and accurately identify the time points when application scenarios, device scenarios, and user scenarios appear and end, and then flexibly and accurately execute various strategies, such as frequency modulation, scheduling, frequency limiting, network acceleration, checking and killing, dynamic adjustment of frame rate, etc., and ultimately indirectly and maximize the smoothness of device operation, reduce device power consumption, and improve user experience.
[0132] Based on the above steps S101-S103, the present application solves the following technical problems:
[0133] (1) The scene recognition module is a system service that is used by all business parties to avoid the situation where each party obtains scene information separately;
[0134] (2) The scenario recognition module not only supports the business side to focus on a single scenario, but also supports the business side to focus on a combination of scenarios, so that the business side's strategy can be very flexible to target any scenario;
[0135] (3) When the scenarios that the business party is concerned about appear and end, a callback will be sent to notify the business party, so that the business party's strategy can be executed very accurately, maximizing the smoothness of device use, reducing device power consumption, and improving user experience;
[0136] (4) When the business party accesses the scene recognition module, it only needs a very small amount of code (no more than 10 lines) and simple parameters in the configuration file to obtain any amount of scene information, which greatly reduces the workload of the business party and the redundant code in the system.
[0137] The technical solution provided by the embodiment of the present application obtains at least one scene information that multiple business parties need to pay attention to, and monitors the status of each scene information. For each scene information, when the status of the scene information changes, feedback information is sent to the business party that pays attention to the scene information, so that the business party can schedule the resources of the device based on the feedback information, so that the scene information that all business parties need to pay attention to can be uniformly obtained, and avoids each business party from separately obtaining the scene information that it needs to pay attention to. In addition, when the status of a certain scene information changes, the business party that pays attention to the scene information can be notified in time, so that each business party can accurately know the current status of various scene information that it pays attention to, so that resource scheduling can be performed more accurately. It can be seen that the technical solution provided by the embodiment of the present application can more conveniently and accurately obtain the state of the scene information that the business party pays attention to, so as to more accurately schedule the device resources.
[0138] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present application.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, object information corresponding to vehicle usage data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, vehicle usage data, etc.) involved in this embodiment are all information and data authorized by the user or fully authorized by all parties. The data acquisition and collection actions involved in this embodiment are all performed after being authorized by the user or the object or fully authorized by all parties.
[0140] Furthermore, the present application also provides a device resource scheduling apparatus.
[0141] See attached Figure 4 , Figure 4 This is a main structural block diagram of a device resource scheduling apparatus provided in an embodiment of the present application. Figure 4 As shown, in the device resource scheduling device in the embodiment of the present application, the device includes an operating system, the architecture of the operating system includes multiple service parties, and the device mainly includes a scene acquisition unit 11, a monitoring unit 12 and a sending unit 13. Among them,
[0142] A scenario acquisition unit 11, configured to acquire at least one scenario information that the multiple business parties need to pay attention to;
[0143] A monitoring unit 12, configured to monitor the status of each of the scene information;
[0144] The sending unit 13 is used to send feedback information to the business party paying attention to the scenario information for each type of scenario information when the state of the scenario information changes, so that the business party schedules the resources of the device based on the feedback information.
[0145] In this embodiment, the operating system includes an Android system; the scene acquisition unit 11 acquires at least one scene information that multiple business parties need to pay attention to in the following manner:
[0146] The scene information is obtained by at least one of the following methods: inserting a stub in the Android source code, embedding a point in the Android application program, registering a listener, registering a broadcast, and registering a content observer.
[0147] In this embodiment, the scenario information is recorded through a preset configuration file; and the attention status of each business party to each type of scenario information is recorded through the configuration file.
[0148] In this embodiment, the device is installed with at least one application; the scenario information includes at least one of the following items: current state information of the application, current state information of the device, and current behavior information of the user.
[0149] Furthermore, the device described in this embodiment also includes:
[0150] A first detection unit, used to detect whether a freeze occurs during operation of the device;
[0151] A second detection unit, used to detect whether the temperature of the device is greater than a preset temperature threshold;
[0152] A current scene acquisition unit, used to acquire the currently running scene information when the operation of the device is stuck or the temperature of the device is greater than the preset temperature threshold;
[0153] An adding unit is used to add the currently running scenario information to the scenario information list that the multiple business parties need to pay attention to.
[0154] In this embodiment, the sending unit 13 is also used for sending the start time of the scenario information to the business party that pays attention to the scenario information when the scenario information starts to run, and sending the end time of the scenario information to the business party that pays attention to the scenario information when the scenario information ends to enable the business party to schedule the resources of the device based on the start time and / or the end time.
[0155] Furthermore, the device described in this embodiment also includes:
[0156] A business connection establishing unit, configured to establish a business connection with each of the business parties before acquiring at least one scenario information that the multiple business parties need to pay attention to;
[0157] Furthermore, the device described in this embodiment also includes:
[0158] The service connection disconnection unit is used to disconnect the service connection with the service party that no longer needs to pay attention to the scenario information.
[0159] In this embodiment, the service connection establishing unit establishes a service connection with each service party in the following manner:
[0160] For each of the business parties, a business connection is established with the business party through a listener class pre-built by the business party for monitoring the state of scene information; or,
[0161] For each of the business parties, a preset interface provided by the business party is called to establish a business connection with the business party.
[0162] In some embodiments, one or more of the scene acquisition unit 11, the monitoring unit 12 and the sending unit 13 may be combined into one module. In one implementation, the specific implementation functions thereof may be described in reference to steps S101-S103.
[0163] The above-mentioned device resource scheduling device is used to execute Figure 1 The device resource scheduling method embodiment shown in the figure has similar technical principles, technical problems solved and technical effects produced. Technical personnel in this technical field can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the device resource scheduling device can refer to the contents described in the embodiment of the device resource scheduling method, which will not be repeated here.
[0164] In the embodiment of the present application, the device may be a control device formed by various electronic devices. In some possible implementations, the device may include multiple storage devices and multiple processors. The program for executing the device resource scheduling method of the above method embodiment can be divided into multiple subprograms, each of which can be loaded and run by a processor to execute different steps of the device resource scheduling method of the above method embodiment. Specifically, each subprogram can be stored in different memories, and each processor can be configured to execute programs in one or more memories to jointly implement the device resource scheduling method of the above method embodiment, that is, each processor executes different steps of the device resource scheduling method of the above method embodiment to jointly implement the device resource scheduling method of the above method embodiment.
[0165] The above-mentioned multiple processors may be processors deployed on the same device. For example, the above-mentioned computer device may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors may be processors configured on the high-performance device. In addition, the above-mentioned multiple processors may also be processors deployed on different devices. For example, the above-mentioned computer device may be a server cluster, and the above-mentioned multiple processors may be processors on different servers in the server cluster.
[0166] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. 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 storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0167] Furthermore, the present application also provides a control device. In a control device embodiment according to the present application, the control device includes a processor and a storage device, the storage device can be configured to store a program for executing the device resource scheduling method of the above method embodiment, and the processor can be configured to execute the program in the storage device, which includes but is not limited to the program for executing the device resource scheduling method of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The control device can be a control device device formed by various electronic devices.
[0168] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the device resource scheduling method of the above method embodiment, and the program can be loaded and run by the processor to implement the above device resource scheduling method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0169] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.
[0170] It is understood by those skilled in the art that each module in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present application, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present application.
[0171] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A device resource scheduling method, characterized in that: The device includes an operating system; the architecture of the operating system includes multiple business parties; the method includes: Acquire at least one type of scenario information that the multiple business parties need to pay attention to; Monitoring the status of each of the scene information; For each type of scenario information, when the state of the scenario information changes, feedback information is sent to a business party that pays attention to the scenario information, so that the business party schedules the resources of the device based on the feedback information.
2. The device resource scheduling method according to claim 1, characterized in that: The operating system includes an Android system; and the obtaining of at least one scenario information that the multiple business parties need to pay attention to includes: The scene information is obtained by at least one of the following methods: inserting a stub in the Android source code, embedding a point in the Android application program, registering a listener, registering a broadcast, and registering a content observer.
3. The device resource scheduling method according to claim 1, characterized in that: The scenario information is recorded through a preset configuration file; and the attention status of each business party to each type of scenario information is recorded through the configuration file.
4. The device resource scheduling method according to claim 1, characterized in that: The device is installed with at least one application; the scenario information includes at least one of the following items: current state information of the application, current state information of the device, and current behavior information of the user.
5. The device resource scheduling method according to claim 1, characterized in that: The method further comprises: Detect whether the operation of the device is stuck; Detecting whether the temperature of the device is greater than a preset temperature threshold; When the operation of the device freezes, or the temperature of the device is greater than the preset temperature threshold, obtaining the currently running scene information; The currently running scenario information is added to a list of scenario information that the multiple business parties need to pay attention to.
6. The device resource scheduling method according to claim 1, characterized in that: For each type of the scenario information, when the state of the scenario information changes, feedback information is sent to a business party concerned with the scenario information, so that the business party schedules resources of the device based on the feedback information, including: For each type of scenario information, when the scenario information starts to run, the start time of the scenario information is sent to the business party that pays attention to the scenario information; when the scenario information ends to run, the end time of the scenario information is sent to the business party that pays attention to the scenario information, so that the business party can schedule the resources of the device based on the start time and / or the end time.
7. The device resource scheduling method according to claim 1, characterized in that: Before acquiring at least one scenario information that the multiple business parties need to pay attention to, the method further includes: Establishing a business connection with each of the business parties; The method further comprises: Disconnect the business connection with the business party that no longer needs to pay attention to the scene information.
8. The device resource scheduling method according to claim 7, characterized in that: The establishing of a business connection with each of the business parties includes: For each of the business parties, a business connection is established with the business party through a listener class pre-built by the business party for monitoring the state of scene information; or, For each of the business parties, a preset interface provided by the business party is called to establish a business connection with the business party.
9. A control device, comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute the device resource scheduling method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the device resource scheduling method according to any one of claims 1 to 8.