Compiling processing method and user plane function node
By automatically triggering compilation processing based on business identification information and time interval conditions in user plane functional nodes, the problem of too long compilation time of predefined rules for core network user plane functional nodes is solved, and real-time effective and efficient compilation of rules is achieved.
Patent Information
- Application Number
- CN202410866992.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, the compilation time of predefined rules for core network user plane function nodes is too long, causing the rules to fail to take effect in real time, affecting the operational interaction experience. Especially when a large number of rules are issued, delayed compilation reduces the compilation speed.
By obtaining predefined rules and their business identification information, based on the consistency judgment of the business identification information and the condition of whether the duration interval between adjacent rules reaches the duration threshold, the compilation process is automatically triggered, the compilation process is optimized, and the rules obtained first are compiled in time and implemented in real time. Take effect.
It improves the compilation speed and real-time performance of predefined rules, ensures that the rules take effect in real time, and improves the user interaction experience. Especially when a large number of rules are issued, the problem of long compilation time is avoided.
Smart Images

Figure CN118612153A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a compilation processing method and a user plane function node. Background Art
[0002] The core network user plane function node (UPF) configures the packet flow description (PFD) predefined rules, which need to be compiled into a regular expression library that can be recognized by the hyperscan module. It is best for UPF to configure the PFD predefined rules in real time, which requires the predefined rules to be compiled as early as possible and as quickly as possible.
[0003] If compilation is triggered every time a rule is configured, as the number of rules increases, the entire compilation time will be very long. Thousands of rules are issued continuously, which obviously affects the operational interaction experience. The solution in the related technology is to delay compilation and complete the compilation of all rules at once when all predefined rules are configured. However, if a large number of rules are configured continuously, the first configured rules cannot take effect in real time, which will reduce the speed of predefined rule compilation and cannot guarantee the real-time performance of predefined rule compilation. Summary of the invention
[0004] The technical solution of this application is implemented as follows:
[0005] The present application provides a compilation processing method, the method comprising:
[0006] Obtaining predefined rules and service identification information corresponding to the predefined rules;
[0007] Based on the compilation processing condition, compile the predefined rule to obtain a corresponding compilation result, so as to process the business data based on the compilation result;
[0008] The compilation processing conditions at least include a consistency judgment of the service identification information and / or a judgment of whether the time interval between adjacent predefined rules reaches a time threshold.
[0009] An embodiment of the present application provides a user plane function node, including:
[0010] A first acquisition module, used to acquire a predefined rule and service identification information corresponding to the predefined rule;
[0011] A first compiling and processing module, configured to compile and process the predefined rules based on the compiling and processing conditions to obtain corresponding compiling results, so as to process the business data based on the compiling results;
[0012] The compilation processing conditions at least include a consistency judgment of the service identification information and / or a judgment of whether the time interval between adjacent predefined rules reaches a time threshold.
[0013] The present application provides a compilation processing device, including:
[0014] A memory for storing executable compiled processing instructions;
[0015] The processor is used to implement the compilation processing method provided in the embodiment of the present application when executing the executable compilation processing instructions stored in the memory.
[0016] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are configured to execute the steps of the above-mentioned compilation processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a compilation processing method provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a method flow for compiling predefined rules provided in an embodiment of the present application;
[0019] Figure 3 A flowchart of another method for compiling predefined rules provided in an embodiment of the present application;
[0020] Figure 4 A flowchart of a method for compiling a core network PFD predefined rule provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a predefined rule and corresponding acquisition time provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of a compilation process of a predefined rule provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of the composition structure of a user plane function node provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the composition structure of a compilation processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0027] In the following description, reference is made to “some embodiments\other embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments\other embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0028] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] In the related art, the time consumed by delayed compilation includes the time for waiting for subsequent predefined rules and the compilation time of all predefined rules. The more PFD predefined rules there are, the longer the compilation time. For example, compiling less than 30 predefined rules requires 3 to 5 milliseconds (ms), and compiling about 3,000 rules requires about 5 seconds (s), thereby reducing the compilation speed of predefined rules. In addition, delayed compilation is triggered by external commands such as the command line interface (CLI) to complete the compilation of all rules at one time. For rules issued within the network element, delayed compilation cannot be triggered in time through the CLI display, affecting the user interaction experience.
[0031] Based on the problems existing in the related art, the embodiment of the present application provides a compilation processing method, which can be applied to UPF, such as Figure 1 FIG. 1 is a flow chart of a compilation processing method provided in an embodiment of the present application, and the method comprises the following steps:
[0032] S101: Obtain predefined rules and service identification information corresponding to the predefined rules.
[0033] It should be noted that the predefined rules may be setting rules for whether to forward service data (such as data packets) between UPF and session management function nodes (Session Management Function, SMF), UPF and base stations, etc., the forwarding path, the forwarding method, etc. The service identification information corresponding to the predefined rules may be the identification information of the service type to which the predefined rules belong.
[0034] In some embodiments, the predefined rules may be sent from the SMF to the UPF, or may be imported into the UPF by the user through the external interface CLI. The service identification information corresponding to the predefined rules may be predetermined, for example, when the predefined rules are created, the identification information of the service type to which the predefined rules belong is clarified, and when the predefined rules are transmitted to the UPF, they carry the corresponding service identification information, so the service identification information corresponding to the predefined rules can be obtained at the same time as the predefined rules are obtained.
[0035] In some embodiments, the predefined rules acquired in the same time period may include multiple ones, and the service identification information corresponding to each predefined rule may be different or the same, and the service identification information of multiple consecutive predefined rules may be the same. For example, if 50 predefined rules are received within 30ms, the service identification information corresponding to the first 40 predefined rules may be A, and the service identification information corresponding to the last 10 predefined rules may be B. The number of predefined rules and the corresponding service identification information are merely exemplary, and this application does not limit this.
[0036] S102: Based on the compilation processing conditions, compile the predefined rules to obtain corresponding compilation results, and process the business data based on the compilation results.
[0037] In some embodiments, the compilation processing conditions may include a consistency judgment on the business identification information of the predefined rules. Whether to trigger the compilation processing of the predefined rules can be determined based on whether the corresponding business identification information of adjacent predefined rules is the same. When it is determined that the business identification information is the same, the current predefined rule and the predefined rules that have not been compiled before the current predefined rule are compiled to obtain the corresponding compilation results.
[0038] In some embodiments, the compilation processing conditions may include a judgment on whether the time interval between adjacent predefined rules reaches a time threshold. The acquisition time of two adjacent predefined rules can be determined first, and the time interval between the two adjacent predefined rules can be determined based on the acquisition time. Based on the judgment of the size of the time interval and the time threshold, it is determined whether to trigger the compilation processing of the predefined rules. When it is determined that the time interval reaches (for example, is greater than or equal to) the time threshold, the current predefined rule and the predefined rules that have not been compiled before the current predefined rule are compiled to obtain the corresponding compilation result.
[0039] In some embodiments, the compilation processing conditions may include a judgment on the consistency of the business identification information and a judgment on whether the time interval between adjacent predefined rules reaches a time threshold. That is, when it is determined that the identification information of the predefined rules is inconsistent and the time interval between adjacent predefined rules reaches the time threshold, the compilation processing of the predefined rules is triggered to obtain the corresponding compilation result.
[0040] In some embodiments, the predefined rules can be compiled and processed by the compilation processing module of UPF. The predefined rules can be converted into feature codes that can be recognized by hyperscan through compilation. That is, the compilation result can be a feature code that is easy for hyperscan to recognize. After the business data is subsequently received, the feature code and the business data can be used to match to determine the processing operation of the business data. The processing operation may include saving, discarding, forwarding the business data, and forwarding to a destination, etc.
[0041] In some embodiments, after the predefined rules are compiled and processed to obtain the corresponding compilation processing results, the compilation results, predefined rules and the business identification information of the predefined rules can be stored as an entry in a preset storage area, the compilation results and predefined rules of the business rules with the same business identification information can be stored in the same storage address space, and the business identification information can be used as the identification information of the storage address space, so that after receiving the business data, the corresponding target storage address space can be quickly found according to the business identification information corresponding to the business data and the identification information of the storage address space, and matching can be performed based on the compilation results in the target storage address space.
[0042] In some embodiments, after the predefined rules are compiled and processed, if business data is received, the business identification information corresponding to the business data can be determined based on the PDR corresponding to the business data, and then the compilation result of the predefined rules that is the same as the business identification information corresponding to the business data is determined from the preset storage area, and the business data and each compilation result are matched to determine the target compilation result corresponding to the business data, and the business data is processed according to the target compilation result.
[0043] In an embodiment of the present application, a predefined rule and the business identification information corresponding to the predefined rule are obtained; based on the compilation processing conditions, the predefined rule is compiled and processed to obtain the corresponding compilation result, so as to process the business data based on the compilation result. In this way, the compilation is automatically triggered by judging the consistency of the business identification information of the predefined rule and / or judging whether the time interval of adjacent predefined rules reaches the time threshold, so that the predefined rules obtained first can be compiled in time, the compilation speed of the predefined rules and the real-time performance of the predefined rule compilation are improved, and the predefined rules are guaranteed to take effect in real time.
[0044] In some embodiments of the application, the predefined rules can be obtained by receiving message data management information sent by a control plane node that has established a communication connection with the user plane function node UPF, wherein the message data management information carries the predefined rules. The control plane node can be an SMF, and after the SMF establishes a communication connection with the UPF, the SMF can send a message data management information to the UPF, and the message data management information includes the predefined rules.
[0045] In some embodiments, the predefined rules can be obtained through an external communication interface of the user plane function node. The external communication interface can be a communication interface corresponding to the CLI, and the user can enter the predefined rules by typing commands in the CLI to obtain the predefined rules.
[0046] In other embodiments, the predefined rules can be obtained by simultaneously receiving the message data management information sent by the control plane node that has established a communication connection with the user plane function node and through the external communication interface of the user plane function node. That is, in the same time period, the predefined rules received by the UPF may include those issued by the control plane node and those entered by the user through the CLI interface.
[0047] It can be understood that the message data management information sent to the user plane function node by the user plane function node and the external communication interface of the user plane function node can obtain the predefined rules to be compiled, and multiple predefined rules can be obtained to facilitate the subsequent processing of data messages based on the compilation results of various predefined rules.
[0048] In some embodiments of the present application, Figure 2 As shown, "compilation processing of the predefined rule based on the compilation processing condition" in step S102 can be implemented through the following steps S201A to S204A, and each step is described below.
[0049] S201A: Determine whether the service identification information corresponding to the current predefined rule is the same as the service identification information corresponding to the first predefined rule.
[0050] In some embodiments, if it is determined that the business identification information corresponding to the current predefined rule is the same as the business identification information corresponding to the first predefined rule, the following steps S202A to S203A can be executed; conversely, if it is determined that the business identification information corresponding to the current predefined rule is different from the business identification information corresponding to the first predefined rule, the following step S204A can be executed.
[0051] S202A: Determine a time interval between the current predefined rule and the first predefined rule.
[0052] In some embodiments, the first predefined rule is the previous predefined rule obtained before the current predefined rule. When the business identification information corresponding to the current predefined rule is different from the identification information corresponding to the first predefined rule, the time interval between the current predefined rule and the first predefined rule can be further determined. The acquisition time of the current predefined rule and the acquisition time of the first predefined rule can be determined first, and then the time interval between the current predefined rule and the first predefined rule can be determined based on the difference between the two acquisition times.
[0053] S203A: Based on the time interval and the time threshold, compile the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule.
[0054] In some embodiments, after determining the time interval between the current predefined rule and the first predefined rule, it can be determined whether the time interval reaches a time threshold. If it is determined that the time interval reaches (for example, greater than or equal to) the time threshold, the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule can be compiled.
[0055] In some embodiments, when the business identification information of a predefined rule and a first predefined rule is the same, if the determined time interval between the current predefined rule and the first predefined rule does not reach a time threshold, the first predefined rule and the current predefined rule can be divided into a group, and the business identification information of the next predefined rule obtained after the current predefined rule and the business identification information of the current predefined rule can be judged for consistency, and / or a judgment is made as to whether the time interval between the current predefined rule and the next predefined rule obtained after the current predefined rule reaches a time threshold, and it is determined whether to compile the current predefined rule and the uncompiled predefined rules (including the first predefined rule) obtained before the current predefined rule.
[0056] In some embodiments, if the first predefined rule is the first predefined rule obtained, that is, there is no uncompiled predefined rule before the first predefined rule, or other predefined rules obtained before the first predefined rule have been compiled, then only the first predefined rule may be compiled.
[0057] It can be understood that, when it is determined that the business identification information of the current predefined rule and the first predefined rule obtained before the current predefined rule is the same, the compilation of the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule is automatically triggered based on the time interval and time threshold between the current predefined rule and the first predefined rule, so as to ensure that the predefined rule obtained first is compiled first, so that the predefined rule takes effect in real time.
[0058] S204A: compile the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule.
[0059] In some embodiments, if it is determined that the business identification information corresponding to the current predefined rule is different from the business identification information corresponding to the first predefined rule, it means that the predefined rules corresponding to the business identification information of the first predefined rule may have been fully acquired, and other predefined rules corresponding to the business identification information of the current predefined rule may be acquired subsequently. In this case, the compilation of the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule can be triggered.
[0060] In some embodiments, if the first predefined rule is the first predefined rule obtained, that is, there is no uncompiled predefined rule before the first predefined rule, or other predefined rules obtained before the first predefined rule have been compiled, then only the first predefined rule may be compiled.
[0061] It can be understood that, when the business identification information of the current predefined rule and the first predefined rule obtained before the current predefined rule is different, the compilation of the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule is automatically triggered, so that the predefined rule with the same business identification information obtained first can be compiled first, thereby improving the real-time performance of the compilation of the predefined rules.
[0062] In some embodiments of the present application, Figure 3 As shown, "compilation processing of the predefined rules based on the compilation processing conditions" in step S102 can also be implemented through the following steps S201B to S206B, and each step is described below.
[0063] S201B: Determine whether the time interval between the current predefined rule and the first predefined rule reaches a time threshold.
[0064] In some embodiments, after obtaining the current predefined rule and the first predefined rule before the current predefined rule, it can be directly determined whether the time interval between the current predefined rule and the first predefined rule reaches the time threshold. If it is determined that the time interval between the current predefined rule and the first predefined rule reaches (for example, greater than or equal to) the time threshold, the following step S202B can be executed; conversely, if it is determined that the time interval between the current predefined rule and the first predefined rule does not reach (for example, less than) the time threshold, the following steps S203B to S204B can be executed.
[0065] S202B: compile the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule.
[0066] In some embodiments, if it is determined that the time interval between the current predefined rule and the first predefined rule obtained before the current predefined rule reaches a time threshold, the compilation of the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule can be triggered.
[0067] In some embodiments, if the first predefined rule is the first predefined rule obtained, that is, there is no uncompiled predefined rule before the first predefined rule, or other predefined rules obtained before the first predefined rule have been compiled, then only the first predefined rule may be compiled.
[0068] It can be understood that, when it is determined that the time interval between the current predefined rule and the first predefined rule obtained before the current predefined rule reaches the time threshold, the compilation of the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule is automatically triggered, avoiding the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule from continuing to wait for other predefined rules to be obtained before compilation, thereby ensuring the real-time compilation of the predefined rules.
[0069] S203B: Determine whether the service identification information of the current predefined rule is the same as the service identification information of the first predefined rule.
[0070] In some embodiments, when it is determined that the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, it can be further determined whether the business identification information of the current predefined rule and the identification information of the first predefined rule are the same. If it is determined that the business identification information of the current predefined rule and the identification information of the first predefined rule are the same, the following steps S204B to S205B can be executed; conversely, if it is determined that the business identification information of the current predefined rule and the identification information of the first predefined rule are different, the following step S206B can be executed.
[0071] S204B: Divide the current predefined rule and the first predefined rule into one group.
[0072] If the duration interval between the current predefined rule and the first predefined rule does not reach the duration threshold, and the business identification information of the current predefined rule is the same as the business identification information of the first predefined rule, then the current predefined rule and the first predefined rule can be divided into a group, that is, the current predefined rule and the first predefined rule belong to the same business type. By dividing the current predefined rule and the first predefined rule into the same group, the predefined rules in a group have the same business identification information, and the compilation of the predefined rules in the group can be triggered simultaneously when the compilation processing conditions are met later.
[0073] S205B: compile the predefined rules corresponding to the group based on the service identification information and the compiling processing conditions corresponding to the group.
[0074] In some embodiments, after the first predefined rule and the current predefined rule are divided into a group, it can be determined whether to trigger the compilation of the predefined rules in the group based on the consistency judgment between the business identification information corresponding to the group and the business identification information of the next predefined rule obtained after the current predefined rule, and / or whether the time interval between the current predefined rule and the next predefined rule obtained after the current predefined rule reaches a time threshold.
[0075] In some embodiments, if it is determined that the business identification information corresponding to the group is different from the business identification information of the next predefined rule obtained after the current predefined rule, the predefined rules in the group can be compiled; or, if the time interval between the current predefined rule and the next predefined rule obtained after the current predefined rule reaches a time threshold, the predefined rules in the group can be compiled; or, if it is determined that the business identification information corresponding to the group is the same as the business identification information of the next predefined rule obtained after the current predefined rule, but the time interval between the current predefined rule and the next predefined rule obtained after the current predefined rule reaches the time threshold, the predefined rules in the group can be compiled; or, if the time interval between the current predefined rule and the next predefined rule obtained after the current predefined rule does not reach the time threshold, but the business identification information corresponding to the group is different from the business identification information of the next predefined rule obtained after the current predefined rule, the predefined rules in the group can be compiled.
[0076] It can be understood that, when the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, and the business identification information of the current predefined rule is the same as the business identification information of the first predefined rule, by dividing the first predefined rule and the current predefined rule into one group, the predefined rules with the same business identification information can be compiled together, thereby improving the compilation efficiency; further, based on the identification information and compilation processing conditions of the divided group, the predefined rules in the group are compiled and processed, so that the predefined rules with the same business identification information can be compiled as soon as possible, thereby improving the real-time compilation of the predefined rules with the same business identification information.
[0077] S206B: compile the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule.
[0078] In some embodiments, if the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, but the business identification information of the current predefined rule is different from the business identification information of the first predefined rule, it means that the acquisition time of the two is relatively close, but they are predefined rules of different business types. In this case, the compilation of the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule can be triggered.
[0079] It can be understood that when the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, and the business identification information of the current predefined rule is different from the business identification information of the first predefined rule, the compilation of the first predefined rule and the uncompiled predefined rules obtained before the first predefined rule is triggered, which can give priority to compiling predefined rules with the same business identification information, thereby improving the real-time performance of the compilation of the predefined rules.
[0080] In some embodiments of the present application, after “compilation processing is performed on the predefined rules based on the compilation processing conditions”, the following steps S301 to S302 may also be performed, and each step is described below.
[0081] S301. Update a duration threshold at least based on a first predefined rule to obtain a new duration threshold.
[0082] In some embodiments, when the compilation of the first predefined rule is triggered based on the judgment of whether the duration interval of adjacent predefined rules meets the duration threshold, but the duration interval between the first predefined rule and the current predefined rule does not meet the duration threshold, and the current predefined rule is not compiled, in order to avoid setting the duration threshold too large, the duration threshold can be further updated to obtain a new and more reasonable duration threshold.
[0083] In some embodiments, the duration threshold can be updated each time the duration interval based on adjacent predefined rules reaches the duration threshold, triggering the compilation of predefined rules; or the duration threshold can be updated again after the duration interval based on adjacent predefined rules reaches the duration threshold, triggering the compilation of predefined rules multiple times (for example, twice, three times, etc.).
[0084] In some embodiments, the new duration threshold is different from the duration threshold before the update, and the new duration threshold may be greater than or less than the duration threshold before the update. The new duration threshold may be determined by the acquisition time of the first predefined rule and the acquisition time of other predefined rules acquired before the first predefined rule.
[0085] S302: Based on the new duration threshold, compile the predefined rules obtained after the first predefined rule.
[0086] In some embodiments, after the duration threshold is updated to obtain a new duration threshold, compilation can be performed based on the new duration threshold and the predefined rule obtained after the first predefined rule. For example, if it is determined that the duration interval between the next predefined rule (current predefined rule) obtained after the first predefined rule and the next predefined rule reaches the new duration threshold, the next predefined rule obtained after the first predefined rule is compiled; if it is determined that the duration interval between the next predefined rule obtained after the first predefined rule and the next predefined rule does not reach the new duration threshold, but the business identification information of the next predefined rule obtained after the first predefined rule and the business identification information of the next predefined rule obtained after the first predefined rule are different, the next predefined rule obtained after the first predefined rule is compiled.
[0087] It can be understood that updating the duration threshold based on the first predefined rule can avoid the time threshold being set too large and affecting the real-time performance of the predefined rule compilation. Further compiling and processing the predefined rules obtained after the first predefined rule based on the new duration threshold can improve the real-time performance of the compilation of other predefined rules after the first predefined rule and ensure that the predefined rules take effect in real time.
[0088] In some embodiments of the present application, the duration threshold is updated at least based on the first predefined rule to obtain a new duration threshold, that is, the above-mentioned step S301 can be implemented by the following steps S3011 to S3013, and each step is described separately below.
[0089] S3011. Determine a first time when a first predefined rule is acquired, and a second time when a predefined rule before the first predefined rule is acquired.
[0090] It should be noted that the first time may be the time when the first predefined rule is obtained, that is, it may be the time point when the UPF receives or acquires the predefined rule, and the second time may be the time when the previous predefined rule of the first predefined rule is obtained, that is, it may be the time point when the UPF receives or acquires the previous predefined rule of the first predefined rule.
[0091] In some embodiments, the UPF is provided with a clock, by which the first time of acquiring the first predefined rule and the second time of acquiring the previous predefined rule of the first predefined rule can be recorded, and the first time and the second time are stored in a preset storage area, so that the first time and the second time can be directly acquired from the preset storage area.
[0092] S3012. Determine a first duration according to the first time and the second time.
[0093] In some embodiments, the first duration can be determined according to the difference between the first time and the second time. For example, if the first time is 18:02:10 and the second time is 18:02:09, the first duration is 1 second. The first time and the second time are merely exemplary and are not limited in this application.
[0094] S3013: Update the duration threshold based at least on the first duration and the preset duration range to obtain a new duration threshold.
[0095] It should be noted that the preset duration range can be any pre-set time length range, and the preset duration range includes a lower limit and an upper limit. For example, if the preset duration range is [0.5s, 1s], the corresponding lower limit is 0.5s and the upper limit is 1s.
[0096] In some embodiments, if the first duration is less than or equal to the duration threshold, the duration threshold can be updated according to the lower limit value of the preset duration range and the first duration to obtain a new duration threshold; if the first duration is greater than the duration threshold, the duration threshold can be updated according to the upper limit value of the preset duration range and the first duration to obtain a new duration threshold.
[0097] In some embodiments, the duration threshold may be updated according to the first time of obtaining the first predefined rule, the second time of the previous predefined rule of the first predefined rule, and the third time of the first two predefined rules of the first predefined rule to obtain a new duration threshold. The first duration may be determined according to the first time and the second time, the second duration may be determined according to the second time and the third time, and the duration threshold may be updated based on the first duration, the second duration, and the preset duration range. The average duration may be obtained by first determining the average of the first duration and the second duration, and the larger duration between the average duration and the first duration is determined. If the larger duration is less than or equal to the duration threshold, the duration threshold may be updated according to the lower limit of the preset duration range and the larger duration to obtain a new duration threshold; if the larger duration is greater than the duration threshold, the duration threshold may be updated according to the upper limit of the preset duration range and the larger duration to obtain a new duration threshold.
[0098] In some embodiments, the duration threshold can also be updated to obtain a new duration threshold based on the first time when the first predefined rule is obtained, the acquisition time of N consecutive predetermined rules obtained before the first predefined rule, N is an integer greater than 3, and the duration interval between two adjacent predefined rules and the preset duration range.
[0099] It can be understood that by obtaining the first time of the first predefined rule, obtaining the first duration and the preset duration range determined by the second time of the previous predefined rule of the first predefined rule, and updating the duration threshold, the duration threshold can be made within the preset duration range and will not be set too large or too small, thereby ensuring the rationality of triggering the compilation based on the new duration threshold and improving the real-time performance of subsequent predefined rule compilation.
[0100] In an embodiment of the present application, a predefined rule and the business identification information corresponding to the predefined rule are obtained; based on the compilation processing conditions, the predefined rule is compiled and processed to obtain the corresponding compilation result, so as to process the business data based on the compilation result. In this way, the compilation is automatically triggered by judging the consistency of the business identification information of the predefined rule and / or judging whether the time interval of adjacent predefined rules reaches the time threshold, so that the predefined rules obtained first can be compiled in time, the compilation speed of the predefined rules and the real-time performance of the predefined rule compilation are improved, and the predefined rules are guaranteed to take effect in real time.
[0101] Next, the implementation process of the application embodiment in the actual application scenario is introduced.
[0102] The present application embodiment provides a method for compiling a core network PFD predefined rule, such as Figure 4 As shown, the method comprises the following steps:
[0103] S401, configuring predefined rules (equivalent to “obtaining predefined rules” in other embodiments).
[0104] In some embodiments, the configuration of the predefined rules can be achieved by sending the predefined rules to the UPF through the SMF, or the predefined rules can be configured through the CLI external command interface.
[0105] S402. Slice the predefined rules according to the application identification (APPID) (equivalent to the "business identification information" in other embodiments).
[0106] In some embodiments, rules with the same APPID can be grouped together for management and compilation. Through APPID slicing management, the number of predefined rules under a single APPID generally does not exceed 100, and is usually around 30. In this way, the compilation speed can be accelerated, and compilation by APPID slicing is faster than compiling one by one or delaying one-time compilation. In addition, when the compiled predefined rules need to be queried, since the database (Data Base, DB) rule set where a single compilation result is stored is small, the business scanning efficiency is higher, so the query speed is fast.
[0107] S403: Triggering predefined rule compilation based on the intelligent compilation strategy.
[0108] In some embodiments, the smart compilation strategy includes: automatically triggering compilation when the APPID switch of the predefined rule is changed and the predefined rule is changed for a time period exceeding a threshold T, automatically triggering compilation. Through this smart compilation strategy, APPID slicing can achieve quasi-real-time compilation, and the smart compilation strategy is automatically triggered without external event intervention.
[0109] In some embodiments, a strategy for automatically triggering compilation when the time from the most recent change of a predefined rule exceeds a time threshold T can be used. Each time compilation is completed, the time threshold T can be dynamically adjusted through self-learning to adapt the compilation to the current environment.
[0110] For example, Figure 5 As shown, if the predefined rules of APPID APPID1 include n (R1, R2, ..., R n-2 ,R n-1 ,R n ), n predefined rules are compiled, R1, R2, ..., R n-2 ,R n-1 ,R n The acquisition times are T1, T2, ..., T n-2 ,T n-1 ,T n , then the updated duration threshold T can be determined by formula (1) u :
[0111]
[0112] Where T is the current duration threshold, 0.5 and 1 are the lower limit and upper limit of the duration threshold interval (equivalent to the “preset duration range” in other embodiments), D=max(D n ,D v ), D n =T n -T n-1 , D v =avg(D n ,D n-1 ,D n-2 ), D n-1 =T n-1 -T n-2 , D n-2 =T n-2 -T n-3 .
[0113] S404. When the data message (equivalent to the "business data" in other embodiments) is forwarded, the database storing the corresponding compilation result is associated with the APPID of the session PDR to achieve predefined rule matching.
[0114] In some embodiments, after compiling the predefined rules, if a data message comes down, for example, when a data message flows through the UPF, the data message and the compiled rules can be matched (identified) according to the APPID of the PDR corresponding to the data message and the APPID corresponding to the database where the compilation results are stored to determine whether the message is forwarded and to whom it is forwarded.
[0115] For example, Figure 6 FIG. 1 is a schematic diagram of a compilation process of a predefined rule provided in an embodiment of the present application. Figure 6 The APPID in includes R 1.1 ,R 1.2 ,R 1.3 ,R 1.4 ,R 1.5 ,R 2.1 ,R 2.2 ,R 2.3 , where R 1.1 ,R 1.2 ,R 1.3 ,R 1.4 ,R 1.5 The corresponding APPID is APPID1, R 2.1 ,R 2.2 ,R 2.3 The corresponding APPID is APPID2. 2.1 When R 1.5 and R 2.1 The time interval T1 between them is less than the time threshold T, so step S501 is executed: triggering the R 1.1 ,R 1.2 ,R 1.3 ,R 1.4 ,R 1.5 The compiled result is saved in DB1; then, R 2.2 , R 2.3 , upon receiving R 2.3 If no other predefined rules are received within the subsequent T2 period, and T2 is greater than the duration threshold T, step S502 may be executed: triggering the R 2.1 ,R 2.2 ,R 2.3 The compiled result is stored in DB2; then step S503 can be executed: the duration threshold T is updated to obtain a new duration threshold T u .
[0116] The method for compiling core network PFD predefined rules provided in the embodiment of the present application automatically triggers compilation by switching the APPID of the predefined rules, or automatically triggers compilation when the time from the most recent change of the predefined rules exceeds a threshold, so that the predefined rules configured in advance can take effect in real time, and for the rules issued within the network element, the compilation can also be triggered in time through the CLI display, thereby improving the user interaction experience.
[0117] The present application also provides a user plane function node, Figure 7 A schematic diagram of the composition structure of a user plane function node provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the user plane function node 600 includes:
[0118] A first acquisition module 601 is used to acquire a predefined rule and service identification information corresponding to the predefined rule;
[0119] A first compiling processing module 602, configured to compile the predefined rule based on the compiling processing condition to obtain a corresponding compiling result, and process the business data based on the compiling result;
[0120] The compilation processing conditions at least include a consistency judgment of the service identification information and / or a judgment of whether the time interval between adjacent predefined rules reaches a time threshold.
[0121] In some embodiments, the first compiling processing module 602 further includes:
[0122] a first compiling processing submodule, configured to compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule if the service identification information corresponding to the current predefined rule is different from the service identification information corresponding to the first predefined rule;
[0123] The first predefined rule is a previous predefined rule obtained before the current predefined rule.
[0124] In some embodiments, the first compiling processing module 602 further includes:
[0125] A first determination submodule, configured to determine a time interval between the current predefined rule and the first predefined rule if the service identification information corresponding to the current predefined rule is the same as the service identification information corresponding to the first predefined rule;
[0126] The second compiling processing submodule is used to compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule based on the time interval and the time threshold.
[0127] In some embodiments, the first compiling processing module 602 further includes:
[0128] A third compiling processing submodule is configured to compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule if the time interval between the current predefined rule and the first predefined rule reaches the time threshold;
[0129] The first predefined rule is a previous predefined rule obtained before the current predefined rule.
[0130] In some embodiments, the first compiling processing module 602 further includes:
[0131] The fourth compilation processing submodule is used to compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule if the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, and the business identification information of the current predefined rule is different from the business identification information of the first predefined rule.
[0132] In some embodiments, the first compiling processing module 602 further includes:
[0133] a division processing submodule, configured to divide the current predefined rule and the first predefined rule into one group if the time interval between the current predefined rule and the first predefined rule does not reach the time threshold and the service identification information of the current predefined rule is the same as the service identification information of the first predefined rule;
[0134] The fifth compiling and processing submodule is used to compile and process the predefined rules corresponding to the group based on the service identification information corresponding to the group and the compiling and processing conditions.
[0135] In some embodiments, the user plane function node 600 further includes:
[0136] A first updating module, configured to update the duration threshold based at least on the first predefined rule to obtain a new duration threshold;
[0137] The second compiling and processing module is used to compile and process the predefined rules acquired after the first predefined rule based on the new duration threshold.
[0138] In some embodiments, the first update module includes:
[0139] A second determination submodule, used to determine a first time when the first predefined rule is acquired, and a second time when a predefined rule before the first predefined rule is acquired;
[0140] A third determining submodule, configured to determine a first duration according to the first time and the second time;
[0141] The first updating submodule is used to update the duration threshold based on at least the first duration and a preset duration range to obtain the new duration threshold.
[0142] In some embodiments, the first acquisition module 601 further includes:
[0143] A first receiving submodule, configured to receive message data management information sent by a control plane node that has established a communication connection with the user plane function node, wherein the message data management information carries the predefined rule;
[0144] The first acquisition submodule is used to acquire the predefined rule through the external communication interface of the user plane function node.
[0145] It should be noted that the description of the user plane function node in the embodiment of the present application is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment, so it will not be repeated. For technical details not disclosed in the embodiment of the present device, please refer to the description of the method embodiment of the present application for understanding.
[0146] It should be noted that in the embodiment of the present application, if the above-mentioned compilation processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or the part that contributes to the relevant solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0147] Accordingly, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the compiling processing method provided in the above embodiment is implemented.
[0148] The embodiment of the present application also provides a compilation processing device. Figure 8 A schematic diagram of the structure of a compiling and processing device provided in an embodiment of the present application is shown in FIG. Figure 8As shown, the compiling and processing device 700 includes: a memory 701, a processor 702, a communication interface 703 and a communication bus 704. The memory 701 is used to store executable compiling and processing instructions; the processor 702 is used to execute the executable compiling and processing instructions stored in the memory to implement the compiling and processing method provided in the above embodiment.
[0149] The description of the above compilation processing device and storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the compilation processing device and storage medium embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0150] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes at least one ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0151] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0152] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0153] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0154] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, disks or optical disks.
[0155] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a product to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0156] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technical object familiar with the technical field can be easily conceived of within the technical scope disclosed in the present application. Changes or substitutions should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A compilation processing method, comprising: Obtaining predefined rules and service identification information corresponding to the predefined rules; Based on the compilation processing condition, compile the predefined rule to obtain a corresponding compilation result, and process the business data based on the compilation result; The compilation processing conditions at least include a consistency judgment of the service identification information and / or a judgment of whether the time interval between adjacent predefined rules reaches a time threshold.
2. The method according to claim 1, wherein the compiling process of the predefined rule based on the compiling process condition comprises: If the service identification information corresponding to the current predefined rule is different from the service identification information corresponding to the first predefined rule, compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule; The first predefined rule is a previous predefined rule obtained before the current predefined rule.
3. The method according to claim 2, characterized in that The compiling process of the predefined rules based on the compiling process condition includes: If the service identification information corresponding to the current predefined rule is the same as the service identification information corresponding to the first predefined rule, determining a time interval between the current predefined rule and the first predefined rule; Based on the time interval and the time threshold, compile the first predefined rule and the predefined rule that has been previously obtained but not compiled.
4. The method according to claim 1, wherein the compiling process of the predefined rule based on the compiling process condition comprises: If the time interval between the current predefined rule and the first predefined rule reaches the time threshold, compile the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule; The first predefined rule is a previous predefined rule obtained before the current predefined rule.
5. The method according to claim 4, wherein the compiling process of the predefined rule based on the compiling process condition comprises: If the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, and the business identification information of the current predefined rule is different from the business identification information of the first predefined rule, the first predefined rule and the uncompiled predefined rule obtained before the first predefined rule are compiled.
6. The method according to claim 4, wherein the compiling process of the predefined rule based on the compiling process condition comprises: If the time interval between the current predefined rule and the first predefined rule does not reach the time threshold, and the service identification information of the current predefined rule is the same as the service identification information of the first predefined rule, the current predefined rule and the first predefined rule are divided into one group; Based on the service identification information corresponding to the group and the compilation processing condition, the predefined rules corresponding to the group are compiled.
7. The method according to any one of claims 4 to 6, further comprising: updating the duration threshold at least based on the first predefined rule to obtain a new duration threshold; Based on the new duration threshold, the predefined rules acquired after the first predefined rule are compiled.
8. The method according to claim 7, wherein the updating the duration threshold based at least on the first predefined rule to obtain a new duration threshold comprises: Determining a first time when the first predefined rule is acquired, and a second time when a predefined rule preceding the first predefined rule is acquired; Determine a first duration according to the first time and the second time; The duration threshold is updated based at least on the first duration and a preset duration range to obtain the new duration threshold.
9. According to the method of claim 1, the predefined rule is obtained in at least one of the following ways: Receiving message data management information sent by a control plane node that has established a communication connection with a user plane function node, wherein the message data management information carries the predefined rule; The predefined rule is acquired through the external communication interface of the user plane function node.
10. A user plane function node, comprising: A first acquisition module, used to acquire a predefined rule and service identification information corresponding to the predefined rule; A first compiling and processing module, configured to compile and process the predefined rules based on the compiling and processing conditions to obtain corresponding compiling results, so as to process the business data based on the compiling results; The compilation processing conditions at least include a consistency judgment of the service identification information and / or a judgment of whether the time interval between adjacent predefined rules reaches a time threshold.
