CN117931429A - Service processing method, device, terminal equipment and storage medium - Google Patents
Service processing method, device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN117931429A CN117931429A CN202311842835.7A CN202311842835A CN117931429A CN 117931429 A CN117931429 A CN 117931429A CN 202311842835 A CN202311842835 A CN 202311842835A CN 117931429 A CN117931429 A CN 117931429A
- Authority
- CN
- China
- Prior art keywords
- service
- processing
- target
- processing unit
- unit
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 22
- 238000003860 storage Methods 0.000 title claims abstract description 18
- 238000012545 processing Methods 0.000 claims abstract description 309
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000004590 computer program Methods 0.000 claims description 21
- 238000009826 distribution Methods 0.000 claims description 11
- 230000008569 process Effects 0.000 abstract description 13
- 230000006870 function Effects 0.000 description 18
- 238000004891 communication Methods 0.000 description 14
- 238000004364 calculation method Methods 0.000 description 11
- 238000001514 detection method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000007689 inspection Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000000638 solvent extraction Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 229910021421 monocrystalline silicon Inorganic materials 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy 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)
- Mobile Radio Communication Systems (AREA)
Abstract
The application is suitable for the field of data processing, and provides a service processing method, a device, terminal equipment and a storage medium, wherein the service processing method comprises the steps of dividing processing resources of a service processing system into a plurality of processing units; acquiring a target service to be processed; distributing the target service to a target processing unit according to the service type and service priority of the target service; based on the current operation load, the resource occupation condition and the target processing unit, the target service is processed, and the scheme can solve the problem that high time delay is caused by processing blockage when a CPU processes a large amount of services at present.
Description
Technical Field
The present application belongs to the technical field of data processing, and in particular, relates to a service processing method, a device, a terminal device, and a storage medium.
Background
In the traditional power calculation, data collected by the terminals of each power are transmitted to the main station for unified centralized processing. In the ubiquitous power internet of things, various growing power terminal equipment and business applications can generate massive data, and the data transmission and processing can cause huge pressure on a master station, so that the method has extremely high requirements on real-time performance in business processing.
In the current service processing scheme, the computing power of the central processing unit (Central Processing Unit, CPU) is mainly relied on, however, as the service volume increases and the service types become more and more diversified, the CPU often has a problem of high delay caused by processing blockage when processing a large amount of services, so that the processing efficiency of the current service processing scheme is lower.
Disclosure of Invention
The embodiment of the application provides a service processing method, a device, terminal equipment and a storage medium, which can solve the problem that high time delay is caused by processing blockage when a CPU (central processing unit) processes a large amount of services.
In a first aspect, an embodiment of the present application provides a service processing method, including:
Dividing processing resources of a service processing system into a plurality of processing units;
acquiring a target service to be processed;
Distributing the target service to a target processing unit according to the service type and service priority of the target service;
And processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
In a second aspect, an embodiment of the present application provides a service processing apparatus, including:
the division module is used for dividing the processing resources of the business processing system into a plurality of processing units;
The acquisition module is used for acquiring target business to be processed;
The distribution module is used for distributing the target service to the target processing unit according to the service type and the service priority of the target service;
And the processing module is used for processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
Optionally, in some embodiments of the application, the allocation module comprises:
a first determining unit, configured to determine a service type and a service priority of the target service;
A second determining unit configured to determine a candidate processing unit among a plurality of processing units according to the service type;
and the allocation unit is used for determining a target processing unit in the determined candidate processing units based on the service priority and allocating the target service to the target processing unit.
Optionally, in some embodiments of the application, the distribution unit is specifically configured to:
Obtaining a unit grade corresponding to the determined candidate processing unit;
and determining a target processing unit in the determined candidate processing units based on the service priority and the unit level.
Optionally, in some embodiments of the present application, the processing module is specifically configured to:
Based on the current operation load and the resource occupation condition, adjusting a task waiting window of the target service;
and processing the adjusted target service according to the target processing unit.
Optionally, in some embodiments of the present application, the processing module is specifically configured to:
Determining the same-level processing units with the same unit level of the target processing unit based on the current operation load and the resource occupation condition;
and migrating the target service to the peer processing unit for processing.
Optionally, in some embodiments of the present application, the processing module is specifically configured to: determining a processing unit with the current operation load lower than a preset value as a standby processing unit based on the current operation load and the resource occupation condition; and migrating the target service to the standby processing unit for processing.
Optionally, in some embodiments of the present application, the dividing module is specifically configured to:
Acquiring a preset unit division strategy and the number of units of a processing unit contained in processing resources of a service processing system;
And dividing the processing resource of the service processing system into a plurality of processing units based on the unit division strategy and the unit number.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the service processing method described above when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, which when executed by a processor, implements the service processing method described above.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to perform the service processing method according to any one of the first aspects above.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Compared with the prior art, the embodiment of the application has the beneficial effects that: the processing resources of the service processing system are divided into a plurality of processing units, then the target service is distributed to the target processing units according to the service type and the service priority of the target service, and finally the target service is flexibly processed based on the current operation load, the resource occupation condition and the target processing units, so that the problem of high time delay caused by processing blockage when a large amount of services are processed can be avoided, the processing efficiency of the service processing can be improved, and the timeliness of the service processing is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a service processing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of adjusting a task waiting window in a service processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a service processing device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The service processing method provided by the embodiment of the application can be applied to terminal equipment such as tablet computers, wearable equipment, vehicle-mounted equipment, augmented reality (augmented reality, AR)/Virtual Reality (VR) equipment, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal DIGITAL ASSISTANT, PDA) and the like, and the embodiment of the application does not limit the specific types of the terminal equipment.
For example, the terminal device may be a Station (ST) in a WLAN, a cellular telephone, a cordless telephone, a Session initiation protocol (Session InitiationProtocol, SIP) telephone, a wireless local loop (Wireless Local Loop, WLL) station, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a car networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite radio, a wireless modem card, a television Set Top Box (STB), a customer premise equipment (customer premise equipment, CPE) and/or other devices for communicating over a wireless system as well as next generation communication systems, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (Public Land Mobile Network, PLMN) network, etc.
By way of example, but not limitation, when the terminal device is a wearable device, the wearable device may also be a generic name for applying wearable technology to intelligently design daily wear, developing wearable devices, such as glasses, gloves, watches, apparel, shoes, and the like. The wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device comprises full functions, large size, and complete or partial functions which can be realized independent of a smart phone, such as a smart watch or a smart glasses, and is only focused on certain application functions, and needs to be matched with other devices such as the smart phone for use, such as various smart bracelets, smart jewelry and the like for physical sign monitoring.
Taking the terminal device as a personal computer as an example. Fig. 1 is a block diagram showing a part of the structure of a computer according to an embodiment of the present application. Referring to fig. 1, a personal computer includes: radio Frequency (RF) circuitry 110, memory 120, input unit 130, display unit 140, sensor 150, audio circuitry 160, wireless fidelity (WIRELESS FIDELITY, wiFi) module 170, processor 180, and power supply 190. Those skilled in the art will appreciate that the handset configuration shown in fig. 1 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the individual constituent elements of the personal computer in detail with reference to fig. 1:
The RF circuit 110 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, after receiving downlink information of the base station, the downlink information is processed by the processor 180; in addition, the data of the design uplink is sent to the base station. Typically, RF circuitry includes, but is not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (Low Noise Amplifier, LNAs), diplexers, and the like. In addition, RF circuit 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general Packet Radio Service (GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE)), email, short message Service (Short MESSAGING SERVICE, SMS), and the like.
The memory 120 may be used to store software programs and modules, and the processor 180 performs various functional applications and data processing of the cellular phone by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 130 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile phone 100. In particular, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 131 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 131 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 180, and can receive commands from the processor 180 and execute them. In addition, the touch panel 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 130 may include other input devices 132 in addition to the touch panel 131. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 may cover the display panel 141, and when the touch panel 131 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in fig. 1, the touch panel 131 and the display panel 141 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the mobile phone.
The personal computer 100 may also include at least one sensor 150, such as a motion sensor, among other sensors. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), can detect the gravity and the direction when stationary, and can be used for recognizing the gesture of a personal computer (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with a personal computer are not described in detail herein.
Audio circuitry 160, speakers 161, and microphone 162 may provide an audio interface between the user and the personal computer. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, microphone 162 converts the collected sound signals into electrical signals, which are received by audio circuit 160 and converted into audio data, which are processed by audio data output processor 180 for transmission to, for example, another device via RF circuit 110, or which are output to memory 120 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a personal computer can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 170, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 170, it is understood that it does not belong to the essential constitution of the personal computer 100, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The processor 180 is a control center of the personal computer, connects various parts of the personal computer using various interfaces and lines, and performs various functions of the personal computer and processes data by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the personal computer. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The personal computer 100 also includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 180 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system.
Although not shown, the personal computer 100 may also include a camera. Alternatively, the position of the camera on the mobile phone 100 may be front or rear, which is not limited in the embodiment of the present application.
Alternatively, the personal computer 100 may include a single camera, a dual camera, or a triple camera, etc., which are not limited in this embodiment of the present application.
In addition, although not shown, the personal computer 100 may further include a bluetooth module or the like, which is not described herein.
Fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 2, the terminal device 20 includes: at least one processor 200 (only one shown in fig. 2), a memory 210, and a computer program 220 stored in the memory 210 and executable on the at least one processor 200, the processor 200 implementing the following functions when executing the computer program 220:
dividing processing resources of a service processing system into a plurality of processing units; acquiring a target service to be processed; distributing the target service to a target processing unit according to the service type and service priority of the target service; and processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
Terminal device 20 may be a computing device such as a desktop computer, a notebook, a palm top computer, and a server. The terminal device may include, but is not limited to, a processor 200, a memory 210. It will be appreciated by those skilled in the art that fig. 2 is merely an example of terminal device 20 and is not intended to limit terminal device 20, and may include more or fewer components than shown, or may combine certain components, or may include different components, such as input-output devices, network access devices, etc.
The Processor 220 may be a central processing unit (Central Processing Unit, CPU), the Processor 220 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 210 may in some embodiments be an internal storage unit of terminal device 20, such as a hard disk or memory of terminal device 20. The memory 210 may also be an external storage device of the terminal device 20 in other embodiments, such as a plug-in hard disk provided on the terminal device 20, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. Further, the memory 210 may also include both an internal storage unit and an external storage device of the terminal device 20. The memory 210 is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs, etc., such as program code of a computer program, etc. The memory 210 may also be used to temporarily store data that has been output or is to be output.
Referring to fig. 3, fig. 3 is a flow chart of a service processing method provided by the present application. The specific flow of the service processing method can be as follows:
S101, dividing processing resources of a service processing system into a plurality of processing units.
It is understood that the processing resource of the present application may be a central processing unit (Central Processing Unit, CPU) resource, where the CPU serves as an operation and control core of the computer system, and is a final execution unit for information processing and program running. The CPU core is a core chip in the middle of the CPU, is made of monocrystalline silicon, is used for completing all calculation, receiving/storing commands, processing data and the like, and is a digital processing core. Cores (Die), also known as kernels, are the most important components of a CPU. The CPU center piece of the raised chip is the core and is manufactured by monocrystalline silicon according to a certain production process, and all calculation, receiving/storing commands and processing data of the CPU are executed by the core.
It will be appreciated, therefore, that in the present application, the processing resources are partitioned, in effect, the CPU cores, to provide a plurality of processing units.
Specifically, the resource information of the CPU, such as the type, model and core number of the CPU, may be read, and then the processing resource is divided according to the resource information, that is, optionally, in some embodiments, the step of "dividing the processing resource of the service processing system into a plurality of processing units" may specifically include:
Acquiring a preset unit division strategy and the number of units of a processing unit contained in processing resources of a service processing system;
The processing resources of the business processing system are partitioned into a plurality of processing units based on the unit partitioning policy and the number of units.
For example, specifically, first, resource information of the CPU, such as the type, model and core number of the CPU, is read, and the CPU core resource is sliced, as shown in the following table:
Priority level | Nuclear slice |
— | CPU-G0 (default system applicable) |
General priority | CPU-G1、CPU-G2、CPU-G3 |
Medium priority | CPU-G4、CPU-G5 |
High priority | CPU-G6 |
The CPU core slice (i.e., the processing unit) 0 generally operates as a system, the CPU core slices 1-m are allocated according to priority levels, and the allocation principle is confirmed according to classification conditions of system services (such as substation automation system services) to be 50% of the common priority, 30% of the medium priority and 20% of the high priority.
S102, obtaining the target service to be processed.
Optionally, the target service may be a service of any application scenario, such as a patrol service, an overhaul data processing service, a measurement acquisition calculation service, a composite signal calculation service, a metering service, a sequence control service, a remote control service, and an electricity distribution communication service, where the electricity distribution communication service is mainly divided into two main categories: one category is various information surrounding the distribution network equipment, namely distribution automation; the other type is various services surrounding the user, and is mainly applied to the collection of the user electric energy information. The distribution communication service comprises the following steps: distribution equipment state monitoring service, distributed power supply monitoring service, electric energy collection service and electric energy quality management service.
Specifically, the target service to be processed can be obtained from the cloud in a wired or wireless manner.
Before the target service is acquired, the service to be scheduled and controlled is registered into the scheduling controller, and the registration information includes service name, priority, supported scheduling mode and control interface for receiving scheduling.
S103, distributing the target service to the target processing unit according to the service type and the service priority of the target service.
As described above, the target service may be a patrol service, an overhaul data processing service, a measurement acquisition calculation service, a composite signal calculation service, a metering service, a sequence control service, a remote control service, and a power distribution communication service, so that service types corresponding to different services may be determined according to actual requirements. Meanwhile, for different services, the timeliness and the emergency degree corresponding to the service are different, for example, for maintenance data processing service, the corresponding service type can be a data calculation type, and the corresponding service priority is one level; for the inspection service, the corresponding service type can be a data acquisition type, and the corresponding service priority is a second level, wherein the service priority is the highest level, so the service priority of the inspection data processing service is higher than the service priority of the inspection service.
It should be noted that, for different services, the allocated processing units are different, for example, the processing units divided from the processing resources include a processing unit a, a processing unit b, a processing unit c, a processing unit d, and a processing unit e, where the types of services processed by the processing unit a, the processing unit b, and the processing unit c are data calculation types, and the types of services processed by the processing unit d and the processing unit e are data collection types. Optionally, in some embodiments, the unit level of the processing unit a is higher than the unit level of the processing unit b, and the unit level of the processing unit b is higher than the processing level of the processing unit c, so, for the service S1 and the service S2 of the data calculation type, when the service priority of the service S1 is higher than the service priority of the service S2, the service S1 may be allocated to the processing unit a, the service S2 may be allocated to the processing unit b, and the service S2 may also be allocated to the processing unit c. The service S1 may also be allocated to the processing unit b, and the service S2 may be allocated to the processing unit c, which may be specifically set according to practical situations, that is, optionally, in some embodiments, the step of "allocating the target service to the target processing unit according to the service type and the service priority of the target service" may specifically include:
Determining the service type and service priority of a target service;
Determining candidate processing units in a plurality of processing units according to the service type;
And determining a target processing unit in the determined candidate processing units based on the service priority, and distributing the target service to the target processing unit.
As can be seen from the above, when allocating a processing unit, first, a candidate processing unit may be determined among a plurality of processing units according to a service type, and then allocation is performed based on a unit level of the candidate processing unit and a service priority of a target service, that is, optionally, in some embodiments, the step of "determining a target processing unit among the determined candidate processing units based on the service priority and allocating the target service to the target processing unit" may specifically include:
Obtaining a unit grade corresponding to the determined candidate processing unit;
And determining a target processing unit in the determined candidate processing units based on the service priority and the unit level.
It should also be noted that the unit level of the processing unit is not constant. For example, during the period t1-t2, the unit level of processing unit a is higher than the unit level of processing unit b; during the period t2-t3, the unit level of processing unit b is higher than the unit level of processing unit a, i.e., during different periods, the processing units corresponding to the same target task may be different. The reason for this difference is that: when the processing units process the service, the service with higher service priority can be preferentially distributed to the processing units with higher unit levels, the number of the processing units with higher unit levels process the service is increased along with the increase of time, and the number of the processing units with lower unit levels process the service is reduced along with the increase of time, at this time, the processing capacity of the processing units with lower unit levels is slowly released, which means that the processing units can process more service, so the unit levels of the processing units are adjusted to be high, namely, in the scheme, the unit levels of the processing units are adjusted in real time and are different from the service priority of the service.
S104, processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
The running load may include, among other things, a system average load, CPU utilization, process context switch, and CPU cache hit rate. The system average load also comprises five CPU time such as User CPU time (User CPU), kernel CPU time (Sys CPU), CPU time waiting for I/O (iowait), time for processing soft interrupt (soft interrupt) and time for processing hard interrupt (hard interrupt), and is a key factor for influencing the actual effect of the calculation task.
The resource occupancy refers to the current resource occupancy of each processing unit. In the application, the scheduling strategy for dynamically adjusting the service task is output based on the current operation load and the resource occupation condition, thereby realizing the balance and the maximum efficiency of task scheduling. The scheduling policy may include 3 kinds of:
And adjusting a task waiting window. As shown in fig. 4, the adjustment of the waiting window of the service, so that the task with more resources occupied by the CPU adjusts and releases the CPU resources by adding the waiting window, that is, optionally, in some embodiments, the step of "processing the target service based on the current running load, the resource occupation situation and the target processing unit" specifically may include:
based on the current operation load and the resource occupation condition, adjusting a task waiting window of the target service;
and processing the adjusted target service according to the target processing unit.
Peer load balancing. The task dynamic migration is realized between the CPU core groups with the same priority according to the load condition, so that the task on the CPU core group with heavy load can be dynamically migrated to the CPU core group with light load, that is, optionally, in some embodiments, the step of processing the target service based on the current running load, the resource occupation condition and the target processing unit may specifically include:
Determining the same-level processing units with the same unit level of the target processing unit based on the current operation load and the resource occupation condition;
and migrating the target service to a peer processing unit for processing.
Priority transitions. In an extreme case, when the running load of a CPU core group at a certain level is heavy and exceeds the load threshold and the load of a CPU core group at other priorities is light, at this time, the service tasks under the current priority are dynamically migrated to the CPU core group at other priorities according to a certain amount and a certain period, so as to maximize the overall efficiency of the system, that is, optionally, in some embodiments, the step of "processing the target service based on the current running load, the resource occupation condition and the target processing unit" may specifically include:
Determining a processing unit with the current operation load lower than a preset value as a standby processing unit based on the current operation load and the resource occupation condition;
And migrating the target service to a standby processing unit for processing.
For the service of the substation automation system, the service operation resources of the substation automation system can be divided according to the policies of service classification, CPU resource division, control waiting window and the like, so that under the operation working condition that the service of the substation is more complex, the high-priority service can be ensured to obtain real-time response and fast processing, and meanwhile, the stable operation of the whole system is maintained, and the method is beneficial to improving the safety and reliability of the power system and ensuring the stability of power supply.
The business processing flow of the application is completed.
As described above, the present application provides a service processing method, after dividing the processing resources of a service processing system into a plurality of processing units, obtaining a target service to be processed, then distributing the target service to the target processing units according to the service type and service priority of the target service, and finally processing the target service based on the current operation load, the resource occupation situation and the target processing units. In the service processing scheme provided by the application, the processing resources of the service processing system are divided into a plurality of processing units, then the target service is distributed into the target processing units according to the service type and the service priority of the target service, and finally the target service is flexibly processed based on the current operation load, the resource occupation condition and the target processing units, so that the problem of high time delay caused by processing blockage when a large amount of services are processed can be avoided, the processing efficiency of service processing can be improved, and the timeliness of service processing is ensured.
Accordingly, referring to fig. 5, an embodiment of the present application provides a service processing apparatus (hereinafter referred to as a processing apparatus) that includes a dividing module 201, an obtaining module 202, an allocating module 203, and a processing module 204, which is specifically as follows:
The dividing module 201 is configured to divide processing resources of the service processing system into a plurality of processing units.
Optionally, in some embodiments, the partitioning module 201 may specifically be configured to: acquiring a preset unit division strategy and the number of units of a processing unit contained in processing resources of a service processing system; the processing resources of the business processing system are partitioned into a plurality of processing units based on the unit partitioning policy and the number of units.
An obtaining module 202, configured to obtain a target service to be processed.
And the allocation module 203 is configured to allocate the target service to a target processing unit according to the service type and the service priority of the target service.
Optionally, in some embodiments, the allocation module 203 may specifically include:
a first determining unit, configured to determine a service type and a service priority of a target service;
a second determining unit configured to determine a candidate processing unit among the plurality of processing units according to the service type;
And the allocation unit is used for determining a target processing unit in the determined candidate processing units based on the service priority and allocating the target service to the target processing unit.
Optionally, in some embodiments, the allocation unit may be specifically configured to: obtaining a unit grade corresponding to the determined candidate processing unit; and determining a target processing unit in the determined candidate processing units based on the service priority and the unit level.
A processing module 204 for processing the target service based on the current operation load, the resource occupation condition and the target processing unit
Optionally, in some embodiments, the processing module 204 may be specifically configured to: based on the current operation load and the resource occupation condition, adjusting a task waiting window of the target service; and processing the adjusted target service according to the target processing unit.
Optionally, in some embodiments, the processing module 204 may be specifically configured to: determining the same-level processing units with the same unit level of the target processing unit based on the current operation load and the resource occupation condition; and migrating the target service to a peer processing unit for processing.
Optionally, in some embodiments, the processing module 204 may be specifically configured to: determining a processing unit with the current operation load lower than a preset value as a standby processing unit based on the current operation load and the resource occupation condition; and migrating the target service to a standby processing unit for processing.
As described above, the present application provides a service processing apparatus, where after processing resources of a service processing system are divided into a plurality of processing units by a dividing module 201, an obtaining module 202 obtains a target service to be processed, then, an allocating module 203 allocates the target service to the target processing unit according to a service type and a service priority of the target service, and finally, a processing module 204 processes the target service based on a current operation load, a resource occupation condition and the target processing unit. In the service processing scheme provided by the application, the processing resources of the service processing system are divided into a plurality of processing units, then the target service is distributed into the target processing units according to the service type and the service priority of the target service, and finally the target service is flexibly processed based on the current operation load, the resource occupation condition and the target processing units, so that the problem of high time delay caused by processing blockage when a large amount of services are processed can be avoided, the processing efficiency of service processing can be improved, and the timeliness of service processing is ensured.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a terminal device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (10)
1. A method for processing a service, comprising:
Dividing processing resources of a service processing system into a plurality of processing units;
acquiring a target service to be processed;
Distributing the target service to a target processing unit according to the service type and service priority of the target service;
And processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
2. The service processing method according to claim 1, wherein the allocating the target service to the target processing unit according to the service type and the service priority of the target service includes:
Determining the service type and service priority of the target service;
Determining candidate processing units in a plurality of processing units according to the service type;
And determining a target processing unit in the determined candidate processing units based on the service priority, and distributing the target service to the target processing unit.
3. The service processing method according to claim 2, wherein the determining a target processing unit among the determined candidate processing units based on the service priority comprises:
Obtaining a unit grade corresponding to the determined candidate processing unit;
and determining a target processing unit in the determined candidate processing units based on the service priority and the unit level.
4. The service processing method according to claim 1, wherein the processing the target service based on the current operation load, the resource occupation situation, and the target processing unit includes:
Based on the current operation load and the resource occupation condition, adjusting a task waiting window of the target service;
and processing the adjusted target service according to the target processing unit.
5. The service processing method according to claim 1, wherein the processing the target service based on the current operation load, the resource occupation situation, and the target processing unit includes:
Determining the same-level processing units with the same unit level of the target processing unit based on the current operation load and the resource occupation condition;
and migrating the target service to the peer processing unit for processing.
6. The service processing method according to claim 1, wherein the processing the target service based on the current operation load, the resource occupation situation, and the target processing unit includes:
Determining a processing unit with the current operation load lower than a preset value as a standby processing unit based on the current operation load and the resource occupation condition;
And migrating the target service to the standby processing unit for processing.
7. The service processing method according to any one of claims 1 to 6, wherein the dividing the processing resources of the service processing system into a plurality of processing units comprises:
Acquiring a preset unit division strategy and the number of units of a processing unit contained in processing resources of a service processing system;
And dividing the processing resource of the service processing system into a plurality of processing units based on the unit division strategy and the unit number.
8. A service processing apparatus, comprising:
the division module is used for dividing the processing resources of the business processing system into a plurality of processing units;
The acquisition module is used for acquiring target business to be processed;
The distribution module is used for distributing the target service to the target processing unit according to the service type and the service priority of the target service;
And the processing module is used for processing the target service based on the current operation load, the resource occupation condition and the target processing unit.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311842835.7A CN117931429A (en) | 2023-12-28 | 2023-12-28 | Service processing method, device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311842835.7A CN117931429A (en) | 2023-12-28 | 2023-12-28 | Service processing method, device, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117931429A true CN117931429A (en) | 2024-04-26 |
Family
ID=90756607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311842835.7A Pending CN117931429A (en) | 2023-12-28 | 2023-12-28 | Service processing method, device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117931429A (en) |
-
2023
- 2023-12-28 CN CN202311842835.7A patent/CN117931429A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391259B (en) | Resource processing method and device, computer readable storage medium and mobile terminal | |
CN106332307B (en) | Method for accessing application program to network and mobile terminal | |
CN109992398B (en) | Resource management method, resource management device, mobile terminal and computer-readable storage medium | |
CN107231159B (en) | Radio frequency interference processing method, device, storage medium and terminal | |
CN107797866B (en) | Processor resource allocation method, mobile terminal and medium product | |
CN107402813B (en) | Resource allocation method, mobile terminal and computer readable storage medium | |
CN106776036A (en) | A kind of resource allocation methods and device | |
EP3499853B1 (en) | Ppg authentication method and device | |
CN106973114B (en) | Access method, server and system | |
CN111338745B (en) | Deployment method and device of virtual machine and intelligent device | |
CN111654902B (en) | Method and device for reducing GPS signal interference of mobile terminal and mobile terminal | |
CN115345464A (en) | Service order dispatching method and device, computer equipment and storage medium | |
CN112052096A (en) | Resource processing method and device, server and terminal | |
CN110018885B (en) | Application program freezing method and device, storage medium and terminal | |
CN117407133A (en) | Task processing method and device and computer readable storage medium | |
CN110045811B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN109831798B (en) | Signal acquisition method, system, storage medium and mobile terminal | |
CN116596202A (en) | Work order processing method, related device and storage medium | |
CN117931429A (en) | Service processing method, device, terminal equipment and storage medium | |
CN112261634B (en) | Bluetooth transmission control method and device, terminal equipment and storage medium | |
CN109992379B (en) | Application freezing method and device, storage medium and terminal | |
CN109992361B (en) | Application freezing method and device, terminal and computer readable storage medium | |
CN111654848B (en) | NFC card detection method and device, storage medium and mobile terminal | |
CN113260069B (en) | Carrier resource scheduling method and device and electronic equipment | |
CN109617660B (en) | Method and device for setting carrier aggregation frequency band, storage medium and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |