Method, device and related products for processing task mutual exclusion in heterogeneous networks

By managing the free and allocated linked lists of shared storage resources in heterogeneous networks and using mutex locks to process requests, the problem of request conflicts in hybrid cloud deployment is solved and efficient resource matching and response is achieved.

CN113986498BActive Publication Date: 2025-09-23FUZHOU QIYUAN INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111256851.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-09-23
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

Hybrid cloud deployment leads to complex storage services, conflicting requests, and inability to respond effectively.

Method used

By obtaining multiple requests to access shared storage resources, determining the free and allocated linked lists, using the free and allocated linked lists to match resources, adding mutual exclusion locks to avoid conflicts, and achieving dynamic real-time response.

Benefits of technology

It effectively avoids conflicts between requests, achieves effective response to shared storage resources, and improves resource management efficiency and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986498B_ABST
    Figure CN113986498B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, and related products for processing task mutual exclusion in a heterogeneous network. The method comprises: obtaining multiple requests for accessing a shared storage resource; determining a free list and an allocated list of the shared storage resource, wherein the free list includes unallocated shared storage resources, and the allocated list includes releasable shared storage resources; matching shared storage resources in the free list and the allocated list of the shared storage resource to respond to the multiple requests for accessing the shared storage resource, thereby avoiding conflicts between the requests and effectively achieving effective response to the requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of heterogeneous technology, and in particular to a method, device and related products for processing task mutual exclusion in a heterogeneous network. Background Art

[0002] With the continuous development of cloud computing technology, a wide variety of cloud platform products are becoming increasingly available. Different cloud service providers have launched their own basic community cloud platform products in the private, public, and community cloud sectors. With an increasing number of choices, more and more cloud computing users are deploying their businesses across different cloud platforms, demonstrating the trend towards hybrid and multi-cloud deployments.

[0003] In the process of implementing the present invention, the inventors found that the existing technology center, hybrid cloud, and multi-cloud deployment have led to increasingly complex storage services, frequent conflicts in requests, and inability to effectively respond to requests. Summary of the Invention

[0004] Based on the above problems, embodiments of the present application provide a method, device and related products for processing task mutual exclusion in a heterogeneous network.

[0005] The embodiments of this application disclose the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for processing task mutual exclusion in a heterogeneous network, which includes:

[0007] Get multiple requests to access shared storage resources;

[0008] Determine a free list and an allocated list of the shared storage resources, wherein the free list includes unallocated shared storage resources, and the allocated list includes releasable shared storage resources;

[0009] Matching of shared storage resources is performed in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources.

[0010] Optionally, in one embodiment of the present application, determining the free linked list and the allocated linked list of the shared storage resources includes: generating the free linked list based on the unallocated shared storage resources, and generating the allocated class list based on the releasable shared storage resources.

[0011] Optionally, in one embodiment of the present application, the shared storage resources are matched in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources, including: according to the set polling rules, the shared storage resources are periodically matched in the free linked list and the allocated linked list of the shared storage resources to dynamically and in real time respond to the multiple requests for accessing the shared storage resources.

[0012] Optionally, in one embodiment of the present application, matching shared storage resources in the free list and the allocated list of the shared storage resources to respond to multiple requests for access to the shared storage resources also includes: adding a mutex lock for the responded requests for access to the shared storage resources.

[0013] In a second aspect, an embodiment of the present application provides a device for processing mutually exclusive tasks in a heterogeneous network, comprising:

[0014] A request acquisition unit, configured to acquire multiple requests for accessing a shared storage resource;

[0015] a linked list determining unit, configured to determine a free linked list and an allocated linked list of the shared storage resources, wherein the free list includes unallocated shared storage resources, and the allocated linked list includes releasable shared storage resources;

[0016] The resource matching unit is used to match the shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources.

[0017] Optionally, in an embodiment of the present application, the linked list determination unit is specifically used to obtain a release flag of the releasable shared storage resource, generate the allocated class table according to the release flag, and store the release flag in a release bitmap.

[0018] Optionally, in one embodiment of the present application, the resource matching unit is specifically used to perform periodic matching of shared storage resources in the free list and allocated list of the shared storage resources according to the set polling rules, so as to dynamically and in real time respond to multiple requests for access to the shared storage resources.

[0019] Optionally, in an embodiment of the present application, the resource matching unit is further configured to add a mutex lock to the responded request for accessing the shared storage resource.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer executable program, and the processor is used to execute the computer executable program to implement the method described in any one of the embodiments of the present application.

[0021] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer executable program is stored, and when the computer executable program is run, it implements the method described in any one of the embodiments of the present application.

[0022] In an embodiment of the present application, multiple requests for accessing a shared storage resource are obtained; a free list and an allocated list of the shared storage resource are determined, wherein the free list includes unallocated shared storage resources, and the allocated list includes releasable shared storage resources; shared storage resources are matched in the free list and the allocated list of the shared storage resource to respond to the multiple requests for accessing the shared storage resource, thereby avoiding conflicts between the requests and effectively achieving effective response to the requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 This is a flowchart of a method for processing task mutual exclusion in a heterogeneous network in Example 1 of the present application;

[0025] Figure 2 This is a schematic diagram of the structure of a device for processing mutually exclusive tasks in a heterogeneous network in the second embodiment of the present application;

[0026] Figure 3 This is a schematic diagram of the structure of the electronic device in Example 3 of this application;

[0027] Figure 4 This is a schematic diagram of the hardware structure of the electronic device in the fourth embodiment of the present application;

[0028] Figure 5 This is a structural diagram of the computer storage medium in Example 5 of the present application. DETAILED DESCRIPTION

[0029] The implementation of any technical solution in the embodiments of the present application does not necessarily require achieving all of the above advantages at the same time.

[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0031] In an embodiment of the present application, a query request for shared data is obtained; a well-formedness verification is performed on the query request for shared data; if the query request for shared data passes the well-formedness verification, the query request for shared data is parsed according to a query link model to generate a query link that satisfies the query request for shared data; an access interface that matches the query link is determined, and the query request for shared data is mapped to the access interface, thereby effectively determining the query link and the access interface, thereby improving the efficiency of the query.

[0032] Figure 1 This is a flowchart of a method for processing mutual exclusion of tasks in a heterogeneous network according to an embodiment of the present application; Figure 1 As shown, it can be specifically executed by a scheduling server, which specifically includes the following steps:

[0033] S101, obtaining multiple requests for accessing a shared storage resource;

[0034] Specifically, the query request may include an identification of the request initiator, which may be the address of the request initiator, or a unique feature SN assigned to the request initiator. In addition, the request may also include a request type identification.

[0035] Specifically, the request may structurally include a request line, a request header, and a request body. The identity identifier of the request initiator is included in the request line, the type identifier of the request is included in the request header, and the data address pointed to by the request is included in the request data, thereby facilitating subsequent parsing, clustering, and response to the request.

[0036] In this embodiment, the request is obtained through a unified API interface. Specifically, the API interface can be periodically accessed according to a set polling rule to obtain the request, thereby achieving real-time access.

[0037] S102, determining a free list and an allocated list of the shared storage resources, wherein the free list includes unallocated shared storage resources, and the allocated list includes releasable shared storage resources;

[0038] Specifically, in this embodiment, in step S102, determining the free list and the allocated list of the shared storage resources includes generating the free list based on the unallocated shared storage resources and generating the allocated list based on the releasable shared storage resources. By using the free list and the allocated list, unallocated shared storage resources and releasable shared storage resources are managed, thereby improving resource management efficiency, increasing the speed of subsequent matching, and reducing matching consumption.

[0039] Specifically, in this embodiment, in step S102, generating the free list based on the unallocated shared storage resources includes: obtaining a free flag of the unallocated shared storage resources, generating the free list based on the free flag, and storing the free flag in a free bitmap.

[0040] Specifically, in this embodiment, a free flag of the unallocated shared storage resource may be obtained through a thread, and the free linked list may be generated according to the free flag, and the free flag may be stored in a free bitmap.

[0041] Specifically, in this embodiment, a buffer pool is allocated to each idle bitmap, so that the idle flag is equivalent to being stored in the buffer pool.

[0042] Specifically, in this embodiment, in step S102, generating the allocated class table based on the releasable shared storage resource includes: obtaining a release flag of the releasable shared storage resource, generating the allocated class table based on the release flag, and storing the release flag in a release bitmap.

[0043] Specifically, in this embodiment, a release flag of the releasable shared storage resource may be obtained through a thread, and the allocated class table may be generated according to the release flag, and the release flag may be stored in a release bitmap.

[0044] Specifically, in this embodiment, a buffer pool is allocated to each release bitmap, so that the release flag is equivalent to being stored in the buffer pool.

[0045] In this embodiment, the corresponding flags are stored by allocating the buffer pool, thereby improving the speed and real-time performance of data processing.

[0046] Specifically, in the above-mentioned free bitmap and release bitmap, the unallocated state or the released state of the shared storage resource is distinguished by the value of a bit in the bitmap.

[0047] Specifically, in one embodiment, if the shared storage resource has been released, an XOR operation is performed on the corresponding bitmap bit, so that the shared storage resource is added to the free list, thereby realizing the dynamic association of the free list and the allocated list and the real-time conversion of the status of the shared storage resources therein.

[0048] S103: Match shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources.

[0049] In this embodiment, in step S103, the shared storage resources are matched in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources, including: according to the set polling rules, the shared storage resources are periodically matched in the free linked list and the allocated linked list of the shared storage resources to dynamically and in real time respond to the multiple requests for accessing the shared storage resources.

[0050] Specifically, the polling rule may be determined based on the requirements of the application scenario and the way of collecting samples.

[0051] In the above Figure 1 Based on the embodiment, in another embodiment, in step S103, the shared storage resources are matched in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources, and also includes: adding a mutex lock for the responded request for accessing the shared storage resources.

[0052] By adding a mutex lock, the relationship between requests and shared storage resources is bound, avoiding conflicts between requests.

[0053] Figure 2 This is a structural diagram of a processing device for mutually exclusive tasks in a heterogeneous network according to the second embodiment of the present application; Figure 2 As shown, it includes:

[0054] A request obtaining unit 201 is configured to obtain multiple requests for accessing a shared storage resource;

[0055] a linked list determining unit 202, configured to determine a free linked list and an allocated linked list of the shared storage resources, wherein the free list includes unallocated shared storage resources, and the allocated linked list includes releasable shared storage resources;

[0056] The resource matching unit 203 is configured to match shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources.

[0057] Specifically, the query request may include an identification of the request initiator, which may be the address of the request initiator, or a unique feature SN assigned to the request initiator. In addition, the request may also include a request type identification.

[0058] Specifically, the request may structurally include a request line, a request header, and a request body. The identity identifier of the request initiator is included in the request line, the type identifier of the request is included in the request header, and the data address pointed to by the request is included in the request data, thereby facilitating subsequent parsing, clustering, and response to the request.

[0059] In this embodiment, the request is obtained through a unified API interface. Specifically, the API interface can be periodically accessed according to a set polling rule to obtain the request, thereby achieving real-time access.

[0060] Specifically, in this embodiment, the linked list determining unit is specifically configured to generate the free linked list according to the unallocated shared storage resources, and generate the allocated class list according to the releasable shared storage resources.

[0061] Specifically, in this embodiment, the linked list determining unit is specifically configured to obtain a free flag of the unallocated shared storage resource, generate the free linked list according to the free flag, and store the free flag in a free bitmap.

[0062] Specifically, in this embodiment, the linked list determining unit is specifically configured to obtain a release flag of the releasable shared storage resource, generate the allocated class table according to the release flag, and store the release flag in a release bitmap.

[0063] Specifically, in this embodiment, the resource matching unit is specifically used to perform periodic matching of shared storage resources in the free list and allocated list of the shared storage resources according to the set polling rules, so as to dynamically and in real time respond to multiple requests for accessing the shared storage resources.

[0064] Specifically, in this embodiment, the resource matching unit is specifically configured to add a mutex lock to the responded request for accessing the shared storage resource.

[0065] By means of free linked lists and allocated linked lists, unallocated shared storage resources and releasable shared storage resources are managed, thereby improving resource management efficiency, increasing the matching speed in subsequent matching, and reducing matching consumption.

[0066] Specifically, in this embodiment, a free flag of the unallocated shared storage resource may be obtained through a thread, and the free linked list may be generated according to the free flag, and the free flag may be stored in a free bitmap.

[0067] Specifically, in this embodiment, a buffer pool is allocated to each idle bitmap, so that the idle flag is equivalent to being stored in the buffer pool.

[0068] Specifically, in this embodiment, a release flag of the releasable shared storage resource may be obtained through a thread, and the allocated class table may be generated according to the release flag, and the release flag may be stored in a release bitmap.

[0069] Specifically, in this embodiment, a buffer pool is allocated to each release bitmap, so that the release flag is equivalent to being stored in the buffer pool.

[0070] In this embodiment, the corresponding flags are stored by allocating the buffer pool, thereby improving the speed and real-time performance of data processing.

[0071] Specifically, in the above-mentioned free bitmap and release bitmap, the unallocated state or the released state of the shared storage resource is distinguished by the value of a bit in the bitmap.

[0072] Specifically, in one embodiment, if the shared storage resource has been released, an XOR operation is performed on the corresponding bitmap bit, so that the shared storage resource is added to the free list, thereby realizing the dynamic association of the free list and the allocated list and the real-time conversion of the status of the shared storage resources therein.

[0073] Specifically, the polling rule may be determined based on the requirements of the application scenario and the way of collecting samples.

[0074] By adding a mutex lock, the relationship between requests and shared storage resources is bound, avoiding conflicts between requests.

[0075] Figure 3 Schematic diagram of the structure of the electronic device in the third embodiment of the present application; Figure 3 As shown, it includes: a memory 301 and a processor 302, the memory stores a computer executable program, and the processor is used to execute the computer executable program to implement the method described in any embodiment of the present application.

[0076] Figure 4 Schematic diagram of the hardware structure of the electronic device in the fourth embodiment of the present application; Figure 4 As shown, the hardware structure of the electronic device may include: a processor 401, a communication interface 402, a computer-readable medium 403 and a communication bus 404;

[0077] The processor 401, the communication interface 402, and the computer-readable medium 403 communicate with each other via a communication bus 404;

[0078] Optionally, the communication interface 402 may be an interface of a communication module, such as an interface of a GSM module;

[0079] The processor 401 may be specifically configured to run an executable program stored in the memory, thereby executing all or part of the processing steps of any of the above method embodiments.

[0080] The processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0081] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:

[0082] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.

[0083] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0084] (3) Portable entertainment devices: These devices can display and play multimedia content. These devices include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0085] (4) Server: A device that provides computing services. The server consists of a processor 710, a hard disk, memory, a system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0086] (5) Other electronic devices with data interaction functions.

[0087] Figure 5 Schematic diagram of the structure of the computer storage medium in the seventh embodiment of the present application; Figure 5 As shown, the computer storage medium stores a computer executable program, and the computer executable program implements the method described in any embodiment of the present application when it is run.

[0088] An embodiment of the present application further provides a data system, which includes the electronic device described in any embodiment of the present application.

[0089] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components indicated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0090] The above is only a specific implementation of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed in this application should be covered by the scope of protection of the present application.

Claims

1. A method for processing task mutual exclusion in a heterogeneous network, characterized in that: include: Obtain multiple requests for accessing shared storage resources, the requests originating from different cloud platforms in a hybrid cloud or multi-cloud deployment scenario; Determine a free linked list and an allocated linked list of the shared storage resources, wherein the free linked list includes unallocated shared storage resources, and the allocated linked list includes releasable shared storage resources; Matching shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources; The matching of shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources includes: periodically matching shared storage resources in the free linked list and the allocated linked list of the shared storage resources according to a set polling rule to dynamically and in real time respond to the multiple requests for accessing the shared storage resources; The matching of shared storage resources in the free linked list and the allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources further includes: adding a mutex lock for the responded requests for accessing the shared storage resources; The determining of the free linked list and the allocated linked list of the shared storage resources comprises: generating the free linked list according to the unallocated shared storage resources, and generating the allocated linked list according to the releasable shared storage resources; Generating the free linked list according to the unallocated shared storage resources, comprising: obtaining a free flag of the unallocated shared storage resources, generating the free linked list according to the free flag, wherein the free flag is stored in a free bitmap; Generating the allocated linked list according to the releasable shared storage resource, comprising: acquiring a release flag of the releasable shared storage resource, generating the allocated linked list according to the release flag, wherein the release flag is stored in a release bitmap; If the shared storage resource has been released, an XOR operation is performed on the corresponding bitmap bit, thereby adding the shared storage resource to the free linked list.

2. A device for processing mutually exclusive tasks in a heterogeneous network, characterized in that: include: a request acquisition unit, configured to acquire multiple requests for accessing shared storage resources, the requests coming from different cloud platforms in a hybrid cloud or multi-cloud deployment scenario; a linked list determining unit, configured to determine a free linked list and an allocated linked list of the shared storage resources, wherein the free linked list includes unallocated shared storage resources, and the allocated linked list includes releasable shared storage resources; A resource matching unit, configured to match shared storage resources in a free linked list and an allocated linked list of the shared storage resources to respond to the multiple requests for accessing the shared storage resources; The resource matching unit is specifically configured to perform periodic matching of shared storage resources in the free linked list and the allocated linked list of the shared storage resources according to a set polling rule, so as to dynamically and in real time respond to multiple requests for accessing the shared storage resources: The resource matching unit is further configured to add a mutex lock to the responded request for accessing the shared storage resource; The determining of the free linked list and the allocated linked list of the shared storage resources comprises: generating the free linked list according to the unallocated shared storage resources, and generating the allocated linked list according to the releasable shared storage resources; Generating the free linked list according to the unallocated shared storage resources, comprising: obtaining a free flag of the unallocated shared storage resources, generating the free linked list according to the free flag, wherein the free flag is stored in a free bitmap; Generating the allocated linked list according to the releasable shared storage resource, comprising: acquiring a release flag of the releasable shared storage resource, generating the allocated linked list according to the release flag, wherein the release flag is stored in a release bitmap; If the shared storage resource has been released, an XOR operation is performed on the corresponding bitmap bit, thereby adding the shared storage resource to the free linked list.

3. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer executable program, and the processor is configured to execute the computer executable program to implement the method of claim 1.

4. A computer storage medium, characterized in that The computer storage medium stores a computer executable program, which implements the method according to claim 1 when executed.

Citation Information

Patent Citations

  • Memory management method and device

    CN107515785A

  • A network internal storage service system and its constituting method

    CN1773468A