CN114691734A - Cache control method and device, computer readable medium and electronic device - Google Patents

Cache control method and device, computer readable medium and electronic device Download PDF

Info

Publication number
CN114691734A
CN114691734A CN202210322897.4A CN202210322897A CN114691734A CN 114691734 A CN114691734 A CN 114691734A CN 202210322897 A CN202210322897 A CN 202210322897A CN 114691734 A CN114691734 A CN 114691734A
Authority
CN
China
Prior art keywords
user
cache
address
identification information
data query
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.)
Granted
Application number
CN202210322897.4A
Other languages
Chinese (zh)
Other versions
CN114691734B (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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210322897.4A priority Critical patent/CN114691734B/en
Publication of CN114691734A publication Critical patent/CN114691734A/en
Application granted granted Critical
Publication of CN114691734B publication Critical patent/CN114691734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Abstract

The application discloses a cache management and control method, a cache management and control device, a computer readable medium and electronic equipment, wherein the method comprises the following steps: when a user login instruction is detected, user identification information is obtained from the user login instruction, and the user identification information is used for indicating the identity of a user; determining whether a user data storage address corresponding to the user identification information exists in a local address cache; if a user data storage address corresponding to the user identification information exists in the local address cache, sending a user data query instruction to the user data storage address to obtain a data query result corresponding to the user data query instruction; and updating the local address cache according to the data query result. According to the technical scheme, the local address cache is automatically updated, the local address cache does not need to be manually updated, the convenience of local address cache management and control is improved, the cache updating operation is simplified, and the cache updating efficiency is improved.

Description

Cache control method and device, computer readable medium and electronic device
Technical Field
The application belongs to the technical field of internet and computers, and particularly relates to a cache management and control method, a cache management and control device, a computer readable medium and electronic equipment.
Background
The fifth Generation Mobile Communication Technology (5th Generation Mobile Communication Technology, abbreviated as 5G) is a new Generation broadband Mobile Communication Technology with the characteristics of high speed, low time delay and large connection, and is a network infrastructure for realizing man-machine interconnection. The 5G core network is composed of a plurality of network elements with different functions, when a user accesses the 5G network, the user data needs to be acquired or inquired from different network elements, in order to improve the efficiency of data acquisition or inquiry, some network elements can store related data in other network elements used in the data acquisition or inquiry process in a local cache, and thus, the data inquiry can be carried out through the local cache. However, the local cache is usually managed manually, and when data in other network elements changes, the local cache needs to be updated manually and synchronously in various places throughout the network, otherwise, the service use of the user is affected. Therefore, the management and control method of the local cache is difficult to operate, low in management and control efficiency and hidden in risk.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The present application aims to provide a cache management and control method, an apparatus, a computer readable medium and an electronic device, so as to solve the problems of difficult local cache management and control operation and low efficiency in the related art.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a cache management and control method, including:
when a user login instruction is detected, user identification information is obtained from the user login instruction, and the user identification information is used for indicating the identity of a user;
determining whether a user data storage address corresponding to the user identification information exists in a local address cache;
if a user data storage address corresponding to the user identification information exists in the local address cache, sending a user data query instruction to the user data storage address to obtain a data query result corresponding to the user data query instruction;
and updating the local address cache according to the data query result.
According to an aspect of an embodiment of the present application, there is provided a cache management and control apparatus, including:
the system comprises a user information acquisition module, a user identification information acquisition module and a user identification information acquisition module, wherein the user information acquisition module is used for acquiring user identification information from a user login instruction when the user login instruction is detected;
a data storage address determining module, configured to determine whether a user data storage address corresponding to the user identification information exists in a local address cache;
a query result obtaining module, configured to send a user data query instruction to a user data storage address if the user data storage address corresponding to the user identification information exists in the local address cache, so as to obtain a data query result corresponding to the user data query instruction;
and the cache updating module is used for updating the local address cache according to the data query result.
In one embodiment of the present application, the cache update module includes:
the counting unit is used for determining data query failure and counting the number of data query failure if the data query result indicates that the data query is abnormal;
and the first cache updating unit is used for acquiring address updating information from a network storage function network element according to the record information of data query failure and updating the local address cache according to the address updating information if the data query failure times are larger than a preset threshold value.
In an embodiment of the present application, the first cache updating unit is specifically configured to:
determining user identification information corresponding to the failure of the currently recorded data query, and acquiring a corresponding user data storage address from the network storage function network element as address update information according to the currently recorded user identification information;
and updating the user data storage address corresponding to the currently recorded user identification information in the local cache according to the address updating information.
In an embodiment of the present application, the cache update module further includes:
a cache timeout judging unit, configured to determine whether the local address cache is timeout if the data query result indicates that data query is normal or the data query failure frequency is smaller than a preset threshold;
and the second cache updating unit is used for acquiring address updating information from the network storage function network element according to the user list of the local address cache if the local address cache is overtime, and updating the local address cache according to the address updating information.
In an embodiment of the application, the second cache updating unit is specifically configured to:
acquiring a user data storage address corresponding to each cache user identifier in the user list from the network storage function network element according to the user list cached in the local address as address updating information;
and updating the user data storage address corresponding to each cache user identifier in the local address cache according to the address updating information.
In one embodiment of the present application, the apparatus further comprises:
an address obtaining module, configured to, if a user data storage address corresponding to the user identification information does not exist in the local address cache, obtain a user data storage address corresponding to the user identification information from a network storage function network element, and add the obtained user data storage address corresponding to the user identification information to the local address cache.
In an embodiment of the present application, the data storage address determining module is specifically configured to:
determining whether a cached user identifier identical to the user identifier information exists in a user list cached in the local address;
and if the cache user identification which is the same as the user identification information exists in the user list of the local address cache, taking a user data storage address which is corresponding to the cache user identification which is the same as the user identification information in the local address cache as a user data storage address corresponding to the user identification information.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements a cache management method as in the above technical solution.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the cache management method as in the above technical solution via executing the executable instructions.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device executes the cache management method according to the above technical solution.
In the technical scheme provided by the embodiment of the application, when a user login instruction is detected, user identification information is obtained from the user login instruction, a user data storage address is determined in the local address cache according to the user identification information, a user data query instruction is sent to the user data storage address, and finally the local address cache is updated according to a data query result corresponding to the user data query instruction.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 schematically shows a block diagram of an exemplary system architecture to which the solution of the present application applies.
Fig. 2 schematically shows a flowchart of a cache management and control method according to an embodiment of the present application.
Fig. 3 schematically shows a flowchart illustrating a cache management method according to a specific embodiment of the present application.
Fig. 4 schematically shows a block diagram of a structure of a cache management and control apparatus according to an embodiment of the present application.
FIG. 5 schematically illustrates a block diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is understood that in the specific implementation of the present application, related data such as user information, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
Fig. 1 schematically shows a network architecture suitable for an embodiment of the present application, and each of the parts involved in the network architecture is described below.
User Equipment (UE) network element 101: various Handheld terminal devices, vehicle-mounted devices, wearable devices with Wireless Communication functions may be included, and examples thereof may include devices that can access a network, such as cellular phones (cellular phones), Smart phones (Smart phones), Wireless data cards, Personal Digital Assistants (PDAs), notebook computers, tablet computers, Wireless modems (modems), Handheld devices (handlets), Laptop computers (Laptop computers), Cordless phones (Cordless phones), Wireless Local Loop (WLL) stations, Machine Type Communication (MTC) terminals, and the like.
Access Network (AN) Network element 102: the system is mainly responsible for functions of radio resource management, Quality of Service (QoS) management, data compression, encryption and the like at the air interface side, is used for providing a network access function for authorized user equipment in a specific area, and can use transmission tunnels with different qualities according to the level of the user equipment, the Service requirement and the like. In a wireless Access scenario, the Access Network element 102 may also be referred to as a Radio Access Network (RAN) element. The RAN network element may include various types of base stations, such as a macro base station, a micro base station (also referred to as a small station), a relay station, an access point, and the like. In systems using different radio access technologies, the names of RAN network elements with base station functionality may be different, for example, in a fifth generation (5G) system, referred to as a gNB; in an LTE system, referred to as an evolved NodeB (eNB or eNodeB); in the third generation (3G) system, the node b is called node b (node b).
User plane network element 103: the device is used for taking charge of functions of packaging, routing, forwarding and counting user messages, processing Quality of service (QoS) of user plane data and the like. In the 5G communication system, the User Plane network element may be a User Plane Function (UPF) network element.
Data network element 104: for providing a network for transmitting data. In the 5G communication system, the Data Network element may be a Data Network (DN) element.
Access and mobility management network element 105: the method is mainly used for Mobility Management, access Management and the like, and can be used for realizing other functions except session Management in Mobility Management Entity (MME) functions, such as functions of lawful interception, access authorization/authentication and the like. In the 5G communication system, the access and Mobility Management network element may be an access and Mobility Management Function (AMF) network element.
Session management network element 106: the method is mainly used for session management, network communication protocol (IP) address allocation and management of user equipment, termination point selection of an interface capable of managing a user plane function and a policy control and charging function, downlink data notification and the like. In the 5G communication system, the Session management network element may be a Session Management Function (SMF) network element.
The policy control network element 107: the unified policy framework is used for guiding network behavior, providing policy rule information for control plane function network elements (such as AMF, SMF network elements and the like), and the like. In the 4G communication system, the Policy control network element may be a Policy and Charging Rules Function (PCRF) network element. In the 5G communication system, the Policy Control network element may be a Policy Control Function (PCF) network element.
The authentication server 108: the method is used for authentication service and key generation to realize bidirectional authentication of the user equipment, and supports a uniform authentication framework. In a 5G communication system, the Authentication server may be an Authentication server function (AUSF) network element.
Data management network element 109: for handling user equipment identity, access authentication, registration, mobility management, etc. In the 5G communication system, the data management network element may be a Unified Data Management (UDM) network element; in the 4G communication system, the data management network element may be a Home Subscriber Server (HSS) network element.
The application network element 110: the method is used for carrying out data routing of application influence, accessing to a network open function network element, carrying out strategy control by interacting with a strategy framework and the like. In the 5G communication system, the Application network element may be an Application Function (AF) network element.
A network storage network element: for maintaining real-time information of all network function services in the network. In the 5G communication system, the Network storage element may be a Network Registration Function (NRF) element.
In the network architecture shown in fig. 1, the user equipment UE is connected to the AMF through AN N1 interface, (R) the AN is connected to the AMF through AN N2 interface, and (R) the AN is connected to the UPF through AN N3 interface. UPFs are connected through an N9 interface, and are interconnected with DN through an N6 interface. The SMF controls the UPF via the N4 interface. The AMF is connected with the SMF through an N11 interface. The AMF obtains the user equipment subscription data from the UDM unit through an N8 interface, and the SMF obtains the user equipment subscription data from the UDM unit through an N10 interface.
It is to be understood that the above network elements or functions may be network elements in a hardware device, or may be software functions running on dedicated hardware, or virtualization functions instantiated on a platform (e.g., a cloud platform). The network architecture applied to the embodiment of the present application is only an example, and the network architecture applied to the embodiment of the present application is not limited thereto, and any network architecture capable of implementing the functions of the network elements is applicable to the embodiment of the present application.
For example, in some Network architectures, Network Function Network element entities such as an AMF Network element, an SMF Network element, a PCF Network element, an AUSF Network element, and a UDM Network element are all called Network Function (NF) Network elements; or, in other network architectures, a set of network elements such as an AMF network element, an SMF network element, a PCF network element, an AUSF network element, and an UDM network element may all be referred to as a control plane function network element.
The following describes the cache management and control method provided by the present application in detail with reference to specific embodiments.
Fig. 2 schematically illustrates a flowchart of a cache management and control method provided in an embodiment of the present application, where the method may be implemented by a terminal device, such as the terminal device 110 shown in fig. 1; the method may also be implemented by a server, such as server 130 shown in FIG. 1. As shown in fig. 2, the cache management and control method provided in the embodiment of the present application is applied to the technical field of a 5G core network, and includes steps 210 to 240, which are specifically as follows:
step 210, when a user login instruction is detected, obtaining user identification information from the user login instruction, where the user identification information is used to indicate a user identity.
Specifically, the user login instruction refers to an instruction for accessing a 5G Core network (5G Core network, abbreviated as 5GC) by a user, and is also referred to as a user online instruction. In the embodiment of the present application, the user may be a single individual, or may be a group composed of multiple individuals, such as an enterprise. When the user accesses the 5G network, a user login instruction is generated based on the relevant information of the user, such as the geographical position of the user, the user identity information, the equipment information used by the user and the like. Therefore, when a user login instruction is detected, that is, when the user is detected to be on-line, user identification information representing the identity of the user can be acquired from the user login instruction.
In one embodiment of the present application, the user identification confidence is mainly used for identifying the user identity, and when the user types are different, the user identification information is also different. For example, when the user is a business, the user identification information may be the organizational code of the business; when the user is a personal user, the user Identification information may be an International Mobile Subscriber Identity (IMSI), a Mobile phone Number of the user, or the like; when the user is a piece of Equipment, the user identification information may be an Equipment ID, a Unique Equipment Identifier (UDID), an International Mobile Equipment Identity (IMEI), or the like.
Step 220, determining whether a user data storage address corresponding to the user identification information exists in the local address cache.
Specifically, the local address cache is a local cache for storing a user data storage address. The local address cache can pre-store the user data storage addresses of the related users, when the users are online, the corresponding user data storage addresses can be directly and conveniently found from the local address cache, and the user data storage addresses do not need to be searched from other databases, so that the query efficiency of the user data is improved.
In an embodiment of the present application, the manner of searching the user data storage address is as follows: determining whether a user identifier which is the same as the user identifier information exists in a user list cached in a local address; and if the user identification which is the same as the user identification information exists in the user list of the local address cache, taking the user data storage address which is corresponding to the user identification which is the same as the user identification information in the local address cache as the user data storage address corresponding to the user identification information.
Specifically, the user data storage addresses and the user identification information are corresponding to each other, and for the convenience of distinguishing, the user identification information in the local address cache is recorded as cache user identifications, and cache user identifications corresponding to all user data storage addresses stored in the local address cache form a user list. Therefore, the user identification information obtained from the user login instruction can be searched in the user list in the local address cache, so as to determine whether the user data storage address corresponding to the user identification information is stored in the local address cache.
When the cached user identifier identical to the user identifier information exists in the user list cached in the local address, it may be determined that the user data storage address corresponding to the user identifier information is stored in the local address cache, and the user data storage address corresponding to the user identifier information is the user data storage address corresponding to the identical cached user identifier.
Generally, if a user does not log in (or goes online) for the first time, that is, the user has already logged in the 5G core network before the user logs in, the local address cache stores the user data storage address corresponding to the user. However, when the user list of the local address cache does not have the cache user identifier that is the same as the user identifier information, it indicates that the user data storage address of the user is not recorded in the local address cache, and this situation is likely that the user logs in for the first time, and the local address cache temporarily does not store the corresponding user data storage address, and at this time, the user data storage address corresponding to the user identifier information needs to be acquired from the network storage function network element. A Network storage Function (NRF) is a Network element in a 5G core Network that is responsible for registering and managing Network elements (a Network element refers to a device or module that implements a certain Function in the 5G core Network, abbreviated as NF).
The user data storage address in the NRF is also corresponding to the user identification information, and for the sake of distinction, the user identification information in the NRF is simply referred to as user identification. Therefore, the user identifier which is the same as the user identifier information is found in the NRF, and the user data storage address corresponding to the user identifier is the user data storage address corresponding to the user identifier information of the current user. After the user data storage address is acquired from the NRF, the user data storage address and the associated user identification information are added to the local address cache, so that the corresponding user data storage address can be searched from the local address cache when the user gets online next time.
Step 230, if the user data storage address corresponding to the user identification information exists in the local address cache, sending a user data query instruction to the user data storage address to obtain a data query result corresponding to the user data query instruction.
Specifically, after the user data storage address is determined, a user data query instruction is sent to the user data storage address, where the user data query instruction is used to query user data of a currently online user. And after a user data query instruction is sent, acquiring a corresponding data query result, wherein the data query result indicates whether the user data can be queried normally.
And 240, updating the local address cache according to the data query result.
Specifically, after the data query result is obtained, it may be determined whether the user data query is normal, and further, it may be determined whether the user data storage address stored in the local address cache is correct, so as to update the local address cache, and keep the data stored in the local address cache correct.
In one embodiment of the present application, the data query result includes two cases, one case is that the data query is indicated to be abnormal, that is, the user data is not queried; the other condition is that the data query is normal, namely the user data can be queried normally. And aiming at the data query result under different conditions, different cache updating modes are adopted.
In one embodiment of the application, if the data query result indicates that the data query is abnormal, determining that the data query fails, and counting the number of times of data query failure; and if the data query failure times are larger than a preset threshold value, acquiring address updating information from the network storage function network element according to the record information of the data query failure, and updating the local address cache according to the address updating information.
Specifically, the data query exception may include two cases, one case is that the user data storage address feeds back that the user does not exist, and the other case is that the query result is not responded, that is, the user data storage address is not responded. When the data query result is in either of the two cases, the data query is failed, and the number of times of data query failure is counted. The number of data query failures may be counted by a count of a designated timer, which starts from 0, and is incremented by 1 each time a data query failure is determined. Then, the current count of the designated timer is the number of data query failures.
When the number of data query failures is greater than the preset threshold, it indicates that there are more errors in the user data storage address stored in the local address cache, for example, the user data storage address corresponding to the user identification information is updated, but the user data storage address is not updated synchronously in the local address cache, thereby causing user data query failures. At this time, the local address cache should be updated to avoid repeated abnormal situations. When the data query fails, recording user identification information corresponding to the data query failure, when the data query failure times are larger than a preset threshold value, obtaining user data storage addresses of the user identification information corresponding to the currently recorded data query failure from a network storage function network element, wherein the user data storage addresses corresponding to the user identification information are address updating information for updating the local address cache, and updating the user data storage addresses corresponding to the user identification information currently recorded in the local cache based on the address updating information to realize the updating of the local address cache. In this case, the content with errors in the local address cache is updated, and other content without errors can be kept unchanged, so that the workload of cache updating is reduced, and the cache updating efficiency is improved.
It will be appreciated that the count of the specified timer should be zeroed after the local address cache is updated. The data query failure times are equal to the preset threshold value, and the data query failure times can be classified into any one of the conditions that the data query failure times are larger than the preset threshold value and the data query failure times are smaller than the preset threshold value.
In an embodiment of the application, if the data query result indicates that the data query is normal, or the data query failure times are less than a preset threshold, determining whether the local address cache is overtime; and if the local address cache is overtime, acquiring address updating information from the network storage function network element according to the user list of the local address cache, and updating the local address cache according to the address updating information.
Specifically, when the data query result indicates that the data query is normal, or the data query failure times are smaller than a preset threshold, it indicates that the correctness of the data stored in the local address cache is high, and at this time, the local address cache does not need to be updated immediately, and the local address cache can be updated through whether the cache is overtime or not. When the local address cache is overtime, which indicates that the valid time limit of the local address cache has expired, the user data storage address corresponding to each cached user identifier in the user list can be acquired from the network storage function network element according to the user list of the local address cache as address update information, and the user data storage address corresponding to each cached user identifier in the local address cache is updated according to the address update information. In short, if the cache is overtime, all the user data storage addresses in the local address cache are updated.
In an embodiment of the present application, if the cache is overtime, when the local address cache is updated, the user identification information and the user data storage address corresponding to the user identification information may be directly obtained from the network storage function network element as address update information, and then the obtained user identification information and the user data storage address corresponding to the user identification information are used as data updated by the local address cache. I.e. all data in the local address cache, including the user identification information and the user data storage address, are updated.
In the technical scheme provided by the embodiment of the application, when a user login instruction is detected, user identification information is obtained from the user login instruction, a user data storage address is determined in the local address cache according to the user identification information, a user data query instruction is sent to the user data storage address, and finally the local address cache is updated according to a data query result corresponding to the user data query instruction.
A specific embodiment of a 5G core network is used below to describe an implementation process of the cache management and control method of the present application, and the method is shown in fig. 3. The cache Management and control method provided in the embodiment of the present application is implemented by an Access and Mobility Management Function (AMF) network element or a Session Management Function (SMF) network element in a 5G core network. As shown in fig. 3, the cache management and control method includes:
step 301, when a user login instruction is detected, the AMF network element or the SMF network element acquires the IMSI number segment from the user login instruction.
Specifically, a user login instruction is initiated when the user accesses the 5G network (i.e., the user is online), and when the AMF/SMF detects the user login instruction, an IMSI number field of the user is obtained, where the IMSI number field is the user identification information in the foregoing.
The IMSI is a mark for distinguishing the mobile subscriber, is stored in the SIM card and can be used for distinguishing effective information of the mobile subscriber, the total length of the IMSI does not exceed 15 digits, and each digit uses 0-9 digits. IMSI mainly comprises three parts: MCC (Mobile Country Code), MNC (Mobile Network Code), and MSIN (Mobile Subscriber identity Number).
The MCC resources are uniformly distributed and managed by the international telecommunications union worldwide, and uniquely identify the country to which the mobile subscriber belongs, which is 3, for example, 460 in china.
The MNC is used for identifying the mobile communication network to which the mobile user belongs, and 2-3 bits are used. In the same country, if there are multiple PLMNs (Public Land Mobile Network, generally one PLMN corresponds to one operator in a certain country), the distinction can be made through the MNC, i.e. each PLMN needs to be assigned a unique MNC, for example, china Mobile uses 00, 02, 04, 07, china unicom uses 01, 06, 09, and china telecom uses 03, 05.
MSIN is used to identify mobile subscribers in a mobile communications network, and has a total of 10 digits, and its structure is represented as: EF + M0M1M2M3+ ABCD, wherein EF is assigned by the operator; a corresponding relationship can exist between M0M1M2M3 and H0H1H2H3 in MDN (Mobile Directory Number); the ABCD four bits are freely allocatable.
The IMSI number field obtained by the AMF/SMF is a certain number in the IMSI, for example, 1-6 digits in the IMSI can be obtained as the required IMSI number field. Specifically, which segment of the IMSI is obtained is determined by the operator (china mobile, china unicom, etc.).
Step 302, the AMF network element or the SMF network element determines whether there is a UDM network element or a PCF network element corresponding to the IMSI number segment in the local address cache.
Specifically, the UDM (Unified Data Management) network element and the PCF (Policy Control Function) network element are network elements used for storing user Data in the 5G core network, and thus, the UDM/PCF is a user Data storage address in the foregoing. The 5G core network can comprise a plurality of UDM/PCFs, the UDM/PCFs corresponding to different IMSI number sections, and the corresponding UDM/PCFs can be determined according to the IMSI number sections.
Step 303, if the AMF network element or the SMF network element does not find the UDM network element or the PCF network element corresponding to the IMSI number segment in the local address cache, obtaining the UDM network element or the PCF network element corresponding to the IMSI number segment from the NRF network element.
Specifically, if the AMF/SMF does not find the UDM/PCF corresponding to the IMSI number segment in the local address cache, it indicates that the user may be online for the first time, and at this time, the corresponding UDM/PCF needs to be acquired from the NRF according to the IMSI number segment.
Step 304, after determining the UDM network element or PCF network element corresponding to the IMSI number segment, the AMF network element or SMF network element initiates a user data query request to the UDM network element or PCF network element to obtain a data query result corresponding to the user data query instruction.
Specifically, after determining the UDM/PCF corresponding to the IMSI number segment from the local address cache, or acquiring the UDM/PCF corresponding to the IMSI number segment from the NRF, the AMF/SMF initiates a user data query request to the UDM/PCF to query the subscription data of the user, where the subscription data of the user is data provided when the user opens (registers), and includes data such as dnn (data Network name), and the Network element knows what service is provided for the user only when the subscription data Network element exists.
Step 305, the AMF network element or the SMF network element determines whether the data query fails.
Specifically, the failure of data query includes two cases: UDM/PCF does not respond, and UDM/PCF feeds back that the user does not exist.
Step 306, if the data query fails, the AMF network element or the SMF network element determines whether the number of data query failures is greater than a preset threshold.
Specifically, when the data query fails, the specified timer count is increased by 1, and then the AMF/SMF determines whether the data query failure times are larger than a preset threshold value.
Step 307, if the data query failure is greater than the preset threshold at this time, the AMF network element or the SMF network element obtains address update information from the NRF network element according to the MISI number segment corresponding to the currently recorded data query failure, and updates the UDM network element or the PCF network element corresponding to the currently recorded MISI number segment in the local address cache according to the address update information.
Specifically, when the data query failure is greater than the preset threshold value at this time, the user data storage address corresponding to the user identification information of the data query failure is updated, that is, the local address cache is partially updated.
Step 308, if the data query is normal, or the data query failure times are smaller than a preset threshold, the AMF network element or the SMF network element determines whether the cache is overtime.
Step 309, if the cache is overtime, the AMF network element or the SMF network element obtains the address update information from the NRF network element, and updates the local address cache according to the address update information.
Specifically, if the cache is overtime, address update information is acquired from the NRF, and all UDM/PCFs in the local address cache are updated, or all data (including the MISI number field and UDM/PCF) in the local address cache are updated.
And step 310, if the cache is not overtime, ending the process. In this case, the user will not be able to access the 5G network normally.
It should be noted that although the various steps of the methods in this application are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the shown steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
The following describes an embodiment of an apparatus of the present application, which may be used to execute the cache management method in the foregoing embodiment of the present application. Fig. 4 schematically shows a block diagram of a structure of a cache management and control apparatus according to an embodiment of the present application. As shown in fig. 4, a cache management and control apparatus provided in an embodiment of the present application includes:
a user information obtaining module 410, configured to, when a user login instruction is detected, obtain user identification information from the user login instruction, where the user identification information is used to indicate a user identity;
a data storage address determining module 420, configured to determine whether a user data storage address corresponding to the user identification information exists in a local address cache;
a query result obtaining module 430, configured to send a user data query instruction to the user data storage address if a user data storage address corresponding to the user identification information exists in the local address cache, so as to obtain a data query result corresponding to the user data query instruction;
and a cache updating module 440, configured to update the local address cache according to the data query result.
In one embodiment of the present application, the cache update module 440 includes:
the counting unit is used for determining data query failure and counting the number of data query failure if the data query result indicates that the data query is abnormal;
and the first cache updating unit is used for acquiring address updating information from a network storage function network element according to the record information of data query failure and updating the local address cache according to the address updating information if the data query failure times are larger than a preset threshold value.
In an embodiment of the present application, the first cache updating unit is specifically configured to:
determining user identification information corresponding to the failure of the currently recorded data query, and acquiring a corresponding user data storage address from the network storage function network element as address update information according to the currently recorded user identification information;
and updating the user data storage address corresponding to the currently recorded user identification information in the local cache according to the address updating information.
In an embodiment of the present application, the cache update module 440 further includes:
a cache timeout judging unit, configured to determine whether the local address cache is timeout if the data query result indicates that data query is normal or the data query failure frequency is smaller than a preset threshold;
and the second cache updating unit is used for acquiring address updating information from the network storage function network element according to the user list of the local address cache if the local address cache is overtime, and updating the local address cache according to the address updating information.
In an embodiment of the present application, the second cache updating unit is specifically configured to:
acquiring a user data storage address corresponding to each cache user identifier in the user list from the network storage function network element according to the user list cached in the local address as address updating information;
and updating the user data storage address corresponding to each cache user identifier in the local address cache according to the address updating information.
In one embodiment of the present application, the apparatus further comprises:
an address obtaining module, configured to, if a user data storage address corresponding to the user identification information does not exist in the local address cache, obtain a user data storage address corresponding to the user identification information from a network storage function network element, and add the obtained user data storage address corresponding to the user identification information to the local address cache.
In an embodiment of the present application, the data storage address determining module 420 is specifically configured to:
determining whether a cached user identifier identical to the user identifier information exists in a user list cached in the local address;
and if the cache user identification which is the same as the user identification information exists in the user list of the local address cache, taking a user data storage address which is corresponding to the cache user identification which is the same as the user identification information in the local address cache as a user data storage address corresponding to the user identification information.
The specific details of the cache management and control apparatus provided in each embodiment of the present application have been described in detail in the corresponding method embodiment, and are not described herein again.
Fig. 5 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the present application.
It should be noted that the computer system 500 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501 that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the random access memory 503, various programs and data necessary for system operation are also stored. The central processor 501, the read only memory 502 and the random access memory 503 are connected to each other via a bus 504. An Input/Output interface 505(Input/Output interface, i.e., I/O interface) is also connected to the bus 504.
The following components are connected to the input/output interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output section 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a local area network card, modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the input/output interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the central processor 501, performs various functions defined in the system of the present application.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A cache management and control method is characterized by comprising the following steps:
when a user login instruction is detected, user identification information is obtained from the user login instruction, and the user identification information is used for indicating the identity of a user;
determining whether a user data storage address corresponding to the user identification information exists in a local address cache;
if a user data storage address corresponding to the user identification information exists in the local address cache, sending a user data query instruction to the user data storage address to obtain a data query result corresponding to the user data query instruction;
and updating the local address cache according to the data query result.
2. The cache management and control method according to claim 1, wherein updating the local address cache according to the data query result includes:
if the data query result indicates that the data query is abnormal, determining that the data query fails, and counting the number of times of data query failure;
if the data query failure times are larger than a preset threshold value, address updating information is obtained from a network storage function network element according to the recording information of the data query failure, and the local address cache is updated according to the address updating information.
3. The cache management and control method according to claim 2, wherein obtaining address update information from a network storage function network element according to record information of data query failure, and updating the local address cache according to the address update information includes:
determining user identification information corresponding to the failure of data query recorded currently, and acquiring a corresponding user data storage address from the network storage function network element according to the user identification information recorded currently as address update information;
and updating the user data storage address corresponding to the currently recorded user identification information in the local cache according to the address updating information.
4. The cache management and control method according to claim 2, wherein after obtaining the data query result corresponding to the user data query instruction, the method further comprises:
if the data query result indicates that the data query is normal or the data query failure times are smaller than a preset threshold value, determining whether the local address cache is overtime;
and if the local address cache is overtime, acquiring address updating information from the network storage function network element according to the user list of the local address cache, and updating the local address cache according to the address updating information.
5. The cache management and control method according to claim 4, wherein obtaining address update information from the network storage function network element according to the user list of the local address cache, and updating the local address cache according to the address update information includes:
acquiring a user data storage address corresponding to each cache user identifier in the user list from the network storage function network element according to the user list cached in the local address as address updating information;
and updating the user data storage address corresponding to each cache user identifier in the local address cache according to the address updating information.
6. The cache management and control method according to claim 1, wherein after determining whether the user data storage address corresponding to the user identification information exists in a local address cache, the method further includes:
and if the user data storage address corresponding to the user identification information does not exist in the local address cache, acquiring the user data storage address corresponding to the user identification information from a network storage function network element, and adding the acquired user data storage address corresponding to the user identification information to the local address cache.
7. The cache management and control method according to claim 1, wherein determining whether a user data storage address corresponding to the user identification information exists in a local address cache includes:
determining whether a cached user identifier identical to the user identifier information exists in a user list cached in the local address;
and if the cache user identification which is the same as the user identification information exists in the user list of the local address cache, taking a user data storage address which is corresponding to the cache user identification which is the same as the user identification information in the local address cache as a user data storage address corresponding to the user identification information.
8. A cache management and control apparatus, comprising:
the system comprises a user information acquisition module, a user identification information acquisition module and a user identification information acquisition module, wherein the user information acquisition module is used for acquiring user identification information from a user login instruction when the user login instruction is detected;
a data storage address determining module, configured to determine whether a user data storage address corresponding to the user identification information exists in a local address cache;
a query result obtaining module, configured to send a user data query instruction to a user data storage address if the user data storage address corresponding to the user identification information exists in the local address cache, so as to obtain a data query result corresponding to the user data query instruction;
and the cache updating module is used for updating the local address cache according to the data query result.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the cache management method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein execution of the executable instructions by the processor causes the electronic device to perform the cache management method of any of claims 1 to 7.
CN202210322897.4A 2022-03-29 2022-03-29 Cache management and control method and device, computer readable medium and electronic equipment Active CN114691734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210322897.4A CN114691734B (en) 2022-03-29 2022-03-29 Cache management and control method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210322897.4A CN114691734B (en) 2022-03-29 2022-03-29 Cache management and control method and device, computer readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114691734A true CN114691734A (en) 2022-07-01
CN114691734B CN114691734B (en) 2023-12-08

Family

ID=82141488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210322897.4A Active CN114691734B (en) 2022-03-29 2022-03-29 Cache management and control method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114691734B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080950A (en) * 2022-07-20 2022-09-20 深圳竹云科技股份有限公司 Identity information processing method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026154A1 (en) * 2004-07-30 2006-02-02 Mehmet Altinel System and method for adaptive database caching
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN111581239A (en) * 2020-04-10 2020-08-25 支付宝实验室(新加坡)有限公司 Cache refreshing method and electronic equipment
CN111737564A (en) * 2019-08-29 2020-10-02 北京京东尚科信息技术有限公司 Information query method, device, equipment and medium
CN112261172A (en) * 2020-10-19 2021-01-22 腾讯科技(深圳)有限公司 Service addressing access method, device, system, equipment and medium
CN112506973A (en) * 2020-12-14 2021-03-16 中国银联股份有限公司 Method and device for managing stored data
WO2021051420A1 (en) * 2019-09-21 2021-03-25 华为技术有限公司 Dns cache record determination method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026154A1 (en) * 2004-07-30 2006-02-02 Mehmet Altinel System and method for adaptive database caching
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN111737564A (en) * 2019-08-29 2020-10-02 北京京东尚科信息技术有限公司 Information query method, device, equipment and medium
WO2021051420A1 (en) * 2019-09-21 2021-03-25 华为技术有限公司 Dns cache record determination method and apparatus
CN111581239A (en) * 2020-04-10 2020-08-25 支付宝实验室(新加坡)有限公司 Cache refreshing method and electronic equipment
CN112261172A (en) * 2020-10-19 2021-01-22 腾讯科技(深圳)有限公司 Service addressing access method, device, system, equipment and medium
CN112506973A (en) * 2020-12-14 2021-03-16 中国银联股份有限公司 Method and device for managing stored data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080950A (en) * 2022-07-20 2022-09-20 深圳竹云科技股份有限公司 Identity information processing method and device, computer equipment and storage medium
CN115080950B (en) * 2022-07-20 2022-11-15 深圳竹云科技股份有限公司 Identity information processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114691734B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
US10659952B2 (en) Network slice selection policy updating method and apparatus
CN111901135B (en) Data analysis method and device
CN109167847B (en) IPv6 address generation method, SMF and communication system
CN112205015B (en) Method, apparatus and computer readable medium for policy distribution
CN110519750B (en) Message processing method, device and system
US11140737B2 (en) Session processing method in wireless communications and terminal device
KR20230048562A (en) Managing vplmn configuration updates in the ue due to home plmn configuration changes
EP3687259A1 (en) Communication method and device
US11553328B2 (en) Methods, devices, and computer programs for provisioning or controlling operator profiles in terminals
WO2021168829A1 (en) User identifier verification method and related device
CN108243631B (en) Network access method and equipment
CN115004635A (en) Subscription information acquisition method and device
CN114691734B (en) Cache management and control method and device, computer readable medium and electronic equipment
US20190215723A1 (en) Packet transmission method, apparatus, and packet transmission system
WO2021129803A1 (en) Information processing method and communication apparatus
US10813037B2 (en) Operator-ID based restriction for a cellular network
CN111901813A (en) Network configuration method and equipment for customer premises equipment
US8953636B2 (en) End-to-end feature support signaling
CN114785626B (en) Method and device for data management
EP3955557B1 (en) Control apparatus, control method, and program
US10314085B2 (en) ProSe information transmission method, terminal, and communications device
US11706694B1 (en) System and method for closed subscriber group identity allocation for radio access network sharing
CN116321110B (en) Service subscription method, device, service providing network element and storage medium
CN111786758B (en) Communication method and device
CN116347421A (en) Method, device, medium and electronic equipment for dynamic strategy of terminal

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