CN114691734B - Cache management and control method and device, computer readable medium and electronic equipment - Google Patents

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

Info

Publication number
CN114691734B
CN114691734B CN202210322897.4A CN202210322897A CN114691734B CN 114691734 B CN114691734 B CN 114691734B CN 202210322897 A CN202210322897 A CN 202210322897A CN 114691734 B CN114691734 B CN 114691734B
Authority
CN
China
Prior art keywords
user
network element
cache
data query
local address
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
CN202210322897.4A
Other languages
Chinese (zh)
Other versions
CN114691734A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a cache management and control method, a 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, wherein 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 the user data storage address corresponding to the user identification information exists in the local address cache, a user data query instruction is sent to the user data storage address so as to acquire 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 automatic updating of the local address cache is realized, the local address cache is not required 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 management and control method and device, computer readable medium and electronic equipment
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 (5 th Generation Mobile Communication Technology, abbreviated as 5G) is a new generation broadband mobile communication technology with high speed, low time delay and large connection characteristics, and is a network infrastructure for realizing man-machine object interconnection. The 5G core network is composed of a plurality of network elements with different functions, when a user accesses the 5G network, user data needs to be acquired or queried from different network elements, and in order to improve the efficiency of data acquisition or query, some network elements store related data in other network elements used in the data acquisition or query process in a local cache, so that the data query can be performed through the local cache. However, the local cache is usually manually managed, and when data in other network elements change, the local cache needs to be manually updated by manually synchronizing the whole network, otherwise, the service usage of users will be affected. It can be seen that this local cache management and control mode is difficult to operate, and the management and control efficiency is low and there is a risk hidden danger.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The application aims to provide a cache management and control method, a device, a computer readable medium and electronic equipment, which are used for solving the problems of difficult local cache management and control operation and low efficiency in the related technology.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the 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, wherein 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 the user data storage address corresponding to the user identification information exists in the local address cache, a user data query instruction is sent to the user data storage address so as to acquire 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 user information acquisition module is used for acquiring user identification information from the user login instruction when the user login instruction is detected, wherein the user identification information is used for indicating the user identity;
the data storage address determining module is used for determining whether a user data storage address corresponding to the user identification information exists in the local address cache;
the query result acquisition module is used for sending a user data query instruction to the 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 acquire 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 times 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 the network storage function network element according to the record information of the data query failure if the data query failure frequency is greater than a preset threshold value, and updating the local address cache according to the address updating information.
In one embodiment of the present application, the first cache update unit is specifically configured to:
determining user identification information corresponding to the failure of the 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 updating 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 one embodiment of the present application, the cache update module further includes:
the cache timeout judging unit is used for determining whether the local address cache is overtime if the data query result indicates that the data query is normal or the number of times of data query failure is smaller than a preset threshold value;
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 one embodiment of the present application, the second cache update 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 by 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 application, the apparatus further comprises:
and the address acquisition module is used for acquiring the user data storage address corresponding to the user identification information from the network storage function network element if the user data storage address corresponding to the user identification information does not exist in the local address cache, and adding the acquired user data storage address corresponding to the user identification information to the local address cache.
In one embodiment of the present application, the data storage address determination module is specifically configured to:
determining whether a cached user identifier which is the same as the user identifier information exists in a user list cached by the local address;
and if the user list of the local address cache has the cache user identification which is the same as the user identification information, taking the user data storage address corresponding to the cache 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.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program 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 a cache management method as in the above technical solution via execution of the executable instructions.
According to an aspect of embodiments of the present application, 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 instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the cache management method as in the above technical solution.
In the technical scheme provided by the embodiment of the application, when the user login instruction is detected, the user identification information is acquired from the user login instruction, then the user data storage address is determined in the local address cache according to the user identification information, further the user data query instruction is sent to the user data storage address, finally the local address cache is updated according to the data query result corresponding to the user data query instruction, the local address cache is updated based on the user data query, the automatic update of the local address cache is realized, the local address cache is not required to be manually updated, the convenience of local address cache management and control is improved, the cache update operation is simplified, and the cache update efficiency is improved.
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 as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a block diagram of an exemplary system architecture to which the technical solution of the present application is applied.
Fig. 2 schematically illustrates a flowchart of a cache management method according to an embodiment of the present application.
FIG. 3 schematically illustrates a flow chart of a cache management method of the present application.
Fig. 4 schematically illustrates a block diagram of a cache management and control apparatus according to an embodiment of the present application.
Fig. 5 schematically shows a block diagram of a computer system suitable for use in implementing embodiments of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many 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 the 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 application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they 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 order of actual execution may be changed according to actual situations.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need 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 use in embodiments of the present application, and the respective parts involved in the network architecture are described separately below.
User Equipment (UE) network element 101: various Handheld terminal devices, in-vehicle devices, wearable devices with wireless communication functions may be included, and for example, cellular phones (celluar Phone), smart phones (Smart Phone), wireless data cards, personal digital assistants (Personal Digitalassistant, PDA), notebook computers, tablet computers, wireless modems (Modem), handheld devices (Handheld), laptop computers (Laptop Computer), cordless phones (Cordless Phone), wireless local loop (Wireless Localloop, WLL) stations, machine type communication (Machine Type Communication, MTC) terminals, and the like may be included.
AN Access Network (AN) Network element 102: the system is mainly responsible for the functions of radio resource management, quality of service (QoS, quality of Service) management, data compression, encryption and the like on an 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 requirements and the like. In a radio access scenario, the access network element 102 may also be referred to as a radio access network (Radio Access Network, RAN) element. The RAN network element can manage radio resources, provide access services for the ue, and further complete forwarding of control signals and ue data between the ue and the core network, and may include various types of base stations, such as macro base stations, micro base stations (also referred to as "small stations"), relay stations, access points, and so on. The names of RAN network elements with base station functionality may vary in systems employing different radio access technologies, e.g., in the fifth generation (5 g) system, called gNB; in the LTE system, it is called evolved NodeB (eNB or eNodeB); in the third generation (3rd generation,3G) system, it is called a Node B (Node B) or the like.
User plane network element 103: the method is used for being responsible for the functions of encapsulation, routing, forwarding, statistics, quality of service (QoS) processing of user messages and the like of user plane data. In a 5G communication system, the user plane network element may be a user plane function (User Plane Function, UPF) network element.
Data network element 104: for providing a network for transmitting data. In a 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 besides session management in the functions of a mobility management entity (Mobility Management Entity, MME), such as legal interception, access authorization/authentication and the like. In a 5G communication system, the access and mobility management network element may be an access and mobility management function (Accessand Mobility Management Function, AMF) network element.
Session management network element 106: the method is mainly used for session management, network communication protocol (InternetProtocol, IP) address allocation and management of user equipment, terminal point of selecting manageable user plane function, strategy control and charging function interface, downlink data notification and the like. In a 5G communication system, the Session management network element may be a Session management function (Session ManagementFunction, SMF) network element.
Policy control network element 107: a unified policy framework for guiding network behavior, providing policy rule information for control plane function network elements (e.g., AMF, SMF network elements, etc.), and the like. In a 4G communication system, the policy control network element may be a policy and charging rules function (Policy Andcharging Rules Function, PCRF) network element. In a 5G communication system, the policy control network element may be a policy control function (Policy Control Function, PCF) network element.
Authentication server 108: the method is used for realizing the bidirectional authentication of the user equipment by the authentication service and the generation of the secret key, and supports a unified authentication framework. In a 5G communication system, the Authentication server may be an Authentication server function (Authentication ServerFunction, AUSF) network element.
Data management network element 109: for handling user equipment identities, access authentication, registration, mobility management etc. In the 5G communication system, the data management network element may be a Unified data management (Unified DataManagement, UDM) network element; in a 4G communication system, the data management network element may be a home subscriber server (HomeSubscriber Server, HSS) network element.
Application network element 110: the method is used for carrying out data routing of application influence, accessing network elements with open functions of the network, interacting with a policy framework to carry out policy control and the like. In a 5G communication system, the application network element may be an application function (Application Function, AF) network element.
Network storage network element: for maintaining real-time information for all network function services in the network. In the 5G communication system, the Network storage Network element may be a Network registration function (Network RepositoryFunction, NRF) Network element.
In the network architecture shown in fig. 1, the UE is connected to the AMF through AN N1 interface, (R) AN is connected to the AMF through AN N2 interface, and (R) AN is connected to the UPF through AN N3 interface. The UPFs are connected through an N9 interface, and are interconnected with the DN through an N6 interface. The SMF controls the UPF through the N4 interface. The AMF is connected with the SMF through an N11 interface. The AMF acquires the user equipment subscription data from the UDM unit through an N8 interface, and the SMF acquires the user equipment subscription data from the UDM unit through an N10 interface.
It will be appreciated that the network elements or functions described above may be either network elements in a hardware device, software functions running on dedicated hardware, or virtualized functions instantiated on a platform (e.g., a cloud platform). The network architecture applied to the embodiment of the present application is merely illustrative, and the network architecture to which the embodiment of the present application is applied is not limited to this, and any network architecture capable of implementing the functions of the respective network elements described above is applicable to the embodiment of the present application.
For example, in some Network architectures, network Function Network element entities such as AMF Network elements, SMF Network elements, PCF Network elements, AUSF Network elements, and UDM Network elements are all called Network Function (NF) Network elements; alternatively, in other network architectures, the set of AMF network elements, SMF network elements, PCF network elements, AUSF network elements, UDM network elements, and the like may be referred to as control plane function network elements.
The cache control method provided by the application is described in detail below with reference to the specific embodiments.
Fig. 2 schematically illustrates a flowchart of a method for cache management according to an embodiment of the present application, which may be implemented by a terminal device, such as the terminal device 110 illustrated 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 control method provided by the embodiment of the present application is applied to the technical field of 5G core networks, and includes steps 210 to 240, specifically as follows:
step 210, when a user login instruction is detected, user identification information is obtained from the user login instruction, where the user identification information is used to indicate the user identity.
Specifically, the user login instruction refers to an instruction for a user to access a 5G Core network (5G Core network, abbreviated as 5 GC), which is also referred to as a user online instruction. In the embodiment of the application, the user can be a single individual or a group formed by a plurality of individuals, such as an enterprise. When a user accesses a 5G network, a user login instruction is generated based on the related information of the user, such as the geographic position of the user, user identity information, equipment information used by the user and the like. Thus, when a user login instruction is detected, that is, when a user is online, user identification information indicating the identity of the user can be obtained from the user login instruction.
In one embodiment of the present application, the user identification confidence is mainly used to identify the user identity, and when the user types are different, the user identification information is different. For example, when the user is an enterprise, the user identification information may be an organization code of the enterprise; when the user is a personal user, the user identification information may be an international mobile subscriber identity (International Mobile Subscriber Identification Number, IMSI), a user mobile phone number, etc.; when the user is a device, the user identification information may be a device ID, a unique device identification code (Unique Device Identifier, UDID), an international mobile equipment identity (International Mobile Equipment Identity, IMEI), etc.
Step 220, determining whether there is a user data storage address corresponding to the user identification information in the local address cache.
Specifically, the local address cache is a local cache for storing user data storage addresses. The local address cache can store the user data storage addresses of related users in advance, when the users are online, the corresponding user data storage addresses can be found out from the local address cache directly, quickly and conveniently, and the user data storage addresses do not need to be found out from other databases, so that the query efficiency of the user data is improved.
In one embodiment of the application, the way to find the user data storage address is: determining whether a user identifier which is the same as the user identifier information exists in a user list of the local address cache; if the user identification which is the same as the user identification information exists in the user list of the local address cache, the user data storage address which corresponds to the user identification which is the same as the user identification information in the local address cache is used as the user data storage address which corresponds to the user identification information.
Specifically, the user data storage addresses and the user identification information are mutually corresponding, so that the user identification information in the local address cache is recorded as a cache user identification for convenience of distinguishing, and the cache user identifications corresponding to all the user data storage addresses stored in the local address cache form a user list. Therefore, the user data storage address corresponding to the user identification information can be determined whether to be stored in the local address cache or not by searching in the user list in the local address cache according to the user identification information acquired from the user login instruction.
When the user list of the local address cache has the same cache user identification as the user identification information, it can be determined that the local address cache stores the user data storage address corresponding to the user identification information, and the user data storage address corresponding to the user identification information is the user data storage address corresponding to the same cache user identification.
Generally, if the user is not logged in (or online) for the first time, that is, the user has logged in to the 5G core network before this time, the local address cache stores the user data storage address corresponding to the user. However, when the user list in the local address cache does not have the same cached user identifier as the user identifier information, it is indicated that the user data storage address of the user is not recorded in the local address cache, which is likely to be the first login of the user, and the corresponding user data storage address is not stored in the local address cache temporarily, 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. The network storage function network element (Network Repository Function, NRF) is a network element in the 5G core network responsible for registering and managing the network element (the network element refers to a device or a module for implementing a certain function in the 5G core network, abbreviated as NF), in the 5G core network, the NRF implements automatic management of all NFs, and when each NF is started, the NRF must register and register to provide services, so that the NRF records the user data storage addresses of all users.
The user data storage address in the NRF also corresponds to user identification information, which is simply referred to as user identification for convenience of distinction. Therefore, the user identification which is the same as the user identification information is found in the NRF, and the user data storage address corresponding to the user identification information of the current user is the user data storage address corresponding to the user identification information of the current user. After the user data storage address is obtained from the NRF, the user data storage address and the associated user identification information thereof are added to the local address cache, so that when the user is online next time, the corresponding user data storage address can be found out from the local address cache.
Step 230, if the user data storage address corresponding to the user identification information exists in the local address cache, a user data query instruction is sent to the user data storage address to obtain a data query result corresponding to the user data query instruction.
Specifically, after determining the user data storage address, a user data query instruction is sent to the user data storage address, where the user data query instruction is used to query the user data of the current online user. After a user data query instruction is sent, a corresponding data query result is obtained, and the data query result indicates whether the user data can be queried normally.
Step 240, updating the local address cache according to the data query result.
Specifically, after the data query result is obtained, it can be determined whether the user data query is normal, and further, whether the user data storage address stored in the local address cache is correct is determined, so that the local address cache is updated, and the data stored in the local address cache is kept correct.
In one embodiment of the application, the data query result includes two cases, one of which is to indicate that the data query is abnormal, i.e. the user data cannot be queried; another case is that the data query is normal, i.e. the user data can be queried normally. Different cache updating modes are adopted for the data query results under different conditions.
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 the data query failure; if the number of data query failures is greater than a preset threshold, address updating information is obtained from network elements of the network storage function according to the record information of the data query failures, and the local address cache is updated according to the address updating information.
Specifically, the data query exception may include two cases, one in which the user data storage address feeds back that the user is not present, and the other in which the query result is unresponsive, that is, the user data storage address is unresponsive. When the data query result is either of the two cases, the data query failure is indicated, and the number of times of the data query failure is counted. The number of data query failures may be counted by counting the designated timer, which counts from 0, and incrementing the count of the designated timer by 1 each time the data query failure is determined. Then the current count of the specified timer is the number of data query failures.
When the number of data query failures is greater than the preset threshold, it is indicated that there are more errors in the user data storage addresses stored in the local address cache, for example, the user data storage addresses corresponding to the user identification information are updated, but the local address cache is not updated synchronously, so that the user data query failure is caused. 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, and when the number of times of the data query failure is larger than a preset threshold, acquiring user data storage addresses of the user identification information corresponding to the data query failure recorded currently 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 a local address cache, and updating the user data storage addresses corresponding to the user identification information recorded currently in the local cache based on the address updating information so as to realize 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 update is reduced, and the cache update efficiency is improved.
It will be appreciated that the count of the designated timer should be zeroed after the local address cache update. The number of data query failures equal to the preset threshold may be categorized into any one of the number of data query failures being greater than the preset threshold and the number of data query failures being less than the preset threshold.
In one embodiment of the present application, if the data query result indicates that the data query is normal, or the number of times of data query failure is smaller than a preset threshold, determining whether the local address cache is overtime; if the local address cache is overtime, the address updating information is obtained from the network storage function network element according to the user list of the local address cache, and the local address cache is updated according to the address updating information.
Specifically, when the data query result indicates that the data query is normal, or the number of times of data query failure is smaller than a preset threshold, the correctness of the data stored in the local address cache is higher, and at the moment, the local address cache does not need to be updated immediately, and whether the cache is overtime or not can be used for updating the local address cache. When the local address cache is overtime, the effective time limit of the local address cache is expired, at this time, the user data storage addresses corresponding to the user identifications of the caches in the user list can be obtained from the network storage function network element as address updating information according to the user list of the local address cache, and the user data storage addresses corresponding to the user identifications of the caches in the local address cache are updated according to the address updating information. In short, if the cache times out, all user data storage addresses in the local address cache are updated.
In one embodiment of the present application, if the cache is overtime, when the local address cache is updated, the user identification information and the corresponding user data storage address thereof can be directly obtained from the network storage function network element as address update information, and then the obtained user identification information and the corresponding user data storage address thereof are used as data after the local address cache is updated. 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 the user login instruction is detected, the user identification information is acquired from the user login instruction, then the user data storage address is determined in the local address cache according to the user identification information, further the user data query instruction is sent to the user data storage address, finally the local address cache is updated according to the data query result corresponding to the user data query instruction, the local address cache is updated based on the user data query, the automatic update of the local address cache is realized, the local address cache is not required to be manually updated, the convenience of local address cache management and control is improved, the cache update operation is simplified, and the cache update efficiency is improved.
The implementation of the cache management method of the present application is described below in a specific embodiment in a 5G core network, and the method is shown in fig. 3. The buffer management and control method provided by the embodiment of the application is implemented by an AMF (Access and Mobility Management Function ) network element or an SMF (Session Management Function, session management function) network element in the 5G core network. As shown in fig. 3, the cache control method includes:
step 301, when a user login instruction is detected, the AMF network element or the SMF network element obtains an IMSI number segment from the user login instruction.
Specifically, when a user accesses a 5G network (i.e. the user is online), a user login instruction is initiated, and when the AMF/SMF detects the user login instruction, an IMSI number segment of the user is obtained, wherein the IMSI number segment is the previous user identification information.
The IMSI is a mark for distinguishing mobile subscribers, and is stored in the SIM card and can be used for distinguishing effective information of the mobile subscribers, the total length of the IMSI is not more than 15 bits, and each bit uses 0-9 digits. The IMSI mainly comprises three parts: MCC (Mobile Country Code ), MNC (Mobile Network Code, mobile network number) and MSIN (Mobile Subscriber Identification Number, mobile subscriber identity number).
The MCC resources are uniformly allocated and managed worldwide by the international telecommunications union to uniquely identify the country to which the mobile subscriber belongs, for a total of 3 digits, such as chinese 460.
The MNC is used for identifying the mobile communication network to which the mobile subscriber belongs, and the MNC is 2-3 bits. In the same country, if there are multiple PLMNs (Public Land Mobile Network, public land mobile network, one operator in a country corresponds to one PLMN in general), it can be distinguished by MNC, i.e. each PLMN is assigned a unique MNC, for example, chinese mobile use 00, 02, 04, 07, chinese corporate use 01, 06, 09, chinese messenger use 03, 05.
MSIN is used to identify mobile subscribers in a mobile communication network, and has a total of 10 bits, and its structure is expressed as: ef+m0m1m2m3+abcd, wherein EF is allocated by the operator; there may be correspondence between M0M1M2M3 and H0H1H2H3 in the MDN (Mobile Directory Number, mobile subscriber directory number); the ABCD four bits are freely assignable.
The IMSI number segment acquired by the AMF/SMF is a certain number in the IMSI, for example, 1-6 digits in the IMSI may be acquired as the required IMSI number segment. The specific section of the IMSI is obtained, and is determined by the operator (china mobile, china communication, 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 for storing user data in the 5G core network, and thus, the UDM/PCF is the aforementioned user data storage address. The 5G core network may include a plurality of UDM/PCFs, and UDM/PCFs corresponding to different IMSI number segments may be determined according to the IMSI number segments.
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 obtained 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 the AMF/SMF determines the UDM/PCF corresponding to the IMSI number segment from the local address cache, or obtains the UDM/PCF corresponding to the IMSI number segment from the NRF, a user data query request is initiated to the UDM/PCF to query the subscription data of the user, where the subscription data of the user is the data provided when the user opens (registers), including DNN (Data Network Name), and only if the subscription data network element knows what service is provided for the user.
Step 305, the AMF network element or the SMF network element determines whether the data query failed.
Specifically, the failure of the data query includes two cases: the UDM/PCF does not respond and the UDM/PCF feeds back that the user is not present.
Step 306, if the data query fails, the AMF network element or the SMF network element determines whether the number of times of the data query failure is greater than a preset threshold.
Specifically, when the data query fails, the designated timer counts up by 1, and then the AMF/SMF determines whether the number of data query failures is greater than a preset threshold.
Step 307, if the data query failure is greater than the preset threshold, 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 data query failure currently recorded, and updates the UDM network element or the PCF network element corresponding to the MISI number segment currently recorded in the local address cache according to the address update information.
Specifically, when the data query fails and is larger than a preset threshold, the user data storage address corresponding to the user identification information of the data query failure is updated, namely the local address cache is partially updated.
Step 308, if the data query is normal, or the number of times of data query failure is less 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 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 obtained from the NRF, and all UDM/PCFs in the local address cache are updated, or all data (including the mis number segment and the UDM/PCF) in the local address cache are updated.
Step 310, if the cache is not timed out, the process is ended. In this case, the user will not be able to access the 5G network normally.
It should be noted that although the steps of the methods of the present application are depicted in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
The following describes an embodiment of the 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 illustrates a block diagram 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 device provided by an embodiment of the present application includes:
a user information obtaining module 410, configured to obtain user identification information from a user login instruction when the user login instruction is detected, 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 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 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, cache update module 440 includes:
The counting unit is used for determining data query failure and counting the number of data query failure times 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 the network storage function network element according to the record information of the data query failure if the data query failure frequency is greater than a preset threshold value, and updating the local address cache according to the address updating information.
In one embodiment of the present application, the first cache update unit is specifically configured to:
determining user identification information corresponding to the failure of the 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 updating 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 one embodiment of the present application, cache update module 440 further comprises:
the cache timeout judging unit is used for determining whether the local address cache is overtime if the data query result indicates that the data query is normal or the number of times of data query failure is smaller than a preset threshold value;
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 one embodiment of the present application, the second cache update 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 by 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 application, the apparatus further comprises:
and the address acquisition module is used for acquiring the user data storage address corresponding to the user identification information from the network storage function network element if the user data storage address corresponding to the user identification information does not exist in the local address cache, and adding the acquired user data storage address corresponding to the user identification information to the local address cache.
In one embodiment of the present application, the data storage address determination module 420 is specifically configured to:
determining whether a cached user identifier which is the same as the user identifier information exists in a user list cached by the local address;
and if the user list of the local address cache has the cache user identification which is the same as the user identification information, taking the user data storage address corresponding to the cache 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.
Specific details of the cache management and control device provided in each embodiment of the present application have been described in the corresponding method embodiments, and are not described herein.
Fig. 5 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the 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 impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a central processing unit 501 (Central Processing Unit, CPU) which can execute various appropriate actions and processes according to a program stored in a Read-Only Memory 502 (ROM) or a program loaded from a storage section 508 into a random access Memory 503 (Random Access Memory, RAM). In the random access memory 503, various programs and data required for the system operation are also stored. The central processing unit 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 (i.e., an I/O interface) is also connected to bus 504.
The following components are connected to the input/output interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and 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, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the input/output interface 505 as needed. 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 needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The computer program, when executed by the central processor 501, performs the 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 (Erasable Programmable Read Only Memory, EPROM), 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 context of this document, 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 the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 flowcharts 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 which 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 a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application 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 application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (8)

1. The cache control method is characterized by comprising the following steps:
when a user login instruction for accessing a 5G core network is detected, user identification information is acquired from the user login instruction, wherein the user identification information is used for indicating a user identity;
determining whether a Unified Data Management (UDM) network element or a Policy Control Function (PCF) network element corresponding to the user identification information exists in a local address cache;
if the UDM network element or PCF network element corresponding to the user identification information exists in the local address cache, a user data query instruction is sent to the UDM network element or PCF network element so as to acquire a data query result corresponding to the user data query instruction; wherein, the UDM network element or PCF network element is used for storing user subscription data; the user data inquiry instruction is used for inquiring the user subscription data, and the user subscription data is used for determining services provided for a user; the data query result indicates whether the user subscription data can be normally queried;
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 the data query failure;
if the number of data query failures is greater than a preset threshold, acquiring address updating information from a network element of a network storage function according to the record information of the data query failures, and updating the local address cache according to the address updating information;
If the data query result indicates that the data query is normal or the number of times of data query failure is smaller 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 a user list of the local address cache, and updating the local address cache according to the address updating information.
2. The cache management and control method according to claim 1, 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, comprises:
determining user identification information corresponding to the current recorded data query failure, and acquiring corresponding UDM network elements or PCF network elements from the network storage function network elements as address updating information according to the current recorded user identification information;
and updating the UDM network element or the PCF network element corresponding to the currently recorded user identification information in the local address cache according to the address updating information.
3. The cache management and control method according to claim 1, 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, comprises:
According to the user list of the local address cache, obtaining UDM network elements or PCF network elements corresponding to each cache user identification in the user list from the network storage function network elements as address updating information;
and updating the UDM network element or PCF network element corresponding to each cache user identifier in the local address cache according to the address updating information.
4. The method for controlling a cache according to claim 1, wherein after determining whether there is a UDM network element or a PCF network element corresponding to the user identification information in the local address cache, the method further comprises:
if the UDM network element or PCF network element corresponding to the user identification information does not exist in the local address cache, the UDM network element or PCF network element corresponding to the user identification information is acquired from a network storage function network element, and the acquired UDM network element or PCF network element corresponding to the user identification information is added to the local address cache.
5. The method for controlling a cache according to claim 1, wherein determining whether there is a UDM network element or a PCF network element corresponding to the user identification information in a local address cache includes:
determining whether a cached user identifier which is the same as the user identifier information exists in a user list cached by the local address;
And if the user list of the local address cache has the cache user identification which is the same as the user identification information, taking the UDM network element or the PCF network element corresponding to the cache user identification which is the same as the user identification information in the local address cache as the UDM network element or the PCF network element corresponding to the user identification information.
6. The utility model provides a buffer memory management and control device which characterized in that includes:
the user information acquisition module is used for acquiring user identification information from a user login instruction when the user login instruction for accessing the 5G core network is detected, wherein the user identification information is used for indicating the user identity;
the data storage address determining module is used for determining whether a Unified Data Management (UDM) network element or a Policy Control Function (PCF) network element corresponding to the user identification information exists in the local address cache;
the query result acquisition module is used for sending a user data query instruction to the UDM network element or the PCF network element if the UDM network element or the PCF network element corresponding to the user identification information exists in the local address cache so as to acquire a data query result corresponding to the user data query instruction; wherein, the UDM network element or PCF network element is used for storing user subscription data; the user data inquiry instruction is used for inquiring the user subscription data, and the user subscription data is used for determining services provided for a user; the data query result indicates whether the user subscription data can be normally queried;
The cache updating module is used for determining data query failure and counting the number of data query failure times if the data query result indicates that the data query is abnormal; if the number of data query failures is greater than a preset threshold, acquiring address updating information from a network element of a network storage function according to the record information of the data query failures, and updating the local address cache according to the address updating information; if the data query result indicates that the data query is normal or the number of times of data query failure is smaller 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 a user list of the local address cache, and updating the local address cache according to the address updating information.
7. A computer readable medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the cache management method of any of claims 1 to 5.
8. 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 one of claims 1 to 5.
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 CN114691734A (en) 2022-07-01
CN114691734B true 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)

Families Citing this family (1)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7395258B2 (en) * 2004-07-30 2008-07-01 International Business Machines Corporation System and method for adaptive database caching

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN114691734A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US10659952B2 (en) Network slice selection policy updating method and apparatus
RU2750996C1 (en) Method for wireless communication, network apparatus and terminal
CN109167847B (en) IPv6 address generation method, SMF and communication system
CN111901135B (en) Data analysis method and device
KR102515634B1 (en) Managing VPLMN configuration updates on the UE due to home PLMN configuration changes
US20220159606A1 (en) Policy Control Function Network Element Selection Method, Apparatus, System, and Storage Medium
US20220394607A1 (en) Network slice configuration update
CN112205015B (en) Method, apparatus and computer readable medium for policy distribution
EP3648512A1 (en) Method for processing session in wireless communication, and terminal device
US10224972B2 (en) Systems, methods, and computer-readable media for tracking updates and loading data
EP3687259A1 (en) Communication method and device
US20210092589A1 (en) Methods, devices, and computer programs for provisioning or controlling operator profiles in terminals
CN114691734B (en) Cache management and control method and device, computer readable medium and electronic equipment
CN108243631B (en) Network access method and equipment
CN115004635A (en) Subscription information acquisition method and device
EP3800950A1 (en) Method and device for managing user data
WO2021129803A1 (en) Information processing method and communication apparatus
CN115299168A (en) Method and apparatus for handover
US8953636B2 (en) End-to-end feature support signaling
WO2022022889A1 (en) Methods and apparatuses for policy control
CN114557045A (en) Communication method and related device
CN116321110B (en) Service subscription method, device, service providing network element and storage medium
EP3955557B1 (en) Control apparatus, control method, and program
US20230179989A1 (en) Appararus, method, and computer program
US20230345247A1 (en) Hierarchical consent in a communication network

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