Resource sharing method, device, computer device and storage medium

By building a shared domain and allocating shared storage space and traffic according to preset rules, the problem of unbalanced storage server burden and traffic under cloud storage mode is solved, and efficient sharing and utilization of resources is achieved.

CN111901490BActive Publication Date: 2024-12-27HONGFUJIN PRECISION ELECTRONICS (ZHENGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910374794.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-06
Publication Date
2024-12-27
Estimated Expiration
2039-05-06

AI Technical Summary

Technical Problem

The existing cloud storage method leads to an increase in the burden and cost of storage servers. At the same time, the unbalanced use of individual traffic has caused waste of resources, and it is impossible to effectively share storage space and traffic.

Method used

By building a shared domain, obtain the shared resource information provided by the user terminal, monitor the number of remaining resources in real time, and allocate shared storage space and/or traffic according to preset rules to optimize resource utilization.

Benefits of technology

It realizes the sharing of storage space and traffic between multiple user terminals, improves resource utilization, reduces storage costs, and avoids waste of traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111901490B_ABST
    Figure CN111901490B_ABST
Patent Text Reader

Abstract

The present invention provides a resource sharing method, device, computer device and storage medium. The resource sharing method includes: building a sharing domain, storing user terminal information joining the sharing domain; obtaining information of shared resources provided by user terminals in the sharing domain; obtaining request information for requesting allocation of shared resources sent by user terminals in the sharing domain; and allocating shared resources according to preset rules. The present invention can realize the sharing of storage space and traffic between multiple user terminals, thereby improving the utilization rate of storage space and traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resource sharing method, a resource sharing device, a computer device and a computer-readable storage medium. Background Art

[0002] As modern mobile user terminals become more and more popular, people's demand for storage space and traffic on mobile user terminals is increasing, while the storage capacity and monthly traffic on people's mobile user terminals are limited. With the development of network technology, cloud storage and other methods have been widely used. The current cloud storage methods are to store data in storage servers provided by third parties. However, as people's storage needs expand, it also creates a burden and cost for storage servers. On the other hand, most people go online by purchasing traffic packages on a monthly basis. Some people's traffic is not enough, and some people's traffic cannot be used up, resulting in a waste of resources. Summary of the invention

[0003] In view of the above, it is necessary to propose a resource sharing method and device, a computer device and a computer-readable storage medium to complete the resource sharing of storage space and traffic in a more economical, simple and fast manner.

[0004] A first aspect of the present application provides a resource sharing method, which is applied to a computer device, wherein the computer device is connected to at least one user terminal, and the method comprises:

[0005] Build a shared domain and store the user terminal information that joins the shared domain;

[0006] Acquire information about shared resources provided by user terminals in the shared domain;

[0007] Acquiring request information for requesting allocation of shared resources sent by a user terminal in the sharing domain; and

[0008] Allocate shared resources according to preset rules.

[0009] Preferably, the shared resources include shared storage space and / or shared network traffic.

[0010] Preferably, the step of acquiring information about shared resources provided by a user terminal joining the sharing domain comprises:

[0011] Acquiring resource information available for sharing provided by the user terminal;

[0012] Monitoring the remaining resources of the user terminal in real time;

[0013] If the real-time remaining resource quantity is greater than the resource quantity available for sharing, the amount of resource data available for sharing provided by the user terminal is the shared resource quantity that the user terminal can provide;

[0014] If the real-time remaining resource quantity is less than the resource data available for sharing, the real-time remaining resource quantity is the shared resource quantity that can be provided by the user terminal.

[0015] Preferably, the information on providing the shared resource includes one or more of the content of the shared resource, the validity period of the shared resource, and the time when the user terminal provides the shared resource.

[0016] Preferably, the method further comprises, if the shared resource is shared traffic, grouping and storing the acquired shared traffic information according to the validity period of the shared traffic.

[0017] Preferably, the method for storing the acquired shared traffic information in groups according to the validity period of the shared traffic includes:

[0018] Obtain the validity period of the shared traffic provided by the user terminal;

[0019] Within the same validity period, the amount of shared traffic provided by the user terminal is summarized;

[0020] The aggregated amount of shared traffic is grouped and stored according to different validity periods.

[0021] Preferably, the step of allocating shared resources according to preset rules includes:

[0022] Determining whether the request sent by the user terminal meets the rule requirements according to the preset rules;

[0023] If they meet the requirements, the shared resources are allocated to the user terminal according to the rules;

[0024] If not, feedback information is sent to the user terminal;

[0025] The preset rule is the authority scope of the user terminal and the IP address of the user terminal. The authority scope includes one or more of the type of shared resources, the quantity of shared resources, and the time of shared resources that the user terminal can share in the sharing domain.

[0026] A second aspect of the present application provides a resource sharing device, the device comprising:

[0027] A building module is used to build a shared domain and store user terminal information that joins the shared domain;

[0028] An acquisition module, used for acquiring information of shared resources provided by user terminals in the shared domain;

[0029] A request module, used to obtain request information for requesting allocation of shared resources sent by a user terminal in the sharing domain; and

[0030] The sharing module is used to allocate shared resources according to preset rules.

[0031] A third aspect of the present application provides a computer device, the computer device comprising a processor, the processor being configured to implement the resource sharing method as described above when executing a computer program stored in a memory.

[0032] A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program implements the resource sharing method as described above when executed by a processor.

[0033] The resource sharing method and device, computer device and computer-readable storage medium of the present invention can realize the sharing of storage space and flow among multiple user terminals, thereby improving the utilization rate of storage space and flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the application environment architecture of the resource sharing method provided in the first embodiment of the present invention.

[0035] Figure 2 It is a flow chart of the resource sharing method provided in the second embodiment of the present invention.

[0036] Figure 3 It is a structural diagram of a resource sharing device provided in Embodiment 3 of the present invention.

[0037] Figure 4 It is a schematic diagram of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0038] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than 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.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0041] Embodiment 1

[0042] See also Figure 1 , which is a schematic diagram of the application environment architecture of the resource sharing method provided in the first embodiment of the present invention.

[0043] The resource sharing method of the present invention is applied to a computer device 1, and the computer device 1 and at least one user terminal 2 establish a communication connection through a network. The network can be a wired network or a wireless network, such as radio, wireless fidelity (Wireless Fidelity, WIFI), cellular, satellite, broadcast, etc.

[0044] The computer device 1 is used to manage the rights of user terminals and store shared resource information. The computer device 1 can be an electronic device installed with resource sharing software, such as a personal computer, a server, etc., wherein the server can be a single server, a server cluster or a cloud server, etc.

[0045] The user terminal 2 is any intelligent electronic device with storage and wireless communication functions, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.

[0046] Embodiment 2

[0047] See also Figure 2 FIG. 1 is a flow chart of a resource sharing method provided by a second embodiment of the present invention. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.

[0048] Step S1: Building a sharing domain and storing information of user terminals joining the sharing domain.

[0049] In one embodiment of the present invention, the computer device stores information such as account information, password information, and user terminals belonging to the shared domain. The computer device is responsible for controlling the verification of each user terminal connected to the shared domain. When the user terminal connects to the shared domain, the computer device first identifies whether the user terminal belongs to the domain, whether the login account used by the user terminal exists, and whether the password is correct. If any of the above information is incorrect, the computer device issues an instruction to deny the user terminal to log in.

[0050] Step S2: Acquire shared resource information provided by user terminals in the shared domain.

[0051] The shared resources include shared storage space and / or shared network traffic. The network traffic includes but is not limited to GPRS traffic and WIFI traffic.

[0052] The step of acquiring information about shared resources provided by a user terminal joining the sharing domain may include:

[0053] Acquiring resource information available for sharing provided by the user terminal;

[0054] Monitoring the remaining resources of the user terminal in real time;

[0055] If the real-time remaining resource quantity is greater than the resource quantity available for sharing, the amount of resource data available for sharing provided by the user terminal is the shared resource quantity that the user terminal can provide;

[0056] If the real-time remaining resource quantity is less than the resource data available for sharing, the real-time remaining resource quantity is the shared resource quantity that can be provided by the user terminal.

[0057] The information on providing shared resources includes one or more of the content of the shared resources, the validity period of the shared resources, and the time when the user terminal provides the shared resources. If the shared resource is shared traffic, the acquired shared traffic information is grouped and stored according to the validity period of the shared traffic.

[0058] The method for storing the acquired shared traffic information in groups according to the validity period of the shared traffic may include:

[0059] Obtain the validity period of the shared traffic provided by the user terminal;

[0060] Within the same validity period, the amount of shared traffic provided by the user terminal is summarized;

[0061] The aggregated amount of shared traffic is grouped and stored according to different validity periods.

[0062] In one embodiment of the present invention, the shared resource is a shared storage space. The user terminal sets the size of the storage space available for sharing and the time of the storage space available for sharing according to the minimum storage space required for the operation of its own system and the user's personal usage preferences, and sends the size of the storage space available for sharing and the time of the storage space available for sharing to the computer device. Within the time range of the storage space available for sharing, the computer device monitors the remaining storage space size of the user terminal in real time, and compares it with the size of the storage space available for sharing set by the user terminal. If the real-time remaining storage space size is larger than the shared storage space size set by the user terminal, the size of the storage space available for sharing set by the user terminal is the size of the shared storage space that the user terminal can provide; if the real-time remaining storage space size is smaller than the storage space size set by the user terminal, the real-time remaining storage space size is the size of the shared storage space that the user terminal can provide.

[0063] In another embodiment of the present invention, the shared resource is shared traffic. The user terminal sets the time for sharing traffic and the amount of traffic available for sharing within the validity period of the traffic according to the amount of traffic required by the user terminal and the validity period of the traffic, and sends the time for sharing traffic, the amount of traffic available for sharing and the validity period of the traffic to a computer device. The computer device receives the traffic information available for sharing provided by multiple user terminals, first summarizes the traffic information within the same validity period according to the validity period of the traffic, and then stores the traffic information according to different validity periods. In one embodiment, the unit of the validity period is day, and the computer device summarizes the total amount of traffic available for sharing every day, and stores the amount of traffic available for sharing every day. In other embodiments, the unit of the validity period is hour or minute.

[0064] During the time period when traffic is available for sharing, the computer device monitors the size of real-time traffic of user terminals in the shared domain in real time. If the real-time remaining traffic is greater than the shared traffic set by the user terminal, the size of the traffic available for sharing set by the user terminal is the shared traffic that the user terminal can provide; if the real-time remaining traffic is less than the shared traffic set by the user terminal, the real-time remaining traffic is the size of the shared traffic that the user terminal can provide.

[0065] Step S3: obtaining request information for allocating shared resources sent by a user terminal in the sharing domain.

[0066] The request information includes the type, time and quantity of the shared resource allocation request.

[0067] For example, in one embodiment of the present invention, the user terminal requests the computer device to allocate 5G of storage space for a period of one week.

[0068] In another embodiment of the present invention, the user terminal requests the computer device to allocate 300M of traffic for two days.

[0069] In another embodiment of the present invention, the user terminal requests the computer device to allocate 3G storage space for 4 days and 200M traffic for one day.

[0070] Step S4: Allocate shared resources according to preset rules.

[0071] The step of allocating shared resources according to preset rules includes:

[0072] Determining whether the request sent by the user terminal meets the rule requirements according to the preset rules;

[0073] If they meet the requirements, the shared resources are allocated to the user terminal according to the rules;

[0074] If not, feedback information is sent to the user terminal;

[0075] The preset rule may be an IP address of a user terminal, an authority range of the user terminal, and the authority range may include one or more of a type of shared resources, a quantity of shared resources, and a time of shared resources that the user terminal can share in the sharing domain.

[0076] The authority of the user terminal can be set according to the number of resources available for sharing provided by the user terminal. The more resources available for sharing that the user terminal can provide, the larger the scope of authority that the user terminal can obtain.

[0077] In yet another embodiment, the authority of the user terminal may be divided according to whether the user terminal is a paying customer of the shared domain, with a paying user terminal having a larger authority range and a free user terminal having a smaller authority range.

[0078] In another embodiment, the preset rule may further include determining the location of the user terminal in the sharing domain according to the IP address of the user terminal, and searching the sharing domain for a user terminal that is closest to the location of the user terminal and that can share resources according to the location.

[0079] For example, the user terminal is a paying user, and the user level of the user terminal in the server is A-level. The resource types that can be shared by the user terminal corresponding to level A are storage space and traffic, which are 1G / day and 100M / day respectively. The storage space that can be shared by the user terminal is set to 2G / day, and the traffic that can be shared is 300M / day. The storage space and traffic that can be shared by the user terminal every day are greater than the user terminal level. The maximum storage space allocated by the user terminal to the server is 1G / day, and the traffic is 100M / day. When the user terminal makes a request to share traffic, the server will search for the user terminal closest to the user terminal in the sharing domain that can share traffic based on the IP address of the user terminal.

[0080] For another example, the user terminal is a free user, and according to the number of shared resources that the user terminal can provide, it is determined that the user level of the user terminal in the sharing domain is Class B. The resource types that can be shared by the user terminal corresponding to Class B are storage space and traffic, which are 800M / day and 80M / day respectively. The storage space that can be shared by the user terminal is set to 500M / day, and the traffic that can be shared is 50M / day. The storage space and traffic that can be shared by the user terminal every day are both less than the user terminal level. The maximum storage space allocated by the user terminal to the server is 800M / day, and the traffic is 50M / day. If there are two Class B user terminals that require the computer device to share a storage space of 800M / day and a traffic of 50M / day at the same time, and the storage space and traffic that the server can control are not enough to meet the requirements of the two Class B users, the server compares the amount of shared resources provided by the two Class B user terminals, and gives priority to the user who has provided more shared resources.

[0081] Above Figure 2 The resource sharing method of the present invention is introduced in detail. The functional modules of the software device for implementing the resource sharing method and the hardware device architecture for implementing the resource sharing method are introduced below in conjunction with Figures 3-4.

[0082] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited by this structure.

[0083] Embodiment 3

[0084] Figure 3 It is a structural diagram of a preferred embodiment of the resource sharing device of the present invention.

[0085] In some embodiments, the resource sharing device 10 runs in a computer device. The computer device is connected to multiple user terminals via a network. The resource sharing device 10 may include multiple functional modules composed of program code segments. The program code of each program segment in the resource sharing device 10 may be stored in the memory of the computer device and executed by the at least one processor to implement the resource sharing function.

[0086] In this embodiment, the resource sharing device 10 can be divided into multiple functional modules according to the functions it performs. Figure 3 As shown, the functional modules may include: a building module 101, an acquisition module 102, a request module 103, and a sharing module 104. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0087] The building module 101 is used to build a sharing domain and store information of user terminals that join the sharing domain.

[0088] In one embodiment of the present invention, the building module 101 stores information such as the account information, password information, and user terminals belonging to the shared domain. The building module 101 is responsible for controlling the verification of each user terminal connected to the shared domain. When the user terminal connects to the shared domain, the building module 101 first identifies whether the user terminal belongs to the domain, whether the login account used by the user terminal exists, and whether the password is correct. If any of the above information is incorrect, the building module 101 issues an instruction to deny the user terminal to log in.

[0089] The acquisition module 102 is used to acquire information about shared resources provided by user terminals in the sharing domain.

[0090] In one embodiment, the shared resources include shared storage space and / or shared network traffic. The network traffic includes but is not limited to GPRS traffic and WIFI traffic.

[0091] In one implementation, the step of acquiring information about shared resources provided by a user terminal joining the sharing domain may include:

[0092] Acquiring resource information available for sharing provided by the user terminal;

[0093] Monitoring the remaining resources of the user terminal in real time;

[0094] If the real-time remaining resource quantity is greater than the resource quantity available for sharing, the amount of resource data available for sharing provided by the user terminal is the shared resource quantity that the user terminal can provide;

[0095] If the real-time remaining resource quantity is less than the resource data available for sharing, the real-time remaining resource quantity is the shared resource quantity that can be provided by the user terminal.

[0096] The information on providing shared resources includes one or more of the content of the shared resources, the validity period of the shared resources, and the time when the user terminal provides the shared resources. If the shared resource is shared traffic, the acquired shared traffic information is grouped and stored according to the validity period of the shared traffic.

[0097] The method for storing the acquired shared traffic information in groups according to the validity period of the shared traffic may include:

[0098] Obtain the validity period of the shared traffic provided by the user terminal;

[0099] Within the same validity period, the amount of shared traffic provided by the user terminal is summarized;

[0100] The aggregated amount of shared traffic is grouped and stored according to different validity periods.

[0101] In one embodiment of the present invention, the shared resource is a shared storage space. The user terminal sets the size of the storage space available for sharing and the time of the storage space available for sharing according to the minimum storage space required for the operation of its own system and the user's personal usage preference, and sends the size of the storage space available for sharing and the time of the storage space available for sharing to the acquisition module 102. Within the time range of the storage space available for sharing, the acquisition module 102 monitors the remaining storage space size of the user terminal in real time, and compares it with the size of the storage space available for sharing set by the user terminal. If the real-time remaining storage space size is larger than the size of the shared storage space set by the user terminal, the size of the storage space available for sharing set by the user terminal is the size of the shared storage space that the user terminal can provide; if the real-time remaining storage space size is smaller than the storage space size set by the user terminal, the real-time remaining storage space size is the size of the shared storage space that the user terminal can provide.

[0102] In another embodiment of the present invention, the shared resource is shared traffic. The user terminal sets the time for sharing traffic and the size of the traffic that can be shared within the validity period of the traffic according to the amount of traffic required by the user terminal and the validity period of the traffic, and sends the time for sharing traffic, the size of the traffic that can be shared, and the validity period of the traffic to the acquisition module 102. The acquisition module 102 receives the traffic information that can be shared from multiple user terminals, first summarizes the traffic information within the same validity period according to the validity period of the traffic, and then stores the traffic information according to different validity periods. In one embodiment, the unit of the validity period is day, and the acquisition module 102 summarizes the total amount of traffic that can be shared every day, and stores the amount of traffic that can be shared every day.

[0103] During the time period when traffic is available for sharing, the acquisition module 102 monitors the size of real-time traffic of user terminals in the shared domain in real time. If the real-time remaining traffic is greater than the shared traffic set by the user terminal, the size of traffic available for sharing set by the user terminal is the shared traffic that the user terminal can provide; if the real-time remaining traffic is less than the shared traffic set by the user terminal, the real-time remaining traffic is the size of the shared traffic that the user terminal can provide.

[0104] The request module 103 is used to obtain request information for requesting allocation of shared resources sent by a user terminal in the sharing domain.

[0105] The request information includes the type, time and quantity of the shared resource allocation request.

[0106] For example, in one embodiment of the present invention, the user terminal requests the request module 103 to allocate 5G of storage space for a period of one week.

[0107] In another embodiment of the present invention, the user terminal requests the request module 103 to allocate 300M of traffic for two days.

[0108] In another embodiment of the present invention, the user terminal requests the request module 103 to allocate 3G storage space for 4 days and allocate 200M traffic for one day.

[0109] The sharing module 104 is used to allocate shared resources according to preset rules.

[0110] The step of allocating shared resources according to preset rules may include:

[0111] Determining whether the request sent by the user terminal meets the rule requirements according to the preset rules;

[0112] If they meet the requirements, the shared resources are allocated to the user terminal according to the rules;

[0113] If not, feedback information is sent to the user terminal;

[0114] The preset rule may be an authority scope of the user terminal or an IP address of the user terminal. The authority scope may include one or more of the type of shared resources, the quantity of shared resources, and the time of shared resources that the user terminal can share in the sharing domain.

[0115] In one implementation, the authority of the user terminal may be set according to the number of resources available for sharing provided by the user. The more resources available for sharing that the user terminal can provide, the greater the scope of authority that the user terminal can obtain.

[0116] In another embodiment, the preset rule may further include determining the location of the user terminal in the sharing domain according to the IP address of the user terminal, and searching the sharing domain for a user terminal that is closest to the location of the user terminal and that can share resources according to the location.

[0117] For example, the user terminal is a paying user, and the user level of the user terminal in the server is A-level. The resource types that can be shared by the user terminal corresponding to level A are storage space and traffic, which are 1G / day and 100M / day respectively. The storage space that can be shared by the user terminal is set to 2G / day, and the traffic that can be shared is 300M / day. The storage space and traffic that can be shared by the user terminal every day are greater than the user terminal level. The maximum storage space allocated by the user terminal to the server is 1G / day, and the traffic is 100M / day. When the user terminal makes a request to share traffic, the server will search for the user terminal closest to the user terminal in the sharing domain that can share traffic based on the IP address of the user terminal.

[0118] For another example, the user terminal is a free user, and according to the number of shared resources that the user terminal can provide, it is determined that the user level of the user terminal in the sharing domain is Class B. The resource types that can be shared by the user terminal corresponding to Class B are storage space and traffic, which are 800M / day and 80M / day respectively. The storage space that can be shared by the user terminal is set to 500M / day, and the traffic that can be shared is 50M / day. The storage space and traffic that can be shared by the user terminal every day are both less than the user terminal level. The maximum storage space allocated by the user terminal to the server is 800M / day, and the traffic is 50M / day. If two Class B user terminals require the server to share a storage space of 800M / day and a traffic of 50M / day at the same time, and the storage space and traffic that the server can control are not enough to meet the requirements of the two Class B users, the server compares the amount of shared resources provided by the two Class B user terminals, and gives priority to the user who has provided more shared resources.

[0119] Embodiment 4

[0120] Figure 4 FIG. 4 is a schematic diagram of a preferred embodiment of a computer device of the present invention.

[0121] The computer device 1 includes a memory 20, a processor 30, and a computer program 40 stored in the memory 20 and executable on the processor 30, such as a resource sharing program. When the processor 30 executes the computer program 40, the steps in the above resource sharing method embodiment are implemented, such as Figure 2 Alternatively, when the processor 30 executes the computer program 40, the functions of each module / unit in the above resource sharing device embodiment are realized, for example Figure 3 Units 101-104 in.

[0122] Exemplarily, the computer program 40 may be divided into one or more modules / units, which are stored in the memory 20 and executed by the processor 30 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 40 in the computer device 1. For example, the computer program 40 may be divided into Figure 3 The building module 101, the acquisition module 102, the request module 103, and the sharing module 104 in the embodiment. The specific functions of each module refer to the third embodiment.

[0123] The computer device 1 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not limit the computer device 1. The computer device 1 may include more or fewer components than shown in the diagram, or may combine certain components, or may include different components. For example, the computer device 1 may also include input and output devices, network access devices, buses, etc.

[0124] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 30 may be any conventional processor, etc. The processor 30 is the control center of the computer device 1, and uses various interfaces and lines to connect various parts of the entire computer device 1.

[0125] The memory 20 can be used to store the computer program 40 and / or modules / units. The processor 30 implements various functions of the computer device 1 by running or executing the computer program and / or modules / units stored in the memory 20 and calling the data stored in the memory 20. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the computer device 1 (such as audio data, a phone book, etc.), etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0126] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed computer device and method can be implemented in other ways. For example, the computer device embodiment described above is only illustrative, for example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation.

[0128] In addition, each functional unit in each embodiment of the present invention may be integrated into the same processing unit, each unit may exist physically separately, or two or more units may be integrated into the same unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0129] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or computer devices stated in the computer device claim can also be implemented by the same unit or computer device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A resource sharing method, applied in a computer device, wherein the computer device is connected to at least one user terminal, characterized in that: The method comprises: Build a shared domain and store the user terminal information that joins the shared domain; Acquire information about shared resources provided by user terminals in the shared domain; Acquiring request information for requesting allocation of shared resources sent by a user terminal in the sharing domain; and Allocate shared resources according to preset rules, wherein the shared resources include shared network traffic; If the shared resource is shared traffic, the acquired shared traffic information is grouped and stored according to the validity period of the shared traffic.

2. The resource sharing method according to claim 1, characterized in that: The shared resources also include a shared storage space.

3. The resource sharing method according to claim 1, characterized in that: The step of acquiring information about shared resources provided by a user terminal joining the sharing domain comprises: Acquiring resource information available for sharing provided by the user terminal; Monitoring the remaining resources of the user terminal in real time; If the real-time remaining resource quantity is greater than the resource quantity available for sharing, the amount of resource data available for sharing provided by the user terminal is the shared resource quantity that the user terminal can provide; If the real-time remaining resource quantity is less than the resource data available for sharing, the real-time remaining resource quantity is the shared resource quantity that can be provided by the user terminal.

4. The resource sharing method according to claim 3, characterized in that: The information on providing shared resources includes one or more of the content of the shared resources, the validity period of the shared resources, and the time when the user terminal provides the shared resources.

5. The resource sharing method according to claim 1, characterized in that: The method for grouping and storing the acquired shared traffic information according to the validity period of the shared traffic includes: Obtain the validity period of the shared traffic provided by the user terminal; Within the same validity period, the amount of shared traffic provided by the user terminal is summarized; The aggregated amount of shared traffic is grouped and stored according to different validity periods.

6. The resource sharing method according to claim 1, characterized in that: The step of allocating shared resources according to preset rules includes: Determining whether the request sent by the user terminal meets the rule requirements according to the preset rules; If they meet the requirements, the shared resources are allocated to the user terminal according to the rules; If not, feedback information is sent to the user terminal; The preset rule includes the authority scope of the user terminal and the IP address of the user terminal. The authority scope includes one or more of the type of shared resources, the quantity of shared resources, and the time of shared resources that the user terminal can share in the sharing domain.

7. A resource sharing device, characterized in that: The device comprises: A building module is used to build a shared domain and store user terminal information that joins the shared domain; An acquisition module, used for acquiring information of shared resources provided by user terminals in the shared domain; A request module, used to obtain request information for requesting allocation of shared resources sent by a user terminal in the sharing domain; and The sharing module is used to allocate shared resources according to preset rules, wherein the shared resources include shared network traffic; if the shared resources are shared traffic, the acquired shared traffic information is grouped and stored according to the validity period of the shared traffic.

8. A computer device, characterized in that: The computer device comprises a processor, and the processor is used to implement the resource sharing method according to any one of claims 1 to 6 when executing a computer program stored in a memory.

9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the resource sharing method according to any one of claims 1 to 6 is implemented.