Resource access method, apparatus and device

CN115795187BActive Publication Date: 2026-10-09HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210749425.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2026-10-09
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

[0003]现有技术中,设备内部的大量资源需要暴露给外部,每一资源对应的访问地址均存在不同,使得设备需存储大量访问地址及对应的处理函数等信息,增加了设备的存储压力,并且,在大量访问地址中检索外部访问者所访问的访问地址的检索效率较低,使得设备对访问的响应速度较慢

Benefits of technology

[0032]By adopting the technical solution of the embodiments of this application, by receiving an access request for a first target resource sent by a second device, the access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this technical solution, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform an operation on the resource according to the resource information, corresponding to the target operation type in the access request, and then send the execution result to the second device, ensuring the accurate response of the first device to the access request.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115795187B_ABST
    Figure CN115795187B_ABST
Patent Text Reader

Abstract

The application discloses a resource access method, device and equipment, to solve the problem of slow response speed of the device to the access request. It includes: receiving the access request sent by the second device for the first target resource; if the first specified class node is included in at least one character node of the first access address in the access request, the first specified class node is replaced with a preset character to obtain a second access address not including the first specified class node; determining the first target index information corresponding to the second access address; determining the first target resource and the first target resource information corresponding to the first target index information according to the first target index information and the mapping relationship between each index information, resource information and resource; performing the operation corresponding to the target operation type in the access request on the first target resource according to the first target resource information, and sending the execution result to the second device. The technical scheme improves the response speed of the device to the access request.
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 resource access method, apparatus, and device. Background Technology

[0002] As devices become increasingly sophisticated, they can store vast amounts of resources internally, depending on the specific application scenario. For example, in the case of an access control system, the device can store a large number of biometric data points, enabling biometric identification based on received fingerprints, facial recognition, and other biometric information to control access. Another example is the ability to record and store attendance information of users, with these internal resources displayed externally via access addresses. In relevant scenarios, such as correcting attendance records or adding biometric data for new users, external visitors can access specific resources within the device by visiting a designated address.

[0003] In existing technologies, a large number of resources inside a device need to be exposed to the outside. Each resource has a different access address, which requires the device to store a large number of access addresses and corresponding processing functions, increasing the storage pressure on the device. Furthermore, the retrieval efficiency of searching for the access address accessed by an external visitor among a large number of access addresses is low, resulting in a slow response speed of the device to access. Summary of the Invention

[0004] The purpose of this application is to provide a resource access method, apparatus, and device to solve the problem of slow response speed of current devices to access requests.

[0005] To solve the above-mentioned technical problems, the embodiments of this application are implemented as follows:

[0006] On one hand, embodiments of this application provide a resource access method applied to a first device, including:

[0007] Receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, the first access address includes at least one character node, and the operation information includes a target operation type;

[0008] If the at least one character node includes a first specified class node, then the first specified class node is replaced with a preset character to obtain a second access address; the second access address does not include the first specified class node.

[0009] Determine the first target index information corresponding to the second access address;

[0010] Based on the first target index information, and the mapping relationship between each index information, resource information and resources, determine the first target resource and the first target resource information corresponding to the first target index information;

[0011] Based on the first target resource information, perform an operation on the first target resource that corresponds to the target operation type, and send the execution result to the second device.

[0012] On the other hand, embodiments of this application provide a resource access method applied to access control devices, including:

[0013] Receive a resource acquisition link sent by a cloud server; the resource acquisition link includes resource identification information of the second target resource to be acquired;

[0014] Based on the resource acquisition link, determine the resource storage address corresponding to the second target resource;

[0015] Based on the resource storage address, retrieve the second target resource corresponding to the resource identification information from the cloud server;

[0016] Determine the second target resource information and the second target index information corresponding to the second target resource;

[0017] Store the mapping relationship between the second target resource information, the second target index information, and the second target resource.

[0018] In another aspect, embodiments of this application provide a resource access device, applied to a first device, comprising:

[0019] A first receiving module is configured to receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, wherein the first access address includes at least one character node, and the operation information includes a target operation type;

[0020] The replacement module is configured to replace the first specified class node with a preset character if the at least one character node includes a first specified class node, thereby obtaining a second access address; the second access address does not include the first specified class node.

[0021] The first determining module is used to determine the first target index information corresponding to the second access address;

[0022] The second determining module is used to determine the first target resource and the first target resource information corresponding to the first target index information based on the first target index information, as well as the mapping relationship between each index information, resource information and resources;

[0023] The execution module is used to perform an operation on the first target resource corresponding to the target operation type based on the first target resource information, and send the execution result to the second device.

[0024] Furthermore, embodiments of this application provide a resource access device applied to access control equipment, comprising:

[0025] The second receiving module is used to receive a resource acquisition link sent by the cloud server; the resource acquisition link includes resource identification information of the second target resource to be acquired;

[0026] The third determining module is used to determine the resource storage address corresponding to the second target resource based on the resource acquisition link;

[0027] The second acquisition module is used to acquire the second target resource corresponding to the resource identification information from the cloud server according to the resource storage address;

[0028] The fourth determining module is used to determine the second target resource information and the second target index information corresponding to the second target resource;

[0029] The third storage module is used to store the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0030] In another aspect, embodiments of this application provide a resource access device, including a processor; and a memory arranged to store computer-executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions being executed by the processor to implement the resource access method applied to a first device, or to implement the resource access method applied to an access control device.

[0031] In another aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which are executed by a processor to implement the resource access method applied to the first device, or to implement the resource access method applied to an access control device.

[0032] By adopting the technical solution of the embodiments of this application, by receiving an access request for a first target resource sent by a second device, the access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this technical solution, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform an operation on the resource according to the resource information, corresponding to the target operation type in the access request, and then send the execution result to the second device, ensuring the accurate response of the first device to the access request. Attached Figure Description

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

[0034] Figure 1 This is a schematic flowchart of a resource access method according to an embodiment of this application;

[0035] Figure 2 This is a swimlane diagram of a resource access method according to an embodiment of this application;

[0036] Figure 3 This is a swimlane diagram of a resource access method according to another embodiment of this application;

[0037] Figure 4 This is a schematic flowchart of a resource access method according to another embodiment of this application;

[0038] Figure 5 This is a swimlane diagram of a resource access method in an access control scenario according to an embodiment of this application;

[0039] Figure 6 This is a schematic diagram of the structure of a resource access device according to an embodiment of this application;

[0040] Figure 7 This is a schematic diagram of the structure of a resource access device according to another embodiment of this application;

[0041] Figure 8 This is a schematic diagram of the hardware structure of a resource access device according to an embodiment of this application. Detailed Implementation

[0042] This application provides a resource access method, apparatus, and device to solve the problem of slow response speed of current devices to access requests.

[0043] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in 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, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0044] The resource access method provided in this application is applicable to various scenarios, such as accessing network resources via a PC (Personal Computer), accessing resources within a computer device via a server corresponding to the computer device, and so on. Optionally, the computer device is an embedded device.

[0045] As computer devices become increasingly sophisticated, their internal resources grow exponentially. To accurately present these resources to the outside world, an orderly and scalable method is needed. URLs (Uniform Resource Locators) used on the Internet are a good choice. A URL is a method of representing the location of information on the World Wide Web service. It provides an abstract method for identifying resource locations, allowing for resource localization. Once a resource is located, various operations can be performed, such as accessing, updating, replacing, and searching its attributes. In this embodiment, the computer device can display its internal resources to the outside world via URLs and provide a URL-based resource access method, enabling external visitors to accurately access the resources within the computer device.

[0046] Figure 1 This is a schematic flowchart illustrating a resource access method according to an embodiment of this application. In this embodiment, the resource access method is applied to a first device. Optionally, the first device is a computer device, and the second device is a server corresponding to the computer device. Figure 1 As shown, the method includes:

[0047] S102, receive the access request for the first target resource sent by the second device.

[0048] The access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes the target operation type. Optionally, the access request can be a RESTful HTTP (Hypertext Transfer Protocol) request. RESTful is a design style and development approach for web applications, based on HTTP, and can be defined using XML (Extensible Markup Language) or JSON (JavaScript Object Notation) format. HTTP is a simple request-response protocol that typically runs on top of TCP (Transmission Control Protocol), specifying what messages the client might send to the server and what responses it might receive.

[0049] Optionally, the first access address is represented in the form of URL, and the general format of URL is: <URL access method>: / / <host>:<port> / <path>. In the following embodiments, unless otherwise specified, URL refers to the content pointed to by <path>, and other contents (such as <URL access method>, <host>, <port>, etc.) will not be described in detail in the embodiments of the present application. <path> usually includes resource nodes divided by a plurality of slashes " / ", wherein a single resource node may be a pure numeric node including only numbers, a pure alphabetic node including only letters, or a hybrid node including both numbers and letters. For example, <path> is: / laws / 23 / 34 / temp1 / 123, wherein "laws" is a pure alphabetic node, "temp1" is a hybrid node, and "23", "34" and "123" are all pure numeric nodes.

[0050] Wherein, the pure numeric nodes in <path> usually represent a fixed page or resource file. If there are different resources on one page, only the content of the pure numeric node in <path> can be replaced without changing the URL format, so as to access different resources. Assuming that the content pointed to by " / laws / temp1 / ……" is an attendance sheet, "……" is a pure numeric node, and different numbers represent attendance sheets of different dates. For example, "401" represents the attendance sheet of April 1st, and "402" represents the attendance sheet of April 2nd, then access to attendance sheets of different dates can be achieved by replacing the content of the pure numeric node in <path>. Assuming that the content pointed to by " / laws / temp2 / ……" is basic personnel information, "……" is a pure numeric node, and different numbers represent basic personnel information of different personnel. For example, "01" represents the basic personnel information of Zhang San, and "02" represents the basic personnel information of Li Si, then access to basic personnel information of different personnel can be achieved by replacing the content of the pure numeric node in <path>.

[0051] Optionally, when the first access address is represented in the form of URL, the character node is the aforementioned resource node. Optionally, when the access request is a RESTFUL-style HTTP request, the first device can strip the first access address from the HTTP request sent by the second device. For example, if the HTTP request sent by the second device is "https: / / www.xxx.cn / laws / 458526?Aspx=xxx", then the first device can strip the first access address " / laws / 458526" therefrom; if the HTTP request sent by the second device is "https: / / 192.168.0.1:80 / laws / tmp2 / 123?format=json", then the first device can strip the first access address " / laws / tmp2 / 123" therefrom.

[0052] Optionally, in the case of an access request that is a RESTful HTTP request, the operation information for the first target resource can be carried in the request message. The target operation type can be GET, POST, PUT, or DELETE. GET is used to retrieve resources, POST is used to create resources (and can also be used to update resources), PUT is used to update resources, and DELETE is used to delete resources.

[0053] Optionally, the operation information may include the target operation type and the target resource content. The target resource content may be any one or more of the content included in the target resource. For example, if the target resource is Zhang San's basic personnel information, the target resource content may be one or more of the following: age information, job information, fingerprint information, and facial information.

[0054] Optionally, if the operation information only includes the target operation type, the purpose of this resource access is to perform an operation corresponding to the target operation type on all resource content in the target resource. For example, if the operation information only includes the target operation type GET, then the purpose of this resource access is to retrieve all resource content in the target resource. If the operation information includes both the target operation type and the target resource content, the purpose of this resource access is to perform an operation corresponding to the target operation type on the target resource content in the target resource. For example, if the target resource is Zhang San's basic personnel information, the target resource content is fingerprint information, and the target operation type is GET, POST, PUT, or DELETE, then the purpose of this resource access is to retrieve, create, update, or delete the fingerprint information in Zhang San's basic personnel information. It should be noted that if the target operation type is POST or PUT, the target resource content, in addition to including any one or more of the content included in the target resource, must also include newly created or updated resource content. For example, if the target operation type is POST or PUT, and the target resource content includes fingerprint information, then the target resource content must also include newly created or updated fingerprint information.

[0055] S104, if at least one character node includes a first specified class node, then replace the first specified class node with a preset character to obtain the second access address.

[0056] The second access address does not include the first specified class node. The preset character is a pre-defined character used to replace the first specified class node. Optionally, the preset character used to replace purely numeric nodes is represented as <preset character>. For example, the preset character is... <id>For example, the default character is <46265> For example, the default character is <exc>;etc.

[0057] In one embodiment, the first designated class node includes pure numeric nodes, and multiple first designated class nodes correspond to a unique preset character. For example, if the preset character is... <id>If the first access address includes a first specified class node, then the first specified class node will be replaced with... <id>The second access address is obtained. In one embodiment, there is one and only one preset character, and multiple first-specified class nodes with different node contents will be replaced with the same preset character.

[0058] S106, determine the first target index information corresponding to the second access address.

[0059] S108, based on the first target index information, and the mapping relationship between each index information, resource information and resources, determine the first target resource and the first target resource information corresponding to the first target index information.

[0060] Optionally, the first target resource is the resource requested for access by the second device. The first target resource information includes a second access address, the allowed operation types to be performed on the first target resource, and the corresponding execution function. Optionally, the first target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, raw, etc. Optionally, the first target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0061] S110, based on the first target resource information, perform an operation on the first target resource corresponding to the target operation type, and send the execution result to the second device.

[0062] Using the example " / laws / 23 / 34 / temp1 / 123" above, this URL contains 3 purely numeric nodes. Assuming each purely numeric node has N possible values ​​(N is an integer greater than or equal to 1), then the first device would need to store N^3 URLs, which significantly increases the storage pressure on the first device. Furthermore, since embedded devices and other computer devices have relatively less internal storage resources compared to PCs or network servers, this embodiment aims to reduce the storage pressure on the device by consolidating N^3 URLs into one, thereby reducing the occupation of internal storage resources and improving the device's URL retrieval efficiency. It should be understood that for two URLs that differ only in terms of pure numeric nodes, the resources accessed through these two URLs may be different resources on the same page or different resources in the same resource file. Therefore, even if the pure numeric nodes in these two URLs are hidden, the same page or the same resource file can still be accessed through these two URLs. Thus, this embodiment of the application improves the efficiency of URL retrieval by aggregating N^3 URLs into one. After receiving an access request, the device retrieves the corresponding aggregated URL, ensuring that the retrieved resource information corresponds to the same page or the same resource file. Furthermore, during resource processing, the resource content is found based on the URL before it was replaced, thus ensuring the device's accurate response to the access request. In summary, the resource access method of this embodiment does not affect the accuracy of the final execution result.

[0063] By adopting the technical solution of the embodiments of this application, by receiving an access request for a first target resource sent by a second device, the access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this technical solution, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform an operation on the resource according to the resource information, corresponding to the target operation type in the access request, and then send the execution result to the second device, ensuring the accurate response of the first device to the access request.

[0064] In one embodiment, before the first device provides a URL-based resource access method to the outside world, it needs to store data (including the URLs corresponding to each resource, resource information, etc.) on the first device. During data storage, a list of URL resources supported by the first device (i.e., the access addresses exposed by the first device to the outside world) can be pre-written in the first device program. This list of URL resources is stored in the form of an array, and the data structure of a single array member is as follows:

[0065] / * Data structure for storing static URLs * /

[0066] typedef struct{

[0067] std::string url; / * The content pointed to by <path>, style: / laws / 458526 * /

[0068] int method; / * The type of operation performed on the resource corresponding to the URL. For example, method can include at least one of GET, PUT, POST, and DELETE. * /

[0069] int format; / * The format of the resource content carried in the access request. For example, format can include at least one of XML, JSON, and raw (referring to any format, such as plain text, binary, etc.) * /

[0070] UP_INT pFunHandle; / * Stores the pointer to the execution function corresponding to the URL as an integer. The memory address pointed to by the execution function pointer stores the execution function that processes the resource corresponding to the URL. * /

[0071] }URL_STORE_CPP_ST.

[0072] In one embodiment, determining the first target index information corresponding to the second access address (i.e., S106) can be performed as follows: step A1 or step A2:

[0073] Step A1: Based on the indexing algorithm within the pre-created associated container, perform index calculation on the second access address to obtain the first target index information corresponding to the second access address.

[0074] Optionally, the pre-created associative container can be a MAP table. A MAP is a type of associative container where each element consists of a key and a value. Elements within the container are sorted by key, and multiple elements cannot have the same key. Compared to traditional database storage methods, MAP tables offer fast indexing capabilities, allowing for rapid resource location and making them suitable for ultra-large-scale retrieval.

[0075] Optionally, the indexing algorithm can be MD5 (Message-Digest Algorithm 5). The main characteristic of the MD5 algorithm is that the encryption process does not require a key, and the encrypted data cannot be decrypted. When the indexing algorithm is MD5, calculating the MD5 value corresponding to the second access address yields a 32-bit MD5 string for the first target index information corresponding to the second access address.

[0076] Step A2: Determine the second access address as the first target index information.

[0077] Considering the different methods for determining index information, the processing of the data stored in the first device in the early stage, and the methods for determining the corresponding target resources and target resource information based on the index information, may also differ. In the following embodiments, the early data processing methods and the methods for determining target resources and target resource information corresponding to the two index information determination methods will be described in detail. For ease of explanation, in the following embodiments, the early data processing methods corresponding to each index information determination method are described using the example of a list of URL resources supported by the first device pre-stored in the first device program, and the URL resource list being stored in array form. It should be understood that data can also be stored in other forms in the first device, and this application embodiment does not limit this. The data structure of a single array member in the array is as follows:

[0078] / * Data structure for storing static URLs * /

[0079] typedef struct{

[0080] std::string url; / * The content pointed to by <path>, style: / laws / 458526 * /

[0081] int method; / * The type of operation performed on the resource corresponding to the URL. For example, method can include at least one of GET, PUT, POST, and DELETE. * /

[0082] int format; / * The format of the resource content carried in the access request. For example, format can include at least one of XML, JSON, and raw (referring to any format, such as plain text, binary, etc.) * /

[0083] UP_INT pFunHandle; / * Stores the pointer to the execution function corresponding to the URL as an integer. The memory address pointed to by the execution function pointer stores the execution function that processes the resource corresponding to the URL. * /

[0084] }URL_STORE_CPP_ST.

[0085] In one embodiment, the index information is determined by performing an index calculation on the second access address based on the index algorithm within a pre-created associated container to obtain the first target index information corresponding to the second access address (i.e., step A1). The data stored in the first device (such as the array members within an array) can then be processed as follows: steps B11-B14.

[0086] Step B11: Obtain multiple resources stored in the first device, and the first storage address corresponding to each resource.

[0087] Wherein, for the same resource, the first storage address and the first access address are the same. For example, if the first device program pre-stores a list of URL resources supported by the first device, step B11 can be executed as follows: obtaining the data structure of each array member in the array, and obtaining the content pointed to by the <path> from each data structure. For example, the array includes several array members; the data structures of four array members are obtained, and the content pointed to by the <path> obtained from each data structure is " / laws / tmp1 / 45", " / laws / tmp1 / 3536", " / laws / tmp2 / 123", and " / laws / tmpN / 23".

[0088] Step B12: For each resource, perform a conversion operation on the first specified class node in the first storage address to obtain the second storage address. Calculate the index information corresponding to the second storage address according to the preset indexing algorithm.

[0089] In this embodiment, the second storage address does not include the first specified class node. For the same resource, the second storage address and the second access address are the same. Optionally, the conversion operation on the first specified class node in the first storage address can be to replace the first specified class node in the first storage address with a preset character. The preset indexing algorithm can be the MD5 algorithm. It should be understood that the preset character in this embodiment is the same as the preset character in S104, and the preset indexing algorithm in this embodiment is the same as the indexing algorithm used to calculate the index of the second access address.

[0090] Optionally, if the first specified class node is a pure numeric node, and the conversion operation for the first specified class node is to replace the first specified class node with a preset character, after obtaining the content pointed to by <path> from the data structure of each array member, the pure numeric nodes can be replaced with the preset character, and the modified URL can overwrite the content pointed to by the original <path> and be saved to the data structure.

[0091] Optionally, in step B11, if the process involves obtaining the data structure of each array member in the array and retrieving the content pointed to by the <path> from each data structure, and if the conversion operation on the first specified class node is to replace the first specified class node with a preset character, then the preset character is assumed to be... <id>Following the example in step B11, for each resource, a conversion operation is performed on the first specified class node in the first storage address to obtain the second storage address as " / laws / tmp1 / <id>”、" / laws / tmp1 / <id>”、" / laws / tmp2 / <id>"and " / laws / tmpN / <id>Assuming the default indexing algorithm is MD5, calculating the MD5 value for the second storage address yields a 32-bit MD5 string representing the index information for that address. Following the example above, this can be used to calculate " / laws / tmp1 / <id>”、" / laws / tmp1 / <id>”、" / laws / tmp2 / <id>"and " / laws / tmpN / <id>"The corresponding MD5 values, where " / laws / tmp1 / <id>"and " / laws / tmp1 / <id>"corresponds to the same MD5 string "B594670F13CC50FD7F8CA81928FF907A", " / laws / tmp2 / <id>The corresponding MD5 string is "2B4C746E9946FAF05FA4DD89081472CA", which is " / laws / tmpN / <id>The corresponding MD5 string is "B594670F13****************8FF907A". The specific content of "****************" is related to the value of N, and different N correspond to different MD5 strings.

[0092] Step B13: Establish the first mapping relationship between each index information and its corresponding index pointer, establish the pointer pointing relationship between each index pointer and the resource information corresponding to each resource, and establish the second mapping relationship between each resource information and its corresponding resource.

[0093] The resource information includes a second storage address, the types of operations allowed to be performed on the resource, and the execution function corresponding to each operation type. Optionally, the resource information may also include the format of the resource content carried in the access request, such as XML, JSON, or raw. Optionally, the resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0094] Assuming the second storage address is " / laws / tmp2 / <id>The corresponding function pointer is "pFunHandle_2", and the second storage address is " / laws / tmp1 / ". <id>The corresponding function pointer is "pFunHandle_1", and the second storage address is " / laws / tmpN / ". <id>The corresponding execution function pointer is "pFunHandle_n". For example, when the allowed operation types for the resource are GET, PUT, POST, and DELETE, and the supported resource content format for the access request is XML, JSON, and raw, establishing the first mapping relationship between each index information and its corresponding index pointer may include: establishing a mapping relationship between index information "B594670F13CC50FD7F8CA81928FF907A" and index pointer "1", establishing a mapping relationship between index information "2B4C746E9946FAF05FA4DD89081472CA" and index pointer "2", and establishing a mapping relationship between index information "B594670F13****************8FF907A" and index pointer "N". Establishing the pointer pointing relationship between each index pointer and the corresponding resource information may include: establishing a pointer pointing relationship between index pointer "1" and resource information 1, where resource information 1 includes the second storage address " / laws / tmp1 / ". <id>The system allows the following operation types on the resource: GET, PUT, POST, and DELETE; supports the following resource content formats carried in the access request: XML, JSON, and raw; and includes the execution function pointer pFunHandle_1. It also establishes a pointer relationship between index pointer 2 and resource information 2, where resource information 2 includes the second storage address " / laws / tmp2 / ". <id>The system allows the following operation types to be performed on the resource: GET, PUT, POST, and DELETE; supports the following resource content formats carried in the access request: XML, JSON, and raw; and includes the execution function pointer "pFunHandle_2"; it establishes a pointer relationship between the index pointer "N" and the resource information N, where the resource information N includes the second storage address " / laws / tmpN / ". <id>The system allows the following operation types to be performed on the resource: GET, PUT, POST, and DELETE; supports the following resource content formats carried in the access request: XML, JSON, and raw; and supports the execution function pointer: pFunHandle_n. Establishing a second mapping relationship between each resource information and its corresponding resource may include: establishing a second mapping relationship between resource information "1" and resource "Personnel Basic Information"; establishing a second mapping relationship between resource information "2" and resource "Attendance Sheet"; and establishing a second mapping relationship between resource information "N" and resource "Equipment Working Time".

[0095] Step B14: Store the first mapping relationship, the second mapping relationship, and the pointer pointing relationship in the first device.

[0096] In this embodiment, by performing a conversion operation on the first designated class node in the first storage address corresponding to each resource of the first device, a second storage address is obtained. This achieves the effect of masking the differences in the first designated class nodes in the first storage address, enabling the integration of the first storage address. Then, according to a preset indexing algorithm, the integrated storage address (i.e., the second storage address) is calculated to obtain the index information corresponding to the second storage address. A first mapping relationship is established between each index information and its corresponding index pointer, a pointer pointing relationship is established between each index pointer and the resource information corresponding to each resource, and a second mapping relationship is established between each resource information and its corresponding resource. The first mapping relationship, the second mapping relationship, and the pointer pointing relationship are then stored in the first device. Compared with the existing solution, the amount of information stored in the first device is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure of the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests.

[0097] In one embodiment, the first mapping relationship between each index information and the corresponding index pointer can be stored in a pre-created association container, and the second mapping relationship between each resource information and the corresponding resource, and the pointer pointing relationship between each index pointer and the resource information corresponding to each resource can be stored in the memory of the first device.

[0098] Optionally, the pre-created associative container can be a MAP table. A MAP is a type of associative container where each element consists of a key and a value. Elements within the container are sorted by key, and multiple elements cannot have the same key. Compared to traditional database storage methods, MAP tables offer fast indexing capabilities, allowing for rapid resource location and making them suitable for ultra-large-scale retrieval. When the pre-created associative container is a MAP table, the key in the table serves as index information, and the value in the table serves as an index pointer.

[0099] In this embodiment, based on the first target index information and the mapping relationships between each index information, resource information, and resources, the first target resource and the first target resource information corresponding to the first target index information are determined (i.e., S108). This can be executed as follows: obtaining the first mapping relationship from the associated container to match the first target index information and the first mapping relationship; obtaining the pointer pointing relationship from the memory of the first device to match the target index pointer and the pointer pointing relationship; and obtaining the second mapping relationship from the memory of the first device to match the first target resource information and the second mapping relationship.

[0100] In this embodiment, the first mapping relationship between each index information and the corresponding index pointer is stored in a pre-created association container, such as in a pre-created MAP table. Since the MAP table has the ability to quickly index, it can quickly respond to the access request initiated by the second device, retrieve the index pointer corresponding to the index information, and thus retrieve the corresponding resource information based on the index pointer.

[0101] At this point, the data storage of the first device is complete. Afterwards, the first device can perform corresponding resource access operations on the first target resource (including performing operations on the first target resource corresponding to the target operation type carried in the access request) based on the access request sent by the second device, and send the execution result to the second device. A detailed explanation follows.

[0102] In one embodiment, the index information is determined by performing an index calculation on the second access address according to the index algorithm in the pre-created associated container to obtain the first target index information corresponding to the second access address (i.e., step A1). The mapping relationship between each index information, resource information and resource includes: the first mapping relationship between each index information and index pointer, the pointer pointing relationship between index pointer and resource information, and the second mapping relationship between resource information and resource.

[0103] In this embodiment, based on the first target index information and the mapping relationships between each index information, resource information, and resources, the first target resource and the first target resource information corresponding to the first target index information are determined (i.e., S108), which can be executed as follows: steps C11-C13:

[0104] Step C11: Match the first target index information with the first mapping relationship to obtain the target index pointer corresponding to the first target index information.

[0105] Step C12: Match the target index pointer with the pointer pointing relationship to obtain the first target resource information corresponding to the target index pointer.

[0106] The first target resource information includes a second access address, the allowed operation types to be performed on the first target resource, and the corresponding execution function for each operation type. Optionally, the first target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, or raw. Optionally, the first target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0107] Step C13: Match the first target resource information with the second mapping relationship to obtain the first target resource corresponding to the first target resource information.

[0108] In this embodiment, the first target resource and the first target resource information corresponding to the first target index information are determined by a step-by-step matching method, which can ensure the matching speed and accuracy, thereby ensuring the response speed and accuracy of the access request.

[0109] In one embodiment, matching the first target index information with the first mapping relationship (i.e., step C11) can be performed as follows: obtaining a pre-created association container, which is used to store the first mapping relationship, obtaining the first mapping relationship from the association container, thereby matching the first target index information with the first mapping relationship in the association container.

[0110] Optionally, the association container can be a MAP table. For example, if the pre-created association container is a MAP table, where the keys are index information and the values ​​are index pointers, matching the first target index information with the first mapping relationship in the association container is equivalent to matching the first target index information with each key in the association container. Specifically, if the association container contains a key identical to the first target index information, it can be determined that the first target index information matches the association container, and the value corresponding to the key identical to the first target index information is the target index pointer corresponding to the first target index information. If the association container does not contain a key identical to the first target index information, it can be determined that the first target index information does not match the association container. In this case, an error message can be sent to the second device to indicate that the resource requested by the second device is not in the first device.

[0111] In this embodiment, by obtaining the pre-created associated container, since the MAP table has the ability to quickly index, it can quickly respond to the access request initiated by the second device, match the first target index information with the first mapping relationship in the associated container, and thus quickly retrieve the index pointer corresponding to the index information.

[0112] In one embodiment, the index information is determined by identifying the second access address as the first target index information (i.e., step A2), and the data stored in the first device (such as each array member in an array) can be processed as follows: steps B21-B24.

[0113] Step B21: Obtain multiple resources stored in the first device, and the first storage address corresponding to each resource.

[0114] Wherein, for the same resource, the first storage address and the first access address are the same. For example, if the first device program pre-stores a list of URL resources supported by the first device, step B21 can be executed as follows: obtaining the data structure of each array member in the array, and obtaining the content pointed to by the <path> from each data structure. For example, the array includes several array members; the data structures of four array members are obtained, and the content pointed to by the <path> obtained from each data structure is " / laws / tmp1 / 45", " / laws / tmp1 / 3536", " / laws / tmp2 / 123", and " / laws / tmpN / 23".

[0115] Step B22: For each resource, perform a transformation operation on the first specified class node in the first storage address to obtain the second storage address. The second storage address is then used as the index information.

[0116] The second storage address does not include the first designated class node. For the same resource, the second storage address and the second access address are the same. Optionally, the conversion operation on the first designated class node in the first storage address can be to replace the first designated class node in the first storage address with a preset character. It should be understood that the preset character in this embodiment is the same as the preset character in S104.

[0117] Optionally, if the first specified class node is a pure numeric node, and the conversion operation for the first specified class node is to replace the first specified class node with a preset character, after obtaining the content pointed to by <path> from the data structure of each array member, the pure numeric nodes can be replaced with the preset character, and the modified URL can overwrite the content pointed to by the original <path> and be saved to the data structure.

[0118] Optionally, in step B21, if the process involves obtaining the data structure of each array member in the array and retrieving the content pointed to by the <path> from each data structure, and if the conversion operation on the first specified class node is to replace the first specified class node with a preset character, then the preset character is assumed to be... <id>Following the example in step B21, for each resource, a conversion operation is performed on the first specified class node in the first storage address to obtain the second storage address as " / laws / tmp1 / <id>”、" / laws / tmp1 / <id>”、" / laws / tmp2 / <id>"and " / laws / tmpN / <id>".

[0119] Step B23: Establish a third mapping relationship between each index information and the corresponding resource information, and establish a fourth mapping relationship between each resource information and the corresponding resource.

[0120] Optionally, the resource information includes a second storage address, the types of operations allowed to be performed on the resource, and the execution function corresponding to the operation type. Optionally, the resource information may also include the format of the resource content carried in the access request, such as XML, JSON, raw, etc. Optionally, the resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0121] Assuming the second storage address is " / laws / tmp2 / <id>The corresponding function pointer is "pFunHandle_2", and the second storage address is " / laws / tmp1 / ". <id>The corresponding function pointer is "pFunHandle_1", and the second storage address is " / laws / tmpN / ". <id>The corresponding execution function pointer is "pFunHandle_n". For example, when the allowed operation types for resources are GET, PUT, POST, and DELETE, and the supported resource content formats carried in the access request are XML, JSON, and raw, establishing a third mapping relationship between each index and the corresponding resource information may include: establishing a second storage address " / laws / tmp2 / <id>The third mapping relationship between "and resource information 1", where resource information 1 includes the second storage address " / laws / tmp2 / <id>Allowed operation types for the resource: GET, PUT, POST, and DELETE; supported resource content formats in access requests: XML, JSON, and raw; and execution function pointer: pFunHandle_2; establishes a second storage address: / laws / tmp1 / <id>The third mapping relationship between "and resource information 2", where resource information 2 includes the second storage address " / laws / tmp1 / <id>Allowed operation types for the resource: GET, PUT, POST, and DELETE; supported resource content formats in access requests: XML, JSON, and raw; and execution function pointer: pFunHandle_1; establish a second storage address: / laws / tmpN / <id>The third mapping relationship between "and resource information N, where resource information N includes the second storage address " / laws / tmpN / " <id>The system allows the following operation types to be performed on the resource: GET, PUT, POST, and DELETE; supports the following resource content formats carried in the access request: XML, JSON, and raw; and supports the execution function pointer: pFunHandle_n. Establishing a fourth mapping relationship between each resource information and its corresponding resource may include: establishing a fourth mapping relationship between resource information "1" and resource "Personnel Basic Information"; establishing a fourth mapping relationship between resource information "2" and resource "Attendance Sheet"; and establishing a fourth mapping relationship between resource information "N" and resource "Equipment Working Time".

[0122] Step B24: Store the third and fourth mapping relationships in the first device.

[0123] In this embodiment, by performing a conversion operation on the first designated class node in the first storage address corresponding to each resource of the first device, a second storage address is obtained. This achieves the effect of masking the differences in the first designated class nodes in the first storage address, enabling the integration of the first storage address. This establishes a third mapping relationship between each index information and the resource information corresponding to each resource, as well as a fourth mapping relationship between each resource information and the corresponding resource. The third and fourth mapping relationships are then stored in the first device. Compared with existing solutions, the amount of information stored in the first device is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure of the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests.

[0124] At this point, the data storage of the first device is complete. Afterwards, the first device can perform corresponding resource access operations on the first target resource (including performing operations on the first target resource corresponding to the target operation type carried in the access request) based on the access request sent by the second device, and send the execution result to the second device. A detailed explanation follows.

[0125] In one embodiment, the index information is determined by determining the second access address as the first target index information (i.e., step A2). The mapping relationship between each index information, resource information, and resource includes: a third mapping relationship between each index information and resource information, and a fourth mapping relationship between resource information and resource.

[0126] In this embodiment, based on the first target index information and the mapping relationships between each index information, resource information, and resources, the first target resource and the first target resource information corresponding to the first target index information are determined (i.e., S108), which can be executed as follows: steps C21-C22:

[0127] Step C21: Match the first target index information with the third mapping relationship to obtain the first target resource information corresponding to the first target index information.

[0128] The first target resource information includes a second access address, the allowed operation types to be performed on the target resource, and the corresponding execution function for each operation type. Optionally, the first target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, or raw. Optionally, the first target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0129] Step C22: Match the first target resource information with the fourth mapping relationship to obtain the first target resource corresponding to the first target resource information.

[0130] In this embodiment, the first target resource and the first target resource information corresponding to the first target index information are determined by a step-by-step matching method, which can ensure the matching speed and accuracy, thereby ensuring the response speed and accuracy of the access request.

[0131] In one embodiment, based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device (i.e., S110). This can be performed as follows: steps D1-D3:

[0132] Step D1: Based on the first mapping relationship within the associated container and the pointer pointing relationship in the memory of the first device, determine whether the operation types included in the first target resource information include the target operation type; if the operation types included in the first target resource information include the target operation type, then proceed to step D2; if the operation types included in the first target resource information do not include the target operation type, then proceed to step D3.

[0133] Optionally, step D1 can be performed as follows: First, obtain the first mapping relationship between each index information and the corresponding index pointer from the associated container, match the first target index information corresponding to the determined second access address with the first mapping relationship, and obtain the target index pointer corresponding to the first target index information; Second, obtain the pointer pointing relationship between the index pointer and resource information from the memory of the first device, match the target index pointer with the pointer pointing relationship, and obtain the first target resource information corresponding to the target index pointer; Finally, determine whether the operation type included in the obtained first target resource information includes the target operation type.

[0134] Step D2: Perform an operation corresponding to the target operation type on the first target resource, and send the execution result to the second device.

[0135] Step D3: Send an error message to the second device.

[0136] For example, if the operation type included in the first target resource information is at least one of GET, PUT, and POST, then if the target operation type is GET, it can be determined that the operation type included in the first target resource information includes the target operation type; if the target operation type is DELETE, it can be determined that the operation type included in the first target resource information does not include the target operation type.

[0137] Optionally, if the target operation type is GET, then the operation corresponding to the target operation type is performed on the first target resource, that is, the first target resource is obtained, and the execution result sent to the second device is the first target resource; if the target operation type is PUT, POST or DELETE, then the operation corresponding to the target operation type is performed on the first target resource, that is, the first target resource is updated, created or deleted, and the execution result sent to the second device is either "update, create or delete successfully" or "update, create or delete failed".

[0138] In this embodiment, by first determining whether the operation type included in the first target resource information includes the target operation type before performing the operation corresponding to the target operation type on the first target resource, it is possible to avoid processing access requests for operation types not included in the first target resource information and to ensure that the second device is aware of this abnormal situation in a timely manner.

[0139] In one embodiment, the operation information for the first target resource includes the target operation type and the target resource content. Performing an operation corresponding to the target operation type on the first target resource can be performed as follows: based on the first access address, locate the target resource content within the first target resource, and perform the operation corresponding to the target operation type on the target resource content.

[0140] Optionally, the first access address is cached by the first device after receiving an access request for the first target resource from the second device. Optionally, the execution function corresponding to the target operation type can be used to perform operations on the target resource content corresponding to the target operation type.

[0141] Optionally, the target resource content can be all the content in the first target resource. For example, if the first target resource is basic personnel information, then the target resource content can be all the content in the basic personnel information, such as age information, job information, fingerprint information, facial information, etc. As another example, if the first target resource is an attendance sheet, then the target resource content can be all the content in the attendance sheet, such as start time, end time, number of days with perfect attendance, etc.

[0142] Optionally, the target resource content may be a portion of the content in the first target resource. For example, if the first target resource is basic personnel information and the target resource content is fingerprint information, then the target resource content could be the fingerprint information within the basic personnel information. As another example, if the first target resource is an attendance sheet and the target resource content is the number of days with perfect attendance, then the target resource content could be the number of days with perfect attendance from the attendance sheet.

[0143] For example, if the first target resource is Zhang San's basic personnel information, which includes age information, job information, fingerprint information and facial information, the target operation type is DELETE, and the target resource content includes fingerprint information, Zhang San's basic personnel information can be found according to the first access address, and the target resource content is Zhang San's fingerprint information. Performing an operation corresponding to the target operation type on the target resource content is to delete Zhang San's fingerprint information.

[0144] In this embodiment, the target resource content in the first target resource can be accurately located through the first access address (i.e., the address before it was replaced), thereby enabling accurate operation on the first target resource.

[0145] In one embodiment, the access request may further include a second specified class node, which includes operation identification information for this access operation.

[0146] Optionally, the second designated class node can be a pure letter node or a mixed class node. The second designated class node is randomly generated by the second device.

[0147] In this embodiment, after sending the execution result to the second device (i.e., S110), feedback information can be sent to the second device. The feedback information is used to indicate that the first device has successfully processed the access request. The feedback information includes operation identification information. By sending the feedback information containing the operation identification information to the second device, the first device can ensure that the second device accurately matches the feedback information with the previously sent access request, thus accurately recording the resource access status.

[0148] To facilitate understanding of the resource access method provided in this application embodiment, the following will describe the resource access method provided in this application embodiment through the interaction between the second device and the first device. In this embodiment, the access request can be a RESTful HTTP request. The first device can extract the first access address from the HTTP request sent by the second device. If the first specified class node is a pure numeric node and the first access address includes the first specified class node, the first specified class node can be replaced with a preset character to obtain the second access address. The second access address is then indexed to obtain the corresponding index information. Based on the index information, a step-by-step matching is performed to determine the corresponding first target resource. The processing result of the first target resource is then returned to the second device. For details, please refer to [link to relevant documentation]. Figure 2 .

[0149] Figure 2 This is a swimlane diagram of a resource access method according to an embodiment of this application, such as... Figure 2 As shown, resource access methods may include:

[0150] S2.1, the second device sends an access request to the first device for the first target resource. The access request includes the first access address corresponding to the first target resource and the first operation information of the target resource.

[0151] The first access address includes at least one character node, and the operation information includes the target operation type and the target resource content. The target operation type and target resource content have been described in detail in the above embodiments and will not be repeated here.

[0152] Optionally, in the case of an access request being a RESTful HTTP request, operation information may be carried in the request message, and the first device may extract the first access address from the HTTP request sent by the second device.

[0153] S2.2, the first device receives the access request and extracts the first access address.

[0154] For example, if the HTTP request sent by the second device is "https: / / 192.168.0.1:80 / laws / tmp2 / 123?format=json", and the operation information carried in the request message includes GET, then the first device can extract the first access address " / laws / tmp2 / 123" from it and determine that the target operation type is GET. Where the request message only carries the GET operation type and does not carry the target resource content, it can be considered that the purpose of this access request is to obtain all resource content in the first target resource.

[0155] S2.3, if the first device includes a first specified class node in at least one character node in the first access address, it replaces the first specified class node with a preset character to obtain the second access address.

[0156] The second access address does not include the first specified class node. Optionally, the first specified class node is a pure numeric node. The preset character is a pre-defined character used to replace the first specified class node. Optionally, the preset character used to replace the pure numeric node is represented as <preset character>.

[0157] Following the example in S2.2, if the first specified class node is a pure numeric node, the default character is... <id>Then, the first specified class node in the first access address is replaced with a preset character, resulting in the second access address " / laws / tmp2 / ". <id>".

[0158] S2.4, the first device performs index calculation on the second access address according to the preset index algorithm to obtain the first target index information corresponding to the second access address.

[0159] Optionally, the preset indexing algorithm can be the MD5 algorithm, thereby calculating the MD5 value corresponding to the second access address, and obtaining the first target index information corresponding to the second access address, which can be a 32-bit MD5 string.

[0160] Following the examples in S2.2-S2.3, if the default indexing algorithm is MD5, then for the second access address " / laws / tmp2 / <id>"After performing index calculation, the first target index information corresponding to the second access address is "2B4C746E9946FAF05FA4DD89081472CA".

[0161] S2.5, the first device matches the first target index information with the pre-established first mapping relationship to obtain the target index pointer corresponding to the first target index information.

[0162] Optionally, a first mapping relationship between each index information and index pointer can be pre-established. The first mapping relationship can be stored in a pre-created association container. Optionally, matching the first target index information with the pre-established first mapping relationship can be performed as follows: obtaining the pre-created association container, which is used to store the first mapping relationship; retrieving the first mapping relationship from the association container; and matching the first target index information with the first mapping relationship in the association container.

[0163] Optionally, the pre-created association container can be a MAP table. When the pre-created association container is a MAP table, the key in the table is index information, and the value in the table is an index pointer. For example, the pre-created MAP table stores the mapping relationship between index information "B594670F13CC50FD7F8CA81928FF907A" and index pointer "1", the mapping relationship between index information "2B4C746E9946FAF05FA4DD89081472CA" and index pointer "2", the mapping relationship between index information "B594670F13****************8FF907A" and index pointer "N", and so on. Following the examples in S2.2-S2.4, matching the first target index information "2B4C746E9946FAF05FA4DD89081472CA" with the MAP table yields the target index pointer "2" corresponding to the first target index information.

[0164] S2.6, the first device matches the target index pointer with the pre-established pointer pointing relationship to obtain the first target resource information corresponding to the target index pointer.

[0165] The first target resource information includes a second access address, the allowed operation types to be performed on the first target resource, and the corresponding execution function for each operation type. Optionally, the first target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, or raw. Optionally, the first target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type. Optionally, a pointer relationship between the index pointer and the resource information can be pre-established. The pointer relationship can be stored in the memory of the first device.

[0166] For example, a pointer relationship between index pointer "1" and resource information 1 can be established in advance, where resource information 1 includes the second access address " / laws / tmp1 / ". <id>The system allows the following operation types to be performed on the first target resource: GET, PUT, POST, and DELETE; supports resource content formats carried in the access request: XML, JSON, and raw; and includes an execution function pointer: pFunHandle_1. It also allows pre-establishing a pointer relationship between an index pointer "2" and resource information 2, where resource information 2 includes the second access address " / laws / tmp2 / ". <id>The system allows the following operation types to be performed on the first target resource: GET, PUT, POST, and DELETE; supports resource content formats carried in the access request: XML, JSON, and raw; and includes an execution function pointer: pFunHandle_2. It also allows pre-establishing a pointer relationship between an index pointer "N" and resource information N, where resource information N includes the second access address " / laws / tmpN / ". <id>It allows the following operation types to be performed on the first target resource: "GET, PUT, POST, and DELETE"; supports the following resource content formats carried in the access request: "XML, JSON, and raw"; and executes the function pointer "pFunHandle_n"; etc.

[0167] Following the examples in S2.2-S2.5, by matching the target index pointer "2" with the pre-established pointer pointing relationship, the first target resource information "Resource Information 2" corresponding to the target index pointer "2" can be obtained.

[0168] S2.7, the first device matches the first target resource information with the pre-established second mapping relationship to obtain the first target resource corresponding to the first target resource information.

[0169] Optionally, a second mapping relationship between resource information and resources can be established in advance. For example, a second mapping relationship between resource information "1" and resource "attendance sheet" can be established in advance, a second mapping relationship between resource information "2" and resource "personnel basic information" can be established in advance, and so on.

[0170] Following the examples in S2.2-S2.6, by matching the first target resource information "Resource Information 2" with the pre-established second mapping relationship, the first target resource "Personnel Basic Information" corresponding to the first target resource information can be obtained.

[0171] S2.8, if the first device determines that the operation type included in the first target resource information includes the target operation type, the first device performs an operation on the first target resource corresponding to the target operation type carried in the access request.

[0172] Optionally, performing an operation corresponding to the target operation type on the first target resource can be as follows: based on the first access address, locate the target resource content in the first target resource, and perform an operation corresponding to the target operation type on the target resource content.

[0173] Optionally, if the first device determines that the target operation type is not included in the operation types included in the first target resource information, it sends an error message to the second device. In this embodiment, by sending an error message to the second device, the second device can be promptly informed that the current access request cannot be processed by the first device, thus avoiding a long waiting period after the second device sends the access request.

[0174] Following the examples in S2.2-S2.7, assuming that the first access address " / laws / tmp2 / 123" points to Zhang San's basic personnel information, then the target resource content in the first target resource found according to the first access address is Zhang San's basic personnel information. Performing an operation corresponding to the target operation type on the first target resource is to obtain all the resource content in Zhang San's basic personnel information. Sending the execution result to the second device is to send all the resource content in Zhang San's basic personnel information to the second device.

[0175] S2.9, the first device sends the execution result to the second device.

[0176] Optionally, the access request may also include a second specified class node, which includes operation identification information for this access operation. After the first device sends the execution result to the second device, it may send feedback information to the second device. The feedback information is used to indicate that the first device has successfully processed the access request. The feedback information includes operation identification information.

[0177] The specific processes of S2.1-S2.9 described above have been explained in detail in the above embodiments and will not be repeated here.

[0178] The technical solution of this application embodiment involves receiving an access request for a first target resource sent by a second device. The access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. Then, according to a preset indexing algorithm, the second access address is indexed to obtain the first target index information corresponding to the second access address. Based on the first target index information, as well as the mapping relationships between various index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this technical solution, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform an operation on the resource according to the resource information, corresponding to the target operation type in the access request, and then send the execution result to the second device, ensuring the accurate response of the first device to the access request.

[0179] Figure 3 This is a swimlane diagram of a resource access method according to another embodiment of this application. In this embodiment, the access request can be a RESTful HTTP request. The first device can extract a first access address from the HTTP request sent by the second device. If the first specified class node is a pure numeric node and the first access address includes the first specified class node, the first specified class node can be replaced with preset characters to obtain a second access address. The second access address is determined as the first target index information, thereby matching the corresponding first target resource based on the first target index information, and then returning the processing result of the first target resource to the second device. Figure 3 As shown, resource access methods may include:

[0180] S3.1, the second device sends an access request to the first device for the first target resource. The access request includes the first access address corresponding to the first target resource and operation information for the first target resource.

[0181] S3.2, the first device receives the access request and extracts the first access address.

[0182] Following the example in S2.2, the first access address extracted is " / laws / tmp2 / 123".

[0183] S3.3, if the first device includes a first specified class node in at least one character node in the first access address, it replaces the first specified class node with a preset character to obtain the second access address.

[0184] Following the example in S2.3, the second access address obtained is " / laws / tmp2 / <id>".

[0185] S3.4, the first device determines the second access address as the first target index information.

[0186] Following the example in S3.3, the first target index information obtained is " / laws / tmp2 / <id>".

[0187] S3.5, the first device matches the first target index information with the pre-established third mapping relationship to obtain the first target resource information corresponding to the first target index information.

[0188] Optionally, a third mapping relationship can be pre-established between each index information and the corresponding resource information. The first target resource information includes a second access address, the allowed operation types for the first target resource, and the execution function corresponding to the operation type. Optionally, the first target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, raw, etc. Optionally, the first target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0189] For example, a second access address " / laws / tmp1 / " can be pre-established. <id>The third mapping relationship between "and resource information 1, where resource information 1 includes the second access address " / laws / tmp1 / " <id>The system allows the following operation types to be performed on the first target resource: GET, PUT, POST, and DELETE; supports resource content formats carried in the access request: XML, JSON, and raw; and allows the execution function pointer: pFunHandle_1; a second access address, " / laws / tmp2 / ", can be pre-established. <id>The third mapping relationship between "and resource information 2", where resource information 2 includes the second access address " / laws / tmp2 / " <id>The system allows the following operation types to be performed on the first target resource: GET, PUT, POST, and DELETE; supports resource content formats carried in the access request: XML, JSON, and raw; and allows the execution function pointer: pFunHandle_2; it can also pre-establish a second access address: / laws / tmpN / <id>The third mapping relationship between "" and resource information N, where resource information N includes the second access address " / laws / tmpN / <id>It allows the following operation types to be performed on the first target resource: "GET, PUT, POST, and DELETE"; supports the following resource content formats carried in the access request: "XML, JSON, and raw"; and executes the function pointer "pFunHandle_n"; etc.

[0190] Following the example in S3.4, the second access address " / laws / tmp2 / " <id>By matching this with the pre-established third mapping relationship, the second access address " / laws / tmp2 / " can be obtained. <id>"Corresponding first target resource information" Resource Information 2.

[0191] S3.6, the first device matches the first target resource information with the pre-established fourth mapping relationship to obtain the first target resource corresponding to the first target resource information.

[0192] Optionally, a fourth mapping relationship between resource information and resources can be pre-established. For example, a fourth mapping relationship between resource information "1" and resource "basic personnel information" can be pre-established, a fourth mapping relationship between resource information "2" and resource "attendance sheet" can be pre-established, and so on.

[0193] Following the example in S3.5, by matching the first target resource information "Resource Information 2" with the pre-established fourth mapping relationship, the first target resource "Attendance Sheet" corresponding to the first target resource information can be obtained.

[0194] S3.7, if the first device determines that the operation type included in the first target resource information includes the target operation type, the first device performs an operation on the first target resource corresponding to the target operation type carried in the access request.

[0195] Optionally, performing an operation corresponding to the target operation type on the first target resource can be as follows: based on the first access address, locate the target resource content in the first target resource, and perform an operation corresponding to the target operation type on the target resource content.

[0196] Optionally, if the first device determines that the target operation type is not included in the operation types included in the first target resource information, it sends an error message to the second device. In this embodiment, by sending an error message to the second device, the second device can be promptly informed that the current access request cannot be processed by the first device, thus avoiding a long waiting period after the second device sends the access request.

[0197] S3.8, the first device sends the execution result to the second device.

[0198] Optionally, the access request may also include a second specified class node, which includes operation identification information for this access operation. After the first device sends the execution result to the second device, it may send feedback information to the second device. The feedback information is used to indicate that the first device has successfully processed the access request. The feedback information includes operation identification information.

[0199] The specific processes of S3.1-S3.8 described above have been explained in detail in the above embodiments and will not be repeated here.

[0200] By adopting the technical solution of the embodiments of this application, by receiving an access request for a first target resource sent by a second device, the access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this technical solution, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform an operation on the resource according to the resource information, corresponding to the target operation type in the access request, and then send the execution result to the second device, ensuring the accurate response of the first device to the access request.

[0201] Figure 4 This is a schematic flowchart illustrating a resource access method according to another embodiment of this application. In this embodiment, the resource access method is applied to an access control device. Figure 4 As shown, the method includes:

[0202] S402: Receives a resource acquisition link sent by the cloud server. The resource acquisition link includes the resource identifier information of the second target resource to be acquired.

[0203] Optionally, the cloud server may periodically or manually trigger a resource acquisition link to the access control device. The resource acquisition link can be represented as a URL, for example, " / ISAPI / AccessControl / UserInfo / asyncImportDatasTasks / d62f36e1103414 / detailStatus".

[0204] For example, the second target resource may be a master attendance sheet or a set of personnel information stored on a cloud server. Optionally, the resource identification information may be information that identifies the resource to be acquired. For example, when the second target resource is a master attendance sheet, the resource identification information may be the attendance date, personnel number, or other information in the master attendance sheet, corresponding to the resource to be acquired being a resource under a certain attendance date(s) or a resource under a certain personnel number(s); when the second target resource is the set of personnel information, the resource identification information may be the personnel number in the set of personnel information, corresponding to the resource to be acquired being a resource under a certain personnel number(s). Optionally, the second target resource may be the same as the first target resource.

[0205] S404, Determine the resource storage address corresponding to the second target resource based on the resource acquisition link.

[0206] Optionally, a fifth mapping relationship between each resource acquisition link and the corresponding resource storage address can be pre-established in the access control device. S404 can be executed as follows: match the resource acquisition link with the pre-established fifth mapping relationship to obtain the resource storage address corresponding to the second target resource.

[0207] Optionally, in addition to resource identification information, the resource acquisition link also includes a second specified class node, which includes operation identification information for this acquisition operation. The second specified class node can be a pure letter node or a mixed class node. For example, if the second specified class node is a mixed class node, and the resource acquisition link is " / ISAPI / AccessControl / UserInfo / asyncImportDatasTasks / d62f36e1103414 / detailStatus", then the second specified class node in this resource acquisition link is "d62f36e1103414".

[0208] In resource distribution scenarios, a cloud server can send resource retrieval links to the same access control device multiple times. In large-scale distribution scenarios, the cloud server can send resource retrieval links to multiple access control devices that have established network connections with the cloud server. To ensure that the cloud server accurately records each retrieval operation performed by each access control device, the operation identifier information for each retrieval operation should be different, that is, the node content of the second specified class node should be different. Optionally, the node content of the second specified class node is a random string, i.e., the operation identifier information is a random string. Assuming that both the current retrieval operation and the next retrieval operation are used to retrieve the master attendance sheet, then the content of the random string will be different for the two retrieval operations on the same master attendance sheet. However, in this embodiment, the content of other character nodes in the resource acquisition links for multiple acquisition operations of the same resource is completely identical. Based on this, the second specified class node in the resource acquisition link in the pre-stored fifth mapping relationship can be replaced with a preset character to avoid storing too many resource acquisition links and the fifth mapping relationship between the resource acquisition link and the resource storage address corresponding to the resource in the access control device. This saves the storage resources of the access control device, reduces the storage pressure of the access control device, and helps to improve the retrieval efficiency of the access control device for resource acquisition links, thereby improving the response speed of the access control device for resource acquisition links.

[0209] Optionally, the preset character used to replace pure letter nodes or mixed-type nodes is represented as [preset character]. For example, the preset character is [ID]; another example is

[2666] ; another example is [dag]; and so on. For example, when the preset character is [ID], for the resource acquisition link " / ISAPI / AccessControl / UserInfo / asyncImportDatasTasks / d62f36e1103414 / detailStatus", the fifth mapping relationship that matches it stores the resource storage address corresponding to the resource acquisition link " / IS API / AccessControl / UserInfo / asyncImportDatasTasks / [ID] / detailStatus" and the second target resource.

[0210] S406: Based on the resource storage address, retrieve the second target resource corresponding to the resource identification information from the cloud server.

[0211] S408, determine the second target resource information and the second target index information corresponding to the second target resource.

[0212] Optionally, the second target resource information includes a second access address, the types of operations allowed to be performed on the second target resource, and the execution function corresponding to the operation type. Optionally, the second target resource information may also include the format of the resource content carried in the access request, such as XML, JSON, raw, etc. Optionally, the second target resource information may include an execution function pointer, which points to the execution function corresponding to the operation type.

[0213] Optionally, determining the second target index information corresponding to the second target resource can be performed by: performing index calculation on the second access address according to a preset index algorithm to obtain the second target index information corresponding to the second access address; or, determining the second access address as the second target index information.

[0214] In this embodiment, the specific content of the second target resource information can be referred to the relevant description of the first target resource information, and the method for determining the second target index information can be referred to the method for determining the first target index information, which will not be repeated here.

[0215] S410 stores the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0216] Optionally, the index information is determined by performing an index calculation on the second access address according to the index algorithm in the pre-created associated container to obtain the first target index information corresponding to the second access address (i.e., step A1). The specific implementation of S410 can be found in steps B11-B14. Alternatively, the index information is determined by setting the second access address as the first target index information (i.e., step A2). The specific implementation of S410 can be found in steps B21-B24, and will not be elaborated here.

[0217] It should be noted that executing S402-S410 before receiving the access request for the first target resource sent by the second device (i.e., S102) is a feasible implementation. In this case, the second target resource is the same as the first target resource. If the second target resource is different from the first target resource, it is necessary to ensure that the access control device stores the first target resource. In practical applications, if the second target resource is different from the first target resource, or if the access control device already stores the first target resource, the execution timing of S402-S410 can also be after performing an operation corresponding to the target operation type on the first target resource according to the first target resource information and sending the execution result to the second device (i.e., S110), or during the execution of S102-S110.

[0218] In this embodiment, the cloud server sends a resource acquisition link to the access control device to trigger the access control device to acquire resources from the cloud server. Since the response speed of the access control devices to the resource acquisition link varies, it can ensure that the concurrent resource distribution tasks of the cloud server are reduced in the scenario of large-scale distribution, thereby improving the efficiency of distributing resources to the access control devices at the same time.

[0219] In one embodiment, the resource acquisition link includes not only resource identification information but also a second specified class node, which includes operation identification information for this acquisition operation.

[0220] In this embodiment, after storing the second target resource information, the second target index information, and the mapping relationship between the second target resource (i.e., S410), feedback information can be sent to the cloud server. This feedback information indicates that the access control device has successfully stored the second target resource. The feedback information includes operation identification information. By sending the feedback information containing the operation identification information to the cloud server, the access control device enables the cloud server to accurately match the feedback information with the previously sent resource acquisition link, thus accurately recording the resource allocation status.

[0221] Optionally, the feedback information can be used to indicate that the access control device failed to store the second target resource.

[0222] In one embodiment, the mapping relationship between the second target resource information, the second target index information, and the second target resource includes: a first mapping relationship between the second target index information and the index pointer; a pointer pointing relationship between the index pointer and the second target resource information; and a second mapping relationship between the second target resource information and the second target resource.

[0223] In this embodiment, storing the second target resource information, the second target index information, and the mapping relationship between the second target resource (i.e., S410) can be executed as follows: storing the first mapping relationship in a pre-created association container, and storing the second mapping relationship and the pointer pointing relationship in the memory of the first device.

[0224] Optionally, the pre-created associated container can be a MAP table, where the key in the table is index information and the value in the table is an index pointer.

[0225] In this embodiment, the first mapping relationship between each index information and the corresponding index pointer is stored in a pre-created association container, such as in a pre-created MAP table. Since the MAP table has the ability to index quickly, it can ensure that during the resource access process, the access control device can quickly respond to the access request initiated by the cloud server, retrieve the index pointer corresponding to the index information, and thus retrieve the corresponding resource information based on the index pointer.

[0226] The resource access method provided in this application is illustrated below through a specific business scenario. This resource access method can be applied to scenarios where a cloud server distributes resources to access control devices. In this embodiment, the access control device responds to a resource acquisition link sent by the cloud server, acquires the resource, and stores the acquired resource, the corresponding resource information and index information, as well as the mapping relationship between the resource, resource information, and index information. Figure 5 The illustrated embodiment uses this scenario as an example for explanation.

[0227] S5.1, the cloud server sends a resource acquisition link for the second target resource to the access control device. The resource acquisition link includes the resource identifier information of the second target resource to be acquired and a second designated class node. The second designated class node includes the operation identifier information of this acquisition operation.

[0228] For example, the second target resource may be a master attendance sheet or a set of personnel information stored on a cloud server. Optionally, the resource acquisition link may be represented as a URL. The resource identification information is information that can identify the resource to be acquired. For example, when the second target resource is a master attendance sheet, the resource identification information may be information such as attendance date and personnel number in the master attendance sheet, corresponding to the resource to be acquired being a resource under a certain attendance date(s) or a resource under a certain personnel number(s).

[0229] S5.2, the access control device matches the resource acquisition link with the pre-established fifth mapping relationship to obtain the resource storage address corresponding to the second target resource.

[0230] Optionally, a fifth mapping relationship can be pre-established between each resource acquisition link and the corresponding resource storage address.

[0231] S5.3 The access control device retrieves the second target resource corresponding to the resource identification information from the cloud server based on the resource storage address.

[0232] S5.4, the access control device determines the second target resource information and the second target index information corresponding to the second target resource.

[0233] Optionally, the specific content of the second target resource information can be referred to the relevant description of the first target resource information, and the method for determining the second target index information can be referred to the method for determining the first target index information, which will not be elaborated here.

[0234] S5.5, the access control device stores the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0235] Optionally, the index information is determined by performing index calculation on the second access address according to the index algorithm in the pre-created associated container to obtain the first target index information corresponding to the second access address (i.e., step A1). For the specific implementation of S5.5, please refer to steps B11-B14. The index information is determined by determining the second access address as the first target index information (i.e., step A2). For the specific implementation of S5.5, please refer to steps B21-B24, which will not be elaborated here.

[0236] In step S5.6, the access control device sends feedback information to the cloud server. This feedback information indicates that the access control device has successfully stored the second target resource. The feedback information includes operation identification information.

[0237] The specific processes of S5.1-S5.6 described above have been explained in detail in the above embodiments and will not be repeated here.

[0238] Using the technical solution of this application embodiment, the cloud server sends a resource acquisition link to the access control device to trigger the access control device to acquire resources from the cloud server. Since the response speed of the access control devices to the resource acquisition link varies, it can ensure that the concurrency of resource acquisition tasks on the cloud server is reduced in scenarios with large-scale resource acquisition, thereby improving the efficiency of simultaneously acquiring resources for the access control devices. Furthermore, the access control device can send feedback information containing operation identification information to the cloud server, enabling the cloud server to accurately match the feedback information with the previously sent resource acquisition link, so as to accurately record the resource acquisition status.

[0239] In summary, specific embodiments of this application have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.

[0240] The above are resource access methods provided in the embodiments of this application. Based on the same idea, the embodiments of this application also provide a resource access device.

[0241] Figure 6 This is a schematic diagram of a resource access device according to an embodiment of this application. In this embodiment, the resource access device is applied to a first device. Figure 6 As shown, the resource access device may include:

[0242] The first receiving module 610 is used to receive an access request for a first target resource sent by the second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, the first access address includes at least one character node, and the operation information includes the target operation type;

[0243] The replacement module 620 is used to replace the first specified class node with a preset character if at least one character node includes a first specified class node, thereby obtaining a second access address; the second access address does not include the first specified class node.

[0244] The first determining module 630 is used to determine the first target index information corresponding to the second access address;

[0245] The second determining module 640 is used to determine the first target resource and the first target resource information corresponding to the first target index information based on the first target index information, as well as the mapping relationship between each index information, resource information and resources;

[0246] The execution module 650 is used to perform an operation on the first target resource corresponding to the target operation type based on the first target resource information, and send the execution result to the second device.

[0247] In one embodiment, the mapping relationship between each index information, resource information, and resource includes: a first mapping relationship between each index information and index pointer; a pointer pointing relationship between index pointers and resource information; and a second mapping relationship between resource information and resource.

[0248] The second determining module 640 includes:

[0249] The first matching unit is used to match the first target index information with the first mapping relationship to obtain the target index pointer corresponding to the first target index information;

[0250] The second matching unit is used to match the target index pointer and the pointer pointing relationship to obtain the first target resource information corresponding to the target index pointer; the first target resource information includes the second access address, the operation type allowed to be performed on the first target resource, and the execution function corresponding to the operation type;

[0251] The third matching unit is used to match the first target resource information and the second mapping relationship to obtain the first target resource corresponding to the first target resource information.

[0252] In one embodiment, the first matching unit is specifically used for:

[0253] Retrieve the pre-created association container, which is used to store the first mapping relationship;

[0254] Retrieve the first mapping relationship from the associated container;

[0255] Match the first target index information with the first mapping relationship in the associated container.

[0256] In one embodiment, the resource access device further includes:

[0257] The first acquisition module is used to acquire multiple resources stored in the first device, and the first storage address corresponding to each resource;

[0258] The conversion and calculation module is used to perform a conversion operation on the first specified class node in the first storage address for each resource to obtain the second storage address; the second storage address does not include the first specified class node; and calculates the index information corresponding to the second storage address according to a preset indexing algorithm.

[0259] The module is used to establish a first mapping relationship between each index information and its corresponding index pointer, establish a pointer pointing relationship between each index pointer and the resource information corresponding to each resource, and establish a second mapping relationship between each resource information and its corresponding resource; the resource information includes a second storage address, the types of operations allowed to be performed on the resource, and the execution function corresponding to the operation type;

[0260] The first storage module is used to store the first mapping relationship, the second mapping relationship, and the pointer pointing relationship in the first device.

[0261] In one embodiment, the resource access device further includes:

[0262] The second storage module is used to store the first mapping relationship in a pre-created association container, and to store the second mapping relationship and pointer pointing relationship in the memory of the first device;

[0263] The second determining module 640 includes:

[0264] The first acquisition and matching unit is used to acquire the first mapping relationship from the associated container, so as to match the first target index information with the first mapping relationship;

[0265] The second acquisition and matching unit is used to acquire pointer pointing relationships from the memory of the first device to match the target index pointer and the pointer pointing relationships; and to acquire a second mapping relationship from the memory of the first device to match the first target resource information and the second mapping relationship.

[0266] In one embodiment, the execution module 650 includes:

[0267] The judgment unit is used to determine whether the operation type included in the first target resource information includes a target operation type based on the first mapping relationship in the associated container and the pointer pointing relationship in the memory of the first device.

[0268] An execution unit is configured to perform an operation corresponding to the target operation type on the first target resource if the condition is met, and send the execution result to the second device.

[0269] The sending unit is used to send an error message to the second device if no error is found.

[0270] In one embodiment, the first determining module 630 includes:

[0271] The processing unit is used to perform index calculation on the second access address according to the index algorithm in the pre-created associated container to obtain the first target index information corresponding to the second access address; or, to determine the second access address as the first target index information.

[0272] In one embodiment, the first designated class node includes pure numeric nodes; multiple first designated class nodes correspond to a unique preset character.

[0273] In one embodiment, the access request further includes a second specified class node, which includes operation identification information for this access operation;

[0274] The resource access device also includes:

[0275] The sending module is used to send feedback information to the second device after sending the execution result; the feedback information includes operation identification information, which is used to indicate that the first device has successfully processed the access request.

[0276] The apparatus according to this application embodiment receives an access request for a first target resource sent by a second device. The access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. It can be seen that in this apparatus, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with a preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared to existing solutions, the amount of information stored in the first device (such as access addresses) is significantly reduced, avoiding the first device exposing too many access addresses to the outside world, saving storage resources, reducing storage pressure on the first device, and improving the first device's efficiency in retrieving access addresses, thereby increasing the first device's response speed to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform operations on the resource according to the target operation type in the access request, and then send the execution result to the second device, ensuring accurate responses to access requests from the first device.

[0277] Figure 7 This is a schematic diagram of a resource access device according to another embodiment of this application. In this embodiment, the resource access device is applied to an access control device. Figure 7 As shown, the resource access device may include:

[0278] The second receiving module 710 is used to receive a resource acquisition link sent by the cloud server; the resource acquisition link includes the resource identification information of the second target resource to be acquired;

[0279] The third determining module 720 is used to determine the resource storage address corresponding to the second target resource based on the resource acquisition link;

[0280] The second acquisition module 730 is used to acquire the second target resource corresponding to the resource identification information from the cloud server according to the resource storage address;

[0281] The fourth determining module 740 is used to determine the second target resource information and the second target index information corresponding to the second target resource;

[0282] The third storage module 750 is used to store the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0283] In one embodiment, the mapping relationship between the second target resource information, the second target index information, and the second target resource includes: a first mapping relationship between the second target index information and the index pointer; a pointer pointing relationship between the index pointer and the second target resource information; and a second mapping relationship between the second target resource information and the second target resource.

[0284] The third storage module 750 includes:

[0285] A storage unit is used to store the first mapping relationship in a pre-created association container, and to store the second mapping relationship and pointer pointing relationship in the memory of the first device.

[0286] Using the apparatus of this application embodiment, the cloud server sends a resource acquisition link to the access control device to trigger the access control device to acquire resources from the cloud server. Since the response speed of the access control devices to the resource acquisition link varies, it can ensure that the concurrent resource acquisition task of the cloud server is reduced in the scenario of large-scale resource acquisition, thereby improving the efficiency of simultaneously acquiring resources from the access control devices.

[0287] Those skilled in the art will understand that Figure 6 and Figure 7 The resource access device in the document can be used to implement the resource access method described above. The details of the method description should be similar to those in the previous section. To avoid being too complicated, they will not be repeated here.

[0288] Following the same line of thought, embodiments of this application also provide a resource access device, such as... Figure 8 As shown. Resource access devices can vary considerably due to differences in configuration or performance, and may include one or more processors 801 and memory 802. Memory 802 may store one or more application programs or data. Memory 802 may be temporary or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown), each module may include a series of computer-executable instructions in the resource access device. Furthermore, processor 801 may be configured to communicate with memory 802 and execute the series of computer-executable instructions in memory 802 on the resource access device. The resource access device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input / output interfaces 805, and one or more keyboards 806.

[0289] In one embodiment, the resource access device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for use in the resource access device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0290] Receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, the first access address includes at least one character node, and the operation information includes the target operation type;

[0291] If at least one character node includes a first specified class node, then the first specified class node is replaced with a preset character to obtain a second access address; the second access address does not include the first specified class node.

[0292] Determine the first target index information corresponding to the second access address;

[0293] Based on the first target index information, as well as the mapping relationships between each index information, resource information, and resources, determine the first target resource and the first target resource information corresponding to the first target index information;

[0294] Based on the first target resource information, perform an operation corresponding to the target operation type on the first target resource, and send the execution result to the second device.

[0295] The device employing this embodiment receives an access request for a first target resource sent by a second device. The access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationships between various index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. It can be seen that in this device, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with a preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared to existing solutions, the amount of information stored in the first device (such as access addresses) is significantly reduced, avoiding the first device exposing too many access addresses to the outside world, saving storage resources, reducing storage pressure on the first device, and improving the first device's efficiency in retrieving access addresses, thereby increasing the first device's response speed to access requests. Furthermore, after indexing the resource information corresponding to the second access address, the first device can perform operations on the resource according to the target operation type in the access request, and then send the execution result to the second device, ensuring accurate responses to access requests from the first device.

[0296] In one embodiment, the resource access device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for use in the resource access device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0297] Receive a resource acquisition link sent by the cloud server; the resource acquisition link includes the resource identifier information of the second target resource to be acquired;

[0298] Based on the resource acquisition link, determine the resource storage address corresponding to the second target resource;

[0299] Based on the resource storage address, retrieve the second target resource corresponding to the resource identification information from the cloud server;

[0300] Determine the second target resource information and the second target index information corresponding to the second target resource;

[0301] Stores the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0302] In the device using the embodiments of this application, the cloud server sends a resource acquisition link to the access control device to trigger the access control device to acquire resources from the cloud server. Since the response speed of the access control devices to the resource acquisition link varies, it can ensure that the concurrent resource acquisition task of the cloud server is reduced in the scenario of large-scale resource acquisition, thereby improving the efficiency of simultaneously acquiring resources from the access control devices.

[0303] This application also proposes a storage medium that stores one or more computer programs, the computer programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform the above-described resource access method, specifically for performing:

[0304] Receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, the first access address includes at least one character node, and the operation information includes the target operation type;

[0305] If at least one character node includes a first specified class node, then the first specified class node is replaced with a preset character to obtain a second access address; the second access address does not include the first specified class node.

[0306] Determine the first target index information corresponding to the second access address;

[0307] Based on the first target index information, as well as the mapping relationships between each index information, resource information, and resources, determine the first target resource and the first target resource information corresponding to the first target index information;

[0308] Based on the first target resource information, perform an operation corresponding to the target operation type on the first target resource, and send the execution result to the second device.

[0309] Using the storage medium of this application embodiment, by receiving an access request for a first target resource sent by a second device, the access request includes a first access address corresponding to the first target resource and operation information for the first target resource. The first access address includes at least one character node, and the operation information includes a target operation type. If the at least one character node includes a first specified class node, the first specified class node is replaced with a preset character to obtain a second access address that does not include the first specified class node. This determines the first target index information corresponding to the second access address. Then, based on the first target index information and the mapping relationship between each index information, resource information, and resources, the first target resource and first target resource information corresponding to the first target index information are determined. Based on the first target resource information, an operation corresponding to the target operation type is performed on the first target resource, and the execution result is sent to the second device. As can be seen, in this storage medium, the first device achieves the effect of masking the first specified class node in the received first access address by replacing it with a preset character. For example, for several first access addresses that differ only in the first specified class node, replacing the first specified class node with the preset character results in the same second access address. Therefore, the first device only needs to store the index information corresponding to the second access address and the aforementioned mapping relationship. Compared with existing solutions, the amount of information stored in the first device (such as access addresses) is greatly reduced, avoiding the first device exposing too many access addresses to the outside world, saving the storage resources of the first device, reducing the storage pressure on the first device, and improving the retrieval efficiency of the first device for access addresses, thereby improving the response speed of the first device to access requests. Furthermore, after indexing the resource information corresponding to the second access address, it can perform operations on the resource according to the resource information that correspond to the target operation type in the access request, thereby sending the execution result to the second device, ensuring the accurate response of the first device to the access request.

[0310] This application also proposes a storage medium that stores one or more computer programs, the computer programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform the above-described resource access method, specifically for performing:

[0311] Receive a resource acquisition link sent by the cloud server; the resource acquisition link includes the resource identifier information of the second target resource to be acquired;

[0312] Based on the resource acquisition link, determine the resource storage address corresponding to the second target resource;

[0313] Based on the resource storage address, retrieve the second target resource corresponding to the resource identification information from the cloud server;

[0314] Determine the second target resource information and the second target index information corresponding to the second target resource;

[0315] Stores the second target resource information, the second target index information, and the mapping relationship between the second target resource.

[0316] Using the storage medium of this application embodiment, the cloud server sends a resource acquisition link to the access control device to trigger the access control device to acquire resources from the cloud server. Since the response speed of the access control devices to the resource acquisition link is different, it can ensure that the concurrency of resource acquisition tasks of the cloud server is reduced in the scenario of large-scale distribution, thereby improving the efficiency of simultaneously distributing resources to the access control devices.

[0317] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0318] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0319] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0320] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0321] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0322] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0323] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0324] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0325] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0326] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0327] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0328] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0329] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.< / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / id> < / exc> < / id>

Claims

1. A resource access method, characterized in that, Applied to a first device, the method includes: Receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, the first access address includes at least one character node, and the operation information includes a target operation type; If the at least one character node includes a first specified class node, then the first specified class node is replaced with a preset character to obtain a second access address; the second access address does not include the first specified class node. The step of replacing the first specified class node with a preset character to obtain the second access address includes: Replace the first specified class node of the first access address with the preset character, so that for multiple first access addresses that are different only in the first specified class node, the same second access address is obtained after replacing the first specified class node with the preset character; Determine the first target index information corresponding to the second access address; Based on the first target index information, and the mapping relationship between each index information, resource information and resources, the first target resource and the first target resource information corresponding to the first target index information are determined. The first target resource information includes the second access address, the operation type allowed to be performed on the first target resource and the execution function corresponding to the operation type. Based on the first target resource information, perform an operation on the first target resource corresponding to the target operation type, and send the execution result to the second device; The step of performing an operation on the first target resource corresponding to the target operation type includes: Based on the first access address, locate the target resource content in the first target resource, and perform an operation on the target resource content that corresponds to the target operation type.

2. The method according to claim 1, characterized in that, The mapping relationships between each index information, resource information, and resource include: a first mapping relationship between each index information and an index pointer; a pointer pointing relationship between the index pointer and the resource information; and a second mapping relationship between the resource information and the resource. The step of determining the first target resource and first target resource information corresponding to the first target index information based on the first target index information, and the mapping relationships between various index information, resource information, and resources, includes: The first target index information and the first mapping relationship are matched to obtain the target index pointer corresponding to the first target index information; Match the target index pointer with the pointer pointing relationship to obtain the first target resource information corresponding to the target index pointer; The first target resource information and the second mapping relationship are matched to obtain the first target resource corresponding to the first target resource information.

3. The method according to claim 2, characterized in that, The step of matching the first target index information with the first mapping relationship includes: Obtain a pre-created association container, which is used to store the first mapping relationship; Obtain the first mapping relationship from the associated container; The first target index information is matched with the first mapping relationship in the associated container.

4. The method according to claim 2, characterized in that, The method further includes: Obtain multiple resources stored in the first device, and the first storage address corresponding to each resource; For each resource, a conversion operation is performed on the first specified class node in the first storage address to obtain a second storage address; the second storage address does not include the first specified class node; according to a preset indexing algorithm, the index information corresponding to the second storage address is calculated. A first mapping relationship is established between each of the index information and its corresponding index pointer; a pointer pointing relationship is established between each of the index pointers and the resource information corresponding to each resource; and a second mapping relationship is established between each of the resource information and its corresponding resource; the resource information includes a second storage address, an operation type allowed to be performed on the resource, and an execution function corresponding to the operation type. The first mapping relationship, the second mapping relationship, and the pointer pointing relationship are stored in the first device.

5. The method according to claim 4, characterized in that, The method further includes: The first mapping relationship is stored in a pre-created association container, and the second mapping relationship and the pointer pointing relationship are stored in the memory of the first device; The step of determining the first target resource and first target resource information corresponding to the first target index information based on the first target index information, and the mapping relationships between various index information, resource information, and resources, includes: The first mapping relationship is obtained from the associated container to match the first target index information with the first mapping relationship; The pointer pointing relationship is obtained from the memory of the first device to match the target index pointer with the pointer pointing relationship; and the second mapping relationship is obtained from the memory of the first device to match the first target resource information with the second mapping relationship.

6. The method according to claim 5, characterized in that, The step of performing an operation corresponding to the target operation type on the first target resource based on the first target resource information, and sending the execution result to the second device, includes: Based on the first mapping relationship within the associated container and the pointer pointing relationship in the memory of the first device, determine whether the operation type included in the first target resource information includes the target operation type; If so, then perform an operation corresponding to the target operation type on the first target resource, and send the execution result to the second device; If not, an error message is sent to the second device.

7. The method according to claim 1, characterized in that, The step of determining the first target index information corresponding to the second access address includes: Based on the indexing algorithm within the pre-created associated container, the second access address is indexed to obtain the first target index information corresponding to the second access address; or, the second access address is determined as the first target index information.

8. The method according to claim 1, characterized in that, The first designated class node includes pure numeric nodes; multiple first designated class nodes correspond to a unique preset character.

9. The method according to claim 1, characterized in that, The access request also includes a second specified class node, which includes the operation identifier information of this access operation; After sending the execution result to the second device, the method further includes: Send feedback information to the second device; the feedback information includes the operation identification information, and the feedback information is used to indicate that the first device has successfully processed the access request.

10. A resource access method, characterized in that, Applied to access control equipment, the method includes: Receive a resource acquisition link sent by a cloud server; the resource acquisition link includes resource identification information of the second target resource to be acquired; Based on the resource acquisition link, determine the resource storage address corresponding to the second target resource; Based on the resource storage address, retrieve the second target resource corresponding to the resource identification information from the cloud server; Determine the second target resource information and the second target index information corresponding to the second target resource. The second target resource information includes a second access address, the type of operation allowed to be performed on the second target resource, and the execution function corresponding to the operation type. Store the mapping relationship between the second target resource information, the second target index information, and the second target resource; Upon receiving an access request for a second target resource from a second device, the first specified class node of the first access address in the access request is replaced with a preset character, such that for multiple first access addresses that differ only in the first specified class node, the same second access address is obtained after replacing the first specified class node with the preset character.

11. The method according to claim 10, characterized in that, The mapping relationship between the second target resource information, the second target index information, and the second target resource includes: a first mapping relationship between the second target index information and the index pointer; a pointer pointing relationship between the index pointer and the second target resource information; and a second mapping relationship between the second target resource information and the second target resource. The storage of the second target resource information, the second target index information, and the mapping relationship between the second target resource includes: The first mapping relationship is stored in a pre-created association container, and the second mapping relationship and the pointer relationship are stored in the memory of the access control device.

12. A resource access device, characterized in that, Applied to a first device, the device includes: A first receiving module is configured to receive an access request for a first target resource sent by a second device; the access request includes a first access address corresponding to the first target resource and operation information for the first target resource, wherein the first access address includes at least one character node, and the operation information includes a target operation type; The replacement module is configured to replace the first specified class node with a preset character if the at least one character node includes a first specified class node, thereby obtaining a second access address; the second access address does not include the first specified class node. The first determining module is used to determine the first target index information corresponding to the second access address; The second determining module is used to determine the first target resource and the first target resource information corresponding to the first target index information based on the first target index information and the mapping relationship between each index information, resource information and resources. The first target resource information includes the second access address, the operation type allowed to be performed on the first target resource and the execution function corresponding to the operation type. The second determining module is used to replace the first specified class node of the first access address with the preset character, so that for multiple first access addresses that are different only in the first specified class node, the same second access address is obtained after replacing the first specified class node with the preset character; The execution module is configured to perform an operation corresponding to the target operation type on the first target resource based on the first target resource information, and send the execution result to the second device; The execution module is used to locate the target resource content in the first target resource according to the first access address, and perform an operation on the target resource content that corresponds to the target operation type.

13. A resource access device, characterized in that, The device, used in access control equipment, includes: The second receiving module is used to receive a resource acquisition link sent by the cloud server; the resource acquisition link includes resource identification information of the second target resource to be acquired; The third determining module is used to determine the resource storage address corresponding to the second target resource based on the resource acquisition link; The second acquisition module is used to acquire the second target resource corresponding to the resource identification information from the cloud server according to the resource storage address; The fourth determining module is used to determine the second target resource information and the second target index information corresponding to the second target resource. The second target resource information includes a second access address, the type of operation allowed to be performed on the second target resource, and the execution function corresponding to the operation type. The third storage module is used to store the second target resource information, the second target index information, and the mapping relationship between the second target resource; The third storage module is further configured to: upon receiving an access request for a second target resource sent by the second device, replace the first designated class node of the first access address in the access request with a preset character, such that for multiple first access addresses that differ only in the first designated class node, the same second access address is obtained after replacing the first designated class node with the preset character.

14. A resource access device, characterized in that, The device includes: Processor; and A memory configured to store computer-executable instructions configured to be executed by the processor to implement the resource access method as described in any one of claims 1-9, or to implement the resource access method as described in any one of claims 10-11.

Citation Information

Patent Citations

  • Resource access method and system applying same

    WO2015056952A1