CN115269207B - Method and system for allocating resources to vCPE network element - Google Patents

Method and system for allocating resources to vCPE network element Download PDF

Info

Publication number
CN115269207B
CN115269207B CN202211197556.5A CN202211197556A CN115269207B CN 115269207 B CN115269207 B CN 115269207B CN 202211197556 A CN202211197556 A CN 202211197556A CN 115269207 B CN115269207 B CN 115269207B
Authority
CN
China
Prior art keywords
resource
redis
linked list
resource unit
vcpe
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211197556.5A
Other languages
Chinese (zh)
Other versions
CN115269207A (en
Inventor
王淑春
郭民
李明
邵如青
赵晓春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wireless Operation Branch Of Zhejiang Public Information Industry Co ltd
Original Assignee
Wireless Operation Branch Of Zhejiang Public Information Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wireless Operation Branch Of Zhejiang Public Information Industry Co ltd filed Critical Wireless Operation Branch Of Zhejiang Public Information Industry Co ltd
Priority to CN202211197556.5A priority Critical patent/CN115269207B/en
Publication of CN115269207A publication Critical patent/CN115269207A/en
Application granted granted Critical
Publication of CN115269207B publication Critical patent/CN115269207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

The invention relates to a method and a system for distributing resources for a vCPE network element, which comprises the steps of storing a class resource unit into a Redis linked list, and judging whether the class resource unit to be applied is in the linked list; if yes, popping the chain table, allocating resources of the resource units to be applied for the vCPE network elements of the resources to be allocated, updating the data of the allocated resource units to be applied of the vCPE network elements of the resources to be allocated, and inserting the allocated resource units to be applied after the data is updated into the Redis chain table; otherwise, judging whether the resource units to be applied exist in the database; if yes, distributing the resources of the resource units to be applied for the vCPE network elements to be distributed, updating the data of the distributed resource units to be applied for the vCPE network elements to be distributed, and updating the Redis linked list. The invention reduces frequent access and update to the database when a large amount of concurrent processing is realized, the read data of the concurrent application is accurate, and the service is not interrupted when the database is abnormal.

Description

Method and system for allocating resources to vCPE network element
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for allocating resources to a vCPE network element.
Background
Currently, a database is queried to determine whether the resource can be allocated before allocating resources for a vCPE (virtual client device) network element, but when a large amount of resource applications are concurrently applied, frequent query and update operations are performed on the database, which results in a decrease in query efficiency, and a large amount of concurrent updates are performed at the same time. However, there are disadvantages to the use of "locks", such as slow resource allocation after locking; deadlock is easy to occur; frequent lock acquisition and lock release can cause problems of poor system stability and performance, and the like, while a large number of concurrent processes can cause data errors in a database and cause problems of vCPE network element resource allocation when a lock mechanism is not adopted.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a system for allocating resources to a vCPE network element, aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
in a first aspect, the present invention provides a method for allocating resources for a vCPE network element, where the method includes:
generating a plurality of class resource units according to the type of the resource to be allocated by the vCPE network element, and storing the class resource units into a Redis (Remote Dictionary Server) linked list;
when a class resource application message of a vCPE network element of the resource to be distributed is received, judging whether a class resource unit to be applied in the class resource application message is in the Redis linked list or not;
if the resource unit exists, popping the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource unit to be applied for is allocated to the vCPE network element to be allocated after the resource of the resource unit to be applied for is allocated to the vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list;
otherwise, judging whether the resource unit to be applied exists in the database;
if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is allocated to the resource vCPE network element to be allocated, the data of the resource unit to be applied, which is allocated to the resource vCPE network element to be allocated, is updated, and the Redis linked list is updated.
In a second aspect, the present invention provides a system for allocating resources to a vCPE network element, where the system includes:
the first processing module is used for generating a plurality of similar resource units according to the types of resources to be distributed of the vCPE network element and storing the similar resource units into a Redis linked list;
the second processing module is used for judging whether a resource unit to be applied in a class resource application message is in the Redis linked list or not when the class resource application message of a vCPE network element of the resource to be distributed is received;
if the resource unit exists, popping the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource unit to be applied for is allocated to the vCPE network element to be allocated after the resource of the resource unit to be applied for is allocated to the vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list;
otherwise, judging whether the resource unit to be applied exists in the database;
if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is allocated to the resource vCPE network element to be allocated, the data of the resource unit to be applied, which is allocated to the resource vCPE network element to be allocated, is updated, and the Redis linked list is updated.
The beneficial effects of the invention are: the method for distributing the resources for the vCPE network element comprises the steps of generating a plurality of similar resource units according to the types of the resources to be distributed of the vCPE network element, and storing the similar resource units into a Redis linked list; when a class resource application message of a vCPE network element of the resource to be distributed is received, judging whether a resource unit to be applied in the class resource application message is in the Redis linked list or not; if the resource unit exists, popping the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource unit to be applied for is allocated to the vCPE network element to be allocated after the resource of the resource unit to be applied for is allocated to the vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list; otherwise, judging whether the resource unit to be applied exists in the database; if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is allocated to the resource vCPE network element to be allocated, the data of the resource unit to be applied, which is allocated to the resource vCPE network element to be allocated, is updated, and the Redis linked list is updated. The invention reduces frequent access and update of the database when a large amount of concurrent processing occurs, ensures the accuracy of the data read by concurrent application, and does not interrupt the service when the database is abnormal.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention or in the description of the prior art will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for allocating resources to a vCPE network element according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a system for allocating resources to a vCPE network element according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
As shown in fig. 1, a method for allocating resources for a vCPE network element according to an embodiment of the present invention includes the following steps:
110. and generating a plurality of similar resource units according to the type of the resource to be allocated by the vCPE network element, and storing the similar resource units into a Redis linked list.
120. When a class resource application message of a vCPE network element to be allocated is received, judging whether a class resource unit to be applied in the class resource application message is in the Redis linked list, if so, executing a step 130, otherwise, executing a step 140.
130. Popping up the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource vCPE network element to be allocated is allocated after the resource of the resource unit to be applied for is allocated by the resource vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list.
140. And judging whether the resource units to be applied exist in the database, if so, executing the step 150, otherwise, not distributing the resource application.
150. If the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is distributed to the resource vCPE network element to be distributed, the data of the resource unit to be applied distributed of the resource vCPE network element to be distributed is updated, and the Redis linked list is updated.
Based on the foregoing embodiment, further, when the data of the resource-like unit in the Redis linked list is updated, the data of the resource-like unit stored in the database is updated.
Based on the foregoing embodiment, further, step 110 specifically includes:
and creating the Redis linked list, and taking the resource types to be distributed meeting the resource robbing conditions as the resource units.
And acquiring an initial value of the class resource unit, and inserting the class resource unit and the data of the class resource unit into the Redis linked list, wherein the Redis linked list is a one-way queue.
Based on the foregoing embodiment, further, the updating the Redis linked list in step 150 specifically includes:
and inquiring whether the resource unit to be applied exists in the Redis linked list.
And if the resource unit exists, updating the data of the resource unit to be applied in the Redis linked list according to the data of the resource unit to be applied, which is allocated to the vCPE network element of the resource to be allocated.
Otherwise, inserting the resource unit to be applied in the Redis linked list, and updating the data of the resource unit to be applied in the Redis linked list.
Based on the above embodiment, further, the method further includes step 200, where in step 200, when a preset condition is met, the Redis linked list and the database are synchronized;
the synchronization of the Redis chain table and the database specifically comprises:
210. and sequentially reading the similar resource units in the Redis linked list, inquiring whether the similar resource units exist in the database, if so, executing the step 220, and otherwise, executing the step 250.
220. If the class resource unit exists in the database, judging whether the data of the class resource unit in the Redis linked list is consistent with the data of the class resource unit stored in the database, setting the class resource unit in the database as an updated identifier, if not, executing step 230, otherwise, executing step 240.
230. And updating the data of the class resource unit in the database according to the data of the class resource unit in the Redis linked list.
240. And not updating the data of the class resource units in the Redis linked list and the data of the class resource units in the database.
250. If the class resource unit does not exist in the database, the class resource unit is stored in the database, the data of the class resource unit stored in the database is updated, and the class resource unit in the database is set to be an updated identifier.
260. After all the class resource units in the Redis linked list are inquired in the database, if the class resource units which do not identify the updated identification exist in the database, inserting the class resource units which do not identify the updated identification in the database into the Redis linked list, wherein the preset condition comprises preset time.
Based on the above embodiment, further, the method further includes step 300, and step 300 is that the Redis linked list and the database are backup of each other;
and when the Redis system to which the Redis linked list belongs is abnormal, sending the class resource application message to the database.
And when the database is abnormal, sending the class resource application message to a Redis system to which the Redis linked list belongs.
It should be understood that the present embodiment solves the practical situation that when the work orders are large concurrently, if the query to the database is performed each time, the vCPE capacity is calculated and increased, and there is a problem in allocation, for example, when the capacity of each vCPE is 2000 when allocating the vCPE instance. 1. Frequent query and update operations of the database are caused, and system performance is lost; 2. when a plurality of work orders simultaneously apply for, data error of vCPE recording capacity can be caused. Assuming that two work orders 1 and 2 simultaneously start to apply for distributing vCPE, when the work order 1 accesses the network element vCPE, the number of distributed users of the vCPE is allocationNum =3, when the number of the distributed users of the vCPE is to be recalculated and incremented by 1, the work order 2 also queries the number of the distributed users of the vCPE from the database and is also 3, when the two work orders are opened, the use condition of the vCPE is only increased by 1, because the data of the database is in a transient state, the second work order is submitted to cover the use condition of the first work order after the first work order is submitted, and the problem of incorrect distribution of vCPE resources is caused.
The present embodiment may further include the following steps: a deployment environment, which is used for acquiring a network element, a database and Redis supporting data synchronization and deploying vCPE on the network element; setting vCPE and initializing parameters, setting vCPE in the database and Redis, and initializing the vCPE; updating data, and updating and synchronizing the resource data in the network element, the database and the Redis; and performing allocation processing, namely acquiring vCPE network element allocation information, and performing allocation processing according to the network element, the database and the resource data in the Redis.
The database in this embodiment includes, but is not limited to, a MySQL database. MySQL is a database system which is safe, cross-platform, efficient, and closely combined with mainstream programming languages such as PHP, java and the like, and has small volume, high speed and low total ownership cost.
In this embodiment, the network element includes, but is not limited to, one or more devices with a transmission function. In this embodiment, the network element may be one or more machine disks or machine frames constituting a router, a NAT, a VPN, or the like.
In this embodiment, the method for allocating maximum capacity of a user based on a vCPE network element specifically includes, according to the network element, the database, and the resource data in the Redis, performing allocation processing:
generating and creating a unidirectional data queue through Redis, judging whether the resource data exist in the unidirectional data queue or not, if so, updating the resource data, otherwise, inquiring the database, and storing the resource data in the database into the unidirectional data queue.
In this embodiment, in the method for allocating maximum capacity of a user based on a vCPE network element, the unidirectional data queue includes, but is not limited to, a data queue having a single-in and/or single-out data function.
In this embodiment, in the method for allocating maximum capacity of network element users based on vCPE, the unidirectional data queue is a list data structure in Redis. The data structure used is list, and there is no need for a large number of keys to store the corresponding value. And managing the data in a pooling mode, uniformly stuffing the data into a key to form a data queue with left inlet and right outlet, uniformly stuffing the data from the left side of the queue, and then acquiring the data from the right side each time, so that the time complexity for acquiring the resources is low. Usually, the list in Redis will be used as a queue, left-in and right-out.
In this embodiment, in the method for allocating the maximum capacity of the network element user based on the vCPE, a PUSH-POP mechanism of Redis is adopted for data access of the unidirectional data queue.
In this embodiment, the database and the Redis are primary and secondary, and the primary and secondary databases and the Redis are in data communication, and if the Redis is abnormal, the database is called, and if the database is abnormal, the Redis is called. Because the network element, the database and the Redis three-party data are intercommunicated and synchronized, the database and the Redis can be in a main-standby relationship with each other, when the Redis is abnormal, the database can be used as a backup for seamless connection, and if the same database is abnormal, the Redis can also be used as a backup for seamless connection.
For example, redis middleware is adopted to realize the resource allocation, a list data structure in Redis is mainly used, a list is created first, data which can generate resource contention generates a plurality of resource units, and then the resource units are pushed into the list to form a long chain with the length of the number of resources. Since Redis access data is single-threaded operation, when a plurality of threads acquire data, only one thread can acquire resources, and one resource is less in list each time one resource is popped. Under the configuration that can be customized, the synchronization of network element, database, redis three-party data is supported, redis and database interact the master spare, when Redis is abnormal, the database can be seamlessly connected.
The distribution method has better expansibility than the traditional synchronization method, because the traditional synchronization method can only support the correct distribution of resources in the single service, not only can support the single service, but also can support the distributed service. And meanwhile, the service of a single-node and clustering deployment mode is supported, and the expansibility is stronger. Meanwhile, aiming at the instability factor of the third-party middleware, the countermeasure designed by the invention ensures that the usability of the system can be ensured when the middleware is abnormal in a high-strength use scene.
In this embodiment, in the maximum capacity allocation system based on vCPE network element users, the allocation processing module includes, but is not limited to, redis. A Remote Dictionary service (Remote Dictionary Server) is an open-source log-type and Key-Value database written in ANSI C language, supporting network, based on memory and persistent, and provides API for multiple languages.
The method for allocating resources for the vCPE network element, which is provided based on the above embodiment, includes generating a plurality of similar resource units according to the types of resources to be allocated by the vCPE network element, and storing the similar resource units in a Redis linked list; when a class resource application message of a vCPE network element of the resource to be distributed is received, judging whether a resource unit to be applied in the class resource application message is in the Redis linked list or not; if the resource unit exists, popping the resource unit of the class to be applied from the Redis linked list, after the resource of the resource unit of the class to be applied is distributed to the vCPE network element of the resource to be distributed, updating the data of the distributed resource unit of the class to be applied of the vCPE network element of the resource to be distributed, and inserting the distributed resource unit of the class to be applied after the data is updated into the Redis linked list; otherwise, judging whether the resource unit to be applied exists in the database; if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is allocated to the resource vCPE network element to be allocated, the data of the resource unit to be applied, which is allocated to the resource vCPE network element to be allocated, is updated, and the Redis linked list is updated. The invention reduces frequent access and update of the database when a large amount of concurrent processing occurs, ensures the accuracy of the data read by concurrent application, and does not interrupt the service when the database is abnormal.
As shown in fig. 2, a system for vCPE network element allocation resources, the system comprising:
the first processing module is used for generating a plurality of similar resource units according to the type of the resource to be allocated by the vCPE network element and storing the similar resource units into a Redis linked list.
The second processing module is used for judging whether a resource unit to be applied in a class resource application message is in the Redis linked list or not when the class resource application message of a vCPE network element of the resource to be distributed is received;
if the resource units to be applied for are distributed in the Redis linked list, popping up the resource units to be applied for from the Redis linked list, updating the data of the resource units to be applied for which the resource vCPE network elements to be distributed are distributed after the resource of the resource units to be applied for are distributed by the resource vCPE network elements to be distributed, and inserting the distributed resource units to be applied for into the Redis linked list after the data is updated.
Otherwise, judging whether the resource unit to be applied exists in the database;
if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is distributed to the resource vCPE network element to be distributed, the data of the resource unit to be applied, which is distributed to the resource vCPE network element to be distributed, is updated, and the Redis linked list is updated.
Based on the foregoing embodiment, further, the second processing module is further configured to update the data of the resource-like unit stored in the database when the data of the resource-like unit in the Redis linked list is updated.
Based on the foregoing embodiment, further, the first processing module is specifically configured to create the Redis linked list, and use the type of the resource to be allocated that meets the resource preemption condition as the resource unit of the class;
and acquiring an initial value of the class resource unit, and inserting the class resource unit and the data of the class resource unit into the Redis linked list, wherein the Redis linked list is a one-way queue.
Based on the foregoing embodiment, further, the second processing module is specifically configured to query whether the resource unit to be applied for is present in the Redis linked list;
if the resource unit exists, updating the data of the resource unit to be applied in the Redis linked list according to the data of the resource unit to be applied, which is allocated to the vCPE network element of the resource to be allocated;
otherwise, inserting the resource unit to be applied in the Redis linked list, and updating the data of the resource unit to be applied in the Redis linked list.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module/unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for vCPE network element allocation resources, the method comprising:
generating a plurality of similar resource units according to the types of resources to be allocated of the vCPE network elements, and storing the similar resource units into a Redis linked list;
when a class resource application message of a vCPE network element of the resource to be distributed is received, judging whether a class resource unit to be applied in the class resource application message is in the Redis linked list or not;
if the resource unit exists, popping the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource unit to be applied for is allocated to the vCPE network element to be allocated after the resource of the resource unit to be applied for is allocated to the vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list;
otherwise, judging whether the resource unit to be applied exists in the database;
if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is distributed to the vCPE network element of the resource to be distributed, the data of the resource unit to be applied, which is distributed to the vCPE network element of the resource to be distributed, is updated, and the Redis linked list is updated;
the generating a plurality of similar resource units according to the type of the resource to be allocated by the vCPE network element, and storing the similar resource units in a Redis linked list specifically includes:
creating the Redis linked list, and taking the resource types to be distributed meeting the resource robbing conditions as the resource units;
acquiring an initial value of the resource-like unit, and inserting the resource-like unit and data of the resource-like unit into the Redis linked list, wherein the Redis linked list is a one-way queue;
the updating the Redis linked list specifically includes:
inquiring whether the resource unit to be applied exists in the Redis linked list or not;
if the resource vCPE network element exists, updating the data of the resource unit to be applied in the Redis linked list according to the data of the resource unit to be applied, which is already allocated to the resource unit to be applied, of the resource vCPE network element to be allocated;
otherwise, inserting the resource unit to be applied in the Redis linked list, and updating the data of the resource unit to be applied in the Redis linked list.
2. The method for vCPE network element allocation resources according to claim 1, wherein the method further includes:
and when the data of the similar resource unit in the Redis linked list is updated, updating the data of the similar resource unit stored in the database.
3. The method for vCPE network element allocation of resources according to claim 1, further comprising synchronizing the Redis chaining table and the database when a preset condition is met;
the synchronization of the Redis chain table and the database specifically comprises:
sequentially reading the similar resource units in the Redis linked list, and inquiring whether the similar resource units exist in the database;
if the similar resource unit exists in the database, judging whether the data of the similar resource unit in the Redis linked list is consistent with the data of the similar resource unit stored in the database, and setting the similar resource unit in the database as an updated identifier;
if the data in the Redis linked list is inconsistent with the data in the database, updating the data of the similar resource units in the database according to the data of the similar resource units in the Redis linked list;
if the data of the class resource units in the Redis linked list are consistent with the data of the class resource units in the database, the data of the class resource units in the Redis linked list are not updated;
if the class resource unit does not exist in the database, storing the class resource unit into the database, updating the data of the class resource unit stored in the database, and setting the class resource unit in the database as an updated identifier;
after all the class resource units in the Redis linked list are queried in the database, if the class resource units which do not identify the updated identification exist in the database, inserting the class resource units which do not identify the updated identification in the database into the Redis linked list, wherein the preset condition comprises preset time.
4. The method for vCPE network element allocation resources according to claim 1, wherein the method further includes:
when the Redis system to which the Redis linked list belongs is abnormal, sending the class resource application message to the database;
and when the database is abnormal, sending the class resource application message to a Redis system to which the Redis linked list belongs.
5. A system for vCPE network element allocation of resources, the system comprising:
the first processing module is used for generating a plurality of similar resource units according to the type of the resource to be allocated by the vCPE network element and storing the similar resource units into a Redis linked list;
the second processing module is used for judging whether a resource unit to be applied in the class resource application message is in the Redis linked list or not when the class resource application message of the vCPE network element to be allocated with the resource is received;
if the resource unit exists, popping the resource unit to be applied for from the Redis linked list, updating the data of the resource unit to be applied for which the resource unit to be applied for is allocated to the vCPE network element to be allocated after the resource of the resource unit to be applied for is allocated to the vCPE network element to be allocated, and inserting the allocated resource unit to be applied for which the data is updated into the Redis linked list;
otherwise, judging whether the resource unit to be applied exists in the database;
if the resource unit to be applied exists in the database, after the resource of the resource unit to be applied is allocated to the resource vCPE network element to be allocated, updating the data of the resource unit to be applied, which is allocated to the resource vCPE network element to be allocated, and updating the Redis linked list;
the generating a plurality of similar resource units according to the type of the resource to be allocated by the vCPE network element, and storing the similar resource units in a Redis linked list specifically includes:
creating the Redis linked list, and taking the type of the resource to be distributed meeting the resource robbing condition as the resource unit;
acquiring an initial value of the resource-like unit, and inserting the resource-like unit and data of the resource-like unit into the Redis linked list, wherein the Redis linked list is a one-way queue;
the updating the Redis linked list specifically includes:
inquiring whether the resource unit to be applied exists in the Redis linked list or not;
if the resource vCPE network element exists, updating the data of the resource unit to be applied in the Redis linked list according to the data of the resource unit to be applied, which is already allocated to the resource unit to be applied, of the resource vCPE network element to be allocated;
otherwise, inserting the resource unit to be applied in the Redis linked list, and updating the data of the resource unit to be applied in the Redis linked list.
6. System for vCPE network element allocation of resources according to claim 5,
the second processing module is further configured to update the data of the class resource unit stored in the database when the data of the class resource unit in the Redis linked list is updated.
7. The system for vCPE network element allocation resources according to claim 5,
the first processing module is specifically configured to create the Redis linked list, and use the type of the resource to be allocated that meets the resource preemption condition as the resource unit;
and acquiring an initial value of the class resource unit, and inserting the class resource unit and the data of the class resource unit into the Redis linked list, wherein the Redis linked list is a one-way queue.
8. The system for vCPE network element allocation resources according to claim 5,
the second processing module is specifically configured to query whether the resource unit to be applied exists in the Redis linked list;
if the resource unit exists, updating the data of the resource unit to be applied in the Redis linked list according to the data of the resource unit to be applied, which is allocated to the vCPE network element of the resource to be allocated;
otherwise, inserting the resource unit to be applied in the Redis linked list, and updating the data of the resource unit to be applied in the Redis linked list.
CN202211197556.5A 2022-09-29 2022-09-29 Method and system for allocating resources to vCPE network element Active CN115269207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211197556.5A CN115269207B (en) 2022-09-29 2022-09-29 Method and system for allocating resources to vCPE network element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211197556.5A CN115269207B (en) 2022-09-29 2022-09-29 Method and system for allocating resources to vCPE network element

Publications (2)

Publication Number Publication Date
CN115269207A CN115269207A (en) 2022-11-01
CN115269207B true CN115269207B (en) 2022-12-23

Family

ID=83756223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211197556.5A Active CN115269207B (en) 2022-09-29 2022-09-29 Method and system for allocating resources to vCPE network element

Country Status (1)

Country Link
CN (1) CN115269207B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665701B1 (en) * 1999-08-03 2003-12-16 Worldcom, Inc. Method and system for contention controlled data exchange in a distributed network-based resource allocation
WO2013097719A1 (en) * 2011-12-31 2013-07-04 中兴通讯股份有限公司 Method and apparatus for resources synchronization
CN104954468A (en) * 2015-06-18 2015-09-30 小米科技有限责任公司 Resource allocation method and resource allocation device
CN107566904A (en) * 2017-08-31 2018-01-09 海信电子科技(深圳)有限公司 A kind of resource data updating method and set-top box device
CN110231992A (en) * 2019-06-06 2019-09-13 深圳前海微众银行股份有限公司 Distributed resource allocation method, device, equipment and readable storage medium storing program for executing
CN110362409A (en) * 2019-07-19 2019-10-22 深圳前海微众银行股份有限公司 Based on a plurality of types of resource allocation methods, device, equipment and storage medium
CN110888858A (en) * 2019-10-29 2020-03-17 北京奇艺世纪科技有限公司 Database operation method and device, storage medium and electronic device
CN111949393A (en) * 2019-05-16 2020-11-17 腾讯科技(深圳)有限公司 Resource allocation and acquisition method, device, storage medium and equipment
CN112269659A (en) * 2020-10-23 2021-01-26 苏州浪潮智能科技有限公司 Resource management method, system, electronic equipment and storage medium
CN112286685A (en) * 2020-10-30 2021-01-29 深圳前海微众银行股份有限公司 Resource allocation method and device
CN112650576A (en) * 2021-01-22 2021-04-13 百度在线网络技术(北京)有限公司 Resource scheduling method, device, equipment, storage medium and computer program product
WO2022127535A1 (en) * 2020-12-15 2022-06-23 中兴通讯股份有限公司 Dynamic message management apparatus and method, and system, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6647508B2 (en) * 1997-11-04 2003-11-11 Hewlett-Packard Development Company, L.P. Multiprocessor computer architecture with multiple operating system instances and software controlled resource allocation
CN101427527B (en) * 2006-03-15 2011-05-18 中兴通讯股份有限公司 A terminal radio bearer resource management method
CN105848012A (en) * 2016-03-30 2016-08-10 乐视控股(北京)有限公司 Real-time transcoding rate control method and device
CN111782391A (en) * 2020-06-29 2020-10-16 北京达佳互联信息技术有限公司 Resource allocation method, device, electronic equipment and storage medium
US11233845B1 (en) * 2020-07-06 2022-01-25 Oracle International Corporation Centralized approach for managing cross-service data of cloud resources
CN112231106B (en) * 2020-10-26 2024-02-06 中国工商银行股份有限公司 Access data processing method and device of Redis cluster

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665701B1 (en) * 1999-08-03 2003-12-16 Worldcom, Inc. Method and system for contention controlled data exchange in a distributed network-based resource allocation
WO2013097719A1 (en) * 2011-12-31 2013-07-04 中兴通讯股份有限公司 Method and apparatus for resources synchronization
CN104954468A (en) * 2015-06-18 2015-09-30 小米科技有限责任公司 Resource allocation method and resource allocation device
CN107566904A (en) * 2017-08-31 2018-01-09 海信电子科技(深圳)有限公司 A kind of resource data updating method and set-top box device
CN111949393A (en) * 2019-05-16 2020-11-17 腾讯科技(深圳)有限公司 Resource allocation and acquisition method, device, storage medium and equipment
CN110231992A (en) * 2019-06-06 2019-09-13 深圳前海微众银行股份有限公司 Distributed resource allocation method, device, equipment and readable storage medium storing program for executing
CN110362409A (en) * 2019-07-19 2019-10-22 深圳前海微众银行股份有限公司 Based on a plurality of types of resource allocation methods, device, equipment and storage medium
CN110888858A (en) * 2019-10-29 2020-03-17 北京奇艺世纪科技有限公司 Database operation method and device, storage medium and electronic device
CN112269659A (en) * 2020-10-23 2021-01-26 苏州浪潮智能科技有限公司 Resource management method, system, electronic equipment and storage medium
CN112286685A (en) * 2020-10-30 2021-01-29 深圳前海微众银行股份有限公司 Resource allocation method and device
WO2022127535A1 (en) * 2020-12-15 2022-06-23 中兴通讯股份有限公司 Dynamic message management apparatus and method, and system, device and storage medium
CN112650576A (en) * 2021-01-22 2021-04-13 百度在线网络技术(北京)有限公司 Resource scheduling method, device, equipment, storage medium and computer program product

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Dynamic Modular vCPE Orchestration in Platform as a Service Architectures;Flávio Meneses 等;《2019 IEEE 8th International Conference on Cloud Networking (CloudNet)》;20200430;第1-6页 *
IP卫星网络接入网关中队列管理器的设计与实现;武东明等;《通信技术》;20171031(第10期);全文 *
互动电视边缘资源管理系统的设计与实现;鞠照明等;《计算机工程》;20120930(第17期);全文 *
基于资源分配图的死锁检测算法的改进;朱丽莉 等;《情 报 科 学》;20000531;第18卷(第5期);第453-455页 *

Also Published As

Publication number Publication date
CN115269207A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US11816084B2 (en) Staging anchor trees for improved concurrency and performance in page range index management
US11080260B2 (en) Concurrent reads and inserts into a data structure without latching or waiting by readers
US10031935B1 (en) Customer-requested partitioning of journal-based storage systems
JP5259404B2 (en) Cloning and managing database fragments
AU676284B2 (en) A computer system and method
CN111597015B (en) Transaction processing method and device, computer equipment and storage medium
US9990391B1 (en) Transactional messages in journal-based storage systems
US9772911B2 (en) Pooling work across multiple transactions for reducing contention in operational analytics systems
EP3688598B1 (en) Method for reading data stored in a non-volatile cache using rdma
CN111338766A (en) Transaction processing method and device, computer equipment and storage medium
US20080140937A1 (en) System and Methodology Providing Multiple Heterogeneous Buffer Caches
US20150205850A1 (en) Eager replication of uncommitted transactions
CN108509462B (en) Method and device for synchronizing activity transaction table
US10025710B2 (en) Pattern for integrating primary and secondary data stores in a sharded data domain
US20050240633A1 (en) Online recovery of user tables using flashback table
US11698893B2 (en) System and method for use of lock-less techniques with a multidimensional database
US10108658B1 (en) Deferred assignments in journal-based storage systems
US10191663B1 (en) Using data store accelerator intermediary nodes and write control settings to identify write propagation nodes
CN113220669B (en) Service data processing method and device and electronic equipment
US9971822B1 (en) Replicated state management using journal-based registers
CN103514298A (en) Method for achieving file lock and metadata server
US9026493B1 (en) Multi-master RDBMS improvements for distributed computing environment
US10235407B1 (en) Distributed storage system journal forking
US8719274B1 (en) Method, system, and apparatus for providing generic database services within an extensible firmware interface environment
CN115269207B (en) Method and system for allocating resources to vCPE network element

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant