Equipment sharing method and device, network equipment and storage medium

The cloud server determines the resource space of the target user in the cloud computing environment and shares external devices, which solves the problem of poor convenience in peripheral sharing in the existing technology and achieves efficient sharing of external devices and improvement in resource utilization.

CN119363740AActive Publication Date: 2025-01-24CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

现有技术中对外设共享便捷性较差,难以实现外部设备的高效共享。

Method used

Determine the resource space of the target user matching through the cloud server, and obtain the sharing instructions, share external equipment to the target resource space, receive the equipment sharing request and forward the data to the first cloud computer to control the external device processing data.

Benefits of technology

The convenient sharing of external equipment has been realized, which enhances the convenience of resource utilization and the convenience of external equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363740A_ABST
    Figure CN119363740A_ABST
Patent Text Reader

Abstract

The invention provides an equipment sharing method, and relates to the technical field of cloud computing and virtualization, and the method comprises the steps that a cloud server determines a first resource space matched with a first target user and obtains a sharing instruction sent by the first target user, the sharing instruction is used for sharing external equipment of a first cloud computer matched with the first target user to a target resource space; the cloud server receives an equipment sharing request sent by a second target user, the equipment sharing request uses the external equipment, and the equipment sharing request carries to-be-processed data; and the cloud server determines a second resource space matched with a second target user, and forwards the to-be-processed data to the first cloud computer when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, and sending the to-be-processed data to the first cloud computer, so that the first cloud computer controls the external equipment to process the to-be-processed data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing and virtualization, and in particular to a device sharing method, apparatus, electronic device and storage medium. Background Art

[0002] With the development of science and technology, cloud computing technology has been widely used. Among them, cloud computers, as a subversive service model, are gradually gaining the favor and recognition of users. It can provide users with the convenience of not having to purchase and maintain expensive hardware devices, and can access personal or corporate data and applications anytime and anywhere. However, in the promotion and use of cloud computers, external device redirection has become a particularly critical and complex technical problem.

[0003] In the prior art, peripherals generally include printers, flash memory, mobile hard disks, digital cameras, writing tablets and other devices, and when using peripherals, they are generally connected to a thin terminal, and then the thin terminal is used to redirect the Universal Serial Bus (USB) device, so that the use of the peripherals is exclusive to a single user.

[0004] Therefore, there is a problem in the prior art that the convenience of sharing peripherals is poor. Summary of the invention

[0005] The embodiments of the present invention provide a device sharing method, apparatus, network equipment and storage medium to solve the problem of poor convenience in peripheral device sharing in the prior art.

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

[0007] In a first aspect, an embodiment of the present invention provides 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 a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an 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 authority 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, wherein the device sharing request uses the external device and carries data to be processed;

[0010] The cloud server determines a second resource space matched by a second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, 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] In a second aspect, an embodiment of the present invention further provides a device sharing apparatus, including:

[0012] A first determination module is used to determine a first resource space matched by a first target user and obtain a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an external device of a first cloud computer matched by the first target user to a target resource space, wherein the user matched by the first resource space has the authority to share the external device to the target resource space;

[0013] A first receiving module, configured 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;

[0014] The second determination module is used to determine the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in 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.

[0015] In a third aspect, an embodiment of the present invention provides a network device, including a transceiver and a processor.

[0016] The processor is used to determine the first resource space matched by the first target user and obtain a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an 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 authority 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, wherein the device sharing request uses the external device and carries data to be processed;

[0018] The processor is used to determine the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in 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] In a fourth aspect, an embodiment of the present invention provides a network device, comprising: 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 device sharing method described in the first aspect above.

[0020] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the device sharing method described in the first aspect are implemented.

[0021] In a sixth aspect, an embodiment of the present invention provides a computer program / program product, which is stored in a storage medium and 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 can first determine the first resource space matched by the first target user and 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, then the cloud server receives the device sharing request sent by the second target user, the device sharing request uses the external device, and the device sharing request carries the data to be processed, finally the cloud server determines the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the data to be processed is forwarded to the first cloud computer, so that the first cloud computer controls the external device to process the data to be processed, and through redirection technology, the first target user and the second target user can access the same external device, thereby improving resource utilization and convenience in using external devices. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 It is a flowchart of a device sharing method provided by an embodiment of the present invention;

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

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

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

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

[0029] Figure 6 It is a structural schematic diagram of a device sharing apparatus provided by an embodiment of the present invention;

[0030] Figure 7 It is a structural diagram of a network device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0032] The terms "first", "second", etc. in the embodiments of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0033] It should be understood that before device sharing, steps of deploying proxy modules and virtual peripheral drivers can be performed. Specifically, all users (which can be users in a region or users of an enterprise) are first deployed in a resource pool, and each cloud computer in the same resource pool is in a local area network. The proxy module and virtual peripheral driver are then deployed in each cloud computer through the remote desktop protocol, and the instance identification code (Identity document, ID) of the cloud computer is reported to the management platform, where the management platform is on the cloud server side.

[0034] In addition, the login of cloud terminal users can be carried out according to the following process. When a cloud terminal user logs in for the first time, the system will first query the local sqlite3 database to see whether there is an instance ID and namespace under the current user account. If these two pieces of information are empty, the system will use the account and password to connect to the management platform, and then find and bind the instance ID in the management platform's database to achieve remote connection to the cloud computer. Then, the system obtains the user's namespace preset by the management platform based on the instance ID, and sends the instance ID and namespace information to the client through a JSON file. After receiving this information, the client will write it to the local sqlite3 database, thereby completing the login process and preparing for subsequent peripheral sharing.

[0035] See also Figure 1 , Figure 1 is a flow chart of a device sharing method provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0036] Step 101, the cloud server determines the first resource space matched by the first target user and obtains a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an 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 authority to share the external device to the target resource space;

[0037] Step 102: The cloud server receives 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;

[0038] Step 103: The cloud server determines the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, 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 may 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 authority to share the external device to the target resource space. In an embodiment of the present invention, the management platform on the cloud server side groups the resource pool to obtain groups with different sharing permissions, namely, resource spaces.

[0040] When the first target user successfully accesses the cloud computer, the first target user can obtain a list of shared peripheral devices from the management platform, and the list is directly displayed on the user terminal interface. If the list is empty, it means that there is no shared device available in the current privatized resource pool. The first target user selects an external device to share in the list of shared peripheral devices, and the sharing instruction is generated.

[0041] It should be noted that the above-mentioned external devices include but are not limited to devices such as printers, displays, plotters, and speech synthesizers, and the embodiments of the present invention do not limit this.

[0042] In step 102, the cloud server may receive a device sharing request sent by the second target user. Since the first target user confirms to share the external device for use by other users, the second target user may see that the external device is available on the terminal side, i.e., the second target user sends the device sharing request to the cloud server side.

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

[0044] In step 103, the cloud server may determine the second resource space matched by the second target user, and confirm that the second target user has the right to use the external device when the second resource space is the target resource space or the second resource space is the resource space in the target resource space.

[0045] During this confirmation process, we can continue to take the above-mentioned step 102 as an example. The Internet Protocol address of the above-mentioned first cloud computer is added to the above-mentioned data to be processed, which can be understood as the above-mentioned device sharing request. The above-mentioned 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 above-mentioned second resource space matched by the above-mentioned second target user through comparison.

[0046] If the comparison is successful, the above-mentioned data to be processed will be forwarded to the above-mentioned first cloud computer, and the above-mentioned first cloud computer will control the above-mentioned external device to process the data to be processed, thereby completing the device sharing process. If the comparison is unsuccessful, it will be reported to the management platform, and the management platform will send messages to the cloud host nodes of other resource spaces in turn to realize the peripheral sharing function.

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

[0048] Take user A sharing the local printer to all spaces in the root space (named for example) as an example to illustrate the whole process of peripheral sharing. The topology diagram is as follows: Figure 2 As shown. Assume that the remote cloud computer associated with user A is A'. For users who share devices for the first time, the system will first query 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 (named for example), they can only share the device to the current space; for users in the others space (named for example), 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 on Share, the basic hardware information of the printer device, its namespace, and target shared space will be sent to the management platform. The management platform will assign the share redirection request to the corresponding leader cloud host node for processing based on the user's namespace and target shared space. In this scenario, the leader cloud host nodes of the three spaces will receive the request, but only the leader cloud host node in the same namespace as the user will store the IP address of the remote cloud computer A' to ensure the accuracy of subsequent share addressing.

[0050] The management platform then sends a sharing message containing A's IP address to all users who meet the sharing permissions. When user B sees that the printer is available on his terminal and performs a print operation, the virtual peripheral driver pre-installed on his remote desktop B' will create a virtual device and intercept the print data. After obtaining the data, it will attach A's IP information to the data header and send it to the leader cloud host node. The leader node will compare the previously saved IP address. If a match is successful, the data will be forwarded to A' in the same namespace to complete the redirection of the shared printer; if there is no match, it will be reported to the management platform, and the management platform will send messages to the leader nodes of other namespaces in turn to realize the peripheral sharing function.

[0051] In this implementation scheme, the cloud server can first determine the first resource space matched by the first target user and obtain 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 the device sharing request sent by the second target user, the device sharing request uses the external device, and the device sharing request carries the data to be processed, finally the cloud server determines the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the data to be processed is forwarded to the first cloud computer, and the first cloud computer 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, thereby improving resource utilization and convenience in using external devices.

[0052] Optionally, the method further comprises:

[0053] Create resource space;

[0054] The creating resource space includes:

[0055] The cloud server obtains the shared peripheral resource permissions of all users;

[0056] The cloud server groups the resource pool into three independent resource spaces according to the shared peripheral resource permissions, all the users are deployed in the resource pool, and each cloud computer in the resource pool is in the same local area network;

[0057] The three independent resource spaces are respectively a first-level resource space, a second-level resource space and a third-level resource space, wherein a user matching the first-level resource space has the authority to share the external device to the first-level resource space, the second-level resource space and the third-level resource space, and a user matching the second-level resource space has the authority to share the external device to the second-level resource space;

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

[0059] In this implementation scheme, the cloud server may first obtain the shared peripheral resource permissions of all users, wherein the permissions of all users may be changed later, and then the cloud server groups the resource pool into three independent resource spaces according to the shared peripheral resource permissions, wherein users matching the first-level resource space have the permissions to share the external devices to the first-level resource space, the second-level resource space and the third-level resource space, users matching the second-level resource space have the permissions to share the external devices to the second-level resource space, and users matching the third-level resource space can only use the external devices for their own use. Through this method, fine-grained user role and permission allocation can be achieved, ensuring that users can only access shared peripheral resources that match the permissions, thereby enhancing system security and improving management flexibility.

[0060] For ease of understanding, the following example illustrates an embodiment of the present invention to fully introduce the process of namespace creation and shared permission management. First, the management platform on the cloud server side creates the resource pool of the entire privatized cluster into three completely independent and isolated logical spaces. The three namespaces are named root space, user space, and others space respectively (this is only an example and can be named in other ways, which is not limited to this embodiment of the present invention).

[0061] It should be noted that all three spaces can access peripheral resources in the cluster, but the user's peripheral sharing permissions in each space are different. If a user belongs to the root space, he not only has the right to share peripheral devices to the current space, but also has the ability to further share peripheral devices to the user space and others space. In contrast, users in the user space can only share with cloud computers in the same space. As for the others space, its peripheral sharing function is restricted and cannot be shared.

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

[0063] The cloud server sends a peripheral sharing device list to a client matching the first target user, wherein the peripheral sharing device list is a list of external devices that the first target user has the authority to share;

[0064] The cloud server determines the first resource space corresponding to the first target user in a 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, and the first target user confirms the shared external device. The cloud server then determines the first resource space corresponding to the first target user in the database, and obtains the sharing instruction sent by the client. Through this method, the external device to be shared by the first target user can be accurately determined to prevent errors in external device sharing. In addition, the cloud server determines the first resource space corresponding to the first target user in the database, and can also determine the sharing authority of the first target user to prevent the occurrence of authority overstepping or the inability to use authority normally, thereby ensuring the stable operation of the external device sharing process.

[0066] Among them, the above-mentioned peripheral sharing device list can be presented in a variety of visual forms on the terminal of the above-mentioned first target user, with the purpose of allowing the above-mentioned first target user to clearly determine the external devices that can be shared. The embodiment of the present invention does not limit the visual form of the above-mentioned peripheral sharing device list.

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

[0068] The cloud server sends the sharing information to the management platform on the cloud server side according to the sharing instruction, wherein the sharing 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 may first send the shared information to the management platform based on the sharing instruction, wherein the shared information may include basic hardware information of the external device, the first resource space and the target resource space, so that the management platform may send the shared information to the second target user based on the target resource space. The second target user may select an available external device through the shared information, and send the device sharing request to the cloud server through the terminal matched by the second target user. Through this method, the cloud server may accurately find the user who can be shared based on the shared information, that is, the second target user. The second target user is in the target resource space, ensuring that the second target user can only access the shared peripheral resources that match the access rights, thereby enhancing system security and improving management flexibility.

[0072] Optionally, the cloud server determines a second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, 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, including:

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

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

[0075] In the event of a successful match, the cloud server 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.

[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 may 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. The leader cloud host node of each resource space stores the address information of all cloud computers in the space. Therefore, the cloud server may 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 by the leader cloud host node one by one. If the match is successful, the cloud computer may forward the data to be processed to the first cloud computer, and the first cloud computer may control the external device to process the data to be processed. Through this method, the accuracy of shared addressing is ensured, and arbitrary sharing of external devices is prevented. While providing convenience for sharing of external devices, security is also provided.

[0077] It should be noted that the first address information may be added to the header of the data to be processed, or may be added to the tail of the data to be processed, which is not limited in the embodiment of the present invention.

[0078] Of course, in order to ensure security, a security code that can be recognized by the leader cloud host node can also be added to the above-mentioned shared information, and this embodiment of the present invention is not limited to this.

[0079] Optionally, the method further comprises:

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

[0081] The step of electing a leader cloud host node of the resource space includes:

[0082] The cloud server obtains the identification number 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 identification number, and determines the cloud host with the largest identification number as the first target leader cloud host node in the target resource space;

[0084] When the first target leader cloud host node in the target resource space is offline, the cloud hosts that are not offline send election information to cloud hosts with identification numbers larger than themselves in order of the identification numbers from small to large, wherein the cloud hosts that receive the election information reply to the cloud hosts that sent the election information;

[0085] In the case that the target cloud host does not receive a reply, the target cloud host is determined as the second target leader cloud host node in the target resource space.

[0086] In this implementation scheme, a leader cloud host node can be elected in each resource space, and the leader cloud host node processes the tasks of the current resource space. The above-mentioned cloud server first obtains the identification number of each cloud host in the target resource space, and the above-mentioned target resource space is any one of the above-mentioned first-level resource space, the above-mentioned second-level resource space and the said third-level resource space. Then the above-mentioned cloud server sorts each cloud host according to the above-mentioned identification number, and determines the cloud host with the largest identification number as the first target leader cloud host node in the said target resource space. In order to ensure the stability of the resource pool cloud computer cluster, through this method, a leader election algorithm is adopted, which can automatically elect and maintain the leader node, ensuring that the cluster can quickly recover stability in case of failure, effectively improving the system's availability and maintenance efficiency.

[0087] For ease of understanding, the following example illustrates the selection of the leader cloud host node. First, in each resource pool, three interconnected cloud hosts are deployed. They will periodically send heartbeat detection signals to confirm each other's survival status. These three cloud hosts have IDs 1, 2, and 3 respectively, and they all know each other's IP addresses and ID information. During the initialization phase, each cloud host will determine whether it has the largest ID among the currently surviving nodes. If so, it will send a "Victory" message to other cloud hosts to announce that it has become the leader node. In our scenario, the cloud host with ID 3 will first announce that it has become 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 of the node with ID 1 first detecting 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 itself. Since node 3 is offline, there will be no response. At this time, the node with ID 2 will receive the "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 larger ID than itself. Figure 3 shown.

[0088] Then, node 2 takes over the election and continues to send "Election" messages to nodes with a larger ID. Since no response is received from other nodes, node 2 will eventually send a "Victory" message to all other cloud hosts, announcing itself as the new leader node. Figure 4 shown.

[0089] Assume that after a period of time, the faulty node with ID 3 recovers and comes back online. It will directly send a "Victory" message to other nodes and re-announce itself as the leader node. At this time, the original leader node No. 2 will actively downgrade to a slave node after receiving an election request from a node with a larger ID than itself. Figure 5 As shown, through this algorithm, we can ensure the stability of the resource pool leader node and implement a fast and effective leader election process when a node failure occurs.

[0090] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a device sharing apparatus provided by an embodiment of the present invention. Figure 6 As shown, the device sharing apparatus 600 includes:

[0091] The first determination module 601 is used to determine the first resource space matched by the first target user and obtain the sharing instruction sent by the first target user, wherein 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 authority to share the external device to the target resource space;

[0092] A first receiving module 602 is configured 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 determination module 603 is used to determine the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in 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.

[0094] Optionally, the device further comprises:

[0095] Create a module to create a resource space;

[0096] Wherein, the creation module includes:

[0097] A first acquisition unit, used to acquire shared peripheral resource permissions of all users;

[0098] A grouping unit, used for grouping the resource pool into three independent resource spaces according to the shared peripheral resource permissions, wherein all the users are deployed in the resource pool, and each cloud computer in the resource pool is in the same local area network;

[0099] The three independent resource spaces are respectively a first-level resource space, a second-level resource space and a third-level resource space, wherein a user matching the first-level resource space has the authority to share the external device to the first-level resource space, the second-level resource space and the third-level resource space, and a user matching the second-level resource space has the authority to share the external device to the second-level resource space;

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

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

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

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

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

[0105] A second sending unit is used to send the sharing information to the management platform of the cloud server according to the sharing instruction, wherein the sharing information includes the basic hardware information of the external device, the first resource space and the target resource space;

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

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

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

[0109] a second determining unit, configured to determine a second resource space matched by a second target user, and analyze and process the device sharing request to obtain the first address information;

[0110] a first processing unit, configured to collect a 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, the leader cloud host node being a routing node in the first resource space;

[0111] The second processing unit is used to forward the data to be processed to the first cloud computer when the match is successful, and the first cloud computer controls the external device to process the data to be processed.

[0112] Optionally, the device further comprises:

[0113] An election module, used to elect a leader cloud host node of the resource space;

[0114] Wherein, the election module includes:

[0115] A second acquisition unit is used to acquire an identification number of each cloud host in a 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] A first election unit is used to sort each cloud host according to the identification number, and determine the cloud host with the largest identification number as the first target leader cloud host node in the target resource space;

[0117] a second election unit, wherein when the first target leader cloud host node in the target resource space is offline, the cloud hosts that are not offline send election information to cloud hosts with identification numbers larger than themselves in order of the identification numbers from small to large, wherein the cloud hosts that receive the election information reply to the cloud host that sent the election information;

[0118] The third election unit is used to determine the target cloud host as a second target leader cloud host node in the target resource space when the target cloud host does not receive a reply.

[0119] An embodiment of the present 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, each process of the above-mentioned device sharing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0120] For details, see Figure 7 The embodiment of the present invention further 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 used to determine the first resource space matched by the first target user and obtain a sharing instruction sent by the first target user, wherein 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 authority to share the external device to the target resource space;

[0122] The transceiver 702 is configured 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] Processor 705 is used to determine the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in 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 the embodiment, the bus architecture (represented by bus 701) may include any number of interconnected buses and bridges, and bus 701 links various circuits including one or more processors represented by processor 705 and memory represented by memory 706. Bus 701 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 704 provides an interface between bus 701 and transceiver 702. Transceiver 702 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 705 is transmitted on a wireless medium via antenna 703, and further, antenna 703 also receives data and transmits the data to processor 705.

[0125] The processor 705 is responsible for managing the bus 701 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 706 can be used to store data used by the processor 705 when performing operations.

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

[0127] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned uplink power control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0128] An embodiment of the present 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, each process of the above-mentioned uplink power control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0131] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection 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 a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an 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 authority to share the external device to the target resource space; The cloud server receives 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; The cloud server determines a second resource space matched by a second target user, and when the second resource space is the target resource space, or the second resource space is a resource space in the target resource space, 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 comprises: Create resource space; The creating resource space includes: The cloud server obtains the shared peripheral resource permissions of all users; The cloud server groups the resource pool into three independent resource spaces according to the shared peripheral resource permissions, all the users are deployed in the resource pool, and each cloud computer in the resource pool is in the same local area network; The three independent resource spaces are respectively a first-level resource space, a second-level resource space and a third-level resource space, a user matching the first-level resource space has the authority to share the external device to the first-level resource space, the second-level resource space and the third-level resource space, and a user matching the second-level resource space has the authority to share the external device to the second-level resource space; The first resource space is the first-level resource space or the second-level resource space.

3. The device sharing method according to claim 2, characterized in that: The cloud server determines a first resource space matched by a first target user and obtains a sharing instruction sent by the first target user, including: The cloud server sends a peripheral sharing device list to a client matching the first target user, wherein the peripheral sharing device list is a list of external devices that the first target user has the authority to share; The cloud server determines the first resource space corresponding to the first target user in a 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 a second target user, including: The cloud server sends the sharing information to the management platform on the cloud server side according to the sharing instruction, wherein the sharing 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 a second resource space matched by a second target user, and when the second resource space is the target resource space or the second resource space is a resource space in the target resource space, 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, including: The cloud server determines a second resource space matched by the second target user, and analyzes and processes the device sharing request to obtain first address information; The cloud server collects a second address information set stored in a leader cloud host node, and matches the first address information with the second address information set stored in the leader cloud host node one by one, the leader cloud host node being a routing node in the first resource space; In the event of a successful match, the cloud server 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.

6. The device sharing method according to claim 2, characterized in that: The method further comprises: Electing a leader cloud host node for the resource space; The step of electing a leader cloud host node of the resource space includes: The cloud server obtains the identification number 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 identification number, and determines the cloud host with the largest identification number as the first target leader cloud host node in the target resource space; When the first target leader cloud host node in the target resource space is offline, the cloud hosts that are not offline send election information to cloud hosts with identification numbers larger than themselves in order of the identification numbers from small to large, wherein the cloud hosts that receive the election information reply to the cloud hosts that sent the election information; In the case that the target cloud host does not receive a reply, the target cloud host is determined as the second target leader cloud host node in the target resource space.

7. A device sharing apparatus, characterized in that: include: A first determination module is used to determine a first resource space matched by a first target user and obtain a sharing instruction sent by the first target user, wherein the sharing instruction is used to share an external device of a first cloud computer matched by the first target user to a target resource space, wherein the user matched by the first resource space has the authority to share the external device to the target resource space; A first receiving module, configured 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; The second determination module is used to determine the second resource space matched by the second target user. When the second resource space is the target resource space or the second resource space is a resource space in the target resource space, the data to be processed is forwarded 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 transceiver and processor, The processor is used to determine the first resource space matched by the first target user and obtain a sharing instruction sent by the first target user, wherein 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 authority 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, wherein the device sharing request uses the external device and carries data to be processed; The processor is used to determine the second resource space matched by the second target user, and when the second resource space is the target resource space or the second resource space is a resource space in 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 when the program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods of claims 1 to 6 are implemented.

11. A computer program product, characterized in that The program product is executed by at least one processor to implement the device sharing method according to 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

  • Peripheral sharing method and device

    CN115883572A

  • Cloud computing system data processing method and device, electronic equipment and storage medium

    CN116382883A

  • Method, device and equipment for multiplexing multiple terminals by external equipment and storage medium

    CN117014512A

Cited By

  • Equipment sharing method and device, storage medium and electronic device

    CN120602116A

  • Equipment sharing method and device, computer equipment and readable storage medium

    CN121070700A

  • Device sharing method and apparatus, computer device, and readable storage medium

    CN121070700B