Business processing method and device, electronic equipment and readable storage medium
By dividing it into the first working stage and the second working stage in the serviced RAN, and handling different types of services respectively, the problem of low resource utilization in the existing technology is solved, and more efficient CPU resource utilization and system performance improvement is achieved.
Patent Information
- Application Number
- CN202411681160.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, when serving RAN processes real-time messages, the resource utilization rate is low, resulting in the CPU being unable to use it to run other services, affecting system performance.
By determining the working stage at the current time, it is divided into the first working stage and the second working stage, and the services that meet specific conditions are processed respectively. The first working stage is used to process the first service with small execution delay requirements, and the second working stage is used to process the second service with long processing time.
By processing different types of services in time segments, we ensure that all types of services are executed in a timely manner, reduce waiting time, improve resource utilization, and reduce CPU load.
Smart Images

Figure CN119854869A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a service processing method, device, electronic device and readable storage medium. Background Art
[0002] In the current wireless communication field, the development of Radio Access Network (RAN) is crucial. For RAN business scenarios, there are some messages with extremely high real-time requirements (such as Transmission Time Interval (TTI) messages). If they are not processed in time, it will not only affect the user experience, but also may cause serious problems such as communication interruption and data loss.
[0003] However, service-oriented RAN is deployed on a general cloud platform. To reduce the message processing latency, a software thread is usually created and a dedicated central processing unit (CPU) core is allocated to the thread. The software thread continuously polls for messages (reading queues, etc.). Once a message arrives, it can be processed immediately. However, a dedicated CPU core is allocated to poll in real time to see if there are any real-time messages to be processed. The CPU cannot be used to run other services, resulting in low resource utilization. Summary of the invention
[0004] The purpose of this application is to provide a business processing method, device, electronic device and readable storage medium, which solve the problem of low resource utilization caused by existing business processing methods.
[0005] To achieve the above object, an embodiment of the present application provides a service processing method, including:
[0006] Determine the working stage at the current time, the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: the execution delay is less than a first value; the second condition includes: the processing time is less than a second value;
[0007] According to the working stage, a business processing operation corresponding to the working stage is executed.
[0008] Optionally, performing a business processing operation corresponding to the working stage according to the working stage includes:
[0009] If the working stage is the first working stage, polling the first service that meets the first condition in real time;
[0010] When the arrival of the first service is detected, the first service is processed.
[0011] Optionally, the method further includes:
[0012] During the processing of the first service, a time corresponding to the next first working phase is determined.
[0013] Optionally, during the processing of the first service, determining a time corresponding to a next first working stage includes:
[0014] During the processing of the first service, the time corresponding to the next first working phase is determined according to the expected arrival time of the first task, the arrival time deviation, the system scheduling delay and the processing time of the second service.
[0015] Optionally, the method further includes:
[0016] If the working phase is the second working phase, detecting a second service that meets a second condition;
[0017] If the second service is detected, the second service is processed; if the second service is not detected, the sleep phase is entered.
[0018] Optionally, in the case of entering the dormant stage, the method further includes:
[0019] When the duration corresponding to the sleep stage is reached, exit the sleep stage and determine the working stage at the current time;
[0020] or,
[0021] During the sleep process, if a system wake-up message is received, the sleep phase is exited and the working phase at the current time is determined.
[0022] Optionally, determining the working stage at the current time includes:
[0023] Acquire a first time, where the first time meets a preset accuracy requirement;
[0024] Convert the first time to obtain the current time;
[0025] The working phase at the current time is determined.
[0026] Optionally, before determining the working stage at the current time, the method further includes:
[0027] Creating a software thread, wherein the software thread is a dedicated software thread for the first service and the second service;
[0028] Setting the scheduling mode of the software thread to a first-in first-out queue (FIFO), and setting the priority of the software thread to the highest priority;
[0029] A central processing unit CPU is allocated to the software thread, and the CPU and the software thread have a one-to-one correspondence.
[0030] To achieve the above object, an embodiment of the present application provides a service processing device, including:
[0031] A first determination module is used to determine the working stage at the current time, and the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: an execution delay is less than a first value; the second condition includes: a processing duration is less than a second value;
[0032] The first processing module is used to execute a business processing operation corresponding to the working stage according to the working stage.
[0033] To achieve the above-mentioned purpose, an embodiment of the present application provides an electronic device, including a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the steps of the above-mentioned business processing method are implemented.
[0034] To achieve the above-mentioned purpose, an embodiment of the present application provides a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the above-mentioned business processing method are implemented.
[0035] To achieve the above-mentioned purpose, an embodiment of the present application provides a computer program product on which a program or instruction is stored, including computer instructions, which implement the steps of the above-mentioned business processing method when executed by a processor.
[0036] The beneficial effects of the above technical solution of the present application are as follows:
[0037] In the embodiment of the present application, services with different latency requirements and processing time requirements are classified, and different services are processed in different working stages. In the first working stage, the first service with a smaller execution latency is processed, and in the second working stage, the second service with a longer execution time is processed. By processing different types of services in different time periods, it is possible to ensure that various types of services are executed in a timely manner and reduce waiting time. By processing in different time periods, it is possible to ensure maximum utilization of CPU processing resources, improve resource utilization, and reduce CPU load. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is one of the flowcharts of the business processing method of an embodiment of the present application;
[0039] Figure 2 A schematic diagram of a time period corresponding to the next first working stage of an embodiment of the present application;
[0040] Figure 3 This is a second flowchart of the business processing method of an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the structure of a service processing device according to an embodiment of the present application;
[0042] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0044] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0045] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0046] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0047] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0048] like Figure 1 As shown, the embodiment of the present application provides a service processing method, including:
[0049] Step 11: determine the working stage at the current time, wherein the working stage includes: a first working stage for processing a first service that meets a first condition; a second working stage for processing a second service that meets a second condition; the first condition includes: an execution delay that is less than a first value; the second condition includes: a processing duration that is less than a second value;
[0050] Step 12: According to the working stage, execute the business processing operation corresponding to the working stage.
[0051] In this embodiment, for the service-oriented RAN service scenario, services are classified according to the real-time requirements of service processing and the size of service granularity: the first service is a service that requires an execution delay less than a first value. This type of service has a high real-time requirement. The messages of this type of service are expected to be executed immediately. The shorter the delay, the better. The requirement may be at the microsecond level. In the wireless RAN service scenario, the arrival timing of this type of message is predictable, such as TTI messages, which are sent periodically, and the shortest period is microseconds.
[0052] The second service is a service with a shorter processing time, that is, a small-granularity service. This type of service requires less CPU time (for example, less than 10 microseconds) to complete the processing of a service unit. In the wireless RAN service scenario, most user-side messages belong to this type of service, such as the processing of service messages.
[0053] Other services other than the first and second services can become third services. Such services are services with a long processing time, i.e., large-granularity services. Such services require more CPU time (e.g., tens of microseconds or more) to complete the processing of a service unit. For a service thread, once such services are processed, it means that other transactions or messages cannot be processed for a long period of time. Therefore, such services cannot be processed in the same thread as service messages with high real-time requirements.
[0054] It should be noted that the specific values of the first value and the second value can be set according to the business scenario and business needs. For example, a business with a latency requirement less than A is considered to be a business with high real-time requirements; a business with a processing time less than B is considered to be a small-granularity business.
[0055] The present application embodiment only considers the processing of the first service and the second service, and these two types of services are processed in different working stages. The scheduling system can determine the working stage at the current time, so as to determine which type of service to execute related processing.
[0056] In the embodiment of the present application, services with different latency requirements and processing time requirements are classified, and different services are processed in different working stages. In the first working stage, the first service with a smaller execution latency is processed, and in the second working stage, the second service with a longer execution time is processed. By processing different types of services in different time periods, it is possible to ensure that various types of services are executed in a timely manner and reduce waiting time. By processing in different time periods, it is possible to ensure maximum utilization of CPU processing resources, improve resource utilization, and reduce CPU load.
[0057] As an optional embodiment, before determining the working stage at the current time, the method further includes:
[0058] Creating a software thread, wherein the software thread is a dedicated software thread for the first service and the second service;
[0059] Setting the scheduling mode of the software thread to a first-in first-out queue (FIFO), and setting the priority of the software thread to the highest priority;
[0060] A central processing unit CPU is allocated to the software thread, and the CPU and the software thread have a one-to-one correspondence.
[0061] In this embodiment, the real-time scheduling function of the cloud platform operating system (OS) can be configured and enabled. When the OS is scheduled in real time and CPU resources are sufficient, the scheduling delay can be reduced to a granularity of 10 to 20 microseconds, which is relatively small.
[0062] Create a software thread, set the FIFO scheduling mode and high priority for it, allocate a dedicated CPU core for it, and set the affinity between the thread and the CPU core. This measure ensures that the thread can continue to monopolize the CPU when needed, and the CPU will not be preempted. Even if the thread actively releases the CPU, it can still be quickly scheduled when it is ready to be scheduled. Run the intelligent scheduling function on the created software thread, and dynamically schedule the execution of the first business or the execution of the second business as needed.
[0063] As an optional embodiment, performing a service processing operation corresponding to the working stage according to the working stage includes:
[0064] If the working stage is the first working stage, the first service that meets the first condition is polled in real time; when the arrival of the first service is detected, the first service is processed.
[0065] In this embodiment, the intelligent scheduling process may include two working stages. In the first working stage, the created software task thread continuously polls and reads the high real-time task queue. Once a new task / message arrives, it is processed immediately with almost zero delay.
[0066] Optionally, the method further includes: during the processing of the first business, determining a time corresponding to a next first working phase.
[0067] In this embodiment, since the first working stage and the second working stage are switched with each other, when the first task is processed, the expected arrival time of the next first task / message is set. The scheduling platform calculates the time period of the next first working stage by predetermining the expected arrival time of the next first task with a smaller delay requirement.
[0068] Optionally, during the processing of the first service, determining a time corresponding to a next first working stage includes:
[0069] During the processing of the first service, the time corresponding to the next first working phase is determined according to the expected arrival time of the first task, the arrival time deviation, the system scheduling delay and the processing time of the second service.
[0070] In this embodiment, the scheduling platform can determine the time period of the next first working stage according to the expected arrival time of the next first task, the arrival time deviation (such as jitter), the scheduling delay of the scheduling system, the execution time of the second task after the first task, etc. Then, the time period between the current first working stage and the next first working stage is the second working stage, which is used to process the second task with small granularity.
[0071] As an optional embodiment, the method further includes:
[0072] If the working phase is the second working phase, detecting a second service that meets a second condition;
[0073] If the second service is detected, the second service is processed; if the second service is not detected, the sleep phase is entered.
[0074] In this embodiment, if it is determined that the current time is in the second working stage, that is, a small-granularity second task needs to be processed, the scheduling platform detects the second task. If the second task is obtained, the corresponding processing is performed. If the second task is not detected, the sleep stage can be entered. At this time, the CPU resources are released and the CPU load is reduced.
[0075] Optionally, in the case of entering the dormant stage, the method further includes:
[0076] When the duration corresponding to the sleep stage is reached, exit the sleep stage and determine the working stage at the current time;
[0077] or,
[0078] During the sleep process, if a system wake-up message is received, the sleep phase is exited and the working phase at the current time is determined.
[0079] In this embodiment, the sleep stage can be set to a fixed duration, which is relatively short, for example, shorter than the processing duration of the second task, and the sleep stage is exited when the fixed duration of the sleep stage is reached, and the current working stage is continuously determined, and then corresponding operations are performed based on the working stage. Alternatively, the duration of the sleep stage is not set, and after entering the sleep stage, until a trigger wake-up message sent by the system is received, the sleep stage is exited and the current working stage is determined, and then corresponding operations are performed based on the working stage.
[0080] As an optional embodiment, determining the working stage at the current time includes:
[0081] Acquire a first time, where the first time meets a preset accuracy requirement;
[0082] Convert the first time to obtain the current time;
[0083] The working phase at the current time is determined.
[0084] In this embodiment, when judging the current working stage, a high-precision timer is required. The first time may be a time that meets the preset accuracy requirement, such as an accuracy greater than a threshold, so as to ensure that the high-precision time is obtained. The first time is obtained, for example: obtaining an independently timed CPU clock counter, or obtaining other hardware clock counts. If the function or system call provided by the OS for obtaining time is used, although it seems that the obtained time information supports nanoseconds or microseconds, since these time information are periodically updated by the OS in the background, their true accuracy will be affected by the update cycle, and the accuracy is not enough to meet the current needs. For example, by obtaining an independently timed CPU clock counter, the number of CPU clock cycles can be read. Since the processing time of the CPU is continuously updated in real time by itself, the number of CPU clock cycles read is the accurate time. After conversion, a relative time close to nanosecond accuracy can be obtained, which will not be affected by system updates, and the working stage determined by this time is more accurate.
[0085] The following example illustrates the implementation process of the business processing method of this application.
[0086] Before service processing, services are classified. For RAN service scenarios, services are classified according to the real-time requirements of service processing and the size of service granularity. They can be divided into the following categories:
[0087] First service: High real-time service refers to services with extremely high real-time requirements. Such service messages are expected to be executed immediately, and the shorter the delay, the better, requiring microseconds. In wireless RAN service scenarios, the timing of arrival of such service messages is predictable.
[0088] Second service: small-granularity service, which means that the service granularity is relatively small, and the CPU time required to complete the processing of a service unit is relatively small (for example, <10 microseconds). In the wireless RAN service scenario, most user-side messages belong to this category, such as service messages.
[0089] The third business is a large-granularity business, which means that the business has a large granularity and requires a lot of CPU time (tens of microseconds or more) to complete the processing of a business unit. For a business thread, once it starts processing this type of business, it means that it cannot process other transactions or messages for a long period of time. Therefore, this type of business cannot be processed in the same thread as messages with high real-time requirements.
[0090] The embodiment of the present application only considers the processing of the first service and the second service.
[0091] First, configure and enable the real-time scheduling function of the cloud platform OS.
[0092] Create a software thread, set the FIFO scheduling mode and high priority for it, assign it a dedicated CPU core, and set the affinity between the thread and the CPU core. This measure ensures that the thread can continue to monopolize the CPU when needed and will not be preempted. Even if the thread actively releases the CPU, it can still be quickly scheduled when it is ready to wait for scheduling.
[0093] On the software thread, an intelligent scheduling function is run to dynamically schedule the execution of the first service or the second service as needed.
[0094] The intelligent scheduling process has two working phases during operation:
[0095] The first working stage is the high real-time working stage. In this stage, the software thread continuously polls and reads the task queue with high real-time requirements. Once a new task / message arrives, it is processed immediately with almost zero delay.
[0096] The second working stage is the quasi-real-time working stage, in which software threads can be used to process some small-granularity services with relatively low real-time requirements. When there are no tasks to be processed, the CPU can be released for a short time to reduce the CPU load.
[0097] The first working stage and the second working stage will switch with each other. When the first task (or message) with high real-time requirements is processed, the expected arrival time of the next first task (or message) is set. The scheduling platform calculates the time period information of the subsequent high real-time working stage (i.e., the next first working stage) based on the expected arrival time of the next first business, the thread scheduling delay, and the processing time of the second business. When in the time period of the first working stage, the scheduling thread works according to the strategy of the first working stage, focusing on polling and processing the first task with high real-time requirements. After leaving the time period of the first working stage, enter the second working stage and process the second business according to the strategy of the second working stage. After completing each task / message processing, or each active sleep wakeup, the scheduling platform determines which working stage it is in based on the current time.
[0098] like Figure 2 As shown, the scheduling platform determines that the next first task (or message) is expected to arrive after time T (for example, 125 microseconds), and the arrival time deviation (jitter) is ±Δt. The scheduling platform takes the larger of the OS scheduling delay and the execution time of the second service to obtain the scheduling delay t_sch of the platform. The scheduling platform performs comprehensive calculations and obtains the time period of the next first working stage as [T-Δt-t_sch, T+Δt]. The duration of this time period is t_sch+2Δt.
[0099] The process of executing business processing on the dispatching platform is as follows Figure 3 As shown, including:
[0100] Step 31: Classify the services and schedule them in different time periods and queues.
[0101] Step 32: Determine the current working stage.
[0102] When judging the current working stage, a high-precision timer is required. For example, the relative time with an accuracy close to nanoseconds can be obtained by reading the number of CPU clock cycles and then converting it.
[0103] Step 33: If the current phase is the first working phase, the first service queue is polled to detect whether the first service has arrived.
[0104] Step 34: If the arrival of the first service is detected, the first service is processed; if the arrival of the first service is not detected, the first service is re-detected.
[0105] Step 35: When the first service is being processed (it may be when the first service is being processed or when the first service is being processed), the expected arrival time of the next first service may be determined, thereby determining the next first working stage.
[0106] Step 36: If the second working phase is currently in progress, then detect whether a second service has arrived.
[0107] Step 37: If the second service is detected, the second service is processed; if the second service is not detected, a short sleep phase can be performed. When the sleep phase ends or the system wakes up, the working phase is determined based on the current time.
[0108] In this embodiment, an innovative service scheduling solution is adopted for the service-oriented RAN service, which supports the real-time processing of high-real-time messages on the general cloud platform with less CPU resources. Messages with extremely high real-time requirements (such as the first service) are processed with lower CPU resource overhead, reducing the CPU load. The CPU core can also be used to process messages with general real-time requirements (such as the second service), improving resource utilization and system performance.
[0109] In the embodiment of the present application, services with different latency requirements and processing time requirements are classified, and different services are processed in different working stages. In the first working stage, the first service with a smaller execution latency is processed, and in the second working stage, the second service with a longer execution time is processed. By processing different types of services in different time periods, it is possible to ensure that various types of services are executed in a timely manner and reduce waiting time. By processing in different time periods, it is possible to ensure maximum utilization of CPU processing resources, improve resource utilization, and reduce CPU load.
[0110] like Figure 4 As shown, the embodiment of the present application further provides a service processing device 400, including:
[0111] The first determination module 410 is used to determine the working stage at the current time, and the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: the execution delay is less than a first value; the second condition includes: the processing time is less than a second value;
[0112] The first processing module 420 is used to perform a business processing operation corresponding to the working stage according to the working stage.
[0113] Optionally, the first processing module is specifically used to:
[0114] If the working stage is the first working stage, polling the first service that meets the first condition in real time;
[0115] When the arrival of the first service is detected, the first service is processed.
[0116] Optionally, the device further comprises:
[0117] The second determining module is used to determine the time corresponding to the next first working stage during the processing of the first business.
[0118] Optionally, the second determining module is specifically configured to:
[0119] During the processing of the first service, the time corresponding to the next first working phase is determined according to the expected arrival time of the first task, the arrival time deviation, the system scheduling delay and the processing time of the second service.
[0120] Optionally, the device further comprises:
[0121] A first detection module, configured to detect a second service that meets a second condition if the working phase is a second working phase;
[0122] The second processing module is configured to process the second service if the second service is detected; and enter a dormant phase if the second service is not detected.
[0123] Optionally, the device further includes: a second detection module, specifically configured to:
[0124] When the duration corresponding to the sleep stage is reached, the system exits the sleep stage and determines the working stage at the current time;
[0125] or,
[0126] During the sleep process, if a system wake-up message is received, the sleep phase is exited and the working phase at the current time is determined.
[0127] Optionally, the first determining module is specifically configured to:
[0128] Acquire a first time, where the first time meets a preset accuracy requirement;
[0129] Convert the first time to obtain the current time;
[0130] The working phase at the current time is determined.
[0131] Optionally, the device further comprises:
[0132] A creation module, used for creating a software thread, wherein the software thread is a dedicated software thread for the first service and the second service;
[0133] A setting module, used to set the scheduling mode of the software thread to a first-in first-out queue FIFO, and set the priority of the software thread to the highest priority;
[0134] The allocation module is used to allocate a central processing unit CPU to the software thread, and the CPU and the software thread have a one-to-one correspondence.
[0135] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned business processing method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0136] like Figure 5 As shown, an electronic device of an embodiment of the present application includes a transceiver 510, a processor 500, a memory 520, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the steps of the above-mentioned video communication method are implemented, and the transceiver 510 is used to receive and send data under the control of the processor 500.
[0137] The processor 500 is used for:
[0138] Determine the working stage at the current time, the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: the execution delay is less than a first value; the second condition includes: the processing time is less than a second value;
[0139] According to the working stage, a business processing operation corresponding to the working stage is executed.
[0140] Optionally, the processor performs, according to the working stage, a service processing operation corresponding to the working stage, including:
[0141] If the working stage is the first working stage, polling the first service that meets the first condition in real time;
[0142] When the arrival of the first service is detected, the first service is processed.
[0143] Optionally, the processor is further configured to:
[0144] During the processing of the first service, a time corresponding to the next first working phase is determined.
[0145] Optionally, the processor determines, during the processing of the first service, a time corresponding to a next first working stage, including:
[0146] During the processing of the first service, the time corresponding to the next first working phase is determined according to the expected arrival time of the first task, the arrival time deviation, the system scheduling delay and the processing time of the second service.
[0147] Optionally, the processor is further configured to:
[0148] If the working phase is the second working phase, detecting a second service that meets a second condition;
[0149] If the second service is detected, the second service is processed; if the second service is not detected, the sleep phase is entered.
[0150] Optionally, the processor is further configured to:
[0151] When the duration corresponding to the sleep stage is reached, exit the sleep stage and determine the working stage at the current time;
[0152] or,
[0153] During the sleep process, if a system wake-up message is received, the sleep phase is exited and the working phase at the current time is determined.
[0154] Optionally, the processor determines the working stage at the current time, including:
[0155] Acquire a first time, where the first time meets a preset accuracy requirement;
[0156] Convert the first time to obtain the current time;
[0157] The working phase at the current time is determined.
[0158] Optionally, the processor is further configured to:
[0159] Creating a software thread, wherein the software thread is a dedicated software thread for the first service and the second service;
[0160] Setting the scheduling mode of the software thread to a first-in first-out queue (FIFO), and setting the priority of the software thread to the highest priority;
[0161] A central processing unit CPU is allocated to the software thread, and the CPU and the software thread have a one-to-one correspondence.
[0162] Among them, Figure 5In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 500 and memory represented by memory 520. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 510 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 when performing operations.
[0163] A readable storage medium in an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the business processing method described above are implemented and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0164] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0165] An embodiment of the present application also provides a computer program product on which programs or instructions are stored, including computer instructions. When the computer instructions are executed by a processor, the steps in the business processing method described above are implemented and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0166] It should be further explained that the terminal devices described in this specification include but are not limited to smart phones, tablet computers, etc., and many of the functional components described are called modules in order to more particularly emphasize the independence of their implementation methods.
[0167] In the embodiment of the present application, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0168] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0169] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0170] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present application. Therefore, the present application should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present application will be perfect and complete, and the scope of the present application will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "comprising" and / or "including" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0171] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A business processing method, characterized in that: include: Determine the working stage at the current time, the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: the execution delay is less than a first value; the second condition includes: the processing time is less than a second value; According to the working stage, a business processing operation corresponding to the working stage is executed.
2. The method according to claim 1, characterized in that The performing of the business processing operation corresponding to the working stage according to the working stage includes: If the working stage is the first working stage, polling the first service that meets the first condition in real time; When the arrival of the first service is detected, the first service is processed.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: During the processing of the first service, a time corresponding to the next first working phase is determined.
4. The method according to claim 3, characterized in that The step of determining a time corresponding to a next first working phase during the processing of the first service includes: During the processing of the first service, the time corresponding to the next first working phase is determined according to the expected arrival time of the first task, the arrival time deviation, the system scheduling delay and the processing time of the second service.
5. The method according to claim 1, characterized in that The method further comprises: If the working phase is the second working phase, detecting a second service that meets a second condition; If the second service is detected, the second service is processed; if the second service is not detected, the sleep phase is entered.
6. The method according to claim 5, characterized in that In the case of entering the dormant stage, the method further comprises: When the duration corresponding to the sleep stage is reached, exit the sleep stage and determine the working stage at the current time; or, During the sleep process, if a system wake-up message is received, the sleep phase is exited and the working phase at the current time is determined.
7. The method according to claim 1, characterized in that Determining the working stage at the current time includes: Acquire a first time, where the first time meets a preset accuracy requirement; Convert the first time to obtain the current time; The working phase at the current time is determined.
8. The method according to claim 1, characterized in that Before determining the working stage at the current time, the method further includes: Creating a software thread, wherein the software thread is a dedicated software thread for the first service and the second service; Setting the scheduling mode of the software thread to a first-in first-out queue (FIFO), and setting the priority of the software thread to the highest priority; A central processing unit CPU is allocated to the software thread, and the CPU and the software thread have a one-to-one correspondence.
9. A service processing device, characterized in that: include: A first determination module is used to determine the working stage at the current time, and the working stage includes: a first working stage for processing a first business that meets a first condition; a second working stage for processing a second business that meets a second condition; the first condition includes: an execution delay is less than a first value; the second condition includes: a processing duration is less than a second value; The first processing module is used to execute a business processing operation corresponding to the working stage according to the working stage.
10. An electronic device, characterized in that: It comprises a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the steps of the business processing method as described in any one of claims 1 to 8 are implemented.
11. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the business processing method according to any one of claims 1 to 8 are implemented.
12. A computer program product having a program or instructions stored thereon, characterized in that: The method comprises computer instructions, which, when executed by a processor, implement the steps of the business processing method according to any one of claims 1 to 7.