Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some of the words that appear in the text are explained below:
the client side in the embodiment of the invention refers to a side, such as a base station, which can send signaling request resources to a gateway and a server side;
the server side in the embodiment of the invention refers to a side which can send signaling request resources to a gateway and respond to signaling sent by a client side, such as a core network;
the gateway in the embodiment of the present invention refers to an end capable of receiving signaling sent by a client and a server and managing resources, such as an LTE gateway;
the embodiments of the present invention will be described in further detail with reference to the drawings attached hereto.
The first embodiment is as follows:
the present embodiment provides a method for resource allocation and management, where a flowchart of steps is shown in fig. 1A, and a specific process thereof is as follows:
in this embodiment, the client is a base station, the server is core network equipment, the gateway is an LTE gateway, and a schematic diagram of resource management of the LTE gateway is shown in fig. 1B;
the resources comprise Evolved Radio Access Bearer (ERAB) (Evolved Radio Access Bearer) Evolved Radio Access Bearer information, User Equipment (UE) context and the like;
and step 110, when the client signaling is determined to arrive, determining a corresponding service thread for the client signaling according to a first preset rule.
The first preset rule may include, but is not limited to, link information between a server and a gateway, link information between a client and a gateway, or congestion between links, or other rules that can achieve the same effect; the first preset rule is not limited too much, and those skilled in the art can select the first preset rule according to the actual requirements of the project.
The client signaling refers to signaling sent by a user to a base station, the same user can send signaling to different base stations, and the same base station can receive the signaling sent by a plurality of users;
in implementation, when a first signaling of the session initiated by the user passes through the base station and reaches a gateway as the client signaling, the gateway decodes the client signaling, and determines a corresponding service thread for the client signaling according to a first preset rule;
when the gateway decodes the client signaling, the gateway processes an application layer S1AP signaling in a network side protocol stack, and decodes the S1AP signaling according to an S1AP international decoding rule (formulated by 3GPP organization), so as to obtain the content of the signaling, where the content of the signaling includes, but is not limited to, the flow type, the service type, and the information of the user equipment UE of the signaling.
Step 120, determining resource grouping information corresponding to the client signaling according to the mapping relationship between the resource grouping identifier and the service thread, where the resource grouping information includes the resource grouping identifier. In implementation, the basis for determining the mapping relationship between the resource grouping identifier and the service thread may include, but is not limited to, the attribute of the service corresponding to the service thread;
in the mapping relationship between the resource grouping identifier and the service thread, one resource grouping identifier corresponds to at least one client service thread and at least one server service thread.
Step 130, utilizing the service thread of the server to schedule the packet resource corresponding to the resource packet identifier for the client signaling.
The schematic diagram of the service thread and the packet resource usage is shown in fig. 1C;
and scheduling the packet resource corresponding to the resource packet identifier for the client signaling by using the service thread of the server.
In the method for allocating and managing resources provided by this embodiment, resources are managed in a packet manner, a gateway generates and maintains a mapping relationship between resource packets and service threads, and allocates corresponding service processing threads for client signaling and allocating respectively, and performs packet management on all resources of the gateway, a resource required by a certain client is allocated to a packet resource corresponding to a corresponding resource packet identifier, and a related service thread bound to the client accesses all fixed packets in a resource packet list in parallel, so that resource contention with other threads is reduced, and while a gateway storage resource is increased, the processing capability of the gateway on the signaling is ensured.
Example two:
the present embodiment provides a method for resource allocation and management, where on the basis of the first embodiment, in implementation, the method further includes, after determining corresponding resource grouping information for the client signaling, placing a resource generated when the server service thread schedules a grouping resource corresponding to the resource grouping identifier for the client signaling in the grouping resource corresponding to the resource grouping identifier;
it should be understood that, for the generated resources, when the client signaling is a signaling that occurs when a certain user UE (mobile terminal) connects to the network, the UE performs a service through signaling negotiation interaction, and during the signaling interaction, the gateway needs to store the context of the UE activity, where the context of the UE includes but is not limited to: the identity of the UE, the service currently processed by the UE, the content of the required next signaling, whether the online state of the UE is abnormal, and the like;
in the implementation, after determining the corresponding resource grouping information for the client signaling, adding the resource grouping identifier to the client signaling, and then sending the client signaling to a server;
correspondingly, when receiving the client signaling added with the resource grouping identifier, the core network issues a server signaling carrying the resource grouping identifier according to the corresponding content of the client signaling;
in the implementation, the gateway receives a server signaling carrying the resource grouping identifier and issued by a server; determining a client service thread corresponding to the server signaling according to the mapping relation between the resource grouping identifier and the service thread; and scheduling the grouping resources corresponding to the resource grouping identification for the signaling of the server by utilizing the client service thread.
And utilizing the client service thread to dispatch the resources generated when the grouping resources corresponding to the resource grouping identification are placed in the grouping resources corresponding to the resource grouping identification for the server signaling.
When the service corresponding to the client signaling is preset to meet the abnormal service judgment condition, the service corresponding to the client signaling is a global service or an abnormal condition;
the global service or the abnormal condition may include, but is not limited to, that when the core network is abnormal, the base station needs to be reset, at this time, the reset signaling sent by the core network is global (that is, the sent reset signaling is not only for a certain UE), and at this time, the gateway needs to clear all resources of the UE under the base station that needs to be reset.
A specific embodiment of the interaction between the base station, the gateway and the core network according to the first embodiment and the second embodiment of the present invention is given below, as shown in fig. 2:
1) the base station sends signaling to the gateway;
2) the gateway receives the signaling from the base station, starts a server thread scheduling module and determines a server service thread for the signaling of the base station from a server service thread group;
3) the gateway determines a packet resource and a corresponding resource packet identifier for the signaling of the base station according to the mapping relation between the resource packet identifier and the service thread, and schedules the determined packet resource for the signaling of the base station;
4) the gateway adds the determined resource grouping identification into the signaling of the base station and sends the signaling to a core network;
5) the core network receives the signaling sent by the gateway and sends the signaling carrying the resource grouping identification in the same group to the gateway according to the signaling content;
6) the gateway receives the signaling sent by the core network, starts a client thread scheduling module, determines a client service thread for the signaling of the base station from a client service thread group, and schedules the packet resource corresponding to the resource packet identifier by using the client service thread.
In the method for allocating and managing resources provided by this embodiment, resources are managed in a grouping manner, a gateway generates and maintains a mapping relationship between resource groups and service threads, and allocates corresponding service processing threads to client signaling and server signaling, respectively, so as to ensure matching between users and service threads in a complete service flow; after a user sends a first signaling to a base station, during the online period of the same user, the same user is processed by the previously allocated service threads (a client service thread and a server service thread) when being processed by the gateway, and the two service threads access the same group resource corresponding to the same resource grouping identifier, so that the crossed resource access during multithreading is reduced, the efficiency of the gateway for searching a resource table is improved, and the processing rate of the gateway for the signaling is increased.
Example three:
the present embodiment provides an apparatus for resource allocation and management, as shown in fig. 3A, the apparatus includes:
a service thread selecting unit 301, configured to determine, when a client signaling arrives, a corresponding server service thread for the client signaling according to a first preset rule;
a resource grouping determining unit 302, configured to determine resource grouping information corresponding to the client signaling according to a mapping relationship between the resource grouping identifier and a service thread, where the resource grouping information includes a resource grouping identifier;
a resource scheduling unit 303, configured to schedule, for the client signaling, a packet resource corresponding to the resource packet identifier by using the server service thread. Optionally, the system further includes a client signaling forwarding unit, configured to add the resource grouping identifier to the client signaling, and then send the client signaling to a server;
a server signaling receiving unit, configured to receive a server signaling carrying the resource grouping identifier and sent by a server;
a service thread determining unit, configured to determine a client service thread corresponding to the server signaling according to a mapping relationship between the resource grouping identifier and a service thread;
and the server resource scheduling unit is used for scheduling the packet resources corresponding to the resource packet identifier for the server signaling by using the client service thread.
The first preset rule comprises link information between the server and the gateway and link information between the client and the gateway.
The client resource scheduling unit is configured to place a resource generated when the server service thread schedules the packet resource corresponding to the resource packet identifier for the client signaling in the packet resource corresponding to the resource packet identifier;
the server resource scheduling unit is configured to utilize the client service thread to schedule a resource generated when the packet resource corresponding to the resource packet identifier is scheduled for the server signaling, and place the resource in the packet resource corresponding to the resource packet identifier.
And determining the mapping relation between the resource grouping identifier and the service thread according to the attribute of the service corresponding to the service thread. The mapping relationship between the resource grouping identifier and the service thread includes: one resource grouping identification corresponds to at least one client service thread and at least one server service thread.
The resource grouping determining unit is further configured to schedule, for the client signaling, a grouping resource corresponding to all resource grouping identifiers by using the service thread of the server when the service preset corresponding to the client signaling meets the abnormal service judgment condition.
The present embodiment further provides a device for resource allocation and management, as shown in fig. 3B, the device includes a processor 310 and a memory 320, where the processor is configured to:
when the client signaling is determined to arrive, determining a corresponding server service thread for the client signaling according to a first preset rule;
determining resource grouping information corresponding to the client signaling according to the mapping relation between the resource grouping identifier and the service thread, wherein the resource grouping information comprises the resource grouping identifier;
and scheduling the packet resources corresponding to the resource packet identification for the client signaling by using the service thread of the server.
The processor is further configured to send the client signaling to a server after adding the resource grouping identifier to the client signaling;
receiving a server signaling which is sent by a server and carries the resource grouping identifier;
determining a client service thread corresponding to the server signaling according to the mapping relation between the resource grouping identifier and the service thread;
and scheduling the grouping resources corresponding to the resource grouping identification for the signaling of the server by utilizing the client service thread.
The first preset rule comprises link information between the server and the gateway and link information between the client and the gateway.
The processor is specifically configured to place a resource, which is generated when the server service thread schedules a packet resource corresponding to the resource packet identifier for the client signaling, in the packet resource corresponding to the resource packet identifier;
the processor is specifically configured to place a resource generated when the client service thread is used to schedule the packet resource corresponding to the resource packet identifier for the server signaling in the packet resource corresponding to the resource packet identifier.
And determining the mapping relation between the resource grouping identifier and the service thread according to the attribute of the service corresponding to the service thread. The mapping relationship between the resource grouping identifier and the service thread includes: one resource grouping identification corresponds to at least one client service thread and at least one server service thread.
The processor is further configured to schedule, by using the service thread of the server, packet resources corresponding to all resource packet identifiers for the client signaling when the service preset corresponding to the client signaling meets the abnormal service judgment condition.
Example four:
the present embodiment provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of a method for resource allocation and management as described in the first and second embodiments.
It should be noted that the technical solutions of the embodiments of the present invention can be combined with each other, but must be based on the realization of the technical solutions by those skilled in the art, and when the technical solutions are contradictory or can not be realized, the combination of the technical solutions should be considered to be absent and not to be within the protection scope of the present invention. The above description is only for the preferred embodiment of the present invention and is not intended to limit the scope of the present invention, and all equivalent structural changes made by using the contents of the present specification and the drawings, or any other related technical fields, are included in the scope of the present invention.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.