Task execution methods, devices and related equipment

By configuring multi-level policy-based device certificates for embedded devices, the server can efficiently manage multiple permission information, solving the problem of server overload and improving device access efficiency.

CN116800426BActive Publication Date: 2026-11-17CHINA MOBILE M2M +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210251812.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2026-11-17
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

When the server is overloaded by multiple embedded device task requests, access to some devices is denied, making it impossible to effectively manage the multiple permission information of the devices.

Method used

By configuring a device certificate for the target device, which contains multiple permission information, the server can obtain multiple permission information of the target device after parsing the device certificate once. This allows for the management of permission information through a multi-level policy hierarchy, simplifying the permission verification process.

Benefits of technology

It improved the server's processing power, reduced the load pressure of authorization verification, and enhanced the efficiency of device access and the server's load capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800426B_ABST
    Figure CN116800426B_ABST
Patent Text Reader

Abstract

This application provides a task execution method, apparatus, and related equipment. The method includes: obtaining a device certificate for a target device, the device certificate including multiple permission information of the target device; searching the multiple permission information according to a pre-acquired task request from the target device to obtain a search result, the task request being used to request a server to execute a target task; and executing the target task if the search result includes target permission information to obtain a target result, wherein the target permission information is the permission information among the multiple permission information that matches the target task. By configuring the device certificate and the target device's permission information into a one-to-many relationship, during the process of the target device calling the server to execute multiple tasks, the server only needs to parse the device certificate once to complete the acquisition of multiple permission information of the target device, which can improve the server's load capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task execution method, apparatus and related equipment. Background Technology

[0002] During the process of an embedded device accessing a server, the embedded device sends a task request to the server. After receiving the task request, the server executes the corresponding task and sends the task execution result back to the embedded device.

[0003] To make reasonable use of the server's limited computing resources, access to different embedded devices is usually differentiated through access control. That is, after receiving a task request from an embedded device, the server will check whether the embedded device has the permission to call the task. Only if the permission check is passed can the embedded device receive the corresponding task execution result.

[0004] Currently, the permission information for each task is stored in the corresponding device certificate. If an embedded device needs to call multiple tasks from the server, the server needs to parse and verify the multiple device certificates corresponding to each task. When multiple embedded devices access the server together, the server's load exceeds the limit, which causes the server to directly refuse access to some embedded devices. In other words, the server's load capacity is poor. Summary of the Invention

[0005] This application provides a task execution method, apparatus, and related equipment to solve the problem of poor load capacity of servers.

[0006] To solve the above problems, this application is implemented as follows:

[0007] In a first aspect, embodiments of this application provide a task execution method, including:

[0008] Obtain the device certificate of the target device, the device certificate including multiple permission information of the target device, the permission information being used to indicate the calling permissions of the target device in the server;

[0009] Based on the task request of the target device to be acquired, a search is performed in the multiple permission information to obtain the search results. The task request is used to request the server to execute the target task.

[0010] If the search results include target permission information, the target task is executed to obtain the target result, wherein the target permission information is the permission information that matches the target task among the plurality of permission information.

[0011] Secondly, embodiments of this application also provide a task execution device, comprising:

[0012] The acquisition module is used to acquire the device certificate of the target device. The device certificate includes multiple permission information of the target device, and the permission information is used to indicate the calling permissions of the target device in the server.

[0013] The retrieval module is used to search the multiple permission information according to the task request of the target device to obtain the retrieval results. The task request is used to request the server to execute the target task.

[0014] An execution module is used to execute the target task and obtain the target result when the search result includes target permission information, wherein the target permission information is the permission information that matches the target task among the plurality of permission information.

[0015] Thirdly, embodiments of this application also provide a communication device, including: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps in the method described in the first aspect above.

[0016] Fourthly, embodiments of this application also provide a readable storage medium for storing a program, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0017] In this embodiment of the application, by configuring the device certificate and the permission information of the target device into a one-to-many relationship, the server only needs to parse the device certificate once to obtain multiple permission information of the target device when the target device calls the server to execute multiple tasks, which can improve the server's load capacity. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a task execution method provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of the structure of a multi-level strategy provided in an embodiment of this application;

[0021] Figure 3 This is a flowchart of a permission verification process based on a multi-level policy, provided in an embodiment of this application.

[0022] Figure 4 This is a schematic diagram of a device certificate provided in an embodiment of this application;

[0023] Figure 5 This is a schematic diagram of a device policy file provided in an embodiment of this application;

[0024] Figure 6 This is a flowchart illustrating a certificate registration process provided in an embodiment of this application;

[0025] Figure 7 This is a schematic diagram illustrating the process of a target device making a task request to a server, as provided in an embodiment of this application.

[0026] Figure 8 This is a schematic diagram of the structure of the task execution device provided in the embodiments of this application;

[0027] Figure 9 This is a schematic diagram of the communication device provided in this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.

[0030] The task execution method provided in the embodiments of this application will be described below.

[0031] See Figure 1 , Figure 1 This is a flowchart illustrating the task execution method provided in the embodiments of this application. Figure 1 The task execution method shown is applied to the server.

[0032] like Figure 1 As shown, the task execution method may include the following steps:

[0033] Step 101: Obtain the device certificate of the target device. The device certificate includes multiple permission information of the target device, which is used to indicate the calling permissions of the target device in the server.

[0034] The target device may be a mobile phone, a tablet computer, a laptop computer, a personal digital assistant (PDA), a mobile internet device (MID), a wearable device, or an in-vehicle device, etc.

[0035] The multiple permission information corresponds to the target device's access permissions to multiple services on the server, including but not limited to online upgrade service and location service.

[0036] Step 102: Search the multiple permission information according to the task request of the target device to obtain the search results. The task request is used to request the server to execute the target task.

[0037] The process of the target device sending a task request to the server can be understood as the process of the target device requesting one of the aforementioned multiple services from the server. The task request includes the first identification information of the service requested by the target device. Based on the first identification information, it can be searched in multiple second identification information corresponding to multiple permission information respectively, and the search results can be obtained.

[0038] For example, if the first identifier is set to OTA (to indicate online upgrade service), and the second identifiers corresponding to the multiple permission information are OTA and OnePos (to indicate location service), then the search results indicating successful search will be obtained. At this time, the search results will include the permission information corresponding to OTA (that is, the target permission information).

[0039] If the first identifier is set to 5G (used to indicate communication services), and the multiple second identifiers corresponding to the multiple permission information are OTA and OnePos respectively, then the search results used to indicate search failure will be obtained.

[0040] Step 103: If the search results include target permission information, execute the target task to obtain the target result. The target permission information is the permission information that matches the target task among the multiple permission information.

[0041] Matching permission information with the target task can be understood as the second identifier information corresponding to the permission information being the same as the first identifier information of the target task. When the search result includes the target permission information, the server determines that the target device has the permission to call the service corresponding to the task request (i.e., the target task). At this time, the server will execute the target task accordingly, obtain the target result output by the target task, and feed back the target result to the target device to complete the response to the task request of the target device.

[0042] In this embodiment of the application, by configuring the device certificate and the permission information of the target device into a one-to-many relationship, the server only needs to parse the device certificate once to obtain multiple permission information of the target device when the target device calls the server to execute multiple tasks, which can improve the server's load capacity.

[0043] Optionally, the plurality of permission information includes at least two permission sets corresponding to at least two policy levels, each policy level corresponding to one permission set, the at least two permission sets including a first set and a second set, wherein if the policy level corresponding to the first set is greater than the policy level corresponding to the second set, the second set is a subset of the first set;

[0044] The step of searching through the multiple permission information based on the pre-acquired task request of the target device to obtain search results includes:

[0045] Based on the at least two permission sets, at least one candidate set is obtained, wherein the candidate set is the permission set in the at least two permission sets whose corresponding policy level is greater than or equal to the policy level of the target device;

[0046] Based on the at least one candidate set, a target set is obtained, wherein the target set is the intersection of the at least one candidate set;

[0047] The search is performed in the target set according to the task request to obtain the search results.

[0048] As mentioned above, by configuring different policy levels for different permission information, the server can conveniently manage multiple permission information of device certificates.

[0049] For example, product policies, group policies, and device policies can be set to manage multiple permission information. In this case, the multiple permission information will include the permission set corresponding to the product policy, the permission set corresponding to the group policy, and the permission set corresponding to the device policy, such as... Figure 2As shown, the policy level of product policy is higher than that of group policy, and the policy level of group policy is higher than that of device policy. That is, the permission set of the corresponding group policy is a subset of the permission set of the corresponding product policy, and the permission set of the corresponding device policy is a subset of the permission set of the corresponding group policy.

[0050] In some implementations, such as Figure 3 As shown, when the policy level of the target device is the same as the policy level of the device policy, the device certificate of the target device will include three permission sets corresponding to the product policy, group policy, and device policy, respectively. To verify whether the target device has the permission to call the target task, it is necessary to first search in the permission set corresponding to the product policy according to the task request. If the search is successful, then search in the permission set corresponding to the group policy according to the task request. If the search is successful, continue to search in the permission set corresponding to the device policy according to the task request. Only if the search is successful will it be determined that the target device has the permission to call the target task. If any of the above three search processes fails, it is directly determined that the target device does not have the permission to call the target task.

[0051] Figure 4 This is a schematic diagram of a device certificate for the target device. Figure 4 In this context, PolicyIdentifier can be understood as the policy level of the target device (001 refers to the policy level of the product policy, 002 refers to the policy level of the group policy, and 003 refers to the policy level of the device policy). CPS.1 is the policy file index of the product policy, CPS.2 is the policy file index of the group policy, and CPS.3 is the policy file index of the device policy. The server can jump to the policy file of the corresponding policy based on the policy file index. The policy file includes all the permission information corresponding to the policy.

[0052] It should be noted that in a device certificate, the policy file index of the target policy cannot be empty, while the policy file index of the non-target policy can be empty. Here, a target policy can be understood as a policy whose policy level is greater than or equal to the policy level of the target device, and a non-target policy can be understood as a policy whose policy level is less than the policy level of the target device. For example, if the PolicyIdentifier is set to 002 in a device certificate, then the product policy and group policy are both target policies, and the device policy is a non-target policy.

[0053] Figure 5 This is a schematic diagram of a policy document for a target device. Figure 5 The policy file is in JSON format and includes a policy unique identifier (PolicyID) to uniquely identify the policy file, a policy object (PolicyObject), and a set of permission information (Services).

[0054] The policy object is used to indicate the specific policy (product policy, group policy, or device policy) corresponding to the policy file. Figure 5 In the policy file, there is a corresponding device policy, and the device policy corresponds to a specific device, whose hardware identifier is CM232801.

[0055] Figure 5 The set of permission information includes two permission information sets. One permission information set corresponds to the OTA service and indicates that the service period of the OTA service is February 18, 2049, and the access threshold of the OTA service is 18,654 times (meaning that after February 18, 2049, or after the access count of the OTA service exceeds 18,654 times, the access permission of the OTA service will be invalidated, and the status of the OTA service will be Deny when it is invalidated). The other permission information set corresponds to the OnePos service, the service period of the OnePos service is February 18, 2049, and the access threshold of the OnePos service is 17,653 times.

[0056] It should be noted that, in practical applications, in addition to using a three-level strategy (such as product strategy, group strategy and device strategy) to manage multiple permission files, the number of strategy levels can also be adaptively adjusted (such as two-level strategy, four-level strategy, five-level strategy, etc.) to adapt to the application needs of actual scenarios. The specific number of strategy levels is not limited in the embodiments of this application.

[0057] As mentioned above, by first obtaining the target set and then searching within the target set based on the task request, the permission verification process for the target device can be simplified to some extent (referring to verifying the target device's calling permissions through three or more search steps), thereby improving the efficiency of obtaining search results and reducing the server's load.

[0058] It should be noted that the target set being the intersection of the at least one candidate set should be understood as follows: when the number of at least one candidate set is equal to one, the target set is that candidate set; when the number of at least one candidate set is greater than or equal to two, the target set is the intersection of the at least one candidate set.

[0059] Optionally, if the search results do not include the target permission information, a pre-configured disconnection task is executed, which is used to disconnect the connection between the target device and the server.

[0060] The fact that the search results do not include the target permission information should be understood as the target device's permission verification failing. That is, the server determines that the target device does not have the permission to call the target task requested by the task. In this case, the server ensures data security by disconnecting the connection between the target device and the server.

[0061] It should be noted that when multiple policies are set up and the permission verification of the target device involves two or more search processes, if any search process fails, the permission verification of the target device can be determined to have failed.

[0062] Optionally, before obtaining the device certificate of the target device, the method further includes:

[0063] Obtain the first identity information of the target device, wherein the first identity information includes the hardware identifier of the target device;

[0064] A device certificate is generated to uniquely identify the target device based on the pre-configured certificate template and the first identity information;

[0065] Send the device certificate to the target device.

[0066] As mentioned above, before the server obtains the target device's device certificate, the target device needs to complete certificate registration on the server to obtain a device certificate that uniquely identifies the target device. During the target device's certificate registration process, pre-configured certificate templates simplify the registration process and further reduce the server's load.

[0067] like Figure 6 As shown, the certificate registration process can be initiated by the target device (which can be understood as...). Figure 6 The embedded device in the process generates a private key, a Certificate Signing Request (CSR) file, a CA certificate, etc., so that the registration module of the target device and the server (which can be understood as...) Figure 6 The registration platform establishes a two-way authenticated Transport Layer Security (TLS) connection. At this time, the target device and the registration module exchange data through the encrypted channel corresponding to the TLS connection.

[0068] After the encrypted channel is established, the target device encapsulates a registration message (i.e., the first identity information) and transmits it to the registration module. After the registration module parses the registration message, it adds the device to the product directory corresponding to the target device and generates device information based on the device ID, device key, group ID, etc. Then, it issues a device certificate to uniquely identify the target device according to the aforementioned certificate request file and the hardware identifier of the target device. Subsequently, the server encapsulates the device certificate and device information into a response message and sends it to the target device. After parsing the response message, the target device obtains and retains the device information and device certificate. At this point, the certificate registration of the target device is completed, and the connection between the target device and the server is disconnected.

[0069] The aforementioned device certificates include a default policy and a custom policy. The default policy is the public policy of the product catalog corresponding to the target device; the custom policy is generated during the certificate registration stage of the target device.

[0070] The default policies for device certificates of any two devices located in the same product directory are the same. The product directory can be pre-registered on the server. During registration, the product ID, product key, and certificate template associated with the product directory will be set accordingly - only a blank certificate with the default policy will be included. There can be multiple product directories. When the target device connects to the server for the first time, a product directory can be specified for the target device, that is, the target device is assigned to the specified product directory. At this time, the server will transmit the product ID, product key (i.e., the private key used to establish the TLS connection) and certificate template of the specified product directory to the target device.

[0071] In some implementations, the process of the target device requesting a service from the server can be as follows: Figure 7 As shown, the embedded device (which can be understood as the target device) establishes an SSL connection with the data platform (which can be understood as the data interaction module of the server, used to interact with the target device and verify the target device's permissions) through information such as CA certificate, device certificate, and private key. Afterward, the data platform parses the device certificate (i.e., identifies the policy level of the target device and obtains the policy files for different policies included in the device certificate based on the policy file index of the device certificate). Subsequently, the embedded device sends a device application protocol connection message to the data platform (including the product ID—the identifier of the product directory corresponding to the target device, the device ID—the unique identifier of the target device, etc.). After the data platform responds to the device application protocol connection message, the embedded device initiates a service request (i.e., a task request) to the data platform. Figure 7Specifically, the data platform verifies the embedded device's permissions based on the service request. If the verification is successful, the data platform forwards the service request to the server's location service module. The location service module responds to the location service request and returns location data (which can be understood as the target result). After being forwarded by the data platform, the embedded device obtains the location data corresponding to the location service request, thus completing one service request for the embedded device. If the embedded device needs to continue requesting other services (such as online upgrade services), the data platform will continue the permission verification process (if the verification is successful, the service request is forwarded to the corresponding service module; if the verification fails, a permission verification failure message is returned to the embedded device). If the embedded device does not need to continue requesting other services, the connection between the embedded device and the data platform is disconnected.

[0072] Optionally, generating a device certificate to uniquely identify the target device based on a pre-configured certificate template and the first identity information includes:

[0073] Based on the first identity information, a search is performed in a pre-configured identity database to obtain target identity information, wherein the target identity information is the second identity information with the highest similarity to the first identity information among a plurality of second identity information in the identity database;

[0074] Based on the first identity information, the pre-configured certificate template, and the reference device certificate corresponding to the second identity information, a device certificate is generated to uniquely identify the target device. The policy level of the device certificate is the same as that of the reference device certificate.

[0075] As mentioned above, during the certificate registration process of the target device, the certificate registration efficiency of the target device is improved by comparing similarity. That is, by referring to the reference device certificate of the second identity information with the highest similarity to the first identity information (meaning that the policy level of the target device certificate is set to be the same as that of the reference device certificate), the policy level of the target device certificate can be quickly determined.

[0076] For example, the similarity between each second identity information and the first identity information can be obtained by calculating the Pearson correlation coefficient between the first identity information and multiple second identity information of the target device; the first identity information includes data such as the hardware identifier and Internet Protocol address of the target device; the second identity information includes data such as the hardware identifier and Internet Protocol address of the corresponding device.

[0077] The various optional implementation methods described in the embodiments of this application can be combined with each other or implemented individually without conflict, and the embodiments of this application do not limit this.

[0078] See Figure 8 , Figure 8 This is a schematic diagram of the structure of the task execution device 200 provided in an embodiment of this application. Figure 8 As shown, the task execution device 200 includes:

[0079] The acquisition module 201 is used to acquire the device certificate of the target device. The device certificate includes multiple permission information of the target device. The permission information is used to indicate the calling permissions of the target device in the server.

[0080] The retrieval module 202 is used to search the multiple permission information according to the task request of the target device to obtain the retrieval result, wherein the task request is used to request the server to execute the target task;

[0081] The execution module 203 is used to execute the target task and obtain the target result when the search result includes target permission information, wherein the target permission information is the permission information that matches the target task among the plurality of permission information.

[0082] Optionally, the plurality of permission information includes at least two permission sets corresponding to at least two policy levels, each policy level corresponding to one permission set, the at least two permission sets including a first set and a second set, wherein if the policy level corresponding to the first set is greater than the policy level corresponding to the second set, the second set is a subset of the first set;

[0083] The retrieval module 202 includes:

[0084] The candidate set acquisition unit is used to obtain at least one candidate set based on the at least two permission sets, wherein the candidate set is a set of permissions in the at least two permission sets whose corresponding policy level is greater than or equal to the policy level of the target device;

[0085] A target set acquisition unit is configured to obtain a target set based on the at least one candidate set, wherein the target set is the intersection of the at least one candidate set;

[0086] The retrieval unit is used to perform a retrieval in the target set according to the task request and obtain retrieval results.

[0087] Optionally, the device 200 further includes a certificate registration module, the certificate registration module comprising:

[0088] An identity acquisition unit is used to acquire first identity information of a target device, wherein the first identity information includes the hardware identifier of the target device;

[0089] The certificate generation unit is used to generate a device certificate for uniquely identifying the target device based on a pre-configured certificate template and the first identity information.

[0090] A certificate sending unit is used to send the device certificate to the target device.

[0091] Optionally, the certificate generation unit includes:

[0092] The similarity comparison subunit is used to search in a pre-configured identity database based on the first identity information to obtain target identity information, wherein the target identity information is the second identity information with the highest similarity to the first identity information among a plurality of second identity information in the identity database;

[0093] The certificate generation subunit is used to generate a device certificate for uniquely identifying the target device based on the first identity information, the pre-configured certificate template, and the reference device certificate corresponding to the second identity information. The policy level of the device certificate is the same as that of the reference device certificate.

[0094] Optionally, the device 200 further includes a disconnection module, specifically used for:

[0095] If the search results do not include the target permission information, a pre-configured disconnection task is executed, which is used to disconnect the connection between the target device and the server.

[0096] The task execution device 200 can realize the embodiments of this application. Figure 1 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.

[0097] This application also provides a communication device. Please refer to [link to relevant documentation]. Figure 9 The communication device may include a processor 301, a memory 302, and a program 3021 stored in the memory 302 and capable of running on the processor 301.

[0098] When program 3021 is executed by processor 301, it can achieve the following: Figure 1 Any steps in the corresponding method embodiments and the achievement of the same beneficial effects will not be repeated here.

[0099] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.

[0100] This application embodiment also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described functions. Figure 1 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.

[0101] The computer-readable storage medium of this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0102] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0103] The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0104] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The above description represents the preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A task execution method, characterized in that, The method includes: Obtain the device certificate of the target device, the device certificate including multiple permission information of the target device, the permission information being used to indicate the calling permissions of the target device in the server; wherein, the multiple permission information respectively correspond to the calling permissions of the target device for multiple services in the server, the multiple services including: online upgrade service and location service; Based on the task request of the target device to be acquired, a search is performed in the multiple permission information to obtain the search results. The task request is used to request the server to execute the target task. If the search results include target permission information, the target task is executed to obtain the target result, wherein the target permission information is the permission information that matches the target task among the plurality of permission information.

2. The method according to claim 1, characterized in that, The multiple permission information includes at least two permission sets corresponding to at least two policy levels, with each policy level corresponding to one permission set. The at least two permission sets include a first set and a second set. If the policy level corresponding to the first set is greater than the policy level corresponding to the second set, the second set is a subset of the first set. The step of searching through the multiple permission information based on the pre-acquired task request of the target device to obtain search results includes: Based on the at least two permission sets, at least one candidate set is obtained, wherein the candidate set is the permission set in the at least two permission sets whose corresponding policy level is greater than or equal to the policy level of the target device; Based on the at least one candidate set, a target set is obtained, wherein the target set is the intersection of the at least one candidate set; The search is performed in the target set according to the task request to obtain the search results.

3. The method according to claim 2, characterized in that, Before obtaining the device certificate of the target device, the method further includes: Obtain the first identity information of the target device, wherein the first identity information includes the hardware identifier of the target device; A device certificate is generated to uniquely identify the target device based on the pre-configured certificate template and the first identity information; Send the device certificate to the target device.

4. The method according to claim 3, characterized in that, The step of generating a device certificate to uniquely identify the target device based on a pre-configured certificate template and the first identity information includes: Based on the first identity information, a search is performed in a pre-configured identity database to obtain target identity information, wherein the target identity information is the second identity information with the highest similarity to the first identity information among a plurality of second identity information in the identity database; Based on the first identity information, the pre-configured certificate template, and the reference device certificate corresponding to the second identity information, a device certificate is generated to uniquely identify the target device. The policy level of the device certificate is the same as that of the reference device certificate.

5. The method according to claim 1, characterized in that, If the search results do not include the target permission information, a pre-configured disconnection task is executed, which is used to disconnect the connection between the target device and the server.

6. A task execution device, characterized in that, The device includes: The acquisition module is used to acquire the device certificate of the target device. The device certificate includes multiple permission information of the target device. The permission information is used to indicate the calling permissions of the target device in the server. The multiple permission information corresponds to the calling permissions of the target device for multiple services in the server. The multiple services include: online upgrade service and location service. The retrieval module is used to search the multiple permission information according to the task request of the target device to obtain the retrieval results. The task request is used to request the server to execute the target task. An execution module is used to execute the target task and obtain the target result when the search result includes target permission information, wherein the target permission information is the permission information that matches the target task among the plurality of permission information.

7. The apparatus according to claim 6, characterized in that, The multiple permission information includes at least two permission sets corresponding to at least two policy levels, with each policy level corresponding to one permission set. The at least two permission sets include a first set and a second set. If the policy level corresponding to the first set is greater than the policy level corresponding to the second set, the second set is a subset of the first set. The retrieval module includes: The candidate set acquisition unit is used to obtain at least one candidate set based on the at least two permission sets, wherein the candidate set is a set of permissions in the at least two permission sets whose corresponding policy level is greater than or equal to the policy level of the target device; A target set acquisition unit is configured to obtain a target set based on the at least one candidate set, wherein the target set is the intersection of the at least one candidate set; The retrieval unit is used to perform a retrieval in the target set according to the task request and obtain retrieval results.

8. The apparatus according to claim 7, characterized in that, The device further includes a certificate registration module, which includes: An identity acquisition unit is used to acquire first identity information of a target device, wherein the first identity information includes the hardware identifier of the target device; The certificate generation unit is used to generate a device certificate for uniquely identifying the target device based on a pre-configured certificate template and the first identity information. A certificate sending unit is used to send the device certificate to the target device.

9. A communication device, comprising: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program from the memory to implement the steps of the task execution method as described in any one of claims 1 to 5.

10. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the task execution method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Access authorization through certificate validation

    US20140282916A1

  • Systems and methods for managing secure sharing of online advertising data

    US20150381607A1