Data request method and device, equipment and storage medium

By searching for user registration information in the target storage space outside the access control system, the slow response speed of the access control system under high-concurrency data requests is solved, resulting in faster data requests and a better user experience.

CN121598360APending Publication Date: 2026-03-03BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411178366.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

When there are too many concurrent data requests, the data query and access pressure of the permission management system becomes too high, resulting in a slower response speed. In severe cases, it may cause request timeouts, affecting the user experience.

Method used

By searching for the target registration information corresponding to the user identifier in the target storage space outside the access control system and retrieving the target data from the storage address, the pressure on the access control system for data querying and access is reduced.

Benefits of technology

It improved the response speed of data requests, enhanced the user experience, and reduced the load on the access control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121598360A_ABST
    Figure CN121598360A_ABST
Patent Text Reader

Abstract

The invention relates to a data request method and device, equipment and a storage medium. The method comprises the following steps: receiving a data request instruction sent by a user side, wherein the data request instruction comprises a user identifier of request data and a storage address of requested target data; target registration information corresponding to the user identifier is searched from a target storage space, the target storage space is located outside an authority management system, the authority management system is used for storing the registration information of the user, and the registration information stored in the target storage space is the same as the registration information stored in the authority management system; in response to the target registration information existing in the target storage space, obtaining target data from the storage address; and sending the target data to the user side. When the data request instruction is responded, the registration information of the user can be queried from the target storage space outside the authority management system, the data query and access pressure on the authority management system is reduced, the response speed of the data request is increased, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data request method, apparatus, device, and storage medium. Background Technology

[0002] Currently, when a user requests data from the server, the access control system verifies the user's permissions by checking if the user's registration information exists in the access control system. If it does, the verification is successful, the data is retrieved from the corresponding database, and then returned to the user.

[0003] When there are too many concurrent data requests, it will put a lot of pressure on the permission management system to query and access data, causing the system to slow down and, in severe cases, to time out and fail to respond properly, resulting in a poor user experience. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a data request method, apparatus, device, and storage medium.

[0005] The first aspect of this disclosure provides a data request method, including:

[0006] Receive data request instructions sent by the user terminal. The data request instructions include the user identifier requesting data and the storage address of the target data being requested.

[0007] The target storage space is located outside the access control system. The access control system is used to store user registration information. The registration information stored in the target storage space is the same as the registration information stored in the access control system.

[0008] In response to the presence of target registration information in the target storage space, the target data is retrieved from the storage address;

[0009] Send the target data to the user's terminal.

[0010] A second aspect of this disclosure provides a data request apparatus, comprising:

[0011] The first receiving module is used to receive a data request instruction sent by the user terminal. The data request instruction includes the user identifier requesting data and the storage address of the target data being requested.

[0012] The lookup module is used to find the target registration information corresponding to the user identifier from the target storage space. The target storage space is located outside the permission management system. The permission management system is used to store the user's registration information. The registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0013] The acquisition module is used to retrieve target data from the storage address in response to the existence of target registration information in the target storage space;

[0014] The first sending module is used to send the target data to the user terminal.

[0015] A third aspect of this disclosure provides a computer device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, can implement the data request method of the first aspect described above.

[0016] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the data request method of the first aspect described above.

[0017] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0018] This disclosure involves receiving a data request instruction sent by a user client, the instruction including a user identifier requesting data and the storage address of the target data; searching for target registration information corresponding to the user identifier in the target storage space, which is located outside the access control system. The access control system stores user registration information, and the registration information stored in the target storage space is identical to that stored in the access control system; in response to the existence of target registration information in the target storage space, retrieving the target data from the storage address; and sending the target data to the user client. When responding to a data request instruction, user registration information can be queried from a target storage space outside the access control system, reducing the data query and access pressure on the access control system, improving the response speed of data requests, and enhancing the user experience. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0020] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a data request method provided in an embodiment of this disclosure;

[0022] Figure 2 This is a flowchart of another data request method provided in an embodiment of this disclosure;

[0023] Figure 3 This is a flowchart of a data registration method provided in an embodiment of this disclosure;

[0024] Figure 4 This is a schematic diagram of the structure of a data request device provided in an embodiment of this disclosure;

[0025] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Detailed Implementation

[0026] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0027] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0029] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 a process, method, article, or apparatus. Without further limitations, 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.

[0030] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0031] The data request method provided in this disclosure can be executed by a computer device, which can be understood as any device with processing and computing capabilities, including but not limited to electronic devices such as permission management servers.

[0032] To better understand the inventive concept of the embodiments of this disclosure, the technical solutions of the embodiments of this disclosure will be described below in conjunction with exemplary embodiments.

[0033] Figure 1 This is a flowchart illustrating a data request method provided in an embodiment of this disclosure. This method can be executed by a computer device, which can be understood as any device with computing capabilities and processing power. Figure 1 As shown, the data request method provided in this embodiment includes the following steps:

[0034] Step 110: Receive a data request instruction sent by the user terminal. The data request instruction includes the user identifier and the storage address of the requested target data.

[0035] In this embodiment of the disclosure, the user terminal can be understood as a user terminal device or a user terminal application. The user terminal can respond to a user's data request by generating a data request instruction, and then send the data request instruction to a computer device, which can receive the data request instruction sent by the user terminal.

[0036] The data request instruction may include the user identifier requesting the data and the storage address of the target data. The user identifier can be understood as information that can uniquely identify a user, such as a user account.

[0037] Step 120: Locate the target registration information corresponding to the user identifier in the target storage space. The target storage space is located outside the permission management system. The permission management system is used to store user registration information. The registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0038] In this embodiment of the disclosure, the access control system can be understood as a system used to store user registration information. The target storage space can be understood as a storage space located outside the access control system, existing independently of the access control system, and the registration information stored in the target storage space is the same as the registration information stored in the access control system.

[0039] After receiving a data request instruction from the user, the computer device can search for the target registration information corresponding to the user identifier in the target storage space. The target registration information is the registration information of the user corresponding to the user identifier.

[0040] The target storage space may include at least one of local cache space and distributed cache space.

[0041] Local cache space can be understood as a cache space that can only be accessed by computer devices. For example, local cache space can use caching frameworks such as GUAVA or EHCACHE to store registration information corresponding to user identifiers.

[0042] A distributed cache space can be understood as a cache space that can be accessed by computer devices and other devices. For example, a distributed cache space can use a remote dictionary service like Redis to store registration information corresponding to user identifiers, where the key can be the user identifier and the value can be the registration information.

[0043] Step 130: In response to the existence of target registration information in the target storage space, retrieve the target data from the storage address.

[0044] In this embodiment of the disclosure, when target registration information exists in the target storage space, the computer device can respond to the existence of target registration information in the target storage space, determine that the user identifier verification is successful, and the user corresponding to the user identifier has the right to access the storage address of the target data. The computer device can then obtain the target data from the storage address.

[0045] Step 140: Send the target data to the user terminal.

[0046] In this embodiment of the disclosure, after obtaining the target data from the storage address, the computer device can send the target data to the user terminal. Thus, the computer device completes the data request instruction, and the user terminal obtains the requested target data.

[0047] This embodiment of the disclosure receives a data request instruction sent by a user terminal. The data request instruction includes a user identifier requesting data and the storage address of the target data. It then searches for target registration information corresponding to the user identifier in the target storage space. The target storage space is located outside the access control system, which stores user registration information. The registration information stored in the target storage space is identical to that stored in the access control system. In response to the existence of target registration information in the target storage space, the target data is retrieved from the storage address. Finally, the target data is sent to the user terminal. By querying user registration information from a target storage space outside the access control system when responding to a data request instruction, the data query and access pressure on the access control system is reduced, improving the response speed of data requests and enhancing the user experience.

[0048] Figure 2This is a flowchart illustrating a data request method provided in an embodiment of this disclosure. This method can be executed by a computer device, which can be understood as any device with computing capabilities and processing power. Figure 2 As shown, the data request method provided in this embodiment includes the following steps:

[0049] Step 210: Receive a data request instruction sent by the user terminal. The data request instruction includes the user identifier requesting the data and the storage address of the target data.

[0050] Step 220: Locate the target registration information corresponding to the user identifier in the target storage space. The target storage space is located outside the permission management system. The permission management system is used to store user registration information. The registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0051] Step 230: In response to the existence of target registration information in the target storage space, retrieve the target data from the storage address.

[0052] Step 240: Send the target data to the user terminal.

[0053] Step 250: In response to the absence of target registration information in the target storage space, a prompt message is sent to the user terminal. The prompt message includes the absence of target registration information and the failure of data request instruction execution.

[0054] In this embodiment of the disclosure, when the target registration information does not exist in the target storage space, the computer device can respond to the absence of target registration information in the target storage space by determining that the user identifier verification has failed. The user corresponding to the user identifier does not have permission to access the storage address of the target data, and the computer device cannot execute the data request instruction. At this time, the computer device can send a prompt message to the user terminal. The prompt message may include the absence of target registration information and the failure of the data request instruction execution.

[0055] Step 260: Receive at least one registration request corresponding to a user identifier sent by the user terminal, each registration request including target registration information corresponding to the user identifier.

[0056] In this embodiment of the disclosure, after receiving a prompt message from the computer device indicating that the target registration information does not exist and the data request instruction has failed to execute, the user terminal can send at least one registration request corresponding to the user identifier to the computer device. The computer device can receive at least one registration request corresponding to the user identifier sent by the user terminal. Each registration request may include the target registration information corresponding to the user identifier.

[0057] Step 270: In response to at least one registration request, write the target registration information into the permission management system and the target storage space, and then execute step 210 and subsequent steps again.

[0058] In this embodiment of the disclosure, the computer device may respond to at least one registration request corresponding to a user identifier sent by the user terminal, write the target registration information into the permission management system and the target storage space respectively, and then execute step 210 and the steps after step 210 again.

[0059] Therefore, when responding to a data request command, the user's registration information can be queried from the target storage space outside the access control system. If the user's registration information is not found in the target storage space, the user's registration information is written to both the access control system and the target storage space. Then, the step of querying the user's registration information from the target storage space outside the access control system is executed again. This reduces the data query and access pressure on the access control system, improves the response speed of data requests, and enhances the user experience.

[0060] When faced with multiple concurrent registration requests from any given user, if each registration request registers information with the access control system, it would overly rely on the access control system's concurrent deduplication capabilities (some designs use a discard strategy). When the concurrency of registration requests is high, this could cause the access control system to crash, affecting the response to all requests. Therefore, in some embodiments of this disclosure, in response to at least one registration request, the target registration information is written to the access control system and the target storage space. The computer device can then execute... Figure 3 A flowchart of a data registration method is provided, such as Figure 3 As shown, the data registration method provided in this embodiment includes the following steps:

[0061] Step 310: For any target registration request in at least one registration request, obtain the distributed lock corresponding to the target registration request.

[0062] In this embodiment of the disclosure, for any one of the at least one registration request, the computer device can acquire the distributed lock corresponding to the target registration request.

[0063] For example, a computer device can obtain a distributed lock corresponding to a target registration request from a remote dictionary server (Redis) system via a network.

[0064] The remote dictionary service system is an open-source, network-enabled, persistent, log-based key-value database or storage system that provides application programming interfaces (APIs) in multiple languages.

[0065] Distributed locks can be stored in a remote dictionary service system.

[0066] Distributed locks, also known as concurrent locks, can achieve mutual exclusion and visibility between multiple threads in a distributed system or cluster mode. In other words, when multiple threads need to execute, the distributed lock only allows one thread to execute at a time, while other threads suspend their response.

[0067] In this embodiment of the disclosure, for any one of the at least one registration requests corresponding to a user identifier, after the target registration request obtains a distributed lock, the distributed lock can control the computer device to execute only the thread corresponding to the target registration request at the same time, and suspend the threads corresponding to other registration requests corresponding to user identifiers other than the target registration request.

[0068] It is understandable that, due to the functional characteristics of distributed locks, once the target registration request has a distributed lock, other registration requests corresponding to user identifiers other than the target registration request are not entitled to obtain the distributed lock. Only after the distributed lock corresponding to the target registration request becomes invalid or does not exist can other registration requests other than the target registration request be entitled to obtain the distributed lock.

[0069] Step 320: In response to acquiring the distributed lock corresponding to the target registration request, register the target registration information corresponding to the user identifier in the permission management system, and suspend responding to at least one registration request other than the target registration request.

[0070] In this embodiment of the disclosure, after acquiring the distributed lock corresponding to the target registration request, based on the performance of the distributed lock, the computer device can only execute the thread corresponding to the target registration request. The computer device can register the target registration information corresponding to the user identifier in the permission management system and suspend responding to other registration requests other than the target registration request in at least one registration request corresponding to the user identifier.

[0071] In some embodiments, the computer device may, in response to acquiring the distributed lock corresponding to the target registration request, acquire the validity period of the distributed lock;

[0072] While the distributed lock is within its valid duration, the distributed lock is valid, and the computer device can register the target registration information corresponding to the user identifier in the access control system.

[0073] When the distributed lock has not been in effect for its specified duration, the distributed lock becomes invalid, and the computer device may stop registering the target registration information corresponding to the user identifier in the access control system.

[0074] Each distributed lock has a valid duration for which it is effective. Within the valid duration, the distributed lock is valid; outside the valid duration, the distributed lock is invalid.

[0075] The validity period of a distributed lock can be set as needed, and there is no limit here. For example, the Redis SETNX method can be used to manage distributed locks and set their validity period.

[0076] Step 330: In response to the successful registration of the target registration information in the permission management system, delete the distributed lock corresponding to the target registration request and stop responding to other registration requests corresponding to user identifiers other than the target registration request.

[0077] In this embodiment, the access control system can verify the authenticity of the target registration information. Once the verification is successful, the target registration information is successfully registered in the access control system. At this point, the target registration information has been successfully written into the access control system, the computer device has completed executing the thread corresponding to the target registration request, and the task of the distributed lock corresponding to the target registration request has been completed. In response to the successful registration of the target registration information in the access control system, the computer device can delete the distributed lock corresponding to the target registration request and stop responding to other registration requests corresponding to user identifiers other than the target registration request.

[0078] Step 340: Write the target registration information into the target storage space.

[0079] In this embodiment of the disclosure, after the target registration information is successfully registered in the permission management system, the computer device can write the target registration information into the target storage space outside the permission management system, at which time the target storage space stores the target registration information.

[0080] Step 350: Generate and broadcast target event messages, which include a successful response to the registration request and the existence of target registration information in the target storage space.

[0081] In this embodiment of the disclosure, after the target registration information is written into the permission management system and the target storage space, the computer device can generate and broadcast target event messages. The target event messages may include the successful response to the registration request and the existence of target registration information in the target storage space.

[0082] Step 360: In response to the failure to acquire the distributed lock corresponding to the target registration request, monitor the target event messages within the preset waiting time.

[0083] In this embodiment of the disclosure, when the computer device fails to acquire the distributed lock corresponding to the target registration request, it indicates that the target registration request among the other registration requests corresponding to the user identifier other than the target registration request has a distributed lock. At this time, the target registration request will only have a chance to acquire the distributed lock after the distributed lock corresponding to the target registration request expires or does not exist.

[0084] In response to the failure to acquire the distributed lock corresponding to the target registration request, the computer device can monitor for a preset waiting time whether the registration request has been successfully responded to and whether the target registration information exists in the target storage space.

[0085] For example, computer devices can use the `BLPOP` method of a Redis List to monitor second event messages. Specifically, preset data will appear in the list within a preset waiting time, indicating that the target registration request (corresponding to a user identifier other than the target registration request) has been successfully responded to and that target registration information exists in the target storage space; if the preset data does not appear in the list within the preset waiting time, it indicates that the target registration request has not been successfully responded to and that target registration information does not exist in the target storage space. The preset data can be set as needed and is not limited here.

[0086] The preset waiting time can be set as needed; there is no limit here.

[0087] This avoids situations where a registration request takes a long time to process and wastes time, thus improving the response speed of registration requests.

[0088] Step 370: In response to detecting a target event message within a preset waiting time, stop responding to the remaining registration requests corresponding to the user identifier other than the target registration request.

[0089] In this embodiment of the present disclosure, when the computer device detects a target event message within a preset waiting time, it indicates that target registration information already exists in the target storage space. In response to detecting the target event message within the preset waiting time, the computer device can stop responding to the remaining registration requests corresponding to the user identifier other than the target registration request.

[0090] In other words, as long as any one of the registration requests corresponding to the user identifier is successfully responded to, the target registration information corresponding to the user identifier is successfully written to the target storage space, and the computer device does not need to execute the remaining registration requests.

[0091] Step 380: In response to the failure to detect the target event message within the preset waiting time, determine that the target registration request response failed and that there is no target registration information in the target storage space, delete the distributed lock corresponding to the target registration request, and execute step 310 and the subsequent steps again.

[0092] In this embodiment of the present disclosure, when the computer device does not detect the target event message within a preset waiting time, it indicates that there is no target registration information in the target storage space. The computer device can respond to the fact that no target event message is detected within the preset waiting time, determine that the target registration request response has failed and that there is no target registration information in the target storage space, delete the distributed lock corresponding to the target registration request, and execute step 310 and the steps after step 310 again.

[0093] Therefore, when faced with multiple concurrent registration requests from any user, a distributed lock can be used to ensure that only one registration request from a user is responded to at the same time. After the registration information is successfully written to the permission management system, the remaining registration requests are stopped. Only one user's registration information is written to the permission management system at the same time and only once, and then synchronized to the target storage space. This can greatly reduce the write pressure on the permission management system, prevent the permission management system from crashing due to excessive query or write pressure, and improve the user registration efficiency.

[0094] In some embodiments of this disclosure, the computer device may synchronize the registration information in the target storage space with the registration information in the access control system at preset time intervals, so that the registration information stored in the target storage space is identical to the registration information stored in the access control system. For example, the computer device may replace the registration information in the target storage space with the registration information stored in the access control system at preset time intervals.

[0095] The preset duration can be set as needed, such as 1 minute; there is no limit here.

[0096] For example, computer devices can use the Scheduled ExecutorService, a timer service built into Java, to perform a synchronization operation between the registration information in the target storage space and the registration information in the permission management system at preset intervals.

[0097] Therefore, the registration information in the target storage space can be refreshed through a scheduled service, keeping the target storage space with the latest registration information, avoiding junk data, and ensuring that the registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0098] Figure 4This is a schematic diagram of a data request device provided in an embodiment of this disclosure. This device can be understood as the aforementioned computer equipment or a functional module within the aforementioned computer equipment. Figure 4 As shown, the data request device 400 includes:

[0099] The first receiving module 410 is used to receive a data request instruction sent by the user terminal. The data request instruction includes the user identifier requesting data and the storage address of the target data being requested.

[0100] The lookup module 420 is used to look up the target registration information corresponding to the user identifier from the target storage space. The target storage space is located outside the permission management system. The permission management system is used to store the user's registration information. The registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0101] The acquisition module 430 is used to acquire target data from the storage address in response to the existence of target registration information in the target storage space;

[0102] The first sending module 440 is used to send the target data to the user terminal.

[0103] Optionally, the above data request device includes:

[0104] The second sending module is used to send a prompt message to the user terminal in response to the absence of target registration information in the target storage space. The prompt message includes the absence of target registration information and the failure to execute the data request command.

[0105] The second receiving module is used to receive at least one registration request corresponding to a user identifier sent by the user terminal, and each registration request includes target registration information corresponding to the user identifier.

[0106] The writing module is used to write the target registration information to the permission management system and the target storage space in response to at least one registration request;

[0107] The execution module is used to execute the data request instructions sent by the user client and the subsequent steps.

[0108] Optionally, the above-mentioned writing module includes:

[0109] The acquisition submodule is used to acquire the distributed lock corresponding to any one of the target registration requests in at least one registration request.

[0110] The registration submodule is used to register the target registration information corresponding to the user identifier in the permission management system in response to acquiring the distributed lock corresponding to the target registration request, and to suspend the response to at least one registration request other than the target registration request.

[0111] The delete submodule is used to delete the distributed lock corresponding to the target registration request and stop responding to other registration requests corresponding to user identifiers other than the target registration request when the target registration information is successfully registered in the permission management system.

[0112] The write submodule is used to write the target registration information to the target storage space;

[0113] The generation submodule is used to generate and broadcast target event messages, which include a successful response to the registration request and the existence of target registration information in the target storage space.

[0114] Optionally, the above registration submodule includes:

[0115] The acquisition unit is used to acquire the valid duration of the distributed lock in response to the acquisition of the distributed lock corresponding to the target registration request;

[0116] The first registration unit is used to register the target registration information corresponding to the user identifier in the permission management system when the distributed lock is within its effective duration.

[0117] The stop unit is used to stop registering the target registration information corresponding to the user identifier in the permission management system when the distributed lock is outside its valid duration.

[0118] Optionally, the above-mentioned writing module includes:

[0119] The monitoring submodule is used to monitor target event messages within a preset waiting time in response to the failure to acquire the distributed lock corresponding to the target registration request.

[0120] The Stop submodule is used to stop responding to any remaining registration requests corresponding to the user identifier other than the target registration request when a target event message is detected within a preset waiting time.

[0121] The execution submodule is used to respond to the failure of the target event message detected within a preset waiting time, determine that the target registration request response failed and that there is no target registration information in the target storage space, delete the distributed lock corresponding to the target registration request, execute any one of the at least one registration request, acquire the distributed lock corresponding to the target registration request and the subsequent steps.

[0122] Optionally, the above data request device includes:

[0123] The synchronization module is used to synchronize the registration information in the target storage space with the registration information in the permission management system at preset intervals, so that the registration information stored in the target storage space is the same as the registration information stored in the permission management system.

[0124] Optionally, the target storage space mentioned above includes at least one of local cache space and distributed cache space.

[0125] The data request apparatus provided in this disclosure can implement the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.

[0126] This disclosure also provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.

[0127] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure, such as... Figure 5 As shown, the computer device 500 may include a processor 510 and a memory 520. The memory 520 stores a computer program 521. When the computer program 521 is executed by the processor 510, it can implement the method provided in any of the above embodiments. Its execution mode and beneficial effects are similar and will not be described again here.

[0128] Of course, for the sake of simplicity, Figure 5 Only some of the components of the computer device 500 relevant to the present invention are shown in this illustration; components such as buses, input / output interfaces, input devices, and output devices are omitted. In addition, the computer device 500 may include any other suitable components depending on the specific application.

[0129] This disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.

[0130] The aforementioned computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0131] The computer program described above can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer device, partially on the user's device, as a standalone software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.

[0132] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0133] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0134] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data request method, characterized in that, include: Receive a data request instruction sent by the user terminal, wherein the data request instruction includes the user identifier requesting data and the storage address of the target data being requested; The target registration information corresponding to the user identifier is retrieved from the target storage space, which is located outside the permission management system. The permission management system is used to store user registration information, and the registration information stored in the target storage space is the same as the registration information stored in the permission management system. In response to the existence of the target registration information in the target storage space, the target data is obtained from the storage address; The target data is sent to the user terminal.

2. The method according to claim 1, characterized in that, After retrieving the target registration information corresponding to the user identifier from the target storage space, the method further includes: In response to the absence of the target registration information in the target storage space, a prompt message is sent to the user terminal, the prompt message including the absence of the target registration information and the failure of the data request instruction; Receive at least one registration request corresponding to the user identifier sent by the user terminal, each registration request including target registration information corresponding to the user identifier; In response to the at least one registration request, the target registration information is written into the permission management system and the target storage space; Execute the data request instruction sent by the receiving user terminal and the subsequent steps.

3. The method according to claim 2, characterized in that, The step of writing the target registration information into the permission management system and the target storage space in response to the at least one registration request includes: For any one of the at least one registration requests, obtain the distributed lock corresponding to the target registration request; In response to acquiring the distributed lock corresponding to the target registration request, the target registration information corresponding to the user identifier is registered in the permission management system, and the response to other registration requests other than the target registration request in the at least one registration request is suspended; In response to the successful registration of the target registration information in the permission management system, the distributed lock corresponding to the target registration request is deleted, and other registration requests corresponding to the user identifier other than the target registration request are stopped. Write the target registration information into the target storage space; Generate and broadcast a target event message, the target event message including a successful response to the registration request and the existence of the target registration information in the target storage space.

4. The method according to claim 3, characterized in that, The step of registering the target registration information corresponding to the user identifier in the permission management system in response to acquiring the distributed lock corresponding to the target registration request includes: In response to acquiring the distributed lock corresponding to the target registration request, the validity period of the distributed lock is obtained; While the distributed lock is within its valid duration, the target registration information corresponding to the user identifier is registered in the permission management system. When the distributed lock is outside its valid duration, the registration of the target registration information corresponding to the user identifier in the permission management system is stopped.

5. The method according to claim 3, characterized in that, The method further includes: In response to the failure to acquire the distributed lock corresponding to the target registration request, the target event message is monitored within a preset waiting time. In response to detecting the target event message within the preset waiting time, stop responding to the remaining registration requests corresponding to the user identifier other than the target registration request; In response to the failure to detect the target event message within the preset waiting time, it is determined that the target registration request response failed and the target registration information does not exist in the target storage space. The distributed lock corresponding to the target registration request is deleted, and the steps of obtaining the distributed lock corresponding to the target registration request and subsequent steps are executed for any one of the at least one registration request.

6. The method according to claim 1, characterized in that, The method further includes: At preset intervals, the registration information in the target storage space is synchronized with the registration information in the permission management system to ensure that the registration information stored in the target storage space is identical to the registration information stored in the permission management system.

7. The method according to claim 1, characterized in that, The target storage space includes at least one of local cache space and distributed cache space.

8. A data request device, characterized in that, include: The first receiving module is used to receive a data request instruction sent by the user terminal. The data request instruction includes the user identifier requesting data and the storage address of the target data being requested. The lookup module is used to look up the target registration information corresponding to the user identifier from the target storage space, the target storage space being located outside the permission management system, the permission management system being used to store user registration information, and the registration information stored in the target storage space being the same as the registration information stored in the permission management system; The acquisition module is used to acquire the target data from the storage address in response to the existence of the target registration information in the target storage space; The first sending module is used to send the target data to the user terminal.

9. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the data request method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the data request method as described in any one of claims 1-7.