Application control method and system, and device and medium
By monitoring and uploading application status to the cloud on the device side, combining control on the cloud and device side, the problem that device-side applications are difficult to adapt to complex control strategies is solved, and automated control and power consumption optimization are achieved.
Patent Information
- Application Number
- PCT/CN2025/072502
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-29
- Filing Date
- 2025-01-15
- Publication Date
- 2025-09-04
AI Technical Summary
In the prior art, applications on the device side are started and run all the time when they are powered on, making it difficult to adapt to the complex control strategy requirements, resulting in increased power consumption and low degree of automation.
By installing monitoring files on the device side, monitoring the status of multiple applications, and uploading the results to the cloud. The cloud controls the application independently based on the monitoring results or the device side to realize operations such as startup, shutdown, uninstallation and upgrade, reducing computing power consumption on the device side and reducing invalid power consumption.
It realizes automated control of application on the device side, reduces power consumption and improves the degree of automation on the device side, reduces computing power consumption on the device side, and can shut down applications that do not need to run in a timely manner.
Smart Images

Figure CN2025072502_04092025_PF_FP_ABST
Abstract
Description
Application control method, system, device and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 29, 2024, with application number 2024102331074 and titled “A control method, system, device and medium for an application,” the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of Internet of Things technology, and in particular to an application control method, system, device, and medium. Background Art
[0004] In IoT technology, simple applications are installed on edge devices to facilitate communication with the IoT platform; edge devices can implement simple control over the installed applications.
[0005] Overview
[0006] Based on the background technology, the present disclosure proposes an application control method, system, device, and medium.
[0007] In a first aspect, the present disclosure provides an application control method, which is applied to a device, and includes:
[0008] Monitoring multiple applications on the device based on a monitoring file, wherein the monitoring file is generated based on configuration information of the application when the application is installed, and the monitoring file is used to indicate the application to be monitored and the monitoring content;
[0009] Uploading the monitoring results of the plurality of applications to the cloud;
[0010] In response to an arrival of a target event for a target application among the plurality of applications, performing a first control on the target application based on the target event, the first control comprising at least one of starting an application, closing an application, uninstalling an application, and upgrading an application;
[0011] The target event includes receiving a control instruction sent by the cloud based on the monitoring result, and / or the monitoring result of the target application monitored by the device side meets a preset condition, and the preset condition is recorded in the monitoring file.
[0012] Optionally, before monitoring the multiple applications on the device based on the monitoring file, the method further includes:
[0013] Receive the installation information sent from the cloud, the installation information including the storage path of at least one application file required by the application to be installed and configuration information corresponding to each application file;
[0014] The at least one application file is downloaded from the storage path, and the at least one application file is installed based on the configuration information.
[0015] Optionally, before monitoring the multiple applications on the device based on the monitoring file, the method further includes:
[0016] Receive a package file sent from the cloud, where the package file includes multiple application files required by the application to be installed, and a directory of the package file includes a script file;
[0017] Decompressing the packaged file to obtain a plurality of application files;
[0018] Based on the script file, generating configuration information corresponding to each of the application files;
[0019] The multiple application files are installed sequentially based on the configuration information according to the installation order of the multiple application files.
[0020] Optionally, after monitoring the multiple applications on the device based on the monitoring file, the method further includes at least one of the following:
[0021] In response to an arrival of a task for a new application to be installed, updating the monitoring file based on configuration information corresponding to the new application to be installed;
[0022] In response to modification information of the installed application sent by the cloud, updating the monitoring file based on the modification information;
[0023] The modification information is used to modify at least one of a property of the installed application and a monitoring configuration of the installed application.
[0024] Optionally, the method further includes:
[0025] In response to updating the monitoring file, the plurality of applications are monitored based on the updated monitoring file.
[0026] Optionally, the monitoring result includes the running status of the application, and the preset condition includes at least one of: the running status of the target application is not running, running failure, and the running status of the application associated with the target application is running while the target application is not running.
[0027] Optionally, the performing a first control on the target application based on the target event includes:
[0028] When the target event is receiving a control instruction sent by the cloud based on the running status, or the device monitoring the target application and the monitoring result meets a preset condition, executing the first control on the target application according to the control instruction or based on the preset condition;
[0029] When the target event includes receiving a control instruction sent by the cloud based on the monitoring result, and the monitoring result of the target application monitored by the device side meets the preset conditions, the first control is performed on the target application based on the control instruction, the preset conditions and the control priority between the cloud and the device side.
[0030] Optionally, the method further includes:
[0031] receiving an adjustment instruction sent by the cloud; the adjustment instruction is generated by the cloud based on the received progress change information;
[0032] executing a second control corresponding to the adjustment instruction on the application to be installed;
[0033] The second control includes at least one of canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting the application file.
[0034] A second aspect of the present disclosure provides an application control method, applied to a cloud, the method comprising:
[0035] Receiving monitoring results of multiple applications sent by a device end; wherein the monitoring results are obtained by the device end by monitoring the multiple applications based on a monitoring file, the monitoring file is generated by the device end based on the configuration information of the application when the application is installed, and is used to indicate the application to be monitored and the monitoring content on the device end;
[0036] Based on the monitoring results of the multiple applications, a control instruction for a target application among the multiple applications is issued to the device end;
[0037] The device is configured to perform a first control on the target application based on the target event, wherein the first control includes at least one of starting the application, closing the application, uninstalling the application, and upgrading the application;
[0038] The target event includes the control instruction and / or the monitoring result of the target application monitored by the device side meeting a preset condition, and the preset condition is recorded in the monitoring file.
[0039] Optionally, before receiving the monitoring results of the multiple applications sent by the device, the method further includes:
[0040] In response to creation of the task, acquiring the created task information, the task information including configuration information of the application to be installed and a package file, the package file including a plurality of application files required by the application to be installed;
[0041] Parsing the task information to generate installation information, the installation information including storage paths of the multiple application files required by the application to be installed and configuration information corresponding to each application file;
[0042] The installation information is sent to the device end, so that the device end downloads the application file from the storage path, and installs the multiple application files in sequence based on the configuration information according to the installation order of the multiple application files.
[0043] Optionally, before receiving the monitoring results of the multiple applications sent by the device, the method further includes:
[0044] In response to the creation of the task, obtaining the created task information, wherein the task information includes a package file, the package file includes a plurality of application files required by the application to be installed, wherein a directory of the package file carries a script file;
[0045] The packaged file is sent to the device end so that the device end decompresses the packaged file and then generates configuration information corresponding to each application file based on the script file; and installs the multiple application files in sequence based on the configuration information in the order in which the multiple application files are installed.
[0046] Optionally, the installation sequence is recorded in the task information, or the installation sequence is obtained by the cloud based on the association relationship between the multiple application files.
[0047] Optionally, the method further includes:
[0048] receiving task progress change information for the task information, where the task progress change information is used to indicate an adjustment to the installation progress of the application to be installed;
[0049] Acquire progress information corresponding to the device end, the progress information including the current progress of the application to be installed;
[0050] Based on the progress information, a second control corresponding to the task progress change information is executed, wherein the second control includes at least one of canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting the application file.
[0051] Optionally, the performing a second control on the task information corresponding to the task progress change information based on the progress information includes:
[0052] Based on the progress information, determining the execution end of the current progress;
[0053] If the execution end is the cloud, the second control is executed by the cloud;
[0054] If the execution end is the device end, an adjustment instruction corresponding to the progress change information is sent to the device end, so that the device end executes the second control.
[0055] Optionally, the sending of a control instruction for a target application among the multiple applications to the device based on the monitoring results of the multiple applications includes at least one of the following:
[0056] Displaying a plurality of the monitoring results, and in response to a control operation on the monitoring results of the target application, issuing a control instruction for the target application to the device end;
[0057] determining a target application in a target operating state according to the monitoring result among the plurality of applications, and issuing a control instruction for the target application to the device end so as to make the target application leave the target operating state;
[0058] Based on the monitoring results and the applications required by the current business, a control instruction for the target application is generated.
[0059] Optionally, the monitoring result includes the running status of the application, and the generating of the control instruction for the target application based on the monitoring result and the application required by the current business includes:
[0060] Acquire multiple first applications that support the current service;
[0061] Obtaining the running status of the plurality of first applications on the device end;
[0062] For the second application whose running status is not running among the multiple first applications, a startup command corresponding to the second application is generated to enable the device to start the second application.
[0063] Optionally, the generating a startup command corresponding to the second application whose running status is not running among the plurality of first applications includes:
[0064] Determining whether the second application is the main application of the current service;
[0065] If yes, after sending the startup command, detecting whether the main application is successfully started;
[0066] After the main application is successfully started, a start command is sent to a third application, where the third application is an application in the second application that is not the main application.
[0067] A third aspect of the present disclosure provides an application control system, comprising a cloud and a plurality of device terminals connected to the cloud; wherein,
[0068] The device is configured to monitor multiple applications on the device based on a monitoring file, wherein the monitoring file is generated based on configuration information of the application when the application is installed, and the monitoring file is used to indicate the application to be monitored;
[0069] The cloud is configured to receive monitoring results of the plurality of applications sent by the device, and send control instructions to the device based on the monitoring results;
[0070] The device is further configured to, in response to an arrival of a target event for a target application among the plurality of applications, perform a first control on the target application based on the target event, wherein the first control includes at least one of starting the application, closing the application, uninstalling the application, and upgrading the application;
[0071] The target event includes receiving the control instruction, and / or the monitoring result of the target application monitored by the device side meets a preset condition, and the preset condition is recorded in the monitoring file.
[0072] The application control method provided by the present disclosure is applied to a device side, comprising: monitoring multiple applications on the device side based on a monitoring file, wherein the monitoring file is generated based on the configuration information of the application when the application is installed, and the monitoring file is used to indicate the applications to be monitored and the monitoring content; uploading the monitoring results of the multiple applications to the cloud; in response to the arrival of a target event for a target application among the multiple applications, performing a first control on the target application based on the target event, the first control including at least one of starting the application, shutting down the application, uninstalling the application, and upgrading the application; wherein the target event includes receiving a control instruction sent by the cloud side based on the monitoring result, and / or the monitoring result of the target application monitored by the device side meeting a preset condition, the preset condition being recorded in the monitoring file;
[0073] Therefore, the present invention monitors multiple applications installed on the device side through the device side itself, and uploads the monitoring results to the cloud, and then monitors the device side applications through the cloud. Since the cloud has higher computing power, it can support application control under complex strategies, reducing the computing power consumption of the device side. At the same time, since the cloud can monitor the status of the application in real time, it can shut down the application in time when it is not needed to run, reducing the power consumption of the device side. Moreover, the control of the target application can also be achieved by the device side based on whether the monitoring results meet the preset conditions, thereby improving the degree of automation of the device side.
[0074] An embodiment of the present disclosure also provides an electronic device, including a processor and a memory, and a computer program stored in the memory and runnable on the processor, wherein the processor executes the control method of the application as described in the first aspect above, or implements the control method of the application as described in the second aspect above.
[0075] An embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the control method for an application as described in the first aspect above, or implement the control method for an application as described in the second aspect above.
[0076] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below.
[0077] BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for the description of the embodiments or related technologies. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. It should be noted that the scales in the drawings are for illustration only and do not represent the actual scale.
[0079] FIG1 shows a schematic diagram of a communication architecture of a control method applied in an embodiment of the present disclosure;
[0080] FIG2 is a schematic diagram showing a process of establishing a connection between a device and the cloud in an embodiment of the present disclosure;
[0081] FIG3 shows a schematic diagram of an information flow path between a device and the cloud in an embodiment of the present disclosure;
[0082] FIG4 shows a schematic flow chart of the steps of the control method of the application provided by an embodiment of the present disclosure;
[0083] FIG5 is a schematic diagram showing a flow chart of steps of a method for controlling an application according to another embodiment of the present disclosure;
[0084] FIG6 shows a schematic diagram of a process for creating a task for installing an application to be installed according to an embodiment of the present disclosure;
[0085] FIG7 shows a schematic diagram of a process for creating a task of installing an application to be installed in an embodiment of the present disclosure;
[0086] FIG8 is a schematic diagram showing the conversion relationship of tasks in an embodiment of the present disclosure;
[0087] FIG9 shows a schematic diagram of a monitoring process for monitoring an application in an embodiment of the present disclosure;
[0088] FIG10 shows a schematic structural diagram of a control system of an application provided by an embodiment of the present disclosure.
[0089] Detailed description
[0090] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0091] With the advancement of semiconductor technology, device performance has improved, enabling terminals to possess sufficient computing power to run software with specific algorithms. However, current device-side applications are designed to start and run continuously when the device is powered on, making them difficult to adapt to the complex control strategy requirements.
[0092] In view of this, the present disclosure provides an application control method, which monitors multiple applications on the device side according to a monitoring file, controls the applications on the device side from the cloud according to the monitoring results of multiple applications, or automatically controls the applications by the device side according to the monitoring results of multiple applications. By jointly controlling the applications through the cloud or the device side, the automation of the device side is improved, and the application can be stopped in time when it is not needed to run, thereby reducing the power consumption of the device side.
[0093] First, the implementation environment of this disclosure is specifically introduced:
[0094] Referring to FIG1 , FIG1 shows a communication architecture diagram of an implementation environment for an application control method provided by an embodiment of the present disclosure, including a device side and a cloud side. The device side can be a smart door lock, a car, an air conditioner, a smart coffee pot, etc., and the cloud side can be an IoT platform. The cloud side communicates with edge devices through a device gateway. The cloud side design includes a device connection management layer, a task management layer, and a policy management layer. The device connection management layer implements connection authentication, security, and maintenance on the device side, ensuring the connectivity of the secure communication link between the cloud side and the device side. The task management layer is responsible for task generation, prioritization, cancellation, and deletion. The policy management layer is responsible for application management policies, including application startup policies, stop policies, time policies, deployment policies, and device policies. In FIG1 , the device sides connected to the IoT (Internet of Things) device gateway are all IoT devices, i.e., an IoT door lock is an IoT door lock, an IoT car is an IoT car, an IoT camera is an IoT camera, and an IoT coffee pot is an IoT coffee pot.
[0095] When the device and the cloud need to establish a connection, refer to Figure 2, which shows a schematic diagram of the process of establishing a connection between the device and the cloud in the embodiment of the present disclosure. As shown in Figure 2, first, the device sends an authentication request to the cloud, which carries the initial authentication key. Among them, the information uploaded when it is first powered on is encrypted with the system's initial symmetric key. The encryption method can use AES128-CBC or other common encryption algorithms.
[0096] The cloud decrypts the received initial authentication key and compares it with the initial authentication key in the cloud device database. If they match, the cloud will feedback the device certificate to the device based on the initial authentication key. The device certificate includes the session encryption key, session encryption method and consistency signature.
[0097] The device then verifies whether the signature is consistent with the content of the device certificate. If they are consistent, it uses the initial encryption key to decrypt the data, extracts the session encryption and decryption method and session encryption and decryption key, and feeds back the cloud information. After that, the session between the device and the cloud uses the new encryption and decryption algorithm and key for encryption and decryption.
[0098] After the edge device is authenticated in the cloud, the device's socket connection field, the device's unique identifier (SN), the device's uplink message queue, and the device's downlink message queue are encapsulated into a corresponding structure instance. This instance (hereinafter referred to as the device connection instance) is stored as a queue for subsequent applications to add, delete, modify, and query. The message queue can be replaced with inter-process communication methods such as Unix byte stream files (sockets), pipes, and socketpairs to transmit device-side messages or cloud-side instructions between cloud processes, thereby enabling command issuance and message upload processing.
[0099] On the cloud side, the management of device connections is implemented by the device connection manager. The device connection manager needs to register at least two functions, one for disconnection processing and the other for wake-up connection processing.
[0100] Among them, the disconnect signal processing function actively disconnects the cloud and the device when other processes send a disconnect signal; the wake-up connection processing function is used when the cloud actively sends instructions to the device, searches for the corresponding socket connection socket in the device connection instance, and actively sends the message to the device. In this way, compared with the previous connection method in which the device needs heartbeat information before sending instructions, the cloud can actively send instructions when it does not receive information from the device, avoiding the duplication of invalid messages, so that after the cloud and the device are connected, the cloud can maintain the connection, or maintain the connection with the device for a period of time. In this case, as long as the socket can be found, based on the TCPIP protocol, the cloud can actively send instructions to the device.
[0101] The process of establishing the communication connection between the device and the cloud can be implemented when the device is introduced, or when the device needs to communicate with the cloud.
[0102] After the device is connected to the cloud, the information flow path between the cloud and the device can be referred to Figure 3. As shown in Figure 3, taking the cloud sending a command to the device as an example, first, the cloud starts the http Server to listen to the configuration port. When the information to be sent is a task control command, the task control command is sent to the device via the task control command sending path. When the information to be sent is an application control command, the application control command is sent to the device via the application control command sending path. After that, the device performs the corresponding operation according to the control command and reports the execution result to the cloud after execution.
[0103] This embodiment describes an application control method from the perspective of a device end. Specifically, FIG4 is shown, which shows a schematic flow chart of the steps of an application control method provided by an embodiment of the present disclosure. The control method is applied to a device end. In the present disclosure, the device end is an IoT terminal on which an application program is installed. The application control method is specifically as follows:
[0104] S101, monitoring multiple applications on the device based on the monitoring file.
[0105] The monitoring file is generated based on the configuration information of the application when the application is installed. The monitoring file is used to indicate the application to be monitored and the monitoring content.
[0106] Specifically, by loading a monitoring file, obtaining the application name, installation path, and version information from the monitoring file, the application to be monitored is found, and then the application is monitored based on the monitoring content. The monitoring file includes the monitoring content, name, installation path, and version information of multiple applications. Based on a monitoring file, all applications on the corresponding device can be monitored.
[0107] The monitoring content may include one or more monitoring items. For example, the monitoring items may include monitoring the running status of the application, monitoring the running time of the application, monitoring the start time and stop time of the application, etc.
[0108] It is understood that when the monitored application or the monitored content changes, the monitoring file will also change. In this case, the application will need to be monitored again based on the monitoring file to ensure that the monitoring actions are consistent with the monitoring file. Changes to the monitoring file can occur due to upgrades to the monitored application, changes to the installation path, additions to monitored applications, removals of previously monitored applications, or changes to the monitored content.
[0109] S102, uploading the monitoring results of multiple applications to the cloud.
[0110] The monitoring results provide feedback on the monitoring content. If the monitoring content is monitoring the status of applications, the monitoring results include the real-time status of multiple applications; if the monitoring content is monitoring the running time of applications, the monitoring results include the running time of multiple applications; if the monitoring content is monitoring the start and stop times of applications, the monitoring results include the start and stop times of each application. When uploading the monitoring results of multiple applications to the cloud, the monitoring results of each application can be uploaded to the cloud separately, or the results of multiple applications can be uploaded together to the cloud. By uploading the monitoring results to the cloud, the cloud can control the applications on the device based on the status of the applications, etc.
[0111] In this embodiment, the monitoring results of multiple applications can be uploaded to the cloud in real time, can be uploaded to the cloud on schedule, or can be determined based on changes in the status of the applications to determine whether to upload the monitoring results to the cloud. For example, when uploading the monitoring results of multiple applications to the cloud in real time, the records are uploaded to the cloud each time a record of the monitored application is generated; when uploading the monitoring results of multiple applications to the cloud on schedule, the monitoring results can be uploaded periodically, such as setting the monitoring results of the previous day to be uploaded at midnight every day, and then recording the monitoring records of the monitored applications on the previous day; and when determining whether to upload the monitoring results to the cloud based on changes in the status of the monitored applications, it can be determined that the monitoring results need to be uploaded to the cloud when the status of the application changes from stopped to started, or when the status of the application changes from started to stopped, at which time all recorded monitoring results are uploaded.
[0112] S103 , in response to an arrival of a target event for a target application among the multiple applications, performing a first control on the target application based on the target event, the first control including at least one of starting the application, closing the application, uninstalling the application, and upgrading the application.
[0113] The target event includes receiving a control instruction sent by the cloud based on the monitoring result, and / or the monitoring result of the target application monitored by the device side meeting the preset conditions, and the preset conditions are recorded in the monitoring file.
[0114] In this embodiment, the monitoring file may also include trigger conditions corresponding to the device-side control instructions. When monitoring an application based on the monitoring file, if the target application is monitored to meet the trigger conditions, the device-side can directly trigger the control instruction and control the application through the control instruction. For example, for application A on the device side, the monitoring file includes the name, installation path, and version of application A, monitors the running time of application A, and is set to control application A to stop running when the running time of application A reaches 24 hours. During actual monitoring, if the running time of application A reaches 24 hours, the device-side triggers the control instruction to control application A to stop running, and controls application A to stop. In this way, the device side itself can also control the application without going through the cloud.
[0115] Of course, the target event can also be receiving a control instruction sent by the cloud based on the monitoring results. In this case, the user can perform the target operation on the cloud, so that the cloud generates a control instruction, and then the cloud sends the control instruction to the device side. At this time, the device side controls the target application according to the control instruction.
[0116] Among them, it may happen that the cloud and the device side send control instructions to the target application at the same time. The device side can determine whether to execute the control instructions sent by the cloud or the control instructions triggered by the device side itself based on the priority of the instructions; the priority can be set by the user, and can also be determined according to the complexity of the control strategy. For example, the cloud side is set to implement control instructions under complex conditions, such as control instructions determined according to the status of multiple applications when multiple applications are linked, while the device side executes control instructions under simpler conditions, such as control instructions determined according to the running time and the start and stop status of the application. The control instructions under complex conditions can be set to instructions with higher priority. In this way, application control under complex conditions can be met first.
[0117] By adopting the application control method provided by the embodiment of the present disclosure, the device side can monitor the applications on it and return the monitoring results of the applications to the cloud, so that the cloud can control the target application among multiple applications according to the monitoring results; at the same time, the device side can also control the target application according to whether the monitoring results meet the preset conditions, thereby realizing remote control of the application on the device side by the cloud. In this way, the control of the application can be jointly realized by the cloud and the device side, which can reduce the computing power consumption of the device side. At the same time, under remote control and autonomous control of the device side according to the monitoring results, the application on the device side can be started on demand, thereby avoiding the problem of increased power consumption of the application on the device side as the device side starts and stops, thereby realizing automatic control of the application on the device side.
[0118] In one embodiment, monitoring multiple applications on the device side requires installing multiple application files on the device side, and generating monitoring files based on the configuration information of the installed application files. Therefore, before monitoring multiple applications on the device side based on the monitoring files, the applications need to be installed first.
[0119] When installing an app on a device, some apps have multiple files, requiring all of them to be downloaded. Whether the task issued by the cloud is a single task or a group of tasks determines whether the installation of multiple app files should be performed as separate tasks or as a single task.
[0120] In one implementation, if the installation information sent from the cloud indicates that the cloud manages each application file as a separate task, then when installing the application, the download process of each application file is performed as a separate task. At this time, the installation process of the application file can be specifically: first, receive the installation information sent from the cloud, and the installation information includes the storage path of at least one application file required for the application to be installed and the configuration information corresponding to each application file; then, download at least one application file from the storage path, and install at least one application file based on the configuration information.
[0121] When there is only one application file to be installed, the application file can be downloaded according to the storage path read from the installation information. When the application to be installed includes multiple application files, the device receives the installation information of the storage path of the application to be installed and the configuration information of each application file to be installed. The installation of each application file is then performed as a separate task. After the installation of an application file is completed, the current task is considered completed and the next task is executed. When all tasks are completed, the application is indicated as having been installed on the device. In this case, the download process of each application file is a separate task, and the download processes of multiple application files will not affect each other. Even if there is a problem in the download process of one application, it will not affect the download of other application files.
[0122] In another implementation, if the installation information sent from the cloud indicates that the cloud manages multiple application files as a whole task, then when installing the application, the multiple application files are packaged and installed. The specific process may be: first, receiving the package file sent from the cloud, the package file includes multiple application files required for the application to be installed, wherein the package file directory carries a script file; then, decompressing the package file to obtain multiple application files; then, based on the script file, generating configuration information corresponding to each application file; then, according to the installation order of the multiple application files, based on the configuration information, installing the multiple application files in sequence.
[0123] In this embodiment, the configuration information may include the name of the application, the application's operating platform, the parameters of the application's installation device, and the path of the application's corresponding configuration file. The application's operating platform indicates whether the application's operating environment is Android, Windows, or Linux, and the parameters of the application's installation device may include the device identifier and the number of devices.
[0124] Among them, the sequence information of multiple application files can be carried in the package file. During the installation process, multiple application files can be installed in sequence according to the read sequence information. When multiple application files are installed on the device side, the current task is completed, indicating that the application has been installed on the device side. In this case, since the installation of multiple application files is performed as a whole task, the possible omission of application files is avoided.
[0125] In one embodiment, considering that the installation process of an application may be terminated or paused by the user, the cloud can control the application to be installed on the device side. The process may be: first, receiving an adjustment instruction sent by the cloud, and the adjustment instruction is generated by the progress change information received by the cloud; then, executing a second control corresponding to the adjustment instruction on the application to be installed; wherein the second control includes canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting at least one of the application files.
[0126] Among them, the progress change information can be an instruction issued by the user. When the user subjectively believes that the application to be installed needs to be canceled, paused, or the application file is wrong, the user can enter an instruction to cancel the installation in the cloud. At this time, the cloud generates an adjustment instruction based on the instruction to cancel the installation entered by the user; thereafter, the device side cancels the installation of the application to be installed according to the adjustment instruction from the cloud.
[0127] For example, regardless of whether the installation process of the application to be installed involves downloading multiple application files based on the installation information, or packaging the multiple application files into a single file and installing the application based on the single packaged file, the execution control method for executing the second control on the application to be installed is the same. Specifically, when the second control is to cancel the installation of the application to be installed, the currently executing task of installing the application file is canceled and the already installed application file is deleted; when the second control is to pause the installation of the application to be installed, the download of the current application file is paused; and when the second control is to delete the application file, the already installed application file is deleted.
[0128] It is understandable that when a new application is installed on the device or the version of the monitored application is upgraded, or the monitoring content changes, the original monitoring file cannot correspond to the multiple applications currently monitored. The monitoring file needs to be updated to ensure normal application monitoring.
[0129] In the case of installing a new application on the device, the monitoring file can be updated based on the configuration information corresponding to the new application to be installed in response to the arrival of the task of the new application to be installed. In the case of configuration changes or monitoring content changes of an installed application on the device, the monitoring file can be updated based on the modification information sent by the cloud for the installed application. The modification information is used to modify at least one of the properties of the installed application and the monitoring configuration of the installed application.
[0130] Specifically, when a task for a new application to be installed arrives, it indicates that the device is installing a new application. Adding the application to the monitoring file can be directly adding configuration information in the monitoring file; the modification information of the installed application can be the version information after the version of the monitored application is upgraded, or the name of the monitored application after the name is modified, etc. For example, when the version of the monitored application is upgraded, the version information changes, and the configuration information in the monitoring file is modified according to the new version information.
[0131] It can be understood that after the monitoring file is updated, it is different from the original monitoring file and can be regarded as a new monitoring file that has been regenerated. Therefore, after the monitoring file is updated, the monitoring file needs to be reread to realize the monitoring of multiple applications. In this case, in response to the update of the monitoring file, multiple applications are monitored based on the updated monitoring file.
[0132] At this time, the updated monitoring file is regarded as a regenerated monitoring file. In order to ensure the real-time monitoring, the monitoring tasks of multiple applications can be executed immediately after the monitoring file is updated, so that the monitoring results can be consistent with the configuration information in the updated monitoring file.
[0133] In this embodiment, the monitoring result includes the running status of the application, and the preset conditions include: the running status of the target application is not running, the running status is faulty, and the running status of the application associated with the target application is running, while the target application is not running.
[0134] Exemplarily, the monitoring results may include the configuration information of the monitored application and the status of the application, such as whether the application is running, not running, or may be in a running failure state; wherein, if the currently monitored application has associated applications, the monitoring results may also include the status of the associated applications.
[0135] It should be noted that some tasks involve the linkage control of multiple applications. For example, when application 1, application 2, and application 3 need to be linked for control in a certain task, application 1, application 2, and application 3 are considered to be associated. In this case, it is necessary to determine whether the state of the target application is reasonable based on the state associated with the target application, and then control the target application. For example, when the monitoring results show that application 1 is not running, and application 2 and application 3 are running, if the task needs to be started, application 1 needs to be started to achieve the task. At this time, the control of the target application based on the monitoring results can be implemented by the cloud or by the device.
[0136] In one implementation, for the case of multiple application linkage, the device can control the target application based on whether the monitoring results meet preset conditions. In this case, the associated applications of the target application can be obtained from the cloud. For example, the device can obtain the service name of a service with multiple application linkage from the cloud. When the service needs to be implemented, the service name determines the application 1, application 2, and application 3 associated with the service. The device can then determine the status of application 1, application 2, and application 3 based on the monitoring results. If application 1 is not running, while application 2 and application 3 are running, application 1 is controlled to start.
[0137] In another implementation method, in the case where multiple applications are linked to implement a certain business, when a business needs to implement the linkage of multiple applications, the cloud can determine the running status of application 1, application 2 and application 3 based on the monitoring results uploaded by the device. If application 1 is not running and application 2 and application 3 are running, an instruction to control the start of application 1 is sent to the device, and the device executes the control instruction to control the start of application 1.
[0138] It should be noted that the device side controls the target application based on the target event. The target event can be a control instruction sent by the cloud based on the running status, or a monitoring result of the target application monitored by the device side that meets the preset conditions. It can also include a control instruction sent by the cloud based on the motion status, and a monitoring result of the target application monitored by the device side that meets the preset conditions. Then, the execution of the first control on the target application based on the target event can be specifically divided into the first case: when the target event is receiving a control instruction sent by the cloud based on the running status, or when the monitoring result of the target application monitored by the device side meets the preset conditions, the first control is executed on the target application according to the control instruction or based on the preset conditions;
[0139] And, situation two: when the target event includes receiving a control instruction sent by the cloud based on the monitoring results, and the monitoring results of the target application monitored by the device side meet the preset conditions, the first control is performed on the target application based on the control instruction, the preset conditions and the control priority between the cloud and the device side.
[0140] Among them, in case one, there is only control execution from the cloud, or only control instructions from the device side, then the target application can be controlled according to the only control instructions; in case two, there are two control instructions, one control instruction is the control instruction for the target application sent by the cloud, and the other is the control instruction for the target application from the device side itself. The two control instructions may conflict, so the control priority of the cloud and device sides can be configured in advance, so that when there are control instructions from two different sources, the control instruction with a higher priority can be selected for execution.
[0141] For example, if the control priority of the cloud side is preset to be higher than that of the device side, then when the target event includes receiving a control instruction sent by the cloud side, and the monitoring result of the target application monitored by the control side itself meets the preset conditions, it is determined to give priority to executing the control instruction of the cloud side. At this time, the first control is performed on the first target application according to the control instruction of the cloud side; and if the control priority of the device side is preset to be higher than that of the cloud side, then when the target event includes both, the target application is directly controlled according to the preset conditions.
[0142] The application control method provided by the embodiment of the present disclosure determines the control instructions for the target application among the multiple applications based on the monitoring results of the multiple applications on the device side by the cloud side, and / or the monitoring results of the target application monitored by the device side itself meet the preset conditions, and then controls the target application according to the control instructions and / or the preset conditions. In the case that the target application is associated with other applications in multiple applications, the device side or the cloud side can control the target application based on the associated applications, so that the device side or the cloud side can control the application according to business needs, realize application control under complex strategies, and also realize collaborative application control between the cloud side and the device side, thereby reducing the computing power consumption of the device side.
[0143] Based on the same inventive concept, the present disclosure further provides an application control method, which is applied to the cloud. Referring to FIG. 5 , FIG. 5 shows a schematic flow chart of steps of another application control method proposed in an embodiment of the present disclosure. As shown in FIG. 5 , the control method specifically includes:
[0144] S201: Receive monitoring results of multiple applications sent by a device.
[0145] Among them, the monitoring results include the configuration information or application representation of multiple applications on the device side, as well as the monitoring results corresponding to each application. The monitoring results can include the application's operating status, fault status, and can also include the monitored operating time or start time, stop time, etc. The acquisition of the monitoring results is implemented by the device side. The specific process can be found in the above-mentioned device side embodiment, which will not be repeated here.
[0146] S202: Based on the monitoring results of the multiple applications, a control instruction for a target application among the multiple applications is issued to the device.
[0147] Among them, the device side is used to perform a first control on the target application based on the target event, and the first control includes at least one of starting the application, closing the application, uninstalling the application and upgrading the application; the target event includes a control instruction and / or the monitoring result of the target application monitored by the device side meets the preset conditions, and the preset conditions are recorded in the monitoring file.
[0148] In this embodiment, the control instructions for the target application in multiple applications can be generated according to preset conditions or according to the service triggered by the user. For example, if application A runs according to a time cycle and needs to be closed for 1 hour after being opened for 10 minutes to avoid large power consumption, the condition can be set that if the running time of application A reaches 10 minutes, an instruction to stop running application A will be generated, and if the running time of application A reaches 1 hour, an instruction to start application A will be generated; further, the control instructions can be generated based on whether the running time of application A in the monitoring results uploaded by the device side meets the preset conditions; and in the case where the user intends to open service 1, the user triggers service 1, determines application B required to implement service 1, determines the status of application B according to the monitoring results, and generates an instruction to open application B if application B is not running.
[0149] By adopting the application control method provided by the embodiment of the present disclosure, the cloud can monitor the status of multiple applications on the device side according to the monitoring results uploaded by the device side, and then it can generate control instructions for the target application among the multiple applications according to the monitoring results. Since the cloud has higher computing power, it can accurately control the target application according to the monitoring results and support application control under complex conditions. At the same time, since the device side itself can also control the target application according to preset conditions, the control of the application can be jointly achieved by the cloud side and the device side, which can reduce the computing power consumption of the device side.
[0150] In one embodiment, there are multiple ways to generate control instructions. The control instructions can be directly generated based on the monitoring results, or the user can input control information for the target application based on the monitoring results, and the cloud can generate control instructions based on the control information. The control instructions can also be generated based on the business that the cloud currently receives and the monitoring results.
[0151] When control instructions are generated directly based on monitoring results, the specific control instruction generation method can be to determine the target application with the target operating state as the monitoring result among multiple applications, and send control instructions for the target application to the device side to make the target application leave the target operating state.
[0152] For example, when the device is not in use, multiple applications on the device are not running. If the monitoring results determine that the target application is in a running state, the cloud can generate a control instruction for the target application to make the target application exit the running state and return to the non-running state.
[0153] When the cloud generates control instructions based on input control information, the specific control instruction generation method can be to display multiple monitoring results, and in response to the control operation of the monitoring results of the target application, send the control instructions for the target application to the device end.
[0154] Among them, the cloud can be configured with a display screen, which is used to display the monitoring results to the user. The monitoring results can be the current running status of each application, such as displaying the name of each application and displaying the current running status of the application after the name. The user can input control operations for the target application as needed. The cloud generates control instructions based on the control operations input by the user. Among them, the control operations input by the user can be switching operations on the running status, or entering control operations in a text box, etc.
[0155] For example, the cloud displays application A, application B, and application C on the device side to the user through a display screen, where application A is displayed as running, application B is displayed as stopped, and application C is displayed as stopped; when the user intends to stop application A, he or she can click application A on the display screen and click on the status switch, which indicates that the user intends to switch application A from the running state to the stopped state. The cloud then generates an instruction to control application A to stop running based on the user's operation.
[0156] When the cloud generates control instructions based on user-triggered services and monitoring results, a specific control instruction generation method may be to generate control instructions for target applications based on the monitoring results and applications required by the current service.
[0157] Among them, the cloud can be configured with a business end, which is used to send the current business to the cloud, and then the application required for the current business can be determined. Then, the cloud can determine the current status of the application required for the current business based on the application required for the current business and the monitoring results. Therefore, when the application required for the current business is not started, a control instruction to start the application is generated.
[0158] In this embodiment, the application required for the current business can be one or more. When the application required for the current business is one, the application required for the current business can be directly controlled according to the monitoring results. When the application required for the current business is multiple, the number of applications that need to be controlled is determined according to the monitoring results, and then the applications are controlled separately.
[0159] Among them, when there are multiple applications required for the current business, the specific process of generating control instructions may be to first obtain multiple first applications that support the current business; then, obtain the running status of the multiple first applications on the device; after that, for the second application in the multiple first applications whose running status is not running, generate a startup command corresponding to the second application, so that the device side starts the second application.
[0160] Specifically, multiple first applications with the same business identifier can be determined based on the business identifier of the current business, or multiple first applications can be determined based on the application name associated with the current business identifier; after determining multiple first applications, the operating status of each first application on the device side can be determined based on the received monitoring results, and corresponding control instructions can be generated based on the operating status. The generated control instructions can be one or more. For example, if the current business is associated with application X and application Y, and according to the monitoring results, application X and application Y are both in a stopped state, the cloud can generate a control instruction to start both application X and application Y, or it can first generate a control instruction to start application X, and then generate a control instruction to start application Y.
[0161] In one embodiment, multiple applications associated with a current service have varying degrees of relevance. The application with the stronger relevance is the primary factor in determining whether the service can be implemented, while the other applications are secondary factors. If the application cannot be launched, the service cannot be implemented even if the other applications are launched. In this case, the application with the stronger relevance can be controlled first. Once the application is successfully launched, the other applications can be controlled. This process can include determining whether the second application is the primary application for the current service. If so, after sending a launch command, checking whether the primary application has been successfully launched. After the primary application has been successfully launched, a launch command is sent to a third application. The third application is an application that is not the primary application in the second application.
[0162] Among them, the main application can represent the application that plays a major role in the implementation of the business. Whether the second application is the main application of the current business can be determined based on the business information sent by the business end; if it is determined according to the business information that application M supports the core functions of the business, and application N only supports the edge functions of the business, then application M is the main application.
[0163] After determining the main application, a startup command can be sent to the main application first. After the device side controls the startup of the main application according to the startup command of the main application, the cloud side can first detect the current monitoring results here and determine whether the main application is successfully started based on the monitoring results. If the running state of the main application switches from the non-running state to the running state, the startup commands of other applications are generated and sent to the device side.
[0164] It is understood that receiving the monitoring results of multiple applications on the device requires that the application be installed on the device. Therefore, before installing multiple applications on the device, the application needs to be installed on the device. Among them, the application to be installed is divided into two parts: the application file and its supporting configuration file. The application file is code.
[0165] In some embodiments, an application may include multiple application files and corresponding configuration files. In this case, two different approaches, namely, separate creation tasks and packaged creation tasks, may be used to implement the application installation process.
[0166] Method 1: After the cloud decompresses the packaged multiple application files and corresponding configuration files, it creates configuration information for each application file as a separate task, and then combines the multiple tasks into a task group. The device side can then directly implement the application installation process based on the task group. The above process may specifically include: first, in response to the creation of the task, obtaining the created task information, the task information including the configuration information of the application to be installed and the packaged file, the packaged file including the multiple application files required for the application to be installed; then, parsing the task information to generate installation information, the installation information including the storage path of the multiple application files required for the application to be installed, and the configuration information corresponding to each application file; thereafter, sending the installation information to the device side so that the device side downloads the application file from the storage path, and installs the multiple application files in sequence based on the configuration information in the installation order of the multiple application files.
[0167] Specifically, referring to Figure 6, Figure 6 shows a flow chart of the task generation process provided in the embodiment of the present disclosure. As shown in Figure 6, when the cloud receives the packaged file uploaded by the user, it decompresses the packaged file to obtain multiple application files and configuration files, and creates a task corresponding to the current application file by reading the configuration information in the configuration files corresponding to the multiple application files; then, a task is created for the next application file until separate tasks are created for all application files; then, the multiple tasks are created into a task group, and the task group is sent to the device end, and the device end directly executes the installation process of the multiple application files.
[0168] In this case, the decompression process of the packaged files is implemented by the cloud. Since each application file is created with a separate task, the cloud can manage each task separately. It can be understood that the cloud sends tasks to the device in the form of task groups. If all tasks in the task group are successfully executed, the installation is considered successful.
[0169] Method 2: The cloud can directly create a task for the packaged file, and implement the decompression process through the device side. The specific process can be: first, in response to the creation of the task, the created task information is obtained, and the task information includes a packaged file, and the packaged file includes multiple application files required for the application to be installed, wherein the packaged file directory carries a script file; then, the packaged file is sent to the device side, so that the device side decompresses the packaged file, and generates configuration information corresponding to each application file based on the script file; and according to the installation order of multiple application files, based on the configuration information, multiple application files are installed in sequence.
[0170] Specifically, referring to Figure 7, Figure 7 shows a flow chart of the task generation process provided in the embodiment of the present disclosure. As shown in Figure 7, when the cloud receives the packaged file, it directly creates a single task based on the packaged file. First, after the cloud receives the packaged file, it can directly create a task based on the packaged file and configure the installation and uninstallation script files in the top-level directory of the packaged file, so that the device side can generate configuration information corresponding to the application file according to the script file, and then the device side can install multiple application files in the packaged file according to the configuration information.
[0171] In this embodiment, by creating a task with the packaged file as a whole, the process of generating the task is more convenient, and the cloud can quickly send the installation task to the device end to quickly perform the application installation process.
[0172] It is understood that, whether the task is to package the files as a whole or to decompress each file as a separate task, the device must download the application files in the installation order. This installation order is recorded in the task information summary, or the installation information is obtained by the cloud based on the relationship between multiple application files. For example, the cloud can sort the application files by name, size, etc., and derive the installation order of the multiple application files based on the sorting.
[0173] During the installation process of an application file, task progress change information input by a user may be received. During the installation of the application on the device, the cloud may control the installation progress of the application to be installed based on the received task progress change information. The control process of the application to be installed may specifically include: first, receiving task progress change information for task information, where the task progress change information is used to indicate an adjustment to the installation progress of the application to be installed; then, obtaining progress information corresponding to the device, where the progress information includes the current progress of the application to be installed; and then, based on the progress information, executing a second control corresponding to the task progress change information, where the second control includes at least one of canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting the application file.
[0174] Among them, the progress of the task represents the progress of the task creation in the cloud, and can also represent the degree of execution of the task on the device side. The current progress of the task can be determined by the status of the task. For example, if the task status is the creation status, it means that the task has just started to be generated. If the task status is the generation completion status, it means that the progress of the task is about to be sent to the device side, etc. Among them, the status of the task includes multiple types, such as task creation, task generation, task running, and task cancellation, etc. There is a conversion relationship between the status of multiple tasks, and the conversion relationship can be shown in Figure 8.
[0175] According to Figure 8, first, through the relevant information of the task, such as task id, task group id, execution terminal list, start time and deadline, etc., the task is created according to the relevant information, and the created task is stored in the database. At this time, the task is regarded as in the task generation state. After the task is generated, the task is included in the task queue and sent to the device for execution. Among them, if the task progress change information is received and the execution of the task needs to be canceled, the task can be suspended and not included in the task queue. At this time, the task is in the task suspension state; afterward, if the task needs to be executed again, the suspended task will be restored to the queue. If the suspended task needs to be deleted, the task can be deleted directly, or the task can be deleted directly in the database when the task is generated. At this time, the task status is the task deletion state.
[0176] When a task is sent to the execution end, that is, the device end, the device end executes the task. At this time, the task is in the execution state. After the execution is completed, regardless of whether the execution fails or succeeds, the device end will return the execution result to the cloud. If the execution failure information is returned, it indicates that the task is in the execution failure state; if the execution success information is returned, it indicates that the task is in the execution success state.
[0177] Among them, the task progress change information can be input into the cloud by the user, or the cloud itself can determine whether the task progress needs to be changed; for example, if the user intends to cancel the application currently being installed, the cloud can input task progress change information to cancel the installation task of the application to be installed; when the cloud issues the task of installing the application to be installed, the user creates a task with a higher priority, the cloud can determine the need to suspend the installation task of the current application to be installed based on the priority, and execute the task with the higher priority first. At this time, the cloud itself generates task progress change information to indicate the suspension of the installation of the application to be installed.
[0178] Among them, the progress information can be the current task creation progress of the application to be installed, or the installation progress of the application to be installed. The installation progress can be sent to the cloud in real time by the device during the installation process, so that the cloud can grasp the installation progress of the application to be installed at any time.
[0179] In one embodiment, when the user inputs task progress change information to the cloud, or when the cloud itself generates task progress change information, the task of installing the application to be installed may still be executing the task generation process on the cloud, or it may be executing the installation process on the device side. That is, at different task progress, the execution end that controls the task may be different. The current execution end can be judged first, and then the operation to be executed on the cloud can be determined based on the execution end. Specifically, the process can be to first determine the execution end where the current progress is based on the progress information; if the execution end is the device side, the second control is executed by the cloud; if the execution end is the device side, an adjustment instruction corresponding to the progress change information is sent to the device side to enable the device side to execute the second control.
[0180] Specifically, when the cloud receives task progress change information, it obtains progress information, which includes the task progress information on the cloud and the installation progress information on the device side. If the progress information indicates that the task is being created or the task is being issued, it is determined that the current task execution end is the cloud. At this time, the second control can be directly implemented by the cloud, such as canceling the installation of the application to be installed, deleting part of the application files of the application to be installed, or pausing the issuance of the task; and if the progress information indicates that the device side is installing the application to be installed, it is determined that the current task execution end is the device side. At this time, the cloud side can send an adjustment instruction to the device side to instruct the device side to perform the second control, such as canceling the installation of the application to be installed and deleting the installed application files, pausing the installation of the application to be installed, etc.
[0181] By adopting the control system of the application provided by the embodiment of the present disclosure, the cloud can generate target control instructions based on the monitoring results sent by the device side and in combination with the user's control operations on the application, or the application required for business implementation, to achieve application control under various conditions and improve the accuracy of application control; at the same time, since application control can be achieved through the collaboration of the cloud and the device side, the computing power consumption of the device can be reduced.
[0182] The following describes the control method of the application provided by the embodiment of the present disclosure in detail with reference to a specific example:
[0183] First, before monitoring an app, the cloud creates a task based on the file package of the application to be installed, sent by the user, so that the device can install the application according to the task. When creating the task, the packaged file can be decompressed to obtain the application file and the corresponding configuration file. The configuration information is generated by reading the configuration file, and the installation task of the application file is created based on the configuration information. Alternatively, a script file can be directly configured for the packaged file, and the configuration information is generated based on the script file. The installation task is then created for the packaged file. The task carries the installation information, which includes the storage path and configuration information of the application file.
[0184] After the task is generated, it is sent to the device for execution. If the device receives a task to install an application file, the application file is directly downloaded to the corresponding storage path according to the installation information; if the device receives a task to install a packaged file, the packaged file is first decompressed to obtain the application file, and then the configuration information of the application file is determined according to the script file in the directory of the packaged file, and then the application file is downloaded according to the configuration information.
[0185] After the application is installed, monitoring is achieved by reading the monitorApp.yaml file and registering the application to be monitored with the device's monitoring module. The monitorApp.yaml file contains information such as the application name and storage path, and also has a specific organizational structure that reflects the application monitoring strategy and control methods.
[0186] Among them, the specific process of monitoring the application can be referred to Figure 9, which shows a schematic diagram of the process of device-side monitoring application in this embodiment. When monitoring the application, first read the monitor App.yaml file, then register the application to the monitoring module, and then add the pipeline signal, and at the same time trigger the instruction to scan the application.
[0187] When the instruction is triggered, it is determined whether the preset time interval is reached and whether the monitor App.yaml file has changed. If either of the conditions is met, a scan of the application is performed to determine the current running status of the application.
[0188] Afterwards, the running status is reported to the cloud. After this application running status report is submitted, it is determined whether the preset time interval has passed since the last scan and whether the monitor App.yaml file has changed. In this way, the application is rescanned to determine the running status of the application.
[0189] The monitoring module process may include: first starting the monitoring module, then reading and parsing the YAML configuration file and obtaining the "apps" field information therein, which includes the name, path, version, and other related information of each application. Then, setting a scheduled task or timer to regularly perform the following steps: first, traversing each configured application and obtaining the application name and path based on the configuration information; then, checking whether the application is running. If so, recording the application status as running; if not, recording the application status as not running; then, updating the response status information based on the recorded status; if a change in the configuration file is detected, such as when the configuration file is modified, reloading the YAML configuration file and parsing the updated configuration file to obtain the latest "apps" field information; then updating the application's running status and related information based on the latest "apps" field information; then continuing to execute the scheduled task or timer, regularly obtaining and recording the application status. If the monitoring module needs to stop, the corresponding stop operation is performed, such as cleaning up resources and canceling the scheduled task.
[0190] After the application's running status is reported to the cloud, the cloud determines the running status of the installed application based on the received monitoring results. If the installed application is not running, it generates a control instruction to control the installation of the application and sends the control instruction to the device. Finally, the device controls the application to start according to the control instruction.
[0191] In another implementation scenario, the cloud also includes a service end, which is used to send services to be executed by the device end to the cloud. In this implementation scenario, the installation process of multiple applications is the same as that in the above embodiment.
[0192] After the business end sends the device end's current business to be implemented to the cloud, the cloud can determine the applications required to implement the business based on the business information sent by the device end, such as the support of application A, application B, and application C is required to implement the current business.
[0193] After determining the applications required for the current business, the monitoring results are used to determine the running status of Application A, Application B, and Application C. If Application A and Application B are running, but Application C is not running, the cloud generates a command to start Application C and sends it to the device.
[0194] Afterwards, the device controls the opening of application C according to the instruction to open application C.
[0195] Based on the above inventive concept, the embodiment of the present disclosure further provides an application control system. Referring to FIG10 , FIG10 shows a schematic structural diagram of an application control system provided by the embodiment of the present disclosure. As shown in FIG10 , the control system includes: a cloud 301 and multiple device terminals 302 connected to the cloud 301; wherein,
[0196] The device 302 is configured to monitor multiple applications on the device 302 based on a monitoring file, wherein the monitoring file is generated based on configuration information of the application when the application is installed, and the monitoring file is used to indicate the application to be monitored;
[0197] The cloud 301 is configured to receive monitoring results of multiple applications sent by the device 302 and send control instructions to the device 302 based on the monitoring results;
[0198] The device 302 is further configured to, in response to an arrival of a target event of a target application among the multiple applications, perform a first control on the target application based on the target event, where the first control includes at least one of starting the application, closing the application, uninstalling the application, and upgrading the application;
[0199] The target event includes receiving a control instruction, and / or the device end 302 monitoring the target application and the monitoring result meets the preset conditions, and the preset conditions are recorded in the monitoring file.
[0200] An embodiment of the present disclosure also provides an electronic device, including a processor and a memory, and a computer program stored in the memory and executable on the processor, causing the processor to execute the control method of the application as described in any of the above embodiments.
[0201] An embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the control method of the application as described in any of the above embodiments.
[0202] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0203] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, commodity, or device that includes the element.
[0204] The above is a detailed introduction to the control method, system, device and medium of an application provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
[0205] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0206] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0207] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0208] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0209] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.
Claims
1. A control method for an application, characterized in that: Applied to a device, the method includes: Monitoring multiple applications on the device based on a monitoring file, wherein the monitoring file is generated based on configuration information of the application when the application is installed, and the monitoring file is used to indicate the application to be monitored and the monitoring content; Uploading the monitoring results of the plurality of applications to the cloud; In response to an arrival of a target event for a target application among the plurality of applications, performing a first control on the target application based on the target event, the first control comprising at least one of starting an application, closing an application, uninstalling an application, and upgrading an application; The target event includes receiving a control instruction sent by the cloud based on the monitoring result, and / or the monitoring result of the target application monitored by the device side meets a preset condition, and the preset condition is recorded in the monitoring file.
2. The control method of the application according to claim 1, characterized in that: Before monitoring the multiple applications on the device based on the monitoring file, the method further includes: Receive the installation information sent from the cloud, the installation information including the storage path of at least one application file required by the application to be installed and configuration information corresponding to each application file; The at least one application file is downloaded from the storage path, and the at least one application file is installed based on the configuration information.
3. The control method of the application according to claim 1, characterized in that: Before monitoring the multiple applications on the device based on the monitoring file, the method further includes: Receive a package file sent from the cloud, where the package file includes multiple application files required by the application to be installed, wherein a directory of the package file carries a script file; Decompressing the packaged file to obtain a plurality of application files; Based on the script file, generating configuration information corresponding to each of the application files; The multiple application files are installed sequentially based on the configuration information according to the installation order of the multiple application files.
4. The control method of the application according to claim 1, characterized in that: After monitoring the multiple applications on the device based on the monitoring file, the method further includes at least one of the following: In response to an arrival of a task for a new application to be installed, updating the monitoring file based on configuration information corresponding to the new application to be installed; In response to modification information of the installed application sent by the cloud, updating the monitoring file based on the modification information; The modification information is used to modify at least one of a property of the installed application and a monitoring configuration of the installed application.
5. The control method of the application according to claim 4, characterized in that: The method further comprises: In response to updating the monitoring file, the plurality of applications are monitored based on the updated monitoring file.
6. The control method of the application according to claim 1, characterized in that: The monitoring result includes the running status of the application, and the preset condition includes at least one of: the running status of the target application is not running, running failure, and the running status of the application associated with the target application is running while the target application is not running.
7. The control method of the application according to claim 1, characterized in that: The performing a first control on the target application based on the target event includes: When the target event is receiving a control instruction sent by the cloud based on the running status, or the device monitoring the target application and the monitoring result meets a preset condition, executing the first control on the target application according to the control instruction or based on the preset condition; When the target event includes receiving a control instruction sent by the cloud based on the monitoring result, and the monitoring result of the target application monitored by the device side meets the preset conditions, the first control is performed on the target application based on the control instruction, the preset conditions and the control priority between the cloud and the device side.
8. The control method of application according to claim 2 or 3, characterized in that: The method further comprises: receiving an adjustment instruction sent by the cloud; the adjustment instruction is generated by the cloud based on the received progress change information; executing a second control corresponding to the adjustment instruction on the application to be installed; The second control includes at least one of canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting the application file.
9. A control method for an application, characterized in that: Applied to the cloud, the method includes: Receiving monitoring results of multiple applications sent by a device end; wherein the monitoring results are obtained by the device end by monitoring the multiple applications based on a monitoring file, the monitoring file is generated by the device end based on the configuration information of the application when the application is installed, and is used to indicate the application to be monitored and the monitoring content on the device end; Based on the monitoring results of the multiple applications, a control instruction for a target application among the multiple applications is issued to the device end; The device is configured to perform a first control on the target application based on the target event, wherein the first control includes at least one of starting the application, closing the application, uninstalling the application, and upgrading the application; The target event includes the control instruction and / or the monitoring result of the target application monitored by the device side meeting a preset condition, and the preset condition is recorded in the monitoring file.
10. The control method of application according to claim 9, characterized in that: Before receiving the monitoring results of the multiple applications sent by the device, the method further includes: In response to creation of the task, acquiring the created task information, the task information including configuration information of the application to be installed and a package file, the package file including a plurality of application files required by the application to be installed; Parsing the task information to generate installation information, the installation information including storage paths of the multiple application files required by the application to be installed and configuration information corresponding to each application file; The installation information is sent to the device end, so that the device end downloads the application file from the storage path, and installs the multiple application files in sequence based on the configuration information according to the installation order of the multiple application files.
11. The control method of application according to claim 9, characterized in that: Before receiving the monitoring results of the multiple applications sent by the device, the method further includes: In response to the creation of the task, obtaining the created task information, wherein the task information includes a package file, the package file includes a plurality of application files required by the application to be installed, wherein a directory of the package file carries a script file; The packaged file is sent to the device end so that the device end decompresses the packaged file and then generates configuration information corresponding to each application file based on the script file; and installs the multiple application files in sequence based on the configuration information in the order in which the multiple application files are installed.
12. The control method of the application according to claim 10 or 11, characterized in that: The installation sequence is recorded in the task information, or the installation sequence is obtained by the cloud based on the association relationship between the plurality of application files.
13. The control method of the application according to claim 10 or 11, characterized in that: The method further comprises: receiving task progress change information for the task information, where the task progress change information is used to indicate an adjustment to the installation progress of the application to be installed; Acquire progress information corresponding to the device end, the progress information including the current progress of the application to be installed; Based on the progress information, a second control corresponding to the task progress change information is executed, wherein the second control includes at least one of canceling the installation of the application to be installed, pausing the installation of the application to be installed, and deleting the application file.
14. The control method of the application according to claim 13, characterized in that: The executing, based on the progress information, a second control corresponding to the task progress change information includes: Based on the progress information, determining the execution end of the current progress; If the execution end is the cloud, the second control is executed by the cloud; If the execution end is the device end, an adjustment instruction corresponding to the progress change information is sent to the device end, so that the device end executes the second control.
15. The control method of application according to claim 9, characterized in that: The sending of a control instruction for a target application among the multiple applications to the device based on the monitoring results of the multiple applications includes at least one of the following: Displaying a plurality of the monitoring results, and in response to a control operation on the monitoring results of the target application, issuing a control instruction for the target application to the device end; determining a target application in a target operating state according to the monitoring result among the plurality of applications, and issuing a control instruction for the target application to the device end so as to make the target application leave the target operating state; Based on the monitoring results and the applications required by the current business, a control instruction for the target application is generated.
16. The control method of application according to claim 15, characterized in that: The monitoring result includes the running status of the application, and the generating of a control instruction for the target application based on the monitoring result and the application required by the current business includes: Acquire multiple first applications that support the current service; Obtaining the running status of the plurality of first applications on the device end; For the second application whose running status is not running among the multiple first applications, a startup command corresponding to the second application is generated to enable the device to start the second application.
17. The control method of the application according to claim 16, characterized in that: The generating, for the second application in the plurality of first applications whose running state is not running, a startup command corresponding to the second application includes: Determining whether the second application is the main application of the current service; If yes, after sending the startup command, detecting whether the main application is successfully started; After the main application is successfully started, a start command is sent to a third application, where the third application is an application in the second application that is not the main application.
18. An application control system, characterized in that: It includes a cloud and multiple device terminals connected to the cloud; wherein, The device is configured to monitor multiple applications on the device based on a monitoring file, wherein the monitoring file is generated based on configuration information of the application when the application is installed, and the monitoring file is used to indicate the application to be monitored; The cloud is configured to receive monitoring results of the plurality of applications sent by the device, and send control instructions to the device based on the monitoring results; The device is further configured to, in response to an arrival of a target event for a target application among the plurality of applications, perform a first control on the target application based on the target event, wherein the first control includes at least one of starting the application, closing the application, uninstalling the application, and upgrading the application; The target event includes receiving the control instruction, and / or the monitoring result of the target application monitored by the device side meets a preset condition, and the preset condition is recorded in the monitoring file.
19. An electronic device, characterized in that: The invention comprises a processor and a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the computer program implements the control method of the application according to any one of claims 1 to 8, or implements the control method of the application according to any one of claims 9 to 17.
20. A computer-readable storage medium, characterized in that The computer program stored therein enables the processor to execute the control method of the application as described in any one of claims 1 to 8, or implement the control method of the application as described in any one of claims 9 to 17.
Citation Information
Patent Citations
Memory monitoring method, device and equipment and computer readable storage medium
CN112214388A
Application non-response monitoring method and device, vehicle-mounted equipment and vehicle
CN112306800A
Data transmission method and device of Internet of Things edge gateway, electronic equipment and medium
CN116915827A
Application control method, system, equipment and medium
CN118093316A
Method for Accelerating Application Startup, Electronic Device, and Computer Storage Medium
US20230385131A1