CN113742042B - Timer processing method, device, equipment and readable storage medium - Google Patents

Timer processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113742042B
CN113742042B CN202110987948.0A CN202110987948A CN113742042B CN 113742042 B CN113742042 B CN 113742042B CN 202110987948 A CN202110987948 A CN 202110987948A CN 113742042 B CN113742042 B CN 113742042B
Authority
CN
China
Prior art keywords
timer
time
environment variable
queues
queue
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
CN202110987948.0A
Other languages
Chinese (zh)
Other versions
CN113742042A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110987948.0A priority Critical patent/CN113742042B/en
Publication of CN113742042A publication Critical patent/CN113742042A/en
Application granted granted Critical
Publication of CN113742042B publication Critical patent/CN113742042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a timer processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU; selecting timers corresponding to each timing task from the timers of each resolution level, and setting the triggering time of the corresponding timers according to each timing task; and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time. According to the technical scheme disclosed by the application, the setting of the resolution level of the timer is realized according to the set environment variable, and the timer with the resolution level meeting the requirement of the timing task is selected from the timers with the resolution levels, so that the timer with the set triggering time can better meet the requirement of the timing task in the system.

Description

Timer processing method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of storage systems, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing a timer.
Background
In a storage system, one data I/O (Input/Output) undergoes multiple operation phases such as storage volume, storage pool, raid (Redundant Arrays of Independent Disks, disk array), storage disk, etc. in the back-end processing, each phase of I/O circulation needs to have strict requirements on time, and a timer with different resolution is needed to record response time.
Currently, a timer with preset uniform resolution is generally directly applied to a system, however, this method may have a problem that the resolution of the timer cannot exactly meet the requirement of a timing task, for example: the timing task is frequently executed due to the too small resolution of the timer, so that the resource is wasted, or the timing task cannot be executed better due to the too large resolution of the timer.
In summary, how to make the timer better meet the system requirements is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a timer processing method, apparatus, device and readable storage medium, for enabling a timer to better meet system requirements.
In order to achieve the above object, the present application provides the following technical solutions:
a timer processing method, comprising:
acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
selecting a timer corresponding to each timing task from the timers of the resolution level, and setting the triggering time of the corresponding timer according to each timing task;
and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
Preferably, after setting the trigger time of the corresponding timer according to each timing task, the method further includes:
creating a timer queue and a thread corresponding to each resolution level;
and adding the timers with the corresponding resolution levels into the corresponding timer queues by using the threads according to the sequence of the trigger time from front to back.
Preferably, after creating the thread corresponding to each resolution level, the method further includes:
if the number of the cores of the CPU is larger than the number of the threads, binding each thread with different cores of the CPU.
Preferably, creating a timer queue corresponding to each resolution level includes:
creating a plurality of timer queues corresponding to the resolution levels respectively;
according to the running time from starting to the time of completing the creation of the queue of the system and the environment variable corresponding to each resolution level, correspondingly determining the reference time of the first timer queue in the plurality of timer queues corresponding to each resolution level;
according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, correspondingly determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the corresponding plurality of timer queues according to the reference time interval;
adding the timers with the corresponding resolutions into the corresponding timer queues according to the sequence of the trigger time from front to back by using the threads, wherein the method comprises the following steps:
and adding the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels by utilizing the corresponding threads in the sequence from front to back.
Preferably, the method further comprises:
if the temporary unsatisfied timers with the triggering time not in the time range managed by the corresponding multiple timer queues exist, storing the temporary unsatisfied timers in a temporary timer linked list according to the sequence of the triggering time from front to back;
judging whether a target timer with triggering time within a time range managed by a plurality of corresponding timer queues exists in the temporary timer linked list;
if yes, adding the target timer into the corresponding timer queue according to the triggering time of the target timer and the reference time of the corresponding timer queues.
Preferably, the method further comprises:
a first timer queue in a plurality of timer queues corresponding to each resolution level is correspondingly used as a current processing queue of each resolution level;
determining whether the current time of the system reaches the triggering time of a timer corresponding to the environment variable according to the environment variable comprises the following steps:
comparing the ratio of the current running time of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
If the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the triggering time smaller than the ratio in the current processing queue as a timer for reaching the triggering time;
and if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, taking the next timer queue in a plurality of timer queues corresponding to the resolution level corresponding to the environment variable as the current processing queue, and returning to the step of executing the comparison of the current running time of the system from the starting to the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable until a timer with the triggering time larger than the ratio exists in the current processing queue.
A timer processing apparatus comprising:
the setting module is used for acquiring an environment variable set according to the requirement of the system on the resolution of the timer and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
the selecting module is used for selecting the timer corresponding to each timing task from the timers of the resolution level, and setting the triggering time of the corresponding timer according to each timing task;
and the execution module is used for determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
Preferably, the method further comprises:
the creating module is used for creating a timer queue and a thread corresponding to each resolution level after setting the triggering time of the corresponding timer according to each timing task;
and the adding module is used for adding the timers with the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by using the threads.
A timer processing apparatus comprising:
a memory for storing a computer program;
A processor for implementing the steps of the timer processing method according to any one of the preceding claims when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the timer processing method of any of the preceding claims.
The application provides a timer processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU; selecting timers corresponding to each timing task from the timers of each resolution level, and setting the triggering time of the corresponding timers according to each timing task; and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
According to the technical scheme disclosed by the application, the resolution level of the timer is set according to the acquired environment variable and the frequency of the CPU by acquiring the environment variable which is preset according to the requirement of the system on the resolution of the timer, so that the flexible change and setting of the resolution of the timer are realized, the flexibility of the setting of the resolution of the timer is improved, the timer with the resolution level capable of meeting the requirement of the timing task is selected from the timers with the resolution level according to the environment variable after the resolution level of the timer is set according to the environment variable, the timer corresponding to each timing task is determined, the triggering time of the timer corresponding to the timing task is set according to the requirement of the timing task, so that the timer with the triggering time set can better meet the requirement of the timing task, namely the timer can better meet the requirement of the system on the timer, the timing task can be accurately executed based on the corresponding timer, and the execution performance of each timing task in the system is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for processing a timer according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a plurality of timer queues corresponding to a resolution level of microsecond according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a temporary timer linked list according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a timer processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a timer processing device according to an embodiment of the present application.
Detailed Description
In the storage field, a data I/O undergoes multiple operation phases such as storage volume, storage pool, raid, storage disk, etc. during the processing of the back end, and each phase of I/O circulation has strict requirements on time control, and a large number of timers with different resolutions are required to record the response time of each module. The resolution of the timer refers to the timing accuracy of the timer. Currently, timers with fixed and uniform resolution are generally used in the system, but the fixed and uniform resolution timers may not exactly meet the requirements of the timing task, for example: if the timing requirement of the timing task is in the millisecond level and the resolution of the applied timer is in the microsecond level, the frequent execution of the timing task is caused, so that the waste of resources is caused, and the CPU pressure ratio is caused to be larger; if the timing requirement of the timing task is nanosecond, and the resolution of the applied timer is μs, this results in that the timing task cannot be better executed, that is, the existing timer adopting the fixed and uniform resolution cannot better meet the requirement of the system.
To this end, the present application provides a timer processing method, apparatus, device, and readable storage medium for enabling a timer to better meet system requirements.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, a flowchart of a timer processing method provided by an embodiment of the present application is shown, where the timer processing method provided by the embodiment of the present application may include:
s11: and acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU.
First, the environment variable rf_time may be set in advance according to a system demand for timer resolution, where the system demand for timer resolution may be specifically a demand for timer resolution for each timing task in a storage software station (i.e., each operation phase of I/O circulation) in a storage system.
Then, the preset environment variable rf_time is acquired, and the resolution level of the timer is set according to the environment variable rf_time and the frequency of the CPU, wherein each environment variable corresponds to the timer with one resolution level, and specifically, the resolution level of the timer is equal to the frequency of the rf_time/CPU. The timer in the application takes reference heartbeats (reference heartbeats) as reference heartbeats (time granularity), each reference heartbeat is limited by the CPU frequency, and the period of the reference heartbeats is defined by setting an environment variable RF_TICK, for example: for a CPU with 2GHz frequency, the vibration frequency of each microsecond is 2000 times, if the environment variable RF_TICK is set to be 2, the resolution level of the timer is 1 nanosecond, and if the environment variable RF_TICK is set to be 2000, the resolution level of the timer is 1 microsecond.
It follows that the application can flexibly change the resolution of the timer by setting the environment variable rf_time.
S12: and selecting the timer corresponding to each timing task from the timers of each resolution level, and setting the triggering time of the corresponding timer according to each timing task.
After the resolution level of the timer is set according to the environment variable, according to the requirements of each timing task in the system, the timers with the resolution level meeting the requirements of the timing tasks are selected from the obtained timers with the resolution level so as to determine the timers respectively corresponding to the timing tasks, so that the determined timers with the resolution level corresponding to the timing tasks can better meet the requirements of the timing tasks.
After determining the timer corresponding to the timing task, the trigger time of the timer corresponding to the timing task can be set according to the requirement of the timing task on the execution time, namely, the trigger time of the timer corresponding to the timing task and with the resolution level capable of meeting the requirement can be set according to the requirement of the timing task on the execution time, so that the timer with the trigger time set can better meet the requirement of the timing task.
S13: and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
Based on step S11 and step S12, the current time of the system may be obtained, and in combination with the environment variable rf_time, it is determined whether the current time of the system reaches the trigger time of the timer with the resolution level corresponding to the environment variable, for example, for the environment variable rf_time=2000, the timer with the resolution level of microsecond is corresponding to the environment variable rf_time=2000, whether the timer with the resolution level of microsecond is present in the timer with the resolution level of microsecond may be determined according to the current time of the system and the rf_time=2000, and if it is determined that the timer with the trigger time is present, the timer with the trigger time is executed.
According to the process, the application realizes a soft timer mechanism, in the soft timer mechanism, not only can the flexible setting of the resolution level of the timer be realized, but also the set resolution level of the timer can better meet the requirement of timing tasks, so that the timing tasks can be better executed.
According to the technical scheme disclosed by the application, the resolution level of the timer is set according to the acquired environment variable and the frequency of the CPU by acquiring the environment variable which is preset according to the requirement of the system on the resolution of the timer, so that the flexible change and setting of the resolution of the timer are realized, the flexibility of the setting of the resolution of the timer is improved, the timer with the resolution level capable of meeting the requirement of the timing task is selected from the timers with the resolution level according to the environment variable after the resolution level of the timer is set according to the environment variable, the timer corresponding to each timing task is determined, the triggering time of the timer corresponding to the timing task is set according to the requirement of the timing task, so that the timer with the triggering time set can better meet the requirement of the timing task, namely the timer can better meet the requirement of the system on the timer, the timing task can be accurately executed based on the corresponding timer, and the execution performance of each timing task in the system is further improved.
The timer processing method provided by the embodiment of the application can further comprise the following steps after setting the trigger time of the corresponding timer according to each timing task:
creating a timer queue and a thread corresponding to each resolution level;
and adding the timers with the corresponding resolution levels into the corresponding timer queues by using the threads according to the sequence of the trigger time from front to back.
In the present application, after setting the trigger time of the corresponding timer according to each timing task, a timer queue and a thread corresponding to each resolution level may be created, that is, each resolution level corresponds to its own timer queue and thread, where the timer queue may differentiate the timers of different resolution levels, and the thread corresponding to the resolution level may implement management of the corresponding timer (where the management mentioned herein includes but is not limited to adding the corresponding timer to the timer queue, determining whether the trigger time of the corresponding timer is reached, for example: the corresponding thread of microsecond level can realize the management of the timer of microsecond level.
After the timer queues and threads are created, the timers with the resolution levels corresponding to the timers can be added into the corresponding timer queues by the threads according to the sequence from front to back of the trigger time, for example, the timers with the resolution levels of microseconds are added into the timer queues with the resolution levels of microseconds by the threads corresponding to the resolution levels of microseconds according to the sequence from front to back of the trigger time, and the timers with other resolution levels are processed in a similar manner, so that the timers with different resolution levels are added into the corresponding timer queues, the timers with different resolution levels are distinguished, and efficient management of the timers with different resolution levels is facilitated.
The timer processing method provided by the embodiment of the application can further comprise the following steps after the threads corresponding to each resolution level are created:
if the number of cores of the CPU is greater than the number of threads, binding each thread with different cores of the CPU.
In the application, after the threads corresponding to each resolution level are created, if the number of the cores of the CPU is greater than the number of the threads, each created thread can be bound with different cores of the CPU, that is, each thread can be respectively bound with one CPU core (the CPU cores bound by each thread are different), so that the created thread can monopolize one CPU core to use and manage a timer queue, thereby improving the management efficiency and convenience.
It should be noted that, if the number of cores of the CPU is not greater than the number of cores of the created CPU, the binding between the thread and the CPU core may not be performed any more, so as to avoid affecting other services of the CPU.
The method for processing the timer provided by the embodiment of the application for creating the timer queue corresponding to each resolution level can comprise the following steps:
creating a plurality of timer queues corresponding to the resolution levels respectively;
according to the operation time length from starting to the time of completing the creation of the queue of the system and the environment variable corresponding to each resolution level, correspondingly determining the reference time of the first timer queue in the plurality of timer queues corresponding to each resolution level;
According to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, correspondingly determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the corresponding plurality of timer queues according to the reference time interval;
the method for adding the timers with the corresponding resolutions into the corresponding timer queues by the thread according to the sequence of the trigger time from front to back can comprise the following steps:
and adding the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels by using the corresponding threads in the sequence from front to back.
In the present application, when creating the timer queues corresponding to each resolution level, a plurality of timer queues corresponding to each resolution level may be created, that is, each resolution level may correspond to a plurality of timer queues, for example, as shown in fig. 2, which shows a schematic diagram of a plurality of timer queues corresponding to a resolution level of microsecond level provided in the embodiment of the present application, it should be noted that fig. 2 is an illustration taking 50 timer queues as an example, but not limited to include only 50 timer queues, and as shown in fig. 2, each timer queue corresponds to a queue parameter, where the queue parameter specifically includes a node linked list pointer (ss_slot_node), a reference time, and a spin lock (spin_lock).
After creating the plurality of timer queues corresponding to the resolution level, a TSC (Time Stamp Counter ) may be utilized to obtain the run length of the system from start-up to the time of completion of the queue creation (the time of completion of the queue creation referred to herein is the time corresponding to the system when the timer queue was created), wherein the run length of nanoseconds or better is obtained with the TSC. After acquiring the operation time length from starting to the completion time of the queue creation of the system, according to the acquired operation time length and the environment variables corresponding to the resolution levels, the value of the operation time length/the environment variable is used as the reference time of the first timer queue in the plurality of timer queues corresponding to the resolution levels, for example: for this resolution level of the microsecond level, the value obtained by the running duration of the system/rf_time=2000 may be used as the reference time (reference_time) of the first timer queue of the plurality of timer queues corresponding to the microsecond level.
Then, according to the frequency of the CPU, the thread scheduling period (typically 10 ms) and the environment variable rf_time corresponding to each resolution level, the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level may be correspondingly determined by using the number of timer queues corresponding to ((the frequency of the CPU/the number of thread scheduling periods included in one second)/the resolution level, for example: for a CPU frequency of 2GHz, an environment variable RF_TICK of 2000 (corresponding resolution level is microsecond level), a thread scheduling period of 10ms, and 50 timer queues corresponding to microsecond level, it is possible to use ((frequency of CPU/RF_TICK)/(number of thread scheduling periods contained in one second)) The number of timer queues corresponding to the resolution level= ((2×10) 9 /2000)/100)/50=200 microseconds.
After determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level, the reference time interval corresponding to the multiple is sequentially added on the basis of the reference time of the first timer queue corresponding to each resolution level, so as to correspondingly determine the reference time of the rest timer queues except for the first timer queue in the plurality of timer queues corresponding to each resolution level. For example, for the microsecond level, after determining the reference time and the reference time interval of the first timer queue, 200 times may be added to the reference time of the first timer queue to obtain the reference time of the second timer queue, and 200 times 2 times may be added to the reference time of the first timer queue to obtain the reference time … … of the third timer queue until the reference time of the last timer queue is determined.
On the basis of the above, the thread adds the timers with the corresponding resolutions into the corresponding timer queues according to the sequence of the trigger time from front to back, specifically, the trigger time of the timers with the resolution levels and the reference time of the timer queues corresponding to the resolution levels are determined by the corresponding thread, the timer belonging to the timers with the resolution levels in the corresponding timer queues is determined by the corresponding thread, the trigger time of the timers with the resolution levels is added into the belonging timer queues according to the sequence of the trigger time from front to back, so that the timers with the resolution levels are added into the corresponding timer queues, for example, for microsecond levels, if the trigger time of the timers with the microsecond levels is 900 microsecond of the system time, the reference time of the second timer queue in the plurality of timers with the microsecond levels is 800 microsecond (the time range of the second timer queue is 800-1000 microsecond), the timers with the trigger time of 900 microsecond of the system time can be determined to belong to the second timer in the corresponding plurality of timer queues, and the corresponding thread can be added into the corresponding queue according to the sequence if the trigger time of the second timer with the microsecond levels is required to be added into the corresponding queue according to the sequence.
By setting a plurality of timer queues and adding the timers into the timer queues according to the relation between the trigger time and the reference time of the timer queues, the management efficiency and the execution efficiency of the timers can be conveniently improved.
In addition, it should be noted that a mutual exclusion lock (lock) may be set in the timer queue, and when the corresponding thread is used to add the timers of the resolution levels to the corresponding timer queue in the order of the trigger time from front to back, the corresponding thread is added to the corresponding timer queue in the order of the trigger time from front to back only after acquiring the mutual exclusion lock of the timer queue.
The timer processing method provided by the embodiment of the application can further comprise the following steps:
if the temporary unsatisfied timers with the triggering time not in the time range managed by the corresponding multiple timer queues exist, storing the temporary unsatisfied timers in a temporary timer linked list according to the sequence of the triggering time from front to back;
judging whether a target timer with trigger time within a time range managed by a plurality of corresponding timer queues exists in the temporary timer linked list;
if yes, adding the target timer into the corresponding timer queue according to the triggering time of the target timer and the reference time of the corresponding timer queues.
In the application, when the corresponding thread is utilized to add the timers of each resolution level into the corresponding timer queues according to the triggering time of the timers of each resolution level and the reference time of each timer queue corresponding to each resolution level, and the corresponding thread finds that the timer with the triggering time which is not in the time range managed by the corresponding timer queues is temporarily unsatisfied (namely, the timer with the triggering time which is not in the time range managed by the corresponding timer queues) in the corresponding time range managed by the corresponding timer queues, wherein the time range managed by the corresponding timer queues is specifically determined according to the reference time and the time interval of the timer queues, the corresponding time range of the management of the plurality of timer queues is the reference time of the first queue to the thread scheduling period+the reference time of the first queue, that is, if there is a temporary unsatisfied timer whose trigger time does not fall within the corresponding time range of the corresponding plurality of timer queues, the temporary unsatisfied timer may be stored in the temporary timer linked list according to the sequence of the trigger time from front to back, and particularly, refer to fig. 3, which shows a schematic structural diagram of the temporary timer linked list provided by the embodiment of the present application, where, in order to improve the management convenience, each resolution level may correspond to one temporary timer linked list, so that the temporary unsatisfied timer storage of each resolution level may be distinguished, thereby facilitating the improvement of the subsequent judgment and addition efficiency.
The temporary unsatisfied timers are stored in the temporary timer linked list, so that the timers can be prevented from being lost, and the subsequent judgment and the addition based on the temporary timer linked list are convenient to perform, so that the judgment and the addition efficiency is improved.
On the basis of adding the temporary unsatisfied timer into the temporary timer linked list, executing the timing task corresponding to the timer reaching the triggering time, judging whether the target timer with the triggering time in the time range managed by the corresponding multiple timer queues exists in the temporary timer linked list in real time or at fixed time by utilizing the corresponding thread, if so, taking the target timer out of the temporary timer linked list by utilizing the corresponding thread and adding the target timer into the timer queue corresponding to the target timer according to the triggering time, the reference time of the corresponding timer queues and the corresponding reference time interval,
the mechanism for setting the temporary timer linked list, picking the temporary timer linked list from the temporary timer linked list when judging and meeting the temporary timer linked list and adding the temporary timer list into a proper timer queue has the advantages of not limiting the number of timers and not limiting the triggering time of the timers.
The timer processing method provided by the embodiment of the application can further comprise the following steps:
a first timer queue in a plurality of timer queues corresponding to each resolution level is correspondingly used as a current processing queue of each resolution level;
determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable may include:
comparing the ratio of the current running time of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the triggering time smaller than the ratio in the current processing queue as a timer for reaching the triggering time;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, taking the next timer queue in the timer queues corresponding to the resolution level corresponding to the environment variable as the current processing queue, and returning to execute the step of comparing the current running time of the system from the starting to the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable until a timer with the triggering time larger than the ratio exists in the current processing queue.
In the application, after a plurality of corresponding timer queues are created and the corresponding thread is utilized to add the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels, a first timer queue in the plurality of timer queues corresponding to the resolution levels can be correspondingly used as a current processing queue of the resolution levels, so that the subsequent determination can be directly started from the corresponding current processing queue when the thread is utilized to determine whether the trigger time of the timer of the resolution level is reached or not, thereby improving the management efficiency of the timers.
In addition, on the basis of taking the first timer queue in the plurality of timer queues corresponding to each resolution level as the current processing queue corresponding to each resolution level, the process of determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable may specifically be:
acquiring the current operation time length of the system from starting to the current time by using the TSC, and comparing the ratio of the current operation time length to an environment variable (specifically, the current operation time length/the environment variable) and the reference time of a current processing queue of a resolution level corresponding to the environment variable by using a corresponding thread;
If the ratio of the current running time length to the environment variable is smaller than the reference time of the current processing queue of the resolution level corresponding to the environment variable, the current time of the system is indicated to not reach the triggering time of the current processing queue, at this time, judgment and processing on whether the triggering time is reached to the timer in the current processing queue are not performed, and comparison of the ratio and the reference time of the next timer queue of the current processing queue is not performed any more, meanwhile, a thread can be utilized to check the corresponding temporary timer linked list so as to judge whether the triggering time exists in the temporary timer linked list within the time range managed by the corresponding multiple timer queues.
If the reference time of the current processing queue of the resolution level corresponding to the environment variable is smaller than the ratio of the current running time to the environment variable, but the time difference between the ratio of the current running time to the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable is smaller than the reference time interval corresponding to the resolution level corresponding to the environment variable, the timer in the current processing queue is indicated to be processed, at this time, after the mutual exclusion lock of the current processing queue is obtained, the timer on the current processing queue is extracted according to the arrangement sequence of the timer in the current processing queue, the trigger time of the extracted timer is compared with the ratio of the current running time to the environment variable, and the timer reaching the trigger time is determined to be the timer reaching the trigger time if the trigger time is smaller, and the timer corresponding to the trigger time is executed; for timers whose trigger times are greater than the ratio of the current run length to the environmental variable, this indicates that the current time of the system has not reached the trigger times of these timers, and therefore these timers may not be processed. In this case, only timers whose triggering times are smaller than the ratio of the current operating time to the environment variable can be extracted when the timer extraction is performed.
If the reference time of the current processing queue of the resolution level corresponding to the environment variable is smaller than the ratio of the current running time to the environment variable, and the time difference between the ratio of the current running time to the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable is greater than or equal to the corresponding reference time interval, the reference time of the current processing queue can be updated by using the reference time=reference time+the reference time interval corresponding to the timer queue of the number of the timer queues according to the number of the timer queues corresponding to the resolution level corresponding to the environment variable, and the next timer queue of the timer queues corresponding to the current running time is used as the current processing queue, namely, the current processing queue is pointed to the next timer queue of the timer queues corresponding to the current processing queue, and the step of comparing the current running time of the system from the starting to the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable is performed until the current processing time is greater than the current running time, namely, the trigger time does not exist in the current processing queue until the ratio of the current running time to the environment variable is reached. After the thread executes the timer reaching the trigger time, the step of judging whether the target timer with the trigger time within the time range managed by the corresponding multiple timer queues exists in the temporary linked list of the timer can be returned to be executed, so that the target timer can be found out in time and added into the corresponding timer queues in time.
The process of setting the current processing queue and performing corresponding comparison can be convenient for improving the determining efficiency of the timer reaching the trigger time, and all the timer queues do not need to be processed, so that the determining efficiency of the timer reaching the trigger time can be further improved.
The embodiment of the application also provides a timer processing device, referring to fig. 4, which shows a schematic structural diagram of the timer processing device provided by the embodiment of the application, and may include:
a setting module 41, configured to obtain an environment variable set according to a requirement of the system for the resolution of the timer, and set a resolution level of the timer according to the environment variable and the frequency of the CPU;
a selecting module 42, configured to select a timer corresponding to each timing task from the timers of each resolution level, and set a trigger time of the corresponding timer according to each timing task;
the execution module 43 is configured to determine whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, and if so, execute the timing task corresponding to the timer reaching the trigger time.
The timer processing device provided by the embodiment of the application may further include:
The creating module is used for creating a timer queue and a thread corresponding to each resolution level after setting the triggering time of the corresponding timer according to each timing task;
and the adding module is used for adding the timers with the corresponding resolution levels into the corresponding timer queues by using the threads according to the sequence of the trigger time from front to back.
The timer processing device provided by the embodiment of the application may further include:
and the binding module is used for binding each thread with different cores of the CPU if the number of the cores of the CPU is larger than that of the threads after the threads corresponding to each resolution level are created.
The timer processing device provided by the embodiment of the application, the creation module may include:
a creation unit for creating a plurality of timer queues corresponding to the resolution levels, respectively;
the first determining unit is used for correspondingly determining the reference time of a first timer queue in the plurality of timer queues corresponding to each resolution level according to the operation time from the starting of the system to the completion of the creation of the queue and the environment variable corresponding to each resolution level;
the second determining unit is used for correspondingly determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the corresponding plurality of timer queues according to the reference time interval;
The joining module may include:
the first adding unit is used for adding the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels by using the corresponding threads in the sequence from front to back.
The timer processing device provided by the embodiment of the application, the adding module may further include:
the storage unit is used for storing the temporary unsatisfied timers in the temporary timer linked list according to the sequence of the trigger time from front to back if the temporary unsatisfied timers exist in the time range that the trigger time is not managed by the corresponding timer queues;
the judging unit is used for judging whether a target timer with the triggering time in the time range managed by the corresponding multiple timer queues exists in the temporary timer linked list;
and the second adding unit is used for adding the target timer into the corresponding timer queue according to the triggering time of the target timer and the reference time of the corresponding timer queues if the target timer with the triggering time within the time range managed by the corresponding timer queues exists in the temporary timer linked list.
The timer processing device provided by the embodiment of the present application, the creation module may further include:
a unit, configured to correspond a first timer queue in a plurality of timer queues corresponding to each resolution level to be a current processing queue of each resolution level;
the execution module 43 may include:
the comparison unit is used for comparing the ratio of the current running time length of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
a third determining unit, configured to determine, as a timer for reaching the trigger time, a timer for which the trigger time in the current processing queue is smaller than the ratio if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval;
and the updating unit is used for updating the reference time of the current processing queue according to the number of the timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, taking the next timer queue in the plurality of timer queues corresponding to the resolution level corresponding to the environment variable as the current processing queue, and returning to execute the step of comparing the current running time of the system from the starting to the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable until the timer with the triggering time larger than the ratio exists in the current processing queue.
The embodiment of the application also provides a timer processing device, referring to fig. 5, which shows a schematic structural diagram of the timer processing device provided by the embodiment of the application, and may include:
a memory 51 for storing a computer program;
the processor 52, when executing the computer program stored in the memory 51, may implement the following steps:
acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU; selecting timers corresponding to each timing task from the timers of each resolution level, and setting the triggering time of the corresponding timers according to each timing task; and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
The embodiment of the application also provides a readable storage medium, which is characterized in that the readable storage medium is stored with a computer program, and the computer program can realize the following steps when being executed by a processor:
acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU; selecting timers corresponding to each timing task from the timers of each resolution level, and setting the triggering time of the corresponding timers according to each timing task; and determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time.
The readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is inherent to. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A timer processing method, comprising:
acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
selecting a timer corresponding to each timing task from the timers of the resolution level, and setting the triggering time of the corresponding timer according to each timing task;
determining whether the current time of the system reaches the triggering time of a timer corresponding to the environment variable according to the environment variable, if so, executing a timing task corresponding to the timer reaching the triggering time;
After setting the triggering time of the corresponding timer according to each timing task, the method further comprises the following steps:
creating a timer queue and a thread corresponding to each resolution level;
adding timers with corresponding resolution levels into corresponding timer queues by using the threads according to the sequence of trigger time from front to back;
creating a timer queue corresponding to each resolution level, comprising:
creating a plurality of timer queues corresponding to the resolution levels respectively;
according to the running time from starting to the time of completing the creation of the queue of the system and the environment variable corresponding to each resolution level, correspondingly determining the reference time of the first timer queue in the plurality of timer queues corresponding to each resolution level;
according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, correspondingly determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the corresponding plurality of timer queues according to the reference time interval;
adding the timers with the corresponding resolutions into the corresponding timer queues according to the sequence of the trigger time from front to back by using the threads, wherein the method comprises the following steps:
And adding the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels by utilizing the corresponding threads in the sequence from front to back.
2. The timer processing method according to claim 1, further comprising, after creating the thread corresponding to each resolution level:
if the number of the cores of the CPU is larger than the number of the threads, binding each thread with different cores of the CPU.
3. The timer processing method according to claim 1, characterized by further comprising:
if the temporary unsatisfied timers with the triggering time not in the time range managed by the corresponding multiple timer queues exist, storing the temporary unsatisfied timers in a temporary timer linked list according to the sequence of the triggering time from front to back;
judging whether a target timer with triggering time within a time range managed by a plurality of corresponding timer queues exists in the temporary timer linked list;
if yes, adding the target timer into the corresponding timer queue according to the triggering time of the target timer and the reference time of the corresponding timer queues.
4. A timer processing method according to claim 3, further comprising:
a first timer queue in a plurality of timer queues corresponding to each resolution level is correspondingly used as a current processing queue of each resolution level;
determining whether the current time of the system reaches the triggering time of a timer corresponding to the environment variable according to the environment variable comprises the following steps:
comparing the ratio of the current running time of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the triggering time smaller than the ratio in the current processing queue as a timer for reaching the triggering time;
and if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, taking the next timer queue in a plurality of timer queues corresponding to the resolution level corresponding to the environment variable as the current processing queue, and returning to the step of executing the comparison of the current running time of the system from the starting to the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable until a timer with the triggering time larger than the ratio exists in the current processing queue.
5. A timer processing apparatus, comprising:
the setting module is used for acquiring an environment variable set according to the requirement of the system on the resolution of the timer and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
the selecting module is used for selecting the timer corresponding to each timing task from the timers of the resolution level, and setting the triggering time of the corresponding timer according to each timing task;
the execution module is used for determining whether the current time of the system reaches the triggering time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the triggering time;
further comprises:
the creating module is used for creating a timer queue and a thread corresponding to each resolution level after setting the triggering time of the corresponding timer according to each timing task;
the adding module is used for adding the timers with the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by using the threads;
the creation module comprises:
a creation unit for creating a plurality of timer queues corresponding to the resolution levels, respectively;
The first determining unit is used for correspondingly determining the reference time of a first timer queue in the plurality of timer queues corresponding to each resolution level according to the operation time from the starting of the system to the completion of the creation of the queue and the environment variable corresponding to each resolution level;
the second determining unit is used for correspondingly determining the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the corresponding plurality of timer queues according to the reference time interval;
the joining module includes:
the first adding unit is used for adding the timers of the resolution levels into the corresponding timer queues according to the trigger time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels by using the corresponding threads in the sequence from front to back.
6. A timer processing apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the timer processing method according to any one of claims 1 to 4 when executing said computer program.
7. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the timer processing method according to any of claims 1 to 4.
CN202110987948.0A 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium Active CN113742042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110987948.0A CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110987948.0A CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113742042A CN113742042A (en) 2021-12-03
CN113742042B true CN113742042B (en) 2023-08-25

Family

ID=78732978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110987948.0A Active CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113742042B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474241A (en) * 2002-08-07 2004-02-11 华为技术有限公司 Dispatching method for massive timer
CN1479556A (en) * 2002-07-16 2004-03-03 雅马哈株式会社 Equipment and method for recording/reconstruction operating information related to video-frequency or music
CN105700961A (en) * 2016-02-29 2016-06-22 华为技术有限公司 Business container creation method and device
CN112650566A (en) * 2020-12-21 2021-04-13 曙光信息产业股份有限公司 Timed task processing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1479556A (en) * 2002-07-16 2004-03-03 雅马哈株式会社 Equipment and method for recording/reconstruction operating information related to video-frequency or music
CN1474241A (en) * 2002-08-07 2004-02-11 华为技术有限公司 Dispatching method for massive timer
CN105700961A (en) * 2016-02-29 2016-06-22 华为技术有限公司 Business container creation method and device
CN112650566A (en) * 2020-12-21 2021-04-13 曙光信息产业股份有限公司 Timed task processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113742042A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
US20180275987A1 (en) Optimization of a software image layer stack
US20220100561A1 (en) Timer-based task processing method and apparatus and electronic device
CN112099800B (en) Code data processing method, device and server
EP3396542A1 (en) Database operating method and device
CN108491122A (en) A kind of click event response method, computer readable storage medium and terminal device
CN113742042B (en) Timer processing method, device, equipment and readable storage medium
CN114064439B (en) Method, device, equipment and medium for predicting running time of micro-service workflow
CN106874343B (en) Data deletion method and system for time sequence database
CN110688206A (en) Timing task scheduling method and device, computer equipment and storage medium
Alistarh et al. How to allocate tasks asynchronously
CN111679895A (en) Execution method, device and equipment of distributed timing task and readable storage medium
CN109101259B (en) Updating method and device of OSDMap cache container and terminal
CN103823711A (en) Method and device for providing relative timing in Java virtual machine
CN114327259B (en) Flash memory channel controller operation method, device, equipment and storage medium
CN113672458B (en) Application program monitoring method, electronic equipment and storage medium
CN110753090A (en) Task execution method and device of server cluster, computer equipment and storage medium
CN111026526B (en) Timer configuration method and device for program, storage medium and terminal equipment
CN113905014A (en) Method, server and storage medium for assigning ID number to terminal device
CN113110991A (en) Page element positioning method and device, storage medium and electronic device
CN112068810A (en) Activity event processing method and device, electronic equipment and storage medium
CN112100273A (en) Cluster data expansion method and storage medium
CN112037017A (en) Method, device and equipment for determining batch processing job evaluation result
CN112988881A (en) Data synchronization method and device and computer readable storage medium
CN114356517B (en) Method, system, electronic equipment and storage medium for managing serial bus resources
CN111930475B (en) Method and device for starting ETT operation

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