A service configuration implementation method and related device
Patent Information
- Application Number
- CN202311406621.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-10-25
AI Technical Summary
[0042] This application proposes a business configuration implementation method and related apparatus. In response to a business configuration request from a third-party server for a target application (APP), the open platform queries the working status of the target APP. If the target APP is running, the platform directly completes the business configuration based on the request. If the target APP is stopped, the platform loads the target management component corresponding to the APP and completes the business configuration through the target management component. Thus, when the APP is running, it receives and processes the business configuration itself; when the APP is stopped, the open platform takes over the receiving and processing of the business configuration by defining an APP management component. This allows the open platform device to receive business configurations from the third-party server even when the APP is not running, just like a traditional intelligent monitoring device, thereby improving configuration availability.
Smart Images

Figure CN117278539B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a business configuration implementation method and related apparatus. Background Technology
[0002] In recent years, some security equipment manufacturers have launched open platform devices, which open up the basic functions of security equipment (such as video streaming, encoding and decoding) as services, while business applications (such as intelligent algorithm application) are developed independently as applications (APP) and installed on the open platform devices, which are then managed and run by the open platform. Compared with traditional intelligent monitoring equipment, open platform devices have higher development efficiency and application flexibility.
[0003] In traditional intelligent monitoring equipment, intelligent business functions and the main program of the equipment are integrated. Therefore, business configuration is also subordinate to equipment configuration. Regardless of whether the intelligent business functions are enabled or not, external parties can configure them.
[0004] However, open platform devices are bare metal when no app is installed, providing only basic functions such as video capture and no other intelligent functions. Furthermore, the outside world cannot predict which app will be installed on the open platform device. Therefore, the business configuration belongs to the app itself. When the app is uninstalled or stops running, the outside world cannot configure it. In scenarios where traditional intelligent monitoring devices and open platform devices are used together, if the app on the open platform device is uninstalled or stops running, the outside world will experience abnormal access device business configuration, which will cause the app to be unable to complete the relevant intelligent business functions normally. Summary of the Invention
[0005] This application provides a service configuration implementation method and related apparatus to improve the availability of service configuration for open platform devices.
[0006] In a first aspect, embodiments of this application provide a service configuration implementation method, the method comprising:
[0007] In response to a third-party server's request for business configuration of the target application (APP), query the working status of the target APP;
[0008] If the target app is in a running state, the business configuration for the target app will be completed directly based on the business configuration request;
[0009] If the target APP is in a stopped state, the target management component corresponding to the target APP is loaded, and the business configuration for the target APP is completed through the target management component. The target management component is used to implement the business configuration read and write functions for the target APP.
[0010] Return the business configuration processing result to the third-party server.
[0011] Secondly, embodiments of this application also provide a service configuration implementation apparatus, applied to a target open platform device, the apparatus comprising:
[0012] The application management module is used to respond to business configuration requests from third-party servers for the target application (APP) and query the working status of the target APP.
[0013] The first processing module is used to directly complete the business configuration for the target APP based on the business configuration request if the target APP is in the running state.
[0014] The second processing module is used to load the target management component corresponding to the target APP if the working state of the target APP is stopped, and to complete the business configuration for the target APP through the target management component. The target management component is used to implement the business configuration read and write function for the target APP.
[0015] The return module is used to return the business configuration processing results to the third-party server.
[0016] Optionally, before responding to a third-party server's request for business configuration of the target application (APP), the application management module is also used for:
[0017] In response to an APP installation request from the target object, or in response to an APP push notification from a third-party server, obtain the installation package of the target APP. The installation package shall at least contain the target main program package, target management component and target configuration file corresponding to the target APP.
[0018] Install the target APP based on the installation package, rename the target management component according to the preset naming rules, and add the target management component to the preset component library.
[0019] Optionally, the second processing module is also used for:
[0020] In response to a third-party server's query request for the target app's business status, if the target app's working status is stopped, a business stop notification is returned to the third-party server.
[0021] Optionally, the application management module is also used for:
[0022] In response to an upgrade request from the target object or a third-party server for the target APP, obtain the upgrade package for the target APP;
[0023] Switch the target app from its initial state to a stopped state, complete the upgrade operation for the target app based on the upgrade package, and switch the target app's working state back to its initial state, which is either running or stopped.
[0024] Optionally, when performing an upgrade operation for the target app based on the upgrade package, the application management module is used for:
[0025] If the upgrade package does not contain any new management components, then delete the target management component;
[0026] If the upgrade package contains a new management component, the target management component will be replaced based on the new management component.
[0027] Optionally, the application management module is also used for:
[0028] In response to the target app's uninstallation request, delete the target app's main program package, but retain the target management component and the target configuration file;
[0029] In response to an app uninstallation request from a third-party server, delete the target app's main program package, target management components, and target configuration files.
[0030] Optionally, the second processing module is also used for:
[0031] In response to a business management request from a third-party server for the target APP, if the target APP is in a non-running state and there is no target management component corresponding to the target APP on the target open platform device, a business management failure notification is returned to the third-party server. The business management failure notification includes at least: business configuration failure notification, business status query failure notification, and business startup failure notification.
[0032] Thirdly, this application also provides a business configuration implementation apparatus, applied to a third-party server, the apparatus comprising:
[0033] The sending module is used to send business configuration requests for the target APP to the target open platform device;
[0034] The receiving module is used to receive the service configuration processing results returned by the target open platform device.
[0035] Optionally, the sending module is also used for:
[0036] Send application management requests for the target APP to the target open platform device, and send business management requests for the target APP to the target open platform. The application management requests include at least: APP installation request, APP upgrade request, and APP uninstallation request. The business management requests include at least: business configuration request, business status query request, and business activation request.
[0037] Optionally, the receiving module is also used for:
[0038] Receive the business management processing result returned by the target open platform device. When the business management processing result is a business management failure notification, the business management failure notification shall include at least: business configuration failure notification, business status query failure notification, and business startup failure notification.
[0039] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the first aspects.
[0040] Fifthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in the first aspect.
[0041] Sixthly, embodiments of this application provide a computer program product that, when invoked by a computer, causes the computer to execute the method described in the first aspect.
[0042] This application proposes a business configuration implementation method and related apparatus. In response to a business configuration request from a third-party server for a target application (APP), the open platform queries the working status of the target APP. If the target APP is running, the platform directly completes the business configuration based on the request. If the target APP is stopped, the platform loads the target management component corresponding to the APP and completes the business configuration through the target management component. Thus, when the APP is running, it receives and processes the business configuration itself; when the APP is stopped, the open platform takes over the receiving and processing of the business configuration by defining an APP management component. This allows the open platform device to receive business configurations from the third-party server even when the APP is not running, just like a traditional intelligent monitoring device, thereby improving configuration availability.
[0043] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0044] Figure 1 This is a schematic diagram illustrating possible application scenarios in the embodiments of this application;
[0045] Figure 2 This is a flowchart of a service configuration implementation method in an embodiment of this application;
[0046] Figure 3 This is a flowchart of an APP installation method according to an embodiment of this application;
[0047] Figure 4 This is a schematic diagram illustrating the relationship between an open platform device and a target APP in an embodiment of this application;
[0048] Figure 5 This is a schematic diagram illustrating the state changes between the open platform and the target APP in an embodiment of this application;
[0049] Figure 6 This is a flowchart of an APP upgrade method according to an embodiment of this application;
[0050] Figure 7 This is a flowchart of an APP uninstallation method according to an embodiment of this application;
[0051] Figure 8 This is a schematic diagram illustrating the connection between a monitoring system and a third-party server in an embodiment of this application;
[0052] Figure 9 This is a schematic diagram illustrating the logic of a third-party server initiating a service activation request to an open platform device in an embodiment of this application.
[0053] Figure 10 This is a schematic diagram of the structure of a service configuration implementation device in an embodiment of this application;
[0054] Figure 11 This is a schematic diagram of another service configuration implementation device in the embodiments of this application;
[0055] Figure 12 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0057] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0058] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0059] (1) Open platform equipment: refers to security monitoring equipment that exposes various underlying functions (such as audio and video, encoding and decoding, etc.) as basic services in the form of application programming interfaces (APIs). Smart applications call these APIs and are installed on the equipment in the form of APPs. The open platform equipment is responsible for managing and running the APPs. The APP runs as an independent process, and the open platform may prepare an isolated environment (sandbox / container) for these APPs.
[0060] (2) Component: A functional module that cannot run independently and needs to rely on an application (in this case, the APP's application) to perform its function. There are certain specifications, constraints and protocols between the component and the application it depends on. The application completes specific functions through the component.
[0061] The design concept of the embodiments of this application is briefly introduced below:
[0062] The open platform itself separates business programs from the device software system and turns them into APPs, thereby improving the versatility of business programs. APPs can be installed relatively freely on different open platform devices. In contrast, traditional intelligent monitoring devices are bare metal when no APP is installed, providing only basic functional services without any intelligent functions, thus introducing the problem of business configuration availability.
[0063] Specifically, since the intelligent services of the open platform device are all integrated into the APP, the intelligent services are in an inactive state when the APP stops running. When the outside world needs to configure the intelligent services, it can only be done by opening the APP through the web interface of the open platform device and entering the running state.
[0064] However, in medium and large-scale security monitoring systems, new open platform devices will connect to existing third-party servers and be used interchangeably with traditional monitoring devices. If the APP in the open platform device is closed, it will not be able to receive the business configuration of the existing third-party server. Furthermore, the third-party server that has not been modified and upgraded will not be able to manage the installation, uninstallation, start and stop functions of the APP, thereby reducing the versatility of the open platform device in the monitoring system.
[0065] In view of this, this application proposes a business configuration implementation method and related apparatus.
[0066] In this embodiment of the application, the backend server of the open platform device responds to the business configuration request of the third-party server for the target application APP by querying the working status of the target APP; if the working status of the target APP is running, the business configuration for the target APP is completed directly based on the business configuration request; if the working status of the target APP is stopped, the target management component corresponding to the target APP is loaded, and the business configuration for the target APP is completed through the target management component.
[0067] In this way, when the APP is running, the APP itself receives and processes the business configuration. When the APP stops running, the open platform takes over the receiving and processing of the business configuration by defining the APP management component. This allows the open platform device to receive business configuration from the third-party server like a traditional smart monitoring device when the APP is not running, thereby improving configuration availability.
[0068] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0069] See Figure 1 The diagram shown is a possible application scenario illustration in the embodiments of this application.
[0070] This application scenario includes terminal device 110 (including terminal device 1101, terminal device 1102... terminal device 110n) and server 120. Terminal device 110 and server 120 can communicate with each other through a communication network.
[0071] In one alternative implementation, the communication network can be a wired network or a wireless network. Therefore, the terminal device 110 and the server 120 can be connected directly or indirectly via wired or wireless communication. For example, the terminal device 110 can be indirectly connected to the server 120 via a wireless access point, or the terminal device 110 can be directly connected to the server 120 via the Internet; this application does not impose any limitations on this.
[0072] In this application embodiment, the terminal device 110 includes, but is not limited to, mobile phones, tablets, laptops, desktop computers, e-book readers, smart voice interaction devices, smart home appliances, vehicle terminals, and other devices; various clients can be installed on the terminal device, which can be applications that support video preview, video playback, and other functions (such as browsers, game software, etc.), or web pages, mini programs, etc.
[0073] Server 120 is a backend server corresponding to the client installed in terminal device 110. Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0074] It should be noted that the service configuration implementation method in this application embodiment can be executed by an electronic device, which can be a server 120 or a terminal device 110. That is, the method can be executed by the server 120 or the terminal device 110 alone, or by the server 120 and the terminal device 110 together.
[0075] It should be noted that the following text mainly uses the example of the server running alone, and no specific limitations are made here.
[0076] It should be noted that, Figure 1 The examples shown are merely illustrative; in reality, the number of terminal devices 110 and servers 120 is unlimited and is not specifically limited in this embodiment.
[0077] In this embodiment of the application, when there are multiple servers 120, the multiple servers 120 can form a blockchain, and the servers 120 are nodes on the blockchain.
[0078] See Figure 2 As shown, it is a flowchart of a business configuration implementation method in an embodiment of this application. The following is a description of the method in conjunction with the attached diagram. Figure 2The specific execution steps are explained in detail below:
[0079] Step S201: In response to the business configuration request from the third-party server for the target application (APP), query the working status of the target APP.
[0080] Specifically, in this embodiment of the application, the backend server of the open platform device (hereinafter referred to as the open platform) needs to complete the installation of the target APP before receiving the business configuration request for the target APP from the third-party server.
[0081] See Figure 3 As shown, it is a flowchart of an APP installation method according to an embodiment of this application, which specifically includes:
[0082] Step S301: In response to the target APP installation request, or in response to the APP push information from a third-party server, obtain the installation package of the target APP.
[0083] The installation package must contain at least the target main program package corresponding to the target APP, the target management component, and the target configuration file.
[0084] Specifically, in this embodiment of the application, the target object, namely the user, can directly perform the APP installation operation based on the WEB interactive interface of the open platform device. When the open platform device is connected to a modified third-party server, the third-party server can push the APP installation package to the open platform device so that the open platform device can install the target APP.
[0085] Step S302: Install the target APP based on the installation package, rename the target management component according to the preset naming rules, and add the target management component to the preset component library.
[0086] Furthermore, if the target app is being installed for the first time on the open platform device, the open platform will execute the installation action based on the obtained installation package after receiving the app installation request from the target object or receiving the app push information from the third-party server.
[0087] It should be noted that before installing the target app, the open platform will verify the app's legitimacy. Once the legitimacy verification is passed, the server will deploy the target app on the open platform device.
[0088] Subsequently, the server verifies whether the target configuration components contained in the installation package are valid. If valid, the target management component is renamed and persistently stored in the open platform device.
[0089] Understandably, if the validity verification of the APP installation package or target management component fails, the server will delete the target APP installation package and cancel the installation operation.
[0090] Once the target app is successfully installed, it will remain in a stopped state until it receives a startup request from the target object or a third-party server before it enters a running state.
[0091] For example, see Figure 4 As shown, it is a schematic diagram of the relationship between an open platform device and a target APP in an embodiment of this application. The installation package of the target APP includes at least the main program of the target APP, the target management component and the target configuration file. In addition to providing intelligent services such as coding services, the open platform also provides APP management services. After the target APP is installed on the open platform device, the open platform saves the target configuration file separately according to the preset storage path.
[0092] Furthermore, the open platform's control over the APP includes: the interaction protocols with third-party servers (such as querying, modifying, deleting, enabling, disabling, etc.); and configurations related to the APP's business (such as rule parameters, etc.), and persistent configuration.
[0093] It should be noted that the above-mentioned scope of takeover is a business constraint. The specific agreements to be taken over are jointly determined by the third-party server and the open platform equipment.
[0094] The open platform implements takeover logic through management components. These components are in the form of dynamic libraries. The open platform device specifies the APIs that the management components should implement and the persistent storage path for unified management. It also specifies the naming method of the management components so that the open platform device can recognize them. This allows the platform to take over and process business configurations when the APP stops running.
[0095] It should be noted that the aforementioned takeover logic falls under technical constraints, typically encompassing both availability and security. Availability refers to ensuring that the developed management components can be used by the backend server of the open platform, usually guaranteed by technical specifications, such as the technology stack (e.g., programming language) and interface specifications used. Security refers to restricting the functionality of the management components to prevent them from performing malicious operations, usually guaranteed by technical means, such as system API interception. This application does not impose any restrictions on this aspect.
[0096] In addition, the open platform can load management components, call agreed APIs to enter or exit the takeover state, and can uninstall components after exiting the takeover state.
[0097] In another alternative embodiment, if the target app's installation package does not contain a target management component, the open platform does not provide takeover services for the target app.
[0098] Step S202: If the target APP is in the running state, then the business configuration for the target APP is completed directly based on the business configuration request.
[0099] Specifically, in this embodiment of the application, if the target APP in the open platform device is running, the target APP can directly receive the business configuration request triggered by the third-party server and complete the business configuration, just like a traditional intelligent monitoring device.
[0100] Step S203: If the target APP is in a stopped state, load the target management component corresponding to the target APP and complete the business configuration for the target APP through the target management component.
[0101] The target management component is used to implement read and write functions for the business configuration of the target APP.
[0102] Specifically, in this embodiment of the application, if the target APP in the open platform device is in a stopped state, the open platform device takes over the business configuration operation of the target APP, and after receiving the business configuration request from the third-party server, loads the target management component, reads and writes the configuration file of the target APP based on the business configuration request, and completes the business configuration for the target APP.
[0103] Step S204: Return the business configuration processing result to the third-party server.
[0104] Based on the above, it can be seen that in this embodiment of the application, there are four states between the target APP and the open platform: open platform takeover state, open platform cancel takeover state, target APP running state, and target APP stopped state.
[0105] See Figure 5 As shown, this is a schematic diagram of the state changes between the open platform and the target APP in an embodiment of this application, specifically including:
[0106] 1) After the target APP is installed, it is in a stopped state, and the open platform enters the takeover state.
[0107] 2) When the target APP is launched by an external source (local device of the open platform or third-party server), the open platform cancels the takeover and launches the target APP to enter the running state.
[0108] 3) When the APP is stopped by external factors (local device on the open platform or third-party server), the open platform stops the APP from running and re-enters the takeover state.
[0109] Among them, the open platform takeover status and the target APP running status, as well as the open platform cancel takeover status and the target APP stop status, are mutually exclusive states.
[0110] Furthermore, in this embodiment, in addition to taking over the business configuration when the target APP is in a stopped state, the open platform also includes responding to external management operations on the target APP, specifically including business status query, APP start / stop, APP upgrade, APP uninstallation, etc., and processing and responding to the management operations based on the working status of the target APP.
[0111] In this process, the open platform responds to a third-party server's query request for the business status of the target app. If the target app's working status is stopped, it returns a business stop notification to the third-party server.
[0112] Regarding external upgrades to the target app, please refer to... Figure 6 As shown, it is a flowchart of an APP upgrade method in an embodiment of this application, which specifically includes:
[0113] Step S601: In response to an upgrade request from the target object or a third-party server for the target APP, obtain the upgrade package for the target APP.
[0114] Specifically, in this embodiment of the application, users can directly execute upgrade requests for the target APP through the WEB interface of the open platform device, and when a third-party server sends a push message for the target APP to the open platform, if the target APP already exists in the open platform device, the upgrade action will be executed.
[0115] Similarly, before upgrading the target app, the open platform will verify the legitimacy of the upgrade package.
[0116] Step S602: Switch the target APP from the initial state to the stopped state, complete the upgrade operation for the target APP based on the upgrade package, and switch the working state of the target APP back to the initial state.
[0117] The initial state can be either running or stopped.
[0118] Specifically, in this embodiment of the application, when performing the APP upgrade operation, it is necessary to first switch the target APP to a stopped state, and then modify the relevant files of the target APP based on the upgrade package.
[0119] If the upgrade package does not contain a new management component, the target management component is deleted; if the upgrade package contains a new management component, the target management component is replaced with the new one. This ensures that the target management component is compatible with the target app, avoiding conflicts in the interaction protocol implementation that could lead to business configuration failures. Furthermore, when the target app upgrades without a management component, the open platform will no longer provide takeover services.
[0120] Furthermore, after completing the upgrade operation for the target APP, the open platform will switch the target APP's working status back to the initial state before the upgrade. The initial state can be either running or stopped.
[0121] For example, if the target app was running before the upgrade, the open platform will restore the target app to running status after the upgrade. If the target app was stopped before the upgrade and the open platform was in a takeover state, the open platform will keep the target app in a stopped state and remain in a takeover state after the upgrade.
[0122] Regarding external uninstallation attempts on the target app, please refer to... Figure 7 As shown, it is a flowchart of an APP uninstallation method in an embodiment of this application, which specifically includes:
[0123] Step S701: In response to the APP uninstallation request of the target object, delete the main program package of the target APP, and retain the target management component and the target configuration file.
[0124] Specifically, in this embodiment of the application, a distinction is made between APP local uninstallation (operation via the web interface of the open platform device) and uninstallation via command-line control from a third-party server.
[0125] For local uninstallation, a partial uninstallation is performed (the target management components and target configuration files are retained), and the open platform continues to take over and process business configurations.
[0126] Step S702: In response to the APP uninstallation request from the third-party server, delete the target APP's main program package, target management component, and target configuration file.
[0127] For uninstallation commands issued by third-party servers, a complete uninstallation is performed, which means deleting the target main program package, target management components, and target configuration files. After this, the open platform will no longer take over the business configuration.
[0128] Optionally, the open platform device web interface can reserve a complete uninstallation option in the APP management interface. After execution, it is the same as the third-party server uninstallation, but it needs to be distinguished from local uninstallation and necessary information prompts should be provided.
[0129] In response to other management operations performed on the target APP by external parties, the open platform responds to the business management requests of the target APP from the third-party server. If the target APP is in a non-running state and there is no target management component corresponding to the target APP in the target open platform device, a business management failure notification is returned to the third-party server. The business management failure notification includes at least: business configuration failure notification, business status query failure notification, and business start failure notification. Other types of management failure notifications may also be included as needed, and this application does not impose any restrictions on this.
[0130] On the other hand, the implementation methods for business configuration applied to third-party servers have been reflected in the above process and will not be repeated here.
[0131] The above embodiments will be further explained in detail below through two specific application scenarios.
[0132] For details, please refer to Figure 8 As shown, it is a schematic diagram of the connection between a monitoring system and a third-party server in an embodiment of this application. The monitoring system includes both open platform devices and traditional intelligent monitoring devices. The following two application scenarios are based on this.
[0133] Example 1:
[0134] 1. The open platform device has been connected to a third-party server, and the third-party server does not support the open platform device APP management functions (such as push notifications, uninstallation, starting, stopping the APP, etc.).
[0135] 2. Install and open a smart application (including management components) through the device's own web interface on the open platform.
[0136] 3. Third-party servers can perform business configurations on both traditional intelligent monitoring equipment and open platform equipment without discrimination.
[0137] 4. (In cases of maintenance, inspection, misoperation, etc.) The user stops or uninstalls the APP by logging into the open platform device's own WEB (this is a local operation); or a third-party server (such as a scheduled program) stops the smart services of the open platform device (the open platform device stops the APP), and the open platform enters the business configuration takeover state.
[0138] 5. When a third-party server initiates a service status query request to an open platform device, the open platform device that is in the service configuration takeover state will return a service stop notification.
[0139] 6. The third-party server initiates a service resumption request to the open platform device whose service has been suspended.
[0140] 1) If the APP is not uninstalled, the open platform will take over and modify the configuration, return a notification that the APP has been successfully launched to the third-party server, and cancel the takeover.
[0141] 2) If the APP has been uninstalled, the open platform will take over and return a business activation failure notification.
[0142] 7. The server initiates a batch modification request for service configurations on the devices:
[0143] 1) For open platform devices where the APP is running, the APP processes requests and responds normally;
[0144] 2) For open platform devices where the APP is stopped or uninstalled, the open platform takes over the handling of requests and responds.
[0145] Example 2:
[0146] 1. Third-party servers support open platform device APP management functions, including push notifications, uninstallation, APP startup, and APP shutdown.
[0147] 2. Third-party server access to open platform devices (the devices may or may not have a smart application APP installed).
[0148] 3. The third-party server queries the device APP installation information of the open platform, finds the devices of the APP to be pushed to, and initiates the push.
[0149] 4. After receiving the push notification, if the device on the open platform does not have the app installed, the installation process will be executed (the open platform will verify the app). After completion, the open platform will enter the configuration takeover state. If the same app is already installed, the upgrade process will be executed (the open platform will verify the app). After completion, both the open platform and the app will return to their original state.
[0150] 5. The third-party server sends an APP launch request to the open platform device, and the open platform launches the APP and cancels configuration takeover.
[0151] 6. (In cases of maintenance, inspection, misoperation, etc.) When a user stops or uninstalls the APP by logging into the device's own web interface on the open platform (which is a local operation); or when a third-party server (such as a scheduled program) stops the device's smart services (which means the APP on the open platform device will stop), the open platform will enter the configuration takeover state.
[0152] 7. When a third-party server initiates a business status query request, the open platform device in the configuration takeover state will return a smart business stop notification.
[0153] 8. The third-party server initiates a service resumption request to the open platform device whose service has been suspended:
[0154] 1) If the APP is not uninstalled, the open platform will take over and modify the configuration, return a notification that the APP has been successfully launched to the third-party server, and cancel the takeover.
[0155] 2) If the app has been uninstalled, the open platform will take over and return a notification of business startup failure;
[0156] 9. For development platform devices that have enabled failure notifications for the return service, the third-party server queries the open platform device's APP installation information: if it has been uninstalled, push the APP (as described in 3-5 above) to restore it; if it has not been uninstalled, then the open platform device is confirmed to be a single point of failure.
[0157] 10. A third-party server initiates a batch modification request for service configurations on open platform devices:
[0158] 1) For open platform devices where the APP is running, the APP processes requests and responds normally;
[0159] 2) For open platform devices where the APP is stopped or uninstalled, the open platform takes over the handling of requests and responds;
[0160] 11. The third-party server sends an uninstallation request to the open platform device. After receiving the request, the open platform device deletes all installation files of the app.
[0161] For example, see Figure 9 As shown, this is a logical diagram of a third-party server initiating a service activation request to an open platform device in an embodiment of this application. In the two application scenarios mentioned above, when the third-party server initiates a service activation request to an open platform device where services have stopped, if the APP has not been uninstalled, the open platform will start the APP through takeover logic and return a service activation success notification to the third-party server. The third-party server will then make subsequent service configuration requests.
[0162] In summary, this application embodiment defines an APP management component to realize business configuration interaction between the third-party server and the open platform device. This enables the third-party server to perform business configuration functions on the open platform device without upgrades or modifications, regardless of whether the APP is running. This improves the versatility of the open platform and reduces usage costs. For third-party servers with APP management capabilities for open platform devices, the solution provided in this application embodiment can also detect and restore the APP after it is abnormally uninstalled on the open platform device.
[0163] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0164] Based on the same technical concept, see [reference] Figure 10 As shown in the illustration, this application also provides a service configuration implementation apparatus, applied to a target open platform device, the apparatus comprising:
[0165] Application management module 1001 is used to respond to business configuration requests from third-party servers for the target application (APP) and query the working status of the target APP.
[0166] The first processing module 1002 is used to directly complete the business configuration for the target APP based on the business configuration request if the target APP is in the running state.
[0167] The second processing module 1003 is used to load the target management component corresponding to the target APP if the working state of the target APP is stopped, and to complete the business configuration for the target APP through the target management component. The target management component is used to implement the business configuration read and write function for the target APP.
[0168] Return module 1004 is used to return the business configuration processing result to the third-party server.
[0169] Optionally, before responding to a third-party server's request for business configuration of the target application (APP), the application management module 1001 is also used for:
[0170] In response to an APP installation request from the target object, or in response to an APP push notification from a third-party server, obtain the installation package of the target APP. The installation package shall at least contain the target main program package, target management component and target configuration file corresponding to the target APP.
[0171] Install the target APP based on the installation package, rename the target management component according to the preset naming rules, and add the target management component to the preset component library.
[0172] Optionally, the second processing module 1003 is also used for:
[0173] In response to a third-party server's query request for the target app's business status, if the target app's working status is stopped, a business stop notification is returned to the third-party server.
[0174] Optionally, the application management module 1001 is also used for:
[0175] In response to an upgrade request from the target object or a third-party server for the target APP, obtain the upgrade package for the target APP;
[0176] Switch the target app from its initial state to a stopped state, complete the upgrade operation for the target app based on the upgrade package, and switch the target app's working state back to its initial state, which is either running or stopped.
[0177] Optionally, when performing an upgrade operation for the target APP based on the upgrade package, the application management module 1001 is used for:
[0178] If the upgrade package does not contain any new management components, then delete the target management component;
[0179] If the upgrade package contains a new management component, the target management component will be replaced based on the new management component.
[0180] Optionally, the application management module 1001 is also used for:
[0181] In response to the target app's uninstallation request, delete the target app's main program package, but retain the target management component and the target configuration file;
[0182] In response to an app uninstallation request from a third-party server, delete the target app's main program package, target management components, and target configuration files.
[0183] Optionally, the second processing module 1003 is also used for:
[0184] In response to a business management request from a third-party server for the target APP, if the target APP is in a non-running state and there is no target management component corresponding to the target APP on the target open platform device, a business management failure notification is returned to the third-party server. The business management failure notification includes at least: business configuration failure notification, business status query failure notification, and business startup failure notification.
[0185] Based on the same technical concept, see [reference] Figure 11 As shown in the illustration, this application also provides a service configuration implementation apparatus, applied to a target open platform device, the apparatus comprising:
[0186] Sending module 1101 is used to send a service configuration request for the target APP to the target open platform device;
[0187] The receiving module 1102 is used to receive the service configuration processing results returned by the target open platform device.
[0188] Optionally, the sending module 1101 is also used for:
[0189] Send application management requests for the target APP to the target open platform device, and send business management requests for the target APP to the target open platform. The application management requests include at least: APP installation request, APP upgrade request, and APP uninstallation request. The business management requests include at least: business configuration request, business status query request, and business activation request.
[0190] Optionally, the receiving module 1102 is also used for:
[0191] Receive the business management processing result returned by the target open platform device. When the business management processing result is a business management failure notification, the business management failure notification shall include at least: business configuration failure notification, business status query failure notification, and business startup failure notification.
[0192] Based on the same technical concept, this application also provides an electronic device that can implement the service configuration implementation method flow provided in the above embodiments of this application.
[0193] In one embodiment, the electronic device may be a server, a terminal device, or other electronic devices.
[0194] See Figure 12 As shown, the electronic device may include:
[0195] At least one processor 1201 and a memory 1202 connected to at least one processor 1201. In this embodiment, the specific connection medium between the processor 1201 and the memory 1202 is not limited. Figure 12 The example shown is the connection between processor 1201 and memory 1202 via bus 1200. Bus 1200 is... Figure 12 The connections between other components are shown in thick lines only and are not intended to be limiting. The Bus 1200 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 12 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 1201 can also be called a controller; there is no restriction on the name.
[0196] In this embodiment, the memory 1202 stores instructions executable by at least one processor 1201. By executing the instructions stored in the memory 1202, the at least one processor 1201 can execute a service configuration implementation method described above. The processor 1201 can implement... Figure 10 The functions of each module in the device shown.
[0197] The processor 1201 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 1202 and calling data stored in memory 1202, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0198] In one possible design, processor 1201 may include one or more processing units. Processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 1201. In some embodiments, processor 1201 and memory 1202 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0199] Processor 1201 can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of a service configuration implementation method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0200] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 1202 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1202 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0201] By designing and programming the processor 1201, the code corresponding to a business configuration implementation method described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during runtime. Figure 2 The illustrated embodiment describes the steps of a service configuration implementation method. How to design and program the processor 1201 is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0202] Based on the same inventive concept, embodiments of this application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a business configuration implementation method described above.
[0203] In some possible implementations, various aspects of the service configuration implementation method provided by this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a device, the program code is used to cause the control device to perform the steps in a service configuration implementation method according to various exemplary embodiments of this application described above.
[0204] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0205] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0206] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0207] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0208] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0209] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0210] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A service configuration implementation method, applied to a target open platform device, characterized in that, include: In response to a third-party server's request for business configuration of the target application (APP), query the working status of the target APP; If the target APP is in a running state, then the business configuration for the target APP is completed directly based on the business configuration request; If the target APP is in a stopped state, then the target management component corresponding to the target APP is loaded, and the business configuration for the target APP is completed through the target management component. The target management component is used to implement the business configuration read and write function for the target APP. The business configuration processing result is returned to the third-party server.
2. The method as described in claim 1, characterized in that, Before responding to the third-party server's business configuration request for the target application (APP), the following are also included: In response to an APP installation request from a target user, or in response to an APP push notification from the third-party server, the installation package of the target APP is obtained. The installation package contains at least the target main program package, the target management component, and the target configuration file corresponding to the target APP. Install the target APP based on the installation package, rename the target management component according to the preset naming rules, and add the target management component to the preset component library.
3. The method as described in claim 1, characterized in that, Also includes: In response to the third-party server's query request for the business status of the target APP, if the working status of the target APP is stopped, a business stop notification is returned to the third-party server.
4. The method as described in claim 1, characterized in that, Also includes: In response to an upgrade request from the target user or the third-party server for the target APP, obtain the upgrade package for the target APP; When the target app is initially in a running state, the target app is switched from a running state to a stopped state, the upgrade operation for the target app is completed based on the upgrade package, and the target app is switched from the stopped state to the running state. Alternatively, when the target app is initially in a stopped state, the target app is kept in the stopped state, the upgrade operation for the target app is completed based on the upgrade package, and the target app is kept in the stopped state.
5. The method as described in claim 4, characterized in that, The upgrade operation for the target APP based on the upgrade package includes: If the upgrade package does not contain any new management components, then the target management component is deleted. If the upgrade package contains a new management component, then the target management component is replaced based on the new management component.
6. The method according to any one of claims 1-5, characterized in that, Also includes: In response to the target user's APP uninstallation request, delete the target APP's main program package, while retaining the target management component and target configuration file; In response to the APP uninstallation request from the third-party server, delete the target APP's main program package, target management component, and target configuration file.
7. The method according to any one of claims 1-5, characterized in that, Also includes: In response to the business management request from the third-party server for the target APP, if the working status of the target APP is stopped and the target management component corresponding to the target APP does not exist in the target open platform device, a business management failure notification is returned to the third-party server. The business management request includes at least: a business configuration request, a business status query request, and a business activation request; the business management failure notification includes at least: a business configuration failure notification, a business status query failure notification, and a business activation failure notification.
8. A business configuration implementation method, applied to a third-party server, characterized in that, include: Send a service configuration request for the target APP to the target open platform device so that the target open platform device can query the working status of the target APP; If the target APP is in a running state, then the target open platform device can directly complete the service configuration for the target APP based on the service configuration request; If the target APP is in a stopped state, the target open platform loads the target management component corresponding to the target APP, and completes the business configuration for the target APP through the target management component. The target management component is used to implement the business configuration read and write function for the target APP. Receive the service configuration processing result returned by the target open platform device.
9. The method as described in claim 8, characterized in that, Also includes: Send an application management request for the target APP to the target open platform device, and send a service management request for the target APP to the target open platform. The application management request includes at least: APP installation request, APP upgrade request, and APP uninstallation request. The service management request includes at least: service configuration request, service status query request, and service activation request.
10. The method as described in claim 8 or 9, characterized in that, Also includes: The system receives the service management processing result returned by the target open platform device. When the service management processing result is a service management failure notification, the service management failure notification includes at least: a service configuration failure notification, a service status query failure notification, and a service activation failure notification.
11. A service configuration implementation apparatus, applied to a target open platform device, characterized in that, include: The application management module is used to respond to business configuration requests from third-party servers for the target application (APP) and query the working status of the target APP. The first processing module is used to directly complete the business configuration for the target APP based on the business configuration request if the target APP is in the running state. The second processing module is used to load the target management component corresponding to the target APP if the working state of the target APP is stopped, and to complete the business configuration for the target APP through the target management component. The target management component is used to implement the business configuration read and write function for the target APP. The return module is used to return the business configuration processing result to the third-party server.
12. A business configuration implementation apparatus, applied to a third-party server, characterized in that, include: The sending module is used to send a service configuration request for the target APP to the target open platform device, so that the target open platform device can query the working status of the target APP; The processing module is configured to, if the target APP is in a running state, enable the target open platform device to directly complete the service configuration for the target APP based on the service configuration request; If the target APP is in a stopped state, the target open platform loads the target management component corresponding to the target APP, and completes the business configuration for the target APP through the target management component. The target management component is used to implement the business configuration read and write function for the target APP. The receiving module is used to receive the service configuration processing results returned by the target open platform device.
13. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-10.
15. A computer program product, characterized in that, When the computer program product is invoked by a computer, it causes the computer to perform the method as described in any one of claims 1-10.
Citation Information
Patent Citations
Service management method, device and system
CN104468518A