Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
Aiming at the problem of backlog of broadcast information in the android system automatic test process in the prior art, one feasible solution is to timely clear the backlog of broadcast information and control the backlog quantity of the broadcast information within a threshold value, so that excessive memory occupation by the backlog of broadcast information is avoided, and system resource deterioration is avoided from being aggravated. However, for some android applications, specific broadcast information directly affects the running state of the android application, and if the broadcast information is not published, the broadcast information is cleaned up, so that the normal running of the android application is easily affected.
In view of the foregoing problems, an embodiment of the present application provides a method for processing broadcast information. In general, in an actual application scenario, in an automated test process, a plurality of pieces of broadcast information may be update information (refresh data of parameter values of system parameters/application parameters) for the same broadcast item (broadcast for the same system parameters/application parameters) among the backlogged pieces of broadcast information. For example, for the broadcast item "camera state", the state of the camera includes two state parameters, "turned on" and "turned off", and when the camera state changes, the broadcast for the camera state needs to be performed. Then, after the camera is turned on and off for a plurality of times, if the broadcast information is backlogged, the backlogged broadcast information may include broadcast information of a plurality of "cameras are turned on" and a plurality of "cameras are turned off".
For the android application, generally, the android application only needs to confirm the current parameter values (latest parameter values) of some system parameters/application parameters to operate normally, and does not need to acquire the previous historical parameter values of the system parameters/application parameters. For example, for a "camera state", the android application generally only needs to confirm the current camera state, that is, only needs to know the specific content of the last broadcast information for the "camera state" (whether the "camera is turned on" or the "camera is turned off").
Therefore, in the broadcast information processing method according to the embodiment of the present application, historical broadcast information (historical parameter values of system parameters/application parameters) for the type of broadcast item in the backlogged broadcast information is removed, and only the latest broadcast information (latest parameter values of system parameters/application parameters) of the type of broadcast item is retained, so that on the basis of not affecting normal operation of the android application, the data volume of the backlogged broadcast information is reduced, excessive memory occupation by the backlogged broadcast information is avoided, and system resource deterioration is avoided from being aggravated.
For example, for the "camera state", only the last broadcast information for the "camera state" is retained among the backlogged broadcast information, and the previous broadcast information for the "camera state" is deleted.
FIG. 1 is a simplified block diagram of an electronic device according to an embodiment of the present application. As shown in fig. 1, an operating system 110 (e.g., an android system) and applications 121 and 122 … are installed in the electronic device 100, and the operating system 110 includes a broadcast module 111. The broadcast module 111 is used for distributing broadcast information. Moreover, when the broadcast module 111 cannot acquire enough processing resources to release the broadcast information, the broadcast module 111 caches the broadcast information to be released in the memory, and when the broadcast module 111 cannot acquire enough processing resources to release the broadcast information, the broadcast information is released according to the storage sequence of the broadcast information cached in the memory.
Fig. 2 is a flowchart illustrating a broadcast information processing method according to an embodiment of the present application. In order to reduce the data amount of the broadcast information backlogged by the broadcast module 111, the electronic device 100 executes the flow shown in fig. 2 during the process of buffering the broadcast information.
S201, acquiring first broadcast information needing to be cached;
s202, when the first broadcast item corresponding to the first broadcast information is a broadcast item needing to be cached, replacing second broadcast information in the cached broadcast information with the first broadcast information, wherein the broadcast item corresponding to the second broadcast information is the first broadcast item.
According to the method flow shown in fig. 2, the data volume of the backlogged broadcast information can be reduced on the basis of not affecting the normal operation of the android application, the backlogged broadcast information is prevented from occupying excessive memory, and the system resource deterioration is prevented from being aggravated.
Further, based on the broadcast information processing method of the embodiment of the present application, an embodiment of the present application also proposes a broadcast information processing apparatus, which is configured in the electronic device 100. Specifically, it may be constructed in the broadcasting module 111; alternatively, the broadcast module 111 may be configured in the operating system 110 independently; alternatively, the application may be installed in the electronic device 100 as a separate application module other than the operating system 110.
Fig. 3 is a block diagram illustrating a broadcast information processing structure according to an embodiment of the present application. As shown in fig. 3, the broadcast information processing apparatus 203 includes:
a broadcast information refresh module 204 to:
acquiring first broadcast information needing to be cached;
when the first broadcast item corresponding to the first broadcast information is a broadcast item needing to be refreshed, replacing second broadcast information in the cached broadcast information with the first broadcast information, wherein the broadcast item corresponding to the second broadcast information is the first broadcast item.
Further, based on the method of the embodiment shown in fig. 2, an embodiment of the present application further provides an electronic device (e.g., a mobile phone, a tablet computer, a notebook computer, an industrial control terminal, and other terminal devices), which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute S210 and S220.
Further, in a practical application scenario, the method flow of the embodiment shown in this specification may be implemented by an electronic chip installed on an electronic device. Therefore, based on the method of the embodiment shown in fig. 2, an embodiment of the present application further proposes an electronic chip, which is installed in an electronic device, and which includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein, when the computer program instructions are executed by the processor, the electronic chip is triggered to execute S210, S220.
Further, the embodiment of the present application does not limit a specific application scenario of the method flow shown in fig. 2, and a person skilled in the art may apply the method flow shown in fig. 2 to an application scenario with a backlog of broadcast information according to an actual requirement.
For example, in an application scenario, in an automated testing process of an android system, a large amount of broadcast information is generated due to an automated testing process, and the broadcast information cannot be released in time due to occupation of processing resources by the automated testing process, thereby resulting in overstock of the broadcast information. According to the method flow shown in fig. 2, the data size of the backlogged broadcast information can be reduced, the backlogged broadcast information is prevented from occupying excessive memory, and the system resource deterioration is prevented from being aggravated.
For example, in an application scenario, when the electronic device performs a data processing operation with a higher priority, the data processing operation has a higher priority than the broadcast information distribution, and the data processing operation cannot be interrupted in the middle. Therefore, if the processing resources that are idle while performing the data processing operation are not enough to issue the broadcast information, the broadcast information generated during the data processing operation can only be issued after the data processing operation is completed, which may lead to backlog of broadcast information. According to the method flow shown in fig. 2, the data size of the backlogged broadcast information can be reduced, the backlogged broadcast information is prevented from occupying excessive memory, and the system resource deterioration is prevented from being aggravated.
Further, the embodiment of each step shown in fig. 2 is not specifically limited in this application, and those skilled in the art may implement each step shown in fig. 2 in many different ways.
Specifically, fig. 4 is a flowchart illustrating a broadcast information processing method according to an embodiment of the present application. The electronic device 100 executes the flow shown in fig. 4 to cache the broadcast information when sufficient processing resources cannot be acquired.
S210, the newly generated broadcast information to be distributed (first broadcast information) is acquired, for example, the broadcast information "camera is turned off" for the broadcast item "camera status".
S220, determining whether the broadcast information (first broadcast information) to be published needs to be cached.
S221, when the broadcast information (first broadcast information) to be published does not need to be cached (e.g., the current processing resources are sufficient, the broadcast information can be published), the broadcast information to be published is published.
S230, when the broadcast information (first broadcast information) to be published needs to be cached (for example, the current processing resource is insufficient, the broadcast information cannot be published, and the broadcast information needs to be cached and then published when the resource to be processed is sufficient), identifying whether the broadcast item corresponding to the broadcast information (first broadcast information) that needs to be cached is a broadcast item that needs to be cached.
Specifically, the broadcast item that needs to be refreshed is to ensure that the application related to the broadcast item runs smoothly by only issuing the latest broadcast information for the broadcast item when there are a plurality of pieces of unpublished broadcast information for the broadcast item. That is, when there is a backlog of broadcast information, only the latest broadcast information needs to be cached for the broadcast item, and all unpublished broadcast information for the broadcast item does not need to be cached.
S231, when the broadcast item corresponding to the broadcast information (first broadcast information) that needs to be cached is not a broadcast item that needs to be cached, storing the broadcast information (first broadcast information) that needs to be cached in a memory.
S240, when the broadcast item corresponding to the broadcast information (first broadcast information) that needs to be cached is a broadcast item (e.g., a first broadcast item) that needs to be refreshed, determining whether the cached broadcast information includes broadcast information (e.g., second broadcast information) that is subordinate to the same broadcast item (e.g., the first broadcast item) as the broadcast information (first broadcast information) that needs to be cached.
S241, when the cached broadcast information does not include broadcast information of the same broadcast item (for example, the first broadcast item) as the broadcast information (the first broadcast information) to be cached, storing the broadcast information (the first broadcast information) to be cached in a memory.
S250, when the cached broadcast information includes broadcast information (e.g., second broadcast information) that is subordinate to the same broadcast item (e.g., first broadcast item) as the broadcast information (first broadcast information) that needs to be cached, replacing the cached broadcast information with the broadcast information (first broadcast information) that is subordinate to the same broadcast item (e.g., first broadcast item) as the broadcast information (first broadcast information) that needs to be cached (e.g., replacing the second broadcast information with the first broadcast information).
For example, in an application scenario, the electronic device 100 is configured with a camera, and when the status of the camera changes, the operating system 110 generates broadcast information of the status of the camera (the camera is turned on or the camera is turned off). Suppose that, on the electronic device 100, an android application that has a demand for broadcast information of a camera state needs to confirm a current camera state during running, and does not need to confirm a history change of the camera state, and a broadcast item "camera state" is a broadcast item that needs to refresh a cache.
Then, after the electronic device 100 is started, the operating system 110 generates broadcast information "camera is turned on" for the broadcast item "camera status" when the camera is turned on for the first time. If the electronic device 100 is busy with other processing operations and the processing resources are not enough to issue the broadcast information, the "camera is turned on" for caching the broadcast information. Further, the broadcast item "camera status" is a broadcast item that needs to be cached, but since the cached broadcast information does not include the broadcast information for the broadcast item "camera status", the broadcast information "camera turned on" is directly cached.
Further, the electronic device 100 continues to be busy with other processing operations, the processing resources are not always sufficient to issue the broadcast information, and the cached broadcast information is not issued all the time. At this time, the camera is turned off by on, and the operating system 110 generates broadcast information "camera is turned off" for the broadcast item "camera status". At this time, the broadcast information "camera turned off" needs to be cached. Since the broadcast information "camera is turned on" for the broadcast item "camera state" is already contained in the cached broadcast information, the broadcast information "camera is turned on" in the cached broadcast information is replaced by the broadcast information "camera is turned off".
Taking a specific application scenario as an example, as shown in table 1:
TABLE 1
According to the method flow shown in fig. 4, the data volume of the backlogged broadcast information can be reduced on the basis of not affecting the normal operation of the android application, the backlogged broadcast information is prevented from occupying excessive memory, and the system resource deterioration is prevented from being aggravated.
Further, in order to implement the execution of S230, in an embodiment of the present application, S200 needs to be executed to determine the broadcast item that needs to be cached (for example, the broadcast item that needs to be cached includes the first broadcast item).
In an implementation manner of S200, the electronic device 100 determines, according to an operation requirement of an android application installed in the electronic device, a broadcast item that needs to be cached in a refresh manner; and/or the electronic device 100 determines that the cached broadcast item does not need to be refreshed according to the running requirement of the android application installed by the electronic device 100.
For example, in an application scenario, the electronic device 100 is configured with a camera, and when the status of the camera changes, the operating system 110 generates broadcast information of the status of the camera (the camera is turned on or the camera is turned off). On the electronic device 100, the android application that has a demand for the broadcast information of the camera state is only the application 121, and the application 121 needs to confirm the current camera state when running, but does not need to confirm the historical change of the camera state. The electronic device 100 can confirm that the camera state is a broadcast item that needs to be cached according to the android application 121 installed by the electronic device.
For another example, in the electronic device 100, android applications that require broadcast information of a camera state are the application 121 and the application 122. The application 121 needs to confirm the current camera state during running, but does not need to confirm the historical change of the camera state; while the application 122 needs to confirm historical changes in camera state at runtime. Therefore, the electronic device 100 can confirm that the camera status is a broadcast item that does not need to be cached for refreshing according to the android application 121 and the application 122 installed by the electronic device.
Further, in an actual application scenario, not all broadcast information generated during the operation of the electronic device 100 is broadcast information required when an application installed on the electronic device 100 operates. For example, in an application scenario, the electronic device 100 is configured with a camera, and when the status of the camera changes, the operating system 110 generates broadcast information of the status of the camera (the camera is turned on or the camera is turned off). However, an application that needs to confirm the camera status at runtime is not installed on the electronic apparatus 100, that is, the application on the electronic apparatus 100 does not need to acquire broadcast information of the camera status at runtime.
For the above situation, in an implementation manner of S200, the electronic device 100 determines, according to an operation requirement of an android application installed in the electronic device, a broadcast item that needs to be cached in a refresh mode; and/or the electronic device 100 determines that the cached broadcast item does not need to be refreshed according to the running requirement of the android application installed by the electronic device 100. And the method can not determine whether the cached broadcast item needs to be refreshed according to the running requirement of the android application installed by the user, and determines the broadcast item needs to be refreshed, so that the data volume of the backlogged broadcast information is reduced.
Further, in order to reduce the data amount of the backlog broadcast information as much as possible, the electronic device 100 determines, according to the operation requirement of the android application installed in the electronic device, that the cached broadcast item does not need to be refreshed. And, the other broadcast items except the broadcast item which does not need to be refreshed are confirmed as the broadcast items which need to be refreshed.
Further, in another implementation manner of S200, the electronic device 100 determines, according to configuration information input from the outside, that a cached broadcast item needs to be refreshed; and/or, the electronic device 100 determines that the cached broadcast item does not need to be refreshed according to externally input configuration information.
For example, a first database is created, where the first database includes description information of all broadcast items that need to be refreshed and cached on the electronic device 100 (e.g., broadcast characters corresponding to each broadcast item that needs to be refreshed and cached). By inputting the first database into the electronic device 100, the electronic device 100 may determine that the cached broadcast items need to be refreshed according to the first database.
Taking a specific application scenario as an example, fig. 5 is a schematic view of an application scenario according to an embodiment of the present application. As shown in fig. 5, an operating system 311 (e.g., an android system) and applications 321 and 322 … are installed in the electronic device 310, and the operating system 311 includes a broadcast module 312. The broadcast module 312 is used for distributing broadcast information. Moreover, when the broadcast module 312 cannot acquire enough processing resources to release the broadcast information, the broadcast module 312 caches the broadcast information to be released in the memory, and when the broadcast module 312 cannot acquire enough processing resources to release the broadcast information, the broadcast information is released according to the storage sequence of the broadcast information cached in the memory.
The electronic device 300 has a configuration tool 301 mounted thereon. The user configures a first database (containing broadcast characters corresponding to each broadcast item that needs to be cached in the electronic device 300) and sends the first database to the configuration tool 301. For example, the first database contains field names and values as shown in Table 2.
TABLE 2
Table 2 shows that the broadcast item (replace _ pending broadcast template) that needs to be cached is a broadcast item containing a character string of google or DROPBOX _ ENTRY or mail.
The electronic device 300 is connected to the electronic device 310, the configuration tool 301 sends the configured first database to the electronic device 310, and the electronic device 310 determines that the cached broadcast item needs to be refreshed by reading the first database.
For example, the configuration tool 301 sets the table 2 contents into the global database of the electronic device 310 by issuing set (settings) commands to the electronic device 310 (e.g., android handset).
When the broadcast module 312 of the electronic device 310 performs broadcast transmission, if broadcast information needs to be cached, it is identified whether the broadcast information to be cached includes a broadcast character string corresponding to a REPLACE _ PENDING _ broadcasts _ pattern field by using a value of a REPLACE _ PENDING _ broadcasts _ pattern field in the global database, and if the broadcast information to be cached includes a character string corresponding to a REPLACE _ PENDING _ broadcasts _ pattern field, a replacement identifier (for example, FLAG _ RECEIVER _ REPLACE _ PENDING FLAG) is added to the broadcast information to be cached, the broadcast information to be currently cached in the memory is replaced by the broadcast information to be cached, so that the broadcast information of the current broadcast item is guaranteed to be the broadcast information requested most recently.
For example, when the broadcast module 312 is sending a broadcast, if the broadcast information needs to be cached, and the broadcast information to be cached matches google or DROPBOX _ ENTRY or mail, the broadcast module 312 adds a FLAG of FLAG _ RECEIVER _ broadcast _ PENDING to the broadcast information to be cached, and REPLACEs the broadcast information to be published of the corresponding google or DROPBOX _ ENTRY or mail currently cached in the memory with the broadcast information to be cached.
For another example, a second database is created, where the second database contains description information of all broadcast items that do not need to be refreshed on the electronic device 100 (e.g., broadcast characters corresponding to each broadcast item that does not need to be refreshed). By inputting the second database into the electronic device 100, the electronic device 100 may determine from the second database that the cached broadcast items do not need to be refreshed.
Further, according to the change of the operating state of the operating system, or the change of the application installation condition, etc., the broadcast item that needs to be cached in the electronic device is also changed.
For example, in an application scenario, the electronic device 100 is configured with a camera, and when the status of the camera changes, the operating system 110 generates broadcast information of the status of the camera (the camera is turned on or the camera is turned off). On the electronic device 100, the android application that has a demand for the broadcast information of the camera state is only the application 121, and the application 121 needs to confirm the current camera state when running, but does not need to confirm the historical change of the camera state. The electronic device 100 can confirm that the camera state is a broadcast item that needs to be cached according to the android application 121 installed by the electronic device. At this time, if the backlog of broadcast information occurs, only the latest broadcast information needs to be cached for the camera state.
Further, the electronic device 100 newly installs the application 130, and the application 130 needs to confirm the history change of the camera state when running. At this time, the broadcast item that needs to be cached in the electronic device 100 changes, and the camera status is no longer the broadcast item that needs to be cached in the refresh.
Further, the electronic device 100 unloads the application 130, at this time, the broadcast item that needs to be cached in the electronic device 100 changes again, and the camera status changes again to the broadcast item that needs to be cached in the electronic device.
In view of the above situation, in an implementation manner of S200, a monitoring module is created in the electronic device 100, and the monitoring module is configured to monitor a broadcast item that needs to be cached for refreshing currently, and when the broadcast item that needs to be cached for refreshing changes, the monitoring module notifies the electronic device 100 to confirm a latest broadcast item that needs to be cached for refreshing.
Fig. 6 is a schematic diagram illustrating an application scenario according to an embodiment of the present application. As shown in fig. 6, an operating system 411 (e.g., an android system) and applications 421 and 422 … are installed in the electronic device 410, and the operating system 411 includes a broadcast module 412. The broadcast module 412 is used to distribute broadcast information. Moreover, when the broadcast module 412 cannot acquire enough processing resources to release the broadcast information, the broadcast module 412 caches the broadcast information to be released in the memory, and when the broadcast module 412 cannot acquire enough processing resources to release the broadcast information, the broadcast information is released according to the storage sequence of the broadcast information cached in the memory.
The electronic device 410 is further installed with a monitoring module 430, the monitoring module 430 is configured to monitor a state change of an operating system/application on the electronic device 410, and when the state of the operating system/application on the electronic device 410 changes, the monitoring module 430 notifies the electronic device 410 to determine a latest broadcast item that needs to be refreshed for a latest operating system/application state.
Fig. 7 is a schematic diagram illustrating an application scenario according to an embodiment of the application. As shown in fig. 7, an operating system 511 (e.g., an android system) and applications 521 and 522 … are installed in the electronic device 510, and the operating system 511 includes a broadcast module 512. The broadcast module 512 is used for distributing broadcast information. Moreover, when the broadcast module 512 cannot acquire enough processing resources to release the broadcast information, the broadcast module 512 caches the broadcast information to be released in the memory, and when the broadcast module 512 cannot acquire enough processing resources to release the broadcast information, the broadcast information is released according to the storage sequence of the broadcast information cached in the memory.
The electronic device 500 has a configuration tool 501 mounted thereon. The user configures a first database (containing broadcast characters corresponding to each broadcast item that needs to be cached in the electronic device 500) and sends the first database to the configuration tool 401. For example, the first database contains field names and values as shown in Table 2.
Also mounted on the electronic device 510 is a listening module 530, and the electronic device 500 is connected to the electronic device 510.
Fig. 8 is a schematic diagram illustrating an application scenario execution flow according to an embodiment of the present application. The electronic device 510 and the electronic device 500 perform the steps of the flow shown in fig. 8.
S600, the configuration tool 501 sends the configured first database to the electronic device 310.
For example, the configuration tool 501 dynamically sets the contents of Table 2 into the global database of the electronic device 310 by issuing settings commands to the electronic device 310.
S610, the monitoring module 530 monitors the content change of the first database to obtain the latest broadcast item that needs to be cached.
For example, the monitoring module 530 monitors a change of a value of a replace _ pending _ broadcasts _ pattern field in the global database, and acquires a latest value when it is detected that the replace _ pending _ broadcasts _ pattern field is updated.
S620, the snooping module 530 sends the latest broadcast item that needs to be cached to the broadcasting module 512.
For example, the listening module 530 transmits the latest value google | DROPBOX _ ENTRY | mail | of the replace _ pending _ broadcasts _ pattern field to the broadcasting module 512.
S630, when the broadcast information needs to be cached, the broadcast module 512 caches the broadcast information according to the newly obtained broadcast item that needs to be cached.
For example, when the broadcast module 512 sends a broadcast, if the broadcast information needs to be cached, the broadcast module 512 identifies whether the broadcast information to be cached includes a broadcast character string corresponding to a replay _ broadcasts _ pattern field through a value of the replay _ broadcasts _ pattern field sent by the monitoring module 530, and if the broadcast information to be cached includes the character string corresponding to the replay _ broadcasts _ pattern field, adds a replacement identifier (for example, FLAG _ RECEIVER _ REPLACE _ PENDING FLAG) to the broadcast information to be cached, REPLACEs the broadcast information to be published currently cached in the memory with the broadcast information to be cached, and ensures that the broadcast information of the current broadcast item is the broadcast information that is requested most recently.
For example, when the broadcast module 312 is sending a broadcast, if the broadcast information needs to be cached, and the broadcast information to be cached matches google or DROPBOX _ ENTRY or mail, the broadcast module 312 adds a FLAG of FLAG _ RECEIVER _ broadcast _ PENDING to the broadcast information to be cached, and REPLACEs the broadcast information to be published of the corresponding google or DROPBOX _ ENTRY or mail currently cached in the memory with the broadcast information to be cached.
In the description of the embodiments of the present application, for convenience of description, the device is described as being divided into various modules by functions, the division of each module is only a division of logic functions, and the functions of each module may be implemented in one or more pieces of software and/or hardware when the embodiments of the present application are implemented.
Specifically, the apparatuses proposed in the embodiments of the present application may be wholly or partially integrated into one physical entity or may be physically separated when actually implemented. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the detection module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
In a practical application scenario, the method flow of the embodiment shown in this specification may be implemented by an electronic chip installed on an electronic device. Therefore, an embodiment of the present application provides an electronic chip. For example, an electronic chip is mounted on an electronic device, the electronic chip including:
a processor for executing computer program instructions stored on the memory, wherein the computer program instructions, when executed by the processor, trigger the electronic chip to perform the method steps of the embodiments of the present application.
An embodiment of the present application also proposes an electronic device (e.g. a smart watch) comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps as described in the embodiments of the present application.
Specifically, in an embodiment of the present application, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the apparatus, cause the apparatus to perform the method steps described in the embodiment of the present application.
Specifically, in an embodiment of the present application, a processor of the electronic device may be an on-chip device SOC, and the processor may include a Central Processing Unit (CPU), and may further include other types of processors. Specifically, in an embodiment of the present application, the processor of the electronic device may be a PWM control chip.
Specifically, in an embodiment of the present application, the processors may include, for example, a CPU, a DSP, a microcontroller, or a digital Signal processor, and may further include a GPU, an embedded Neural-Network Processor (NPU), and an Image Signal Processing (ISP), and the processors may further include necessary hardware accelerators or logic Processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program according to the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
Specifically, in an embodiment of the present application, the memory of the electronic device may be a read-only memory (ROM), another type of static storage device capable of storing static information and instructions, a Random Access Memory (RAM), or another type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or another optical disc storage, an optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a blu-ray disc, etc.), a magnetic disc storage medium, or another magnetic storage device, or any computer readable medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In particular, in an embodiment of the present application, the processor and the memory may be combined into a processing device, and more generally, independent components, and the processor is configured to execute the program code stored in the memory to implement the method described in the embodiment of the present application. In particular implementations, the memory may be integrated within the processor or may be separate from the processor.
Further, the apparatuses, devices, and modules described in the embodiments of the present application may be implemented by a computer chip or an entity, or by a product with certain functions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
Specifically, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the method provided by the embodiment of the present application.
An embodiment of the present application further provides a computer program product, which includes a computer program, when it runs on a computer, causes the computer to execute the method provided by the embodiment of the present application.
The embodiments herein are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments herein. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the embodiments of the present application, "at least one" means one or more, "and" a plurality "means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
In the embodiments of the present application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of electronic hardware and computer software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope disclosed in the present application, and all the changes or substitutions should be covered within the protective scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.