Program deployment method and device, equipment and storage medium
By receiving the device's request to be activated, establish a communication connection between the device and the server, and determine and deploy the device's activateable program, solving the problem that program deployment in the prior art depends on physical burner and requires manual on-site access, achieving flexibility, Efficient program deployment.
Patent Information
- Application Number
- CN202411550027.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, program deployment methods rely on physical burners and have poor scalability, which limits software updates and deployments to be performed only in an environment with burners. In the face of widely distributed program deployment requirements, manual on-site is still required. Access, increasing operational complexity and cost.
Provide a program deployment method, by receiving the request to be activated from the device, establishing a communication connection between the device and the server, and determining the activation program of the device based on the identification information of the device and the identification information of the program to be activated, and without manual access Deploy and activate in the field.
It improves the flexibility and scalability of program deployment, reduces manual intervention, reduces related human and material resources costs, and improves the efficiency of program deployment.
Smart Images

Figure CN119473329A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to program deployment methods, devices, equipment, and storage media. Background Art
[0002] With the rapid development of embedded systems and IoT devices, the importance of program deployment and management has become increasingly prominent. Effective deployment methods can not only ensure the smooth operation of embedded software, but also accelerate industry output and meet the market's demand for rapid iteration.
[0003] In the process of realizing the present invention, the inventor found that the prior art at least has the following problems: the deployment method of the current program often relies on a physical burner to carry out the overall burning of the embedded software, but the scalability of this deployment mode is poor, and the update and deployment of the restriction software can only be carried out under the environment of the burner. In addition, in the face of the widely distributed program deployment requirements, the software deployment and update maintenance still need manual on-site visits, which also increases the complexity and cost of the deployment operation. Therefore, in the face of the rapidly developing technology and market demand, there is an urgent need for a more flexible and efficient deployment scheme. Summary of the invention
[0004] Based on the above problems, the embodiments of the present application provide a program deployment method, apparatus, device and storage medium, the purpose of which is to improve the flexibility and scalability of program deployment and reduce manual intervention.
[0005] In a first aspect, an embodiment of the present application provides a program deployment method, which is applied to a server, including:
[0006] Receive an activation request from at least one device; wherein each device corresponds to each activation request one by one; and the activation request includes identification information of a program to be activated and device identification information;
[0007] Establishing a communication connection with a device corresponding to the device identification information in each of the requests to be activated;
[0008] Determining an activatable program for each of the devices according to the identification information of the program to be activated and the device identification information in each of the requests to be activated;
[0009] The activatable program is deployed to each of the devices and activated.
[0010] In one embodiment, determining the activatable program for each device according to the identification information of the program to be activated and the device identification information in each of the requests to be activated includes:
[0011] For each of the device identification information in the request to be activated, query the payment information corresponding to the device identification information, and determine whether the device corresponding to the device identification information has the right to obtain the activatable program based on the payment information obtained from the query;
[0012] If so, the identification information of the program to be activated in the activation request is used to determine the activatable program of the device.
[0013] In one embodiment, the method further comprises:
[0014] If the payment information corresponding to the device identification information is not found, re-querying the payment information corresponding to the device identification information within a first preset time period to obtain a returned query result;
[0015] If the query result indicates that the payment information corresponding to the device identification information has not been queried, a prompt message indicating that the payment has failed is sent to the device.
[0016] In one embodiment, the request to be activated further includes a state identifier and a thread identifier, wherein the state identifier is used to indicate whether the request to be activated is being processed; and the thread identifier is used to identify the thread that is processing the request to be activated.
[0017] In one embodiment, the deploying and activating the activatable program of each device includes:
[0018] For each of the devices, an authorization certificate is generated according to the device identification information and the activatable program deployed on the device and stored in the device; the activatable program can be activated and executed when the authorization certificate is stored in the device.
[0019] In one embodiment, the authorization certificate also includes an authorization time limit, and the method further includes:
[0020] Counting according to the authorization time limit in the authorization certificate;
[0021] Within a second preset time period before the authorization time limit expires, a prompt message indicating that the authorization certificate is about to expire is sent to the device.
[0022] In one embodiment, the method further comprises:
[0023] When the authorization time limit in the authorization certificate expires, a deactivation processing instruction and a program uninstallation instruction are sent to the device, so that the device marks the status tag of the activatable program corresponding to the authorization certificate as inactivated, removes the activatable program from the running list of the operating system of the device, and uninstalls the activatable program.
[0024] In a second aspect, an embodiment of the present application further provides a program deployment device, including:
[0025] A receiving unit, configured to receive a request to be activated from at least one device; wherein each device corresponds to each request to be activated one by one; and the request to be activated includes identification information of a program to be activated and identification information of a device;
[0026] a communication connection unit, configured to establish a communication connection with a device corresponding to the device identification information in each of the requests to be activated;
[0027] a determining unit, configured to determine an activatable program for each of the devices according to the identification information of the program to be activated and the device identification information in each of the requests to be activated;
[0028] The processing unit is used to deploy and activate the activatable program on each of the devices.
[0029] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0030] CPU, memory, input and output interfaces;
[0031] The memory is a short-term storage memory or a persistent storage memory;
[0032] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform any one of the program deployment methods described above.
[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is run on an electronic device, any one of the program deployment methods described above is executed.
[0034] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0035] The embodiment of the present application allows receiving a request to be activated from at least one device, and each device corresponds to each request to be activated one by one; the request to be activated includes identification information of the program to be activated and device identification information, and can flexibly handle deployment requirements from different locations and sources; after receiving multiple requests to be activated, a communication connection with the device corresponding to the device identification information can be established through the device identification information in each request to be activated, thereby reducing waiting time, ensuring the security of data transmission, and preventing unauthorized access; based on the identification information of the program to be activated and the device identification information in each request to be activated, the activatable program of each device is determined, and then the activatable program of each device can be deployed and activated. The embodiment of the present application combines the distributed remote management technology of the server and the device through the above method, thereby reducing the demand for on-site maintenance, reducing the related human and material resource costs, and improving the efficiency of program deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A schematic diagram of a program deployment system architecture provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a program deployment method flow provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of the structure of a program deployment device provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] With the rapid development of embedded systems and IoT devices, the importance of program deployment and management has become increasingly prominent. Effective deployment methods can not only ensure the smooth operation of embedded software, but also accelerate industry output and meet the market's demand for rapid iteration.
[0043] In the process of realizing the present invention, the inventor found that the prior art has at least the following problems: the current program deployment method often relies on a physical burner to burn the entire embedded software, but the scalability of this deployment method is poor, which limits the update and deployment of the software to only be carried out in an environment with a burner. In addition, in the face of widely distributed program deployment requirements, software deployment and update maintenance still require manual on-site visits, which also increases the complexity and cost of deployment operations. In the face of rapidly developing technology and market demand, there is an urgent need for a more flexible and efficient deployment solution.
[0044] Therefore, the present application provides a program deployment algorithm, which can receive the program deployment requirements of each user without manual on-site visits and record and manage the ordered program deployment requirements. According to the recorded program deployment requirements, each device connected to the server is authenticated. If the identity authentication is passed, it is automatically triggered to grab the program to be activated recorded in the deployment requirements of each device from the service program library, deploy it in the device and activate it. In other words, the embodiment of the present application actually provides a distributed remote management program deployment platform, which provides a unified platform for the purchase, use, activation and other operations of the program.
[0045] The embodiments of the present application can be applied to Figure 1 In the system architecture shown. The system framework includes a server (also called a "server") and a control subsystem. The server may also include a rights management subsystem and a deployment subsystem for deploying programs to devices. The rights management subsystem may include customer information management, authentication interface, service program library, etc. The control subsystem is generally deployed inside the device or integrated in the client of the device. In an embodiment of the present application, the device may refer to any terminal system or smart device that requires the deployment and activation of embedded software. Depending on the application scenario, these devices may include but are not limited to: embedded system devices (such as embedded controllers, sensor modules, industrial automation equipment); Internet of Things (IoT) devices (such as smart home devices, smart city infrastructure); mobile terminals (such as smart watches, wearable devices, handheld terminals); network devices (such as routers, switches, firewalls).
[0046] The control subsystem may include a service loading unit and a service execution unit for performing authentication communication with the server according to device identification information (UID, User Identification).
[0047] Specifically, the user corresponding to the account browses the required software program through the service program product browsing interface, selects the required program to purchase and place an order, enters the device identification information of the program to be deployed, and then pays. The customer information management library in the authority management subsystem is responsible for managing the billing information after the user pays the order. After the authority management subsystem receives and stores the new payment information, the identity authentication interface will check the UID information of each access device, and after comparing the UID information of the access device with the device identification information in the payment information in the customer information management library, the activatable program that the device can load or obtain is obtained in the service program library. Among them, the service program library is used to realize the unified management and configuration of various service programs. Generally, after the R&D personnel complete the development or maintenance of the service program, the service program is pushed to the service program library of the authority management subsystem. After the service program library captures the required program in the payment information, the deployment subsystem performs the program deployment logic processing.
[0048] The deployment subsystem is used to grab the target program package from the service program library after querying a new order. After obtaining the consent of the device user, the program is deployed to the device corresponding to the device identification information filled in when placing the order through remote deployment. It should be noted that the program cannot be used directly after the initial deployment, and remote activation authorization is required. Therefore, the authorization activation service will be automatically triggered after the deployment is completed.
[0049] The control subsystem is a service loading and execution system running on the device. The local UID information of the device is used as the device identification information in this system, and the downloading, loading, activation and operation of the program are controlled through the authorization certificate.
[0050] The program deployment framework provided by this application can realize automatic access and implementation of program deployment, including the deployment, renewal, upgrade, cancellation, expiration and other processes of the program. In addition, during the implementation process, decoupled communication can be carried out between the subsystems to ensure the reliability of communication, thereby presenting an efficient, fast and stable program deployment platform.
[0051] The various embodiments of the present application are described in further detail below in conjunction with the accompanying drawings.
[0052] The present application embodiment provides a program deployment method, such as Figure 2 As shown, the method includes steps S201-S204.
[0053] S201: receiving an activation request sent by at least one device; wherein each device corresponds to each activation request one by one; and the activation request includes identification information of a program to be activated and identification information of a device;
[0054] In the embodiment of the present application, after a user selects a desired program through the service program product browsing interface, determines the device identification information to be deployed and places an order, the device or the client on the device automatically generates an activation request and waits for a response from the server. After the server receives the activation request from at least one device, it can send instructions to the corresponding subsystem through the activation program identification information and device identification information carried in the activation request to provide the corresponding service to the user.
[0055] S202: Establishing a communication connection with a device corresponding to the device identification information in each request to be activated;
[0056] In the description of the system architecture above, it is mentioned that after the user selects the service program to be deployed on the device and places an order, the device will initiate an activation request and wait for the server to respond; and after receiving the new payment information and storing it in the customer information management library, the server's permission management subsystem will try to establish a communication connection with the device corresponding to the device identification information in the request. This communication connection is an important support for the deployment of subsequent programs, real-time control of program operation and usage permissions, and activation.
[0057] S203: Determine an activatable program for each device according to the identification information of the program to be activated and the device identification information in each activation request;
[0058] In order to verify whether the device initiating the request has the right to access or obtain a specific service program, the authentication interface in the permission management subsystem can check the device identification information of each device that initiates the activation request. By comparing the device identification information of the device initiating the activation request with the device identification information in the payment information in the customer information management library, and confirming that the device does have the corresponding payment information, the activatable program of the device can be further obtained based on the identification information of the program to be activated in the activation request. The above process can ensure that only legally authorized devices obtain and use specific service programs, improve the security and controllability of service programs, and prevent the leakage of service programs to the greatest extent.
[0059] S204: Deploy and activate the activatable program on each device.
[0060] In the previous step, the program deployment system has determined the set of programs that can be activated for each device. By establishing a communication connection between the server and the device, the activatable programs captured from the service program library can be transferred to the device. After deployment to the device, the program deployment system will also perform activation operations, such as activation by entering an activation code, license key, or other authorization information.
[0061] The embodiment of the present application allows receiving a request to be activated from at least one device, and each device corresponds to each request to be activated one by one; the request to be activated includes the identification information of the program to be activated and the device identification information, and can flexibly handle deployment requirements from different locations and sources. After receiving multiple requests to be activated, a communication connection with the device corresponding to the device identification information can be established through the device identification information in each request to be activated, thereby reducing waiting time, ensuring the security of data transmission, and preventing unauthorized access. According to the identification information of the program to be activated and the device identification information in each request to be activated, the activatable program of each device is determined, and then the activatable program of each device can be deployed and activated. The embodiment of the present application uses the above method combined with the distributed remote management technology of the server and the device to deploy, flash and activate the program. The operator does not need to master the complex algorithm details. Only the user authorization of the device is required to execute the entire program deployment and activation process through one-click operation, reducing the demand for on-site maintenance, reducing the related human and material resource costs, and improving the efficiency of program deployment.
[0062] In one embodiment, the activatable program for each device is determined based on the identification information of the program to be activated and the device identification information in each request to be activated, including: for the device identification information in each request to be activated, querying the payment information corresponding to the device identification information, and judging whether the device corresponding to the device identification information has the right to obtain the activatable program based on the payment information obtained from the query; if so, determining the activatable program for the device based on the identification information of the program to be activated in the request to be activated.
[0063] The system receives activation requests from devices, each of which contains the identification information of the program to be activated and the identification information of the device. For each activation request, the system will query the corresponding payment information based on the device identification information. The payment information is usually stored in a database or other storage system (such as the customer information management library of the rights management subsystem), and the payment information may include the device identification information and the identification information of the program to be activated. Based on the queried payment information, it is determined whether the corresponding device has the right to obtain the activatable program. For example, based on each payment information corresponding to the device identification information, it is checked whether the customer has purchased the corresponding program, whether the service is within the validity period, whether the customer has unpaid payments, etc. If the device has the right to obtain the program, the system will further determine the specific program that the device can activate based on the program identification information in the activation request. Specifically, the program identification information can be matched with the identification information of each program in the service program library to ensure that the program requested to be deployed and activated in the activation request is compliant.
[0064] The embodiments of the present application ensure that only paid authorized users can activate and use specific programs by verifying the payment information corresponding to the device identification information, which helps prevent unauthorized access to and use of the program, thereby reducing the illegal copying and distribution of software programs. At the same time, the automated verification process can also reduce the need for manual intervention, reduce the error rate, and increase the speed of processing requests.
[0065] In one embodiment, it also includes: if the payment information corresponding to the device identification information is not found, the payment information corresponding to the device identification information is re-queried within a first preset time period to obtain a returned query result; if the query result indicates that the payment information corresponding to the device identification information is not found, a prompt message indicating a payment failure is sent to the device.
[0066] If the payment information corresponding to the device identification information cannot be queried, the system will re-execute the query operation within the first preset time period (such as 30 seconds or 3 minutes). If the query result obtained within the first preset time period indicates that the payment information corresponding to the device identification information has been queried, the system will continue to execute subsequent steps (such as grabbing the program from the service program library and deploying it to the device). If the query result returned within the first preset time period indicates that the payment information corresponding to the device identification information has not been queried, a prompt message indicating that the payment failed is sent to the device. Specifically, it can be an error notification, warning or a message guiding the user to perform the correct operation, prompting the user that the payment may not have been completed or the payment information is incorrect.
[0067] The embodiment of the present application can more quickly and effectively handle the situation of query failure or delay by re-querying the payment information within a preset time period, thereby improving the stability and reliability of the system. When the query of payment information fails, a clear prompt message is sent to the device, which can reduce user loss caused by operational confusion or misunderstanding and improve user retention rate. In addition, by verifying the payment information, the system can also prevent unauthorized access and protect the security and integrity of the program.
[0068] In one embodiment, the request to be activated further includes a state identifier and a thread identifier, wherein the state identifier is used to indicate whether the request to be activated is being processed; and the thread identifier is used to identify the thread that is processing the request to be activated.
[0069] In a specific embodiment, in order to improve efficiency, the system can process multiple pending activation requests at the same time. In order to avoid the situation where multiple threads process the same pending activation request at the same time, the system assigns a status identifier and a thread identifier to each pending activation request. The status identifier is used to indicate whether the pending activation request is being processed (for example, "000" represents a waiting state, "100" represents a processing state, and "200" represents successful processing), and the thread identifier is used to identify the thread that is processing the pending activation request (for example, "A" indicates that thread A is processing the pending activation request, and if it is empty or "None", no specific thread is assigned to process the pending activation request). The embodiment of the present application does not limit the specific representation form of the status label. For example, a bit mask can also be used to represent the status label and thread identifier (such as 0x01 for unprocessed, 0x10 for processing). The embodiments of the present application do not limit the storage method of the tags. For example, a database record can be used to create a record in the database for each request to be activated, or a hash table or dictionary can be used to store status tags, where the key is the identification code (ID, IDentity) of the request to be activated, and the value is a combination of the status identifier and the thread identifier, or the status identifier and the thread identifier can also be stored as objects in XML or JSON format, such as {"status":"processing"; "threadID":"threadA";} and so on.
[0070] Exemplarily, each pending activation request is assigned a status tag consisting of a status identifier and a thread identifier. In addition, each pending activation request is also assigned a unique ID. For example, if thread A is responsible for processing pending activation request A, it will update the status tag of the request to "100A", which indicates that thread A is processing this request. At this time, if thread B checks that the status tag of request A is "100A", it will recognize that request A has been taken over by thread A, so thread B will not intervene in the processing.
[0071] On the contrary, if thread B detects that the status tag of another pending request B is "000None", it means that request B has not been processed yet. In this case, thread B will take over and try to process request B. After processing, thread B will change the status tag of request B to "200None", indicating that the request has been successfully processed and can continue with the subsequent process.
[0072] It can be seen that the embodiment of the present application reduces conflicts between multiple threads through thread identification and state identification, ensuring that the same request will not be processed by multiple threads at the same time, thereby avoiding data inconsistency and potential errors, and ensuring the reliability of the server. For application services that rely on fast response, such as online trading platforms or real-time communication services, this way of managing requests can also reduce user waiting time, improve flashing efficiency, and enhance user experience.
[0073] In one embodiment, deploying and activating an activatable program on each device includes: for each device, generating an authorization certificate based on device identification information and the activatable program deployed on the device and storing it in the device; the activatable program can be activated and executed if the device stores the authorization certificate.
[0074] In a feasible embodiment, the activatable program for each device may be deployed by downloading the activatable program for each device over the air (OTA).
[0075] OTA remotely downloads and installs the required programs for the device, allowing the device to receive the latest software program version anytime and anywhere without the user's physical intervention. OTA updates can be achieved through various wireless technologies, including but not limited to 3G, 4G, 5G, Wi-Fi and Bluetooth.
[0076] After deploying the activatable program to the device, the activatable software is in an unactivated state and needs to wait for the subsequent activation steps. After obtaining the permission of the device user, it is necessary to collect the field data related to the device (such as device model, serial number, MAC address, etc.) and the activatable program corresponding to the device to generate an authorization certificate through a joint hash algorithm.
[0077] A hash algorithm is a one-way encryption function that converts input data into an output of a fixed length (i.e., a hash value). The embodiments of the present application do not limit the specific hash algorithm, for example, it may be an MD5, SHA-256 algorithm, etc. The hash value generated by the hash algorithm is combined with other relevant information (such as user account, authorization period, etc.) to generate an authorization certificate. Furthermore, the authorization certificate can also be digitally signed to ensure its legitimacy. Finally, the generated authorization certificate is stored in a secure location, such as a server database. At the same time, the authorization certificate is distributed to the device, and the activatable program on the device is restricted to be executable only with an authorization certificate. Devices that do not meet this condition cannot run the program. After deployment and activation are completed, the service program deployed on the controller of the device can automatically execute the predetermined business service.
[0078] The embodiment of the present application generates an authorization certificate and stores it in the device, ensuring that only devices with legal authorization certificates can activate and execute the program, which can effectively prevent unauthorized access and use and protect the software from being illegally copied or abused. The use of hash algorithms (such as MD5, SHA-256, etc.) provides strong anti-collision and anti-tampering properties for the authorization certificate, enhancing the security of the system. In addition, the authorization certificate also contains a digital signature, which can further ensure the legitimacy and integrity of the program.
[0079] In one embodiment, the authorization certificate also includes an authorization time limit, and the method further includes: timing according to the authorization time limit in the authorization certificate; and sending a prompt message to the device that the authorization certificate is about to expire within a second preset time period before the authorization time limit expires.
[0080] The authorization time limit specifies the specific time period during which the user can activate and use the program. The server can check the authorization time limit according to the authorization time limit recorded in the authorization certificate, record the time in the database, monitor the remaining time, and trigger the sending of notifications at the appropriate time. It sends a prompt message to the device to inform the user that the authorization certificate is about to expire and remind the user to renew or re-acquire the authorization in time to avoid service interruption.
[0081] The second preset time period is defined in advance, such as one week, one month or other time before expiration, depending on the policy of the service provider. In this way, users can understand the authorization status of purchased programs, and program providers can effectively manage authorization usage and optimize customer service experience.
[0082] It should be understood that different service programs will generate different certificates and authorization time limits, and can then be managed independently according to the authorization periods of different programs. The embodiment of the present application can continuously and periodically obtain and monitor the authorization information in the device by establishing a remote communication connection between the server and the device. When the server establishes a connection with the device, the running usage rights and activation of the service can also be controlled in real time according to the authorization time limit of the authorization certificate. If the authorization time limit shows that it has expired, it can immediately respond to changes in the authorization information and control the access rights or activation status of the program accordingly. The embodiment of the present application can also be managed independently according to the authorization periods of different programs, making the authorization management of the program more efficient and flexible, and also easy to adapt to different program service requirements.
[0083] In one embodiment, the method further includes: when the authorization time limit in the authorization certificate expires, sending a deactivation processing instruction and a program uninstallation instruction to the device, so that the device marks the status tag of the activatable program corresponding to the authorization certificate as inactivated, removes the activatable program from the running list of the operating system of the device, and uninstalls the activatable program.
[0084] When the authorization time limit specified in the authorization certificate expires, it means that the user of the device storing the certificate no longer has the legal right to use it. Therefore, the server will send a deactivation processing instruction to the device, instructing the device to stop all activities of the activatable program corresponding to the authorization certificate and deployed on the device, and mark its status as "deactivated". The server will also send a program uninstallation instruction to instruct the device to clear all files, configurations and related data of the activatable program corresponding to the authorization certificate and deployed on the device from the device. After the device receives the deactivation processing instruction, it will change the status of the activatable program to "deactivated", so that the activatable program is no longer allowed to execute. In addition, the device will also remove the program from the operating system's run list. The run list is a data structure used by the operating system to manage and schedule running processes. Removing the program from the operating system's run list means that the operating system will no longer manage and schedule the program as the currently active process. In this way, the server reclaims the service running permission in the controller through the deployment subsystem to ensure that the application program cannot continue to run. The embodiment of the present application can ensure that the user cannot continue to use the software after the authorization period expires by sending a deactivation processing instruction and a program uninstallation instruction after the authorization time limit expires, thereby effectively protecting the program copyright and preventing unauthorized use.
[0085] Through the various embodiments of the present application, the distributed remote management technology between the server and the device can be used to perform customer information management, program deployment management, order management, and permission management of the program; after the user of the device purchases and places an order, the activatable program in the order is flashed to the control panel of the device through remote OTA, and the device's on-site information such as device identification information and the identification code of the program deployed on the device is used to generate an authorization certificate with an authorization period. The operation of the program in the control panel depends on its authorization certificate, which can control the life cycle of the program, and the server can actively revoke execution permissions / uninstall the application. By establishing remote data communication between the server and the device to continuously obtain the authorization information of the controller, the server can control the operation, usage permissions and activation of the service in real time when the device is connected.
[0086] In addition, the system will implement centralized control over all operations to ensure that each operation is carried out under strict monitoring and recording. That is, from program deployment to permission allocation, to program activation and revocation, each step is recorded in detail by the system to ensure transparency and traceability of operations, and facilitate subsequent audit work. Through these records, the use of services can be effectively monitored to ensure that the life cycle of authorization certificates is properly managed, and when necessary, the system can actively revoke execution permissions or uninstall applications to maintain system security and compliance.
[0087] In actual applications, the program deployment system provided by the embodiment of this application can be built based on Alibaba Cloud, the driver layer and the application layer can be decoupled, and the application layer can be deployed independently. The permission management subsystem and the deployment subsystem are deployed on the server side to perform strict permission control; the user of the device can directly connect to the server to execute program deployment and activation through online authorization and ordering, providing a better customer experience and higher deployment and delivery efficiency. The embodiment of this application realizes an efficient and secure remote management platform, which not only simplifies the deployment and activation process of the program, but also strengthens the control of program running permissions, while providing customers with convenient online services.
[0088] In order to implement the program deployment method of the embodiment of the present application, the embodiment of the present application also provides a program deployment device, such as Figure 3 As shown, the device comprises:
[0089] The receiving unit 301 is used to receive a request to be activated sent by at least one device; wherein each device corresponds to each request to be activated one by one; and the request to be activated includes identification information of the program to be activated and identification information of the device;
[0090] A communication connection unit 302, configured to establish a communication connection with a device corresponding to the device identification information in each of the requests to be activated;
[0091] A determination unit 303, configured to determine an activatable program for each of the devices according to the identification information of the program to be activated and the device identification information in each of the activation requests;
[0092] The processing unit 304 is used to deploy and activate the activatable program on each of the devices.
[0093] In one embodiment, the apparatus further comprises: a query unit; the query unit is configured to query the payment information corresponding to the device identification information in each of the device identification information in the activation request, and determine whether the device corresponding to the device identification information has the right to obtain the activatable program according to the payment information obtained by the query;
[0094] The determining unit is configured to determine, if yes, an activatable program of the device according to the identification information of the program to be activated in the activation request.
[0095] In one embodiment, the query unit is further configured to, if the payment information corresponding to the device identification information is not found, re-query the payment information corresponding to the device identification information within a first preset time period to obtain a returned query result;
[0096] If the query result indicates that the payment information corresponding to the device identification information has not been queried, a prompt message indicating that the payment has failed is sent to the device.
[0097] In one embodiment, the request to be activated further includes a state identifier and a thread identifier, wherein the state identifier is used to indicate whether the request to be activated is being processed; and the thread identifier is used to identify the thread that is processing the request to be activated.
[0098] In one embodiment, the processing unit is further used to generate an authorization certificate for each of the devices according to the device identification information and the activatable program deployed on the device and store it in the device; the activatable program can be activated and executed if the device stores the authorization certificate.
[0099] In one embodiment, the authorization certificate also includes an authorization time limit, and the processing unit is further used to count according to the authorization time limit in the authorization certificate;
[0100] The processing unit is further configured to send a prompt message indicating that the authorization certificate is about to expire to the device within a second preset time period before the authorization time limit expires.
[0101] In one embodiment, the processing unit is further used to send a deactivation processing instruction and a program uninstallation instruction to the device when the authorization time limit in the authorization certificate expires, so that the device marks the status tag of the activatable program corresponding to the authorization certificate as inactivated, removes the activatable program from the running list of the operating system of the device, and uninstalls the activatable program.
[0102] In actual application, the processing unit can be implemented by a processor in an electronic device in combination with a communication interface, and the receiving unit, communication connection unit, determination unit, and query unit can be implemented by a communication interface in a program deployment device.
[0103] It should be noted that: the above embodiment provides a program deployment device, and only uses the division of the above program modules as an example when performing program deployment. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the program deployment device provided in the above embodiment and the program deployment method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0104] Based on the hardware implementation of the above program modules, and in order to implement a program deployment method provided in an embodiment of the present application, an embodiment of the present application further provides an electronic device, such as Figure 4 As shown, the electronic device 400 includes:
[0105] CPU 401, memory 402 and input / output interface 403;
[0106] The memory 402 is a temporary storage memory or a permanent storage memory;
[0107] The central processor 401 is configured to communicate with the memory 402 and execute instructions in the memory 402 to perform any one of the above-mentioned program deployment methods.
[0108] Of course, in actual application, the various components in the electronic device 400 are coupled together through the bus system 404. It can be understood that the bus system 404 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 404 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 4 Various buses are labeled as bus system 404 .
[0109] The memory 402 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 400. Examples of such data include: any computer program used to operate on the electronic device 400.
[0110] It is understandable that when the processor in the electronic device described above executes the computer program, the functions of each unit in the above-mentioned corresponding device embodiments can also be realized, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory, and executed by the processor to complete the various embodiments of the present application. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device. For example, the computer program can be divided into each unit in the above-mentioned electronic device, and each unit can realize the specific function described in the above-mentioned corresponding electronic device. The electronic device may include but is not limited to a processor and a memory. It can be understood by those skilled in the art that the processor and the memory are only examples of electronic devices, and do not constitute a limitation on the electronic device, and may include more or fewer components, or combine certain components, or different components, such as electronic devices may also include input and output devices, network access devices, buses, etc.
[0111] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of an electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0112] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC, Smart Media Card), a secure digital (SD, Secure Digital) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0113] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is run on an electronic device, any one of the above-mentioned program deployment methods is executed.
[0114] An embodiment of the present application also provides a computer program product having a computer program / instruction stored thereon, which, when executed by a processor, is used to implement any one of the program deployment methods described above.
[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0116] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0118] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable an electronic device (which can be an embedded device, an Internet of Things device, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
Claims
1. A program deployment method, characterized in that: Applied to the server, including: Receive an activation request from at least one device; wherein each device corresponds to each activation request one by one; and the activation request includes identification information of a program to be activated and device identification information; Establishing a communication connection with a device corresponding to the device identification information in each of the requests to be activated; Determining an activatable program for each of the devices according to the identification information of the program to be activated and the device identification information in each of the requests to be activated; The activatable program is deployed to each of the devices and activated.
2. The program deployment method according to claim 1, characterized in that: The step of determining the activatable program for each device according to the identification information of the program to be activated and the device identification information in each of the activation requests includes: For each of the device identification information in the request to be activated, query the payment information corresponding to the device identification information, and determine whether the device corresponding to the device identification information has the right to obtain the activatable program based on the payment information obtained from the query; If so, determining the activatable program of the device according to the identification information of the program to be activated in the activation request.
3. The program deployment method according to claim 2, characterized in that: The method further comprises: If the payment information corresponding to the device identification information is not found, re-querying the payment information corresponding to the device identification information within a first preset time period to obtain a returned query result; If the query result indicates that the payment information corresponding to the device identification information has not been queried, a prompt message indicating that the payment has failed is sent to the device.
4. The program deployment method according to claim 1, characterized in that: The request to be activated further includes a state identifier and a thread identifier, wherein the state identifier is used to indicate whether the request to be activated is being processed; and the thread identifier is used to identify the thread that is processing the request to be activated.
5. The program deployment method according to claim 1, characterized in that: The deploying and activating the activatable program of each device includes: For each of the devices, an authorization certificate is generated according to the device identification information and the activatable program deployed on the device and stored in the device; the activatable program can be activated and executed when the authorization certificate is stored in the device.
6. The program deployment method according to claim 5, characterized in that: The authorization certificate also includes an authorization time limit, and the method further includes: Counting according to the authorization time limit in the authorization certificate; Within a second preset time period before the authorization time limit expires, a prompt message indicating that the authorization certificate is about to expire is sent to the device.
7. The program deployment method according to claim 6, characterized in that: The method further comprises: When the authorization time limit in the authorization certificate expires, a deactivation processing instruction and a program uninstallation instruction are sent to the device, so that the device marks the status tag of the activatable program corresponding to the authorization certificate as inactivated, removes the activatable program from the running list of the operating system of the device, and uninstalls the activatable program.
8. A program deployment device, characterized in that: include: A receiving unit, configured to receive a request to be activated from at least one device; wherein each device corresponds to each request to be activated one by one; and the request to be activated includes identification information of a program to be activated and identification information of a device; a communication connection unit, configured to establish a communication connection with a device corresponding to the device identification information in each of the requests to be activated; a determining unit, configured to determine an activatable program for each of the devices according to the identification information of the program to be activated and the device identification information in each of the requests to be activated; The processing unit is used to deploy and activate the activatable program on each of the devices.
9. An electronic device, characterized in that: include: CPU, memory and input / output interface; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the program deployment method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is run on an electronic device, the program deployment method described in any one of claims 1 to 7 is executed.