A device sharing method, apparatus, network device, and storage medium

By managing the resource space permissions and data forwarding of external devices through cloud servers, the problem of poor convenience in sharing peripheral devices is solved, and multi-user sharing and convenient access are realized.

CN119363740BActive Publication Date: 2025-11-14CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411426779.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-11-14
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

Existing technologies offer poor convenience for peripheral sharing, involve complex external device redirection, and cannot achieve multi-user sharing.

Method used

The cloud server determines the resource space permissions of the target user, receives device sharing requests, and forwards the data to be processed within the target resource space to enable sharing and processing of external devices.

Benefits of technology

It improves the resource utilization and ease of use of external devices, and enables multiple users to access external devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363740B_ABST
    Figure CN119363740B_ABST
Patent Text Reader

Abstract

This invention provides a device sharing method, relating to the fields of cloud computing and virtualization technology. The method includes: a cloud server determining a first resource space matched by a first target user and obtaining a sharing instruction sent by the first target user, the sharing instruction being used to share an external device of a first cloud computer matched by the first target user to the target resource space; the cloud server receiving a device sharing request sent by a second target user, the device sharing request using the external device and carrying data to be processed; the cloud server determining a second resource space matched by the second target user, and if the second resource space is the target resource space or a resource space within the target resource space, forwarding the data to be processed to the first cloud computer, so that the first cloud computer controls the external device to process the data to be processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of cloud computing and virtualization technology, and in particular to a device sharing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of science and technology, cloud computing technology has been widely applied. Among them, cloud computing, as a disruptive service model, is gradually gaining popularity and recognition among users. It provides users with the convenience of not needing to purchase and maintain expensive hardware, while allowing them to access personal or business data and applications anytime, anywhere. However, in the promotion and use of cloud computing, external device redirection has become a particularly critical and complex technical challenge.

[0003] In existing technologies, peripherals generally include devices such as printers, flash memory, external hard drives, digital cameras, and handwriting tablets. When using peripheral devices, they are usually connected to thin clients, and then the thin clients redirect Universal Serial Bus (USB) devices. The use of peripherals is exclusive to a single user.

[0004] Therefore, existing technologies suffer from poor convenience in sharing peripherals. Summary of the Invention

[0005] This invention provides a device sharing method, apparatus, network device, and storage medium to address the problem of poor convenience in sharing peripherals in the prior art.

[0006] To solve the above-mentioned technical problems, the present invention is implemented as follows:

[0007] In a first aspect, embodiments of the present invention provide a device sharing method, the device sharing method comprising:

[0008] The cloud server determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space.

[0009] The cloud server receives a device sharing request sent by a second target user. The device sharing request uses the external device and carries data to be processed.

[0010] The cloud server determines the second resource space matched by the second target user. If the second resource space is the target resource space or is a resource space within the target resource space, the server forwards the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0011] Secondly, embodiments of the present invention also provide a device sharing apparatus, comprising:

[0012] The first determining module is used to determine the first resource space matched by the first target user and to obtain the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space, wherein the user matched by the first resource space has the permission to share the external device to the target resource space.

[0013] The first receiving module is used to receive a device sharing request sent by the second target user, wherein the device sharing request uses the external device and carries data to be processed.

[0014] The second determining module is used to determine the second resource space matched by the second target user. If the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the module forwards the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0015] Thirdly, embodiments of the present invention provide a network device, including a transceiver and a processor.

[0016] The processor is configured to determine the first resource space matched by the first target user and to obtain a sharing instruction sent by the first target user. The sharing instruction is configured to share the external device of the first cloud computer matched by the first target user to the target resource space, wherein the user matched by the first resource space has the permission to share the external device to the target resource space.

[0017] The transceiver is used to receive a device sharing request sent by a second target user, the device sharing request using the external device and carrying data to be processed.

[0018] The processor is configured to determine the second resource space matched by the second target user, and if the second resource space is the target resource space or the second resource space is a resource space within the target resource space, forward the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0019] Fourthly, embodiments of the present invention provide a network device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the device sharing method described in the first aspect.

[0020] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the device sharing method described in the first aspect.

[0021] In a sixth aspect, embodiments of the present invention provide a computer program / program product stored in a storage medium, the computer program / program product being executed by at least one processor to implement the steps of the device sharing method described in the first aspect above.

[0022] In the device sharing method of this embodiment, the cloud server first determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space. Then, the cloud server receives a device sharing request sent by a second target user. The device sharing request uses the external device and carries data to be processed. Finally, the cloud server determines the second resource space matched by the second target user. If the second resource space is the target resource space or a resource space within the target resource space, the data to be processed is forwarded to the first cloud computer so that the first cloud computer can control the external device to process the data to be processed. Through redirection technology, the first target user and the second target user can access the same external device, improving resource utilization and the convenience of using the external device. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, 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 of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating a device sharing method provided in an embodiment of the present invention;

[0025] Figure 2 This is a peripheral sharing topology diagram provided in an embodiment of the present invention;

[0026] Figure 3 This is one of the schematic diagrams of leader cloud host node election provided in the embodiments of the present invention;

[0027] Figure 4 This is the second schematic diagram of a leader cloud host node election provided in an embodiment of the present invention;

[0028] Figure 5 This is the third schematic diagram of a leader cloud host node election provided in this embodiment of the invention;

[0029] Figure 6 This is a schematic diagram of the structure of a device sharing device provided in an embodiment of the present invention;

[0030] Figure 7 This is a schematic diagram of the structure of a network device provided in an embodiment of the present invention. Detailed Implementation

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

[0032] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0033] It should be understood that before device sharing, the steps of deploying agent modules and virtual peripheral drivers can be performed. Specifically, firstly, all users (which can be users within a region or users within an enterprise) are deployed in a resource pool. Each cloud computer in the same resource pool is in the same local area network. Then, the agent module and virtual peripheral drivers are deployed in each cloud computer through the remote desktop protocol, and the instance identifier (ID) of the cloud computer is reported to the management platform, which is located on the cloud server side.

[0034] Additionally, cloud terminal users can log in using the following process: Upon first login, the system will first query the local sqlite3 database to see if the current user account has an instance ID and namespace. If these two pieces of information are empty, the system will connect to the management platform using the username and password, and then search for and bind the instance ID in the management platform's database to enable remote connection to the cloud computer. Next, the system will retrieve the user's default namespace based on the instance ID and send the instance ID and namespace information to the client via a JSON file. After receiving this information, the client will write it to its local sqlite3 database, thus completing the login process and preparing for subsequent peripheral device sharing.

[0035] Please see Figure 1 , Figure 1 This is a flowchart illustrating a device sharing method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps:

[0036] Step 101: The cloud server determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space.

[0037] Step 102: The cloud server receives a device sharing request sent by the second target user. The device sharing request uses the external device and carries data to be processed.

[0038] Step 103: The cloud server determines the second resource space matched by the second target user. If the second resource space is the target resource space or the second resource space is a resource space within the target resource space, the server forwards the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0039] In step 101, the cloud server can first determine the first resource space matched by the first target user, thereby obtaining that the user matched by the first target user has the permission to share the external device to the target resource space. In this embodiment of the invention, the management platform on the cloud server side groups the resource pool to obtain groups with different sharing permissions, i.e., resource spaces.

[0040] Once the first target user successfully connects to the cloud computer, they can obtain a list of shared peripheral devices from the management platform, which is displayed directly on the user's terminal interface. If the list is empty, it means there are no shared devices available in the current private resource pool. The first target user selects an external device from the list of shared peripheral devices to share, thus generating the aforementioned sharing command.

[0041] It should be noted that the aforementioned external devices include, but are not limited to, printers, monitors, plotters, and speech synthesizers, etc., and the embodiments of the present invention do not limit these devices.

[0042] In step 102, the cloud server can receive a device sharing request sent by the second target user. Since the first target user has confirmed that the external device is shared for use by other users, the second target user can see that the external device is available on the terminal side. That is, the second target user sends the device sharing request to the cloud server side.

[0043] The second target user can associate with the second cloud computer. The virtual peripheral driver pre-installed on the remote desktop of the second cloud computer can create a virtual device, while intercepting the data to be processed and adding the Internet Protocol address of the first cloud computer to the data to be processed to ensure the accuracy of subsequent device sharing addressing.

[0044] In step 103, the cloud server can determine the second resource space matched by the second target user. If the second resource space is the target resource space or the second resource space is a resource space within the target resource space, then the cloud server can confirm that the second target user has the right to use the external device.

[0045] During this confirmation process, we can continue to take step 102 above as an example. The Internet Protocol address of the first cloud computer is added to the data to be processed. This can be understood as the device sharing request. The device sharing request can be sent to the cloud host node. The cloud host node can compare the Internet Protocol address saved in advance and confirm the second resource space matched by the second target user through the comparison.

[0046] If the comparison is successful, the data to be processed is forwarded to the first cloud computer, which then controls the external device to process the data, thereby completing the device sharing process. If the comparison fails, the data is reported to the management platform, which then sends the message to the cloud host nodes in other resource spaces to realize the peripheral device sharing function.

[0047] For ease of understanding, the following is shown Figure 2 , Figure 2 This is a peripheral sharing topology diagram provided in an embodiment of the present invention, combined with Figure 2 This section introduces the process of sharing external devices.

[0048] Taking user A sharing a local printer from the root space (example name) to all spaces as an example, this illustrates the entire process of peripheral device sharing. The topology diagram is as follows: Figure 2 As shown. Assume user A is associated with a remote cloud computer named A'. For users sharing devices for the first time, the system first queries their namespace in the sqlite3 database. If the user belongs to the root space, they can choose to share the device to the current space or all spaces; if the user belongs to the user space (example name), they can only share the device to the current space; for users in the others space (example name), the sharing function will be disabled, and the interface will be grayed out, but they can still redirect the printer to their remote cloud computer.

[0049] When user A clicks "share," the printer's basic hardware information, its namespace, and the target shared space are sent to the management platform. The management platform then assigns the share redirection request to the appropriate leader cloud host node based on the user's namespace and the target shared space. In this scenario, leader cloud host nodes in all three spaces will receive the request, but only the leader cloud host node in the same namespace as the user stores the IP address of the remote cloud computer A' to ensure accurate subsequent share addressing.

[0050] The management platform then sends a sharing message containing A's IP address to all users with sharing permissions. When user B sees the printer is available on their terminal and performs a print operation, the virtual peripheral driver pre-installed on their remote desktop B' creates a virtual device, intercepts the print data, and appends A's IP information to the data header before sending it to the leader cloud host node. The leader node compares the IP address with a pre-saved IP address. If a match is found, the data is forwarded to A' in the same namespace, completing the redirection of the shared printer. If no match is found, the management platform is notified, and the platform sequentially sends the message to leader nodes in other namespaces to achieve peripheral sharing.

[0051] In this implementation scheme, the cloud server first determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user. The sharing instruction is used to move the external device of the first cloud computer matched by the first target user to the target resource space. Then, the cloud server receives a device sharing request sent by the second target user. The device sharing request uses the external device and carries data to be processed. Finally, the cloud server determines the second resource space matched by the second target user. If the second resource space is the target resource space or a resource space within the target resource space, the data to be processed is forwarded to the first cloud computer. The first cloud computer then controls the external device to process the data to be processed. Through redirection technology, the first target user and the second target user can access the same external device, improving resource utilization and the convenience of using the external device.

[0052] Optionally, the method further includes:

[0053] Create resource space;

[0054] The creation of the resource space includes:

[0055] The cloud server obtains access to shared peripheral resources from all users.

[0056] The cloud server groups the resource pool into three independent resource spaces based on the shared peripheral resource permissions. All users are deployed in the resource pool, and each cloud computer in the resource pool is on the same local area network.

[0057] The three independent resource spaces are a first-level resource space, a second-level resource space, and a third-level resource space. Users matched with the first-level resource space have the permission to share the external device to the first-level resource space, the second-level resource space, and the third-level resource space. Users matched with the second-level resource space have the permission to share the external device to the second-level resource space.

[0058] The first resource space is either the resource space of the first level or the resource space of the second level.

[0059] In this implementation scheme, the cloud server first obtains the shared peripheral resource permissions for all users, and can then modify these permissions. Next, the cloud server groups the resource pool into three independent resource spaces based on these shared peripheral resource permissions. Users matching the first-level resource space have the permission to share the external devices to the first-level, second-level, and third-level resource spaces. Users matching the second-level resource space have the permission to share the external devices to the second-level resource space. Users matching the third-level resource space can only use the external devices for their own purposes. This method achieves fine-grained user role and permission allocation, ensuring that users can only access shared peripheral resources that match their permissions, thereby enhancing system security and improving management flexibility.

[0060] To facilitate understanding, the following examples illustrate the embodiments of the present invention, providing a complete description of the process of namespace creation and shared permission management. First, the management platform on the cloud server side creates the entire private cluster's resource pool into three completely independent and isolated logical spaces. The three namespaces are named root space, user space, and others space respectively (this is just an example; other naming methods are possible, and the present invention does not limit this).

[0061] It's important to note that all three spaces can access peripheral resources within the cluster, but users have different peripheral sharing permissions within their respective spaces. If a user belongs to the root space, they not only have the right to share peripheral devices within that space, but also the ability to further share them to the user space and the others space. In contrast, users in the user space can only share peripherals with cloud computers within the same space, while those in the others space have limited peripheral sharing capabilities and cannot perform any sharing operations.

[0062] Optionally, the cloud server determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user, including:

[0063] The cloud server sends a list of shared peripheral devices to the client that matches the first target user. The list of shared peripheral devices is a list of external devices that the first target user has permission to share.

[0064] The cloud server determines the first resource space corresponding to the first target user in the database, and obtains the sharing instruction sent by the client.

[0065] In this implementation scheme, the cloud server first sends a list of shared peripheral devices to a client matching the first target user. The first target user then confirms the shared external devices. Next, the cloud server determines the first resource space corresponding to the first target user in its database and retrieves the sharing instruction sent by the client. This method accurately determines the external devices the first target user intends to share, preventing errors in sharing. Furthermore, by determining the first resource space corresponding to the first target user in its database, the cloud server can also determine the first target user's sharing permissions, preventing permission overreach or malfunctions, thus ensuring the stable operation of the external device sharing process.

[0066] The aforementioned list of shared peripheral devices can be presented to the terminal of the first target user in various visual formats, with the aim of allowing the first target user to clearly identify the external devices that can be shared. This embodiment of the invention does not limit the visual format of the aforementioned list of shared peripheral devices.

[0067] Optionally, the cloud server receives a device sharing request sent by the second target user, including:

[0068] The cloud server sends the shared information to the management platform on one side of the cloud server according to the sharing instruction. The shared information includes the basic hardware information of the external device, the first resource space, and the target resource space.

[0069] The cloud server controls the management platform to send the shared information to the second target user;

[0070] The cloud server receives a device sharing request sent by the second target user.

[0071] In this implementation scheme, the cloud server, based on the sharing instruction, can first send the sharing information to the management platform. This sharing information may include basic hardware information of the external device, the first resource space, and the target resource space. The management platform can then send the sharing information to the second target user based on the target resource space. The second target user can then select available external devices using the sharing information and send a device sharing request to the cloud server through a terminal matched to the second target user. This method allows the cloud server to accurately locate the user who can share the information—the second target user—within the target resource space, ensuring that the second target user can only access shared peripheral resources with matching permissions. This enhances system security and improves management flexibility.

[0072] Optionally, the cloud server determines the second resource space matched to the second target user. If the second resource space is the target resource space or a resource space within the target resource space, the server forwards the data to be processed to the first cloud computer, which then controls the external device to process the data, including:

[0073] The cloud server determines the second resource space matched by the second target user and analyzes and processes the device sharing request to obtain the first address information;

[0074] The cloud server collects the second set of address information stored in the leader cloud host node, and matches the first address information with the second set of address information stored in the leader cloud host node one by one. The leader cloud host node is a routing node in the first resource space.

[0075] If a match is successful, the cloud server forwards the data to be processed to the first cloud computer, which then controls the external device to process the data.

[0076] In this implementation scheme, the device sharing request may carry the first address information, which is the address of the first cloud computer. Therefore, the cloud server can first determine the second resource space matched by the second target user and analyze and process the device sharing request to obtain the first address information. Each resource space's leader cloud host node stores the address information of all cloud computers within its space. Therefore, the cloud server can collect the set of second address information stored in the leader cloud host node and match the first address information with the set of second address information stored in the leader cloud host node one by one. If the match is successful, the cloud computer can forward the data to be processed to the first cloud computer, and the first cloud computer can control the external device to process the data to be processed. This method ensures the accuracy of sharing addressing, prevents arbitrary sharing of external devices, and provides both convenience and security for sharing external devices.

[0077] It should be noted that the first address information mentioned above can be added to the beginning of the data to be processed, or it can be added to the end of the data to be processed. This embodiment of the present invention does not limit this.

[0078] Of course, to ensure security, a security code that can be recognized by the leader's cloud host node can also be added to the above-mentioned shared information, and this embodiment of the invention does not limit this.

[0079] Optionally, the method further includes:

[0080] Elect a leader cloud host node for the resource space;

[0081] The leader cloud host node for electing the resource space includes:

[0082] The cloud server obtains the identifier of each cloud host in the target resource space, where the target resource space is any one of the first-level resource space, the second-level resource space, and the third-level resource space.

[0083] The cloud server sorts each cloud host according to the identifier number, and determines the cloud host with the largest identifier number as the first target leader cloud host node in the target resource space;

[0084] If the first target leader cloud host node in the target resource space goes offline, the cloud hosts that are still online will send election information to the cloud hosts with larger identifiers in ascending order of their identifiers. The cloud host that receives the election information will reply to the cloud host that sent the election information.

[0085] If the target cloud host does not receive a response, the target cloud host is identified as the second target leader cloud host node within the target resource space.

[0086] In this implementation scheme, a leader cloud host node can be elected in each resource space. The leader cloud host node handles the tasks of the current resource space. The cloud server first obtains the identifier of each cloud host in the target resource space. The target resource space can be any one of the first-level resource space, the second-level resource space, and the third-level resource space. Then, the cloud server sorts each cloud host according to the identifier and determines the cloud host with the largest identifier as the first target leader cloud host node in the target resource space. To ensure the stability of the resource pool cloud computer cluster, this method adopts a leader election algorithm. This algorithm can automatically elect and maintain the leader node, ensuring that the cluster can quickly recover stability in the event of a failure, effectively improving the availability and maintenance efficiency of the system.

[0087] To facilitate understanding, the selection of the leader cloud host node is illustrated below with an example. First, three interconnected cloud hosts are deployed in each resource pool. They periodically send heartbeat signals to confirm each other's liveness. These three cloud hosts have IDs 1, 2, and 3, and each knows the other's IP address and ID information. During the initialization phase, each cloud host determines whether it has the largest ID among the currently alive nodes. If so, it sends a "Victory" message to the other cloud hosts, declaring itself the leader node. In our scenario, the cloud host with ID 3 will be the first to declare itself the leader. However, when one of the cloud hosts fails and goes offline, we need to re-elect the leader node. If the offline node is a slave node, the impact on the entire resource pool is relatively small. However, if the leader node goes offline, a new election process will be triggered. Taking the example where node with ID 1 first detects the loss of the heartbeat of the leader node with ID 3, node 1 will initiate an election. It will send an "Election" message to all nodes with IDs larger than its own. Since node 3 is offline, there will be no response. At this point, the node with ID 2 will receive an "Election" message and reply with an "Alive" message to indicate that it is alive. After receiving the response from node 2, node 1 will stop the election process because it has found a live node with a higher ID than its own. Figure 3 As shown.

[0088] Next, node 2 takes over the election and continues sending "Election" messages to nodes with larger IDs. Since no responses are received from other nodes, node 2 eventually sends "Victory" messages to all other cloud hosts, declaring itself the new leader node. Figure 4 As shown.

[0089] Suppose that after some time, the faulty node with ID 3 recovers and comes back online. It will directly send a "Victory" message to the other nodes, re-declaring itself the leader node. At this point, the original leader node 2, upon receiving an election request from a node with a higher ID, will voluntarily demote to a slave node. Figure 5 As shown, this algorithm enables us to ensure the stability of the resource pool leader node and achieve a fast and efficient leader election process when node failure occurs.

[0090] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a device sharing device provided in an embodiment of the present invention. Figure 6 As shown, the device sharing device 600 includes:

[0091] The first determining module 601 is used to determine the first resource space matched by the first target user and to obtain the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space.

[0092] The first receiving module 602 is used to receive a device sharing request sent by a second target user, wherein the device sharing request uses the external device and carries data to be processed.

[0093] The second determining module 603 is used to determine the second resource space matched by the second target user. If the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the module forwards the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0094] Optionally, the device further includes:

[0095] Create a module to create resource spaces;

[0096] The creation module includes:

[0097] The first acquisition unit is used to acquire the shared peripheral resource permissions of all users;

[0098] The grouping unit is used to group the resource pool into three independent resource spaces according to the shared peripheral resource permissions. All users are deployed in the resource pool, and each cloud computer in the resource pool is on the same local area network.

[0099] The three independent resource spaces are a first-level resource space, a second-level resource space, and a third-level resource space. Users matched with the first-level resource space have the permission to share the external device to the first-level resource space, the second-level resource space, and the third-level resource space. Users matched with the second-level resource space have the permission to share the external device to the second-level resource space.

[0100] The first resource space is either the resource space of the first level or the resource space of the second level.

[0101] Optionally, the first determining module 601 includes:

[0102] The first sending unit is configured to send a list of peripheral sharing devices to a client matching the first target user, wherein the list of peripheral sharing devices is a list of external devices that the first target user has permission to share;

[0103] The first determining unit is configured to determine the first resource space corresponding to the first target user in the database, and to obtain the sharing instruction sent by the client.

[0104] Optionally, the first receiving module 602 includes:

[0105] The second sending unit is used to send the shared information to the management platform on the cloud server side according to the sharing instruction. The shared information includes the basic hardware information of the external device, the first resource space, and the target resource space.

[0106] The third sending unit is used to control the management platform to send the shared information to the second target user;

[0107] The first receiving unit is used to receive the device sharing request sent by the second target user.

[0108] Optionally, the second determining module 603 includes:

[0109] The second determining unit is used to determine the second resource space matched by the second target user and to analyze and process the device sharing request to obtain the first address information.

[0110] The first processing unit is used to collect the second address information set stored in the leader cloud host node, and match the first address information with the second address information set stored in the leader cloud host node one by one, wherein the leader cloud host node is a routing node in the first resource space;

[0111] The second processing unit, upon successful matching, forwards the data to be processed to the first cloud computer, which then controls the external device to process the data.

[0112] Optionally, the device further includes:

[0113] The election module is used to elect the leader cloud host node for the resource space.

[0114] The election module includes:

[0115] The second acquisition unit is used to acquire the identifier of each cloud host in the target resource space, wherein the target resource space is any one of the first-level resource space, the second-level resource space and the third-level resource space;

[0116] The first election unit is used to sort each cloud host according to the identifier number and determine the cloud host with the largest identifier number as the first target leader cloud host node in the target resource space.

[0117] In the second election unit, if the first target leader cloud host node in the target resource space goes offline, the cloud hosts that are not offline send election information to the cloud hosts with larger identifiers in ascending order of the identifier number. The cloud host that receives the election information replies to the cloud host that sent the election information.

[0118] The third election unit, in the absence of a response from the target cloud host, is used to determine the target cloud host as the second target leader cloud host node within the target resource space.

[0119] This invention also provides a network device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described device sharing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0120] For details, see Figure 7 The present invention also provides a network device, including a bus 701, a transceiver 702, an antenna 703, a bus interface 704, a processor 705, and a memory 706.

[0121] The processor 705 is configured to determine the first resource space matched by the first target user and to obtain a sharing instruction sent by the first target user. The sharing instruction is configured to share the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space.

[0122] Transceiver 702 is used to receive a device sharing request sent by a second target user, wherein the device sharing request uses the external device and carries data to be processed.

[0123] The processor 705 is configured to determine the second resource space matched by the second target user, and if the second resource space is the target resource space or the second resource space is a resource space within the target resource space, forward the data to be processed to the first cloud computer so that the first cloud computer controls the external device to process the data to be processed.

[0124] exist Figure 7In this document, a bus architecture (represented by bus 701) is used. Bus 701 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 705 and memory represented by memory 706. Bus 701 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 704 provides an interface between bus 701 and transceiver 702. Transceiver 702 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 705 is transmitted over a wireless medium via antenna 703, which further receives data and transmits data to processor 705.

[0125] Processor 705 manages bus 701 and general processing, and also provides various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 706 can be used to store data used by processor 705 during operation.

[0126] Optionally, the processor 705 can be a CPU, ASIC, FPGA, or CPLD.

[0127] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described uplink power control method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0128] This invention also provides a network device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described uplink power control method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0129] It should be noted that, in this document, 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. Unless otherwise specified, 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 that element.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0131] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A device sharing method, characterized in that, include: The cloud server determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user. The sharing instruction is used to share the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space. The cloud server receives a device sharing request sent by a second target user. The device sharing request uses the external device and carries data to be processed. The cloud server determines the second resource space matched by the second target user. If the second resource space is the target resource space, or if the second resource space is a resource space within the target resource space, the server forwards the data to be processed to the first cloud computer, so that the first cloud computer controls the external device to process the data to be processed.

2. The device sharing method according to claim 1, characterized in that, The method further includes: Create resource space; The creation of the resource space includes: The cloud server obtains access to shared peripheral resources from all users. The cloud server groups the resource pool into three independent resource spaces based on the shared peripheral resource permissions. All users are deployed in the resource pool, and each cloud computer in the resource pool is on the same local area network. The three independent resource spaces are a first-level resource space, a second-level resource space, and a third-level resource space. Users matched with the first-level resource space have the permission to share the external device to the first-level resource space, the second-level resource space, and the third-level resource space. Users matched with the second-level resource space have the permission to share the external device to the second-level resource space. The first resource space is either the resource space of the first level or the resource space of the second level.

3. The device sharing method according to claim 2, characterized in that, The cloud server determines the first resource space matched by the first target user and obtains the sharing instruction sent by the first target user, including: The cloud server sends a list of shared peripheral devices to the client that matches the first target user. The list of shared peripheral devices is a list of external devices that the first target user has permission to share. The cloud server determines the first resource space corresponding to the first target user in the database, and obtains the sharing instruction sent by the client.

4. The device sharing method according to claim 3, characterized in that, The cloud server receives a device sharing request sent by the second target user, including: The cloud server sends the shared information to the management platform on one side of the cloud server according to the sharing instruction. The shared information includes the basic hardware information of the external device, the first resource space, and the target resource space. The cloud server controls the management platform to send the shared information to the second target user; The cloud server receives a device sharing request sent by the second target user.

5. The device sharing method according to claim 4, characterized in that, The cloud server determines the second resource space matched to the second target user. If the second resource space is the target resource space or a resource space within the target resource space, the server forwards the data to be processed to the first cloud computer. The first cloud computer then controls the external device to process the data to be processed, including: The cloud server determines the second resource space matched by the second target user and analyzes and processes the device sharing request to obtain the first address information; The cloud server collects the second set of address information stored in the leader cloud host node, and matches the first address information with the second set of address information stored in the leader cloud host node one by one. The leader cloud host node is a routing node in the first resource space. If a match is successful, the cloud server forwards the data to be processed to the first cloud computer, which then controls the external device to process the data.

6. The device sharing method according to claim 2, characterized in that, The method further includes: Elect a leader cloud host node for the resource space; The leader cloud host node for electing the resource space includes: The cloud server obtains the identifier of each cloud host in the target resource space, where the target resource space is any one of the first-level resource space, the second-level resource space, and the third-level resource space. The cloud server sorts each cloud host according to the identifier number, and determines the cloud host with the largest identifier number as the first target leader cloud host node in the target resource space; If the first target leader cloud host node in the target resource space goes offline, the cloud hosts that are still online will send election information to the cloud hosts with larger identifiers in ascending order of their identifiers. The cloud host that receives the election information will reply to the cloud host that sent the election information. If the target cloud host does not receive a response, the target cloud host is identified as the second target leader cloud host node within the target resource space.

7. A device for sharing equipment, characterized in that, include: The first determining module is used to determine the first resource space matched by the first target user and to obtain the sharing instruction sent by the first target user. The sharing instruction is used to transfer the external device of the first cloud computer matched by the first target user to the target resource space. The user matched by the first resource space has the permission to share the external device to the target resource space. The first receiving module is used to receive a device sharing request sent by the second target user, wherein the device sharing request uses the external device and carries data to be processed. The second determining module is used to determine the second resource space matched by the second target user. If the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the module forwards the data to be processed to the first cloud computer, and the first cloud computer controls the external device to process the data to be processed.

8. A network device, characterized in that, Including transceivers and processors, The processor is configured to determine the first resource space matched by the first target user and to obtain a sharing instruction sent by the first target user. The sharing instruction is configured to transfer the external device of the first cloud computer matched by the first target user to the target resource space, wherein the user matched by the first resource space has the permission to share the external device to the target resource space. The transceiver is used to receive a device sharing request sent by a second target user, the device sharing request using the external device and carrying data to be processed. The processor is configured to determine the second resource space matched by the second target user, and if the second resource space is the target resource space or the second resource space is a resource space within the target resource space, forward the data to be processed to the first cloud computer, and the first cloud computer controls the external device to process the data to be processed.

9. A network device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.

11. A computer program product, characterized in that, The program product is executed by at least one processor to implement the device sharing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Resource sharing method, device and system

    CN108123925A

  • External equipment redirection method and system

    CN114691228A