WO2022237419A1 - Task execution method and apparatus, and storage medium - Google Patents

Task execution method and apparatus, and storage medium Download PDF

Info

Publication number
WO2022237419A1
WO2022237419A1 PCT/CN2022/086072 CN2022086072W WO2022237419A1 WO 2022237419 A1 WO2022237419 A1 WO 2022237419A1 CN 2022086072 W CN2022086072 W CN 2022086072W WO 2022237419 A1 WO2022237419 A1 WO 2022237419A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
execution
periodic
flash simulation
volatile data
Prior art date
Application number
PCT/CN2022/086072
Other languages
French (fr)
Chinese (zh)
Inventor
姜珊
许凯程
张晓谦
孙忠刚
Original Assignee
中国第一汽车股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国第一汽车股份有限公司 filed Critical 中国第一汽车股份有限公司
Publication of WO2022237419A1 publication Critical patent/WO2022237419A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C27/00Electric analogue stores, e.g. for storing instantaneous values

Definitions

  • the embodiments of the present application relate to the technical field of computers, for example, to a task execution method, device, and storage medium.
  • the vehicle controller will write a large amount of non-volatile data during program operation.
  • the amount of non-volatile data is gradually increasing, and the generation of non-volatile data always exists along with the life cycle of the entire electronic control unit (Electronic Control Unit, ECU). Therefore, how to store non-volatile data in real time becomes particularly important.
  • ECU Electronic Control Unit
  • EEPROM Electrically Erasable Programmable read-only memory
  • FLASH that is, flash memory
  • EEPROM is generally used to store non-volatile data.
  • the storage space of EEPROM is limited, so FLASH is often used to simulate the read and write functions of EEPROM to store non-volatile data.
  • the FLASH emulation EEPROM task is only executed during the power-off stage to realize writing of non-volatile data. In this way, the power-off phase will take too long.
  • the present application provides a task execution method, device and storage medium, which reduces the duration of the power-off phase by using the idle time of executing periodic tasks to execute FLASH simulation EEPROM tasks.
  • the present application provides a task execution method, including: during the execution of the periodic task, detecting whether there is non-volatile data writing; Execute the FLASH simulation EEPROM operation task in at least one remaining period of time.
  • the cycle of the periodic task is a preset duration; each cycle corresponds to a remaining duration; each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
  • the present application provides a task execution device, including: a detection module and an execution module;
  • the detection module is configured to detect whether non-volatile data is written during the execution of the periodic task by the execution module; the period of the periodic task is a preset duration;
  • the execution module is configured to respond to the detection module detecting that there is non-volatile data writing, and executes the FLASH simulation EEPROM operation task in at least one remaining period of executing the periodic task; each period corresponds to a remaining period; each remaining period It is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
  • the present application provides a task execution device, including a memory, a processor, a bus, and a communication interface; the memory is configured to store instructions executed by a computer, and the processor and the memory are connected through a bus; when the task execution device is running, the processor executes The computer stored in the memory executes instructions, so that the task execution device executes the task execution method provided in the first aspect above.
  • the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer executes the instructions, the computer executes the task execution method as provided in the first aspect.
  • the present application provides a computer program product, the computer program product includes computer instructions, and when the computer instructions are run on a computer, the computer is made to execute the task execution method as provided in the first aspect.
  • all or part of the above computer instructions may be stored on a computer-readable storage medium.
  • the computer-readable storage medium may be packaged together with the processor of the task execution device, or may be separately packaged with the processor of the task execution device, which is not limited in this application.
  • FIG. 1 is a schematic flowchart of a task execution method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of another task execution method provided by the embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another task execution method provided by the embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another task execution method provided in the embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another task execution method provided by the embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another task execution method provided by the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a task execution device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another task execution device provided by an embodiment of the present application.
  • first and second in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different processes for the same object, rather than to describe a specific sequence of objects.
  • the vehicle controller will write a large amount of non-volatile data during program operation.
  • the amount of non-volatile data is gradually increasing, and the generation of non-volatile data always exists along with the life cycle of ECU. Therefore, how to store non-volatile data in real time becomes particularly important.
  • EEPROM has the function of reading and writing in real time, and FLASH does not have the function of reading and writing in real time, so EEPROM is generally used to store non-volatile data. However, the storage space of EEPROM is limited, so FLASH is often used to simulate the read and write functions of EEPROM to store non-volatile data.
  • the FLASH analog EEPROM in the related art can be implemented in two ways: synchronous and asynchronous.
  • FLASH emulates EEPROM for a long time, and the emulation operation cannot be interrupted, which affects the execution of other tasks.
  • the process of asynchronous implementation although the single running time of FLASH emulated EEPROM is short, the number of cycle scheduling is large, and when the amount of stored data is large, the overall running time is longer.
  • the embodiment of the present application provides a task execution method, device and storage medium, by using the idle time of executing periodic tasks to execute FLASH simulation EEPROM tasks, so as to reduce the duration of the power-off phase.
  • the task execution method provided in the embodiment of the present application may be applicable to a task execution device.
  • the task execution device may be a physical machine (such as a server), or a virtual machine (virtual machine, VM) deployed on the physical machine.
  • a real-time operating system (Real Time Operating System, RTOS) is embedded in the task execution device, and the RTOS can be set to execute the periodic tasks involved in the embodiments of the present application.
  • RTOS Real Time Operating System
  • the server may be one server, or may be a server cluster composed of multiple servers, which is not limited in this embodiment of the present application.
  • the task execution method provided by the embodiment of the present application includes S101-S102:
  • the period of the periodical task may be a preset duration determined artificially in advance.
  • the non-volatile memory (Non Volatile Memory, NVM) scheduler in the real-time operating system can be set to control the FLASH to realize the simulation operation, and the writing of the NVM scheduler
  • the interface is set up to receive write requests for non-volatile data. Therefore, optionally, in a possible implementation, the task execution device may determine whether the write interface of the NVM scheduler detects a write request, and if it is determined that the write interface detects a write request, determine whether there is a write request. Non-volatile data writes.
  • the task execution device executes the FLASH simulation EEPROM operation task within at least one remaining period of execution of the periodic task when it detects that non-volatile data is written.
  • each cycle corresponds to a remaining duration.
  • Each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding period.
  • the remaining duration may be determined according to a difference between a preset duration and a duration for executing a periodic task in a corresponding period.
  • the time interval between the first period and the second period is 10ms, that is, the preset duration in the embodiment of the present application is 10ms.
  • the period required by the task execution device to execute the periodic task is 5 ms
  • the time required by the task execution device to execute the periodic task is 7 ms.
  • the remaining time in the first cycle is 5ms, that is, the time for executing the FLASH simulation EEPROM operation task in the first cycle is 5ms
  • the remaining time in the second cycle is 3ms, that is, in the second cycle
  • the duration of executing the FLASH simulation EEPROM operation task in the cycle is 3ms.
  • the remaining duration can also be determined based on the resources occupied by executing periodic tasks and the resources occupied by executing FLASH simulation EEPROM operation tasks, that is, the execution of periodic tasks and the execution of FLASH simulation EEPROM can be determined.
  • the time during which the resources occupied by the operation tasks do not conflict is determined as the remaining time.
  • the FLASH simulation EEPROM operation task is implemented by program code in most cases, and the program code must be implemented by a single thread, and cannot be executed in parallel with the periodic task.
  • the FLASH simulation EEPROM operation task is implemented by hardware such as a chip, it does not conflict with the execution of periodic tasks. At this time, the FLASH simulation EEPROM operation task can be paralleled with the periodic task at the same time.
  • the FLASH simulation EEPROM operation task may be executed within at least one remaining period of execution of the periodic task by setting the priorities of the periodic task and the FLASH simulation EEPROM operation task. For example, it can be determined that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task, so that when the task execution device executes the task, it can execute the tasks in the order of priority.
  • the periodic task can be executed preferentially, and the FLASH simulated EEPROM operation task is executed within at least one remaining period of execution of the periodic task. In this way, the execution of the FLASH simulated EEPROM operation task will not affect the execution of the periodic task.
  • the FLASH simulation EEPROM operation task can be set to be triggered by an event set by the verification interface of the NVM scheduler, and the event trigger is used to trigger the execution of the FLASH simulation EEPROM operation task.
  • the task execution device detects that non-volatile data is written, it can call the verification interface to set an event trigger to trigger the execution of the FLASH simulation EEPROM operation task within at least one remaining time period.
  • the task execution device can close the verification interface after calling the verification interface to set the event trigger, and then restart the verification after the FLASH simulation EEPROM operation task is completed. interface. In this way, if a FLASH simulation EEPROM operation task is being executed, because the verification interface is closed, the task execution device cannot call the verification interface to set an event trigger, and another FLASH simulation EEPROM operation task cannot be started.
  • the verification interface may be a runtime environment/client-server (Run-time environment/Client-Server, RTE/C-S) interface.
  • event triggering may also be set in other ways, which is not limited in this embodiment of the present application.
  • event triggering can also be implemented by modifying program codes in the real-time operating system.
  • the task execution device calls the verification interface to set the event trigger, it can also set the scheduling status of the NVM scheduler to Change to PENDING state.
  • PENDING state you can wait for the periodic tasks being executed to complete.
  • the periodic tasks change the scheduling state of the NVM scheduler to the execution (BUSY) state.
  • the NVM scheduler cannot be rescheduled in the BUSY state and the PENDING state.
  • the scheduling state is changed to the idle (IDLE) state, and other FLASH simulation EEPROM operation tasks can be rescheduled in the IDLE state.
  • the technical solution provided by the embodiment of the present application can utilize the idle time during the periodical task implementation to execute the FLASH simulation EEPROM operation task.
  • the FLASH simulated EEPROM can complete the writing operation of non-volatile data in real time, and it is not necessary to perform the FLASH simulated EEPROM operation task in the power-off stage. Therefore, compared with the task execution method in the related art, the technical solution provided by the present application can reduce the duration of the power-off phase.
  • the embodiment of the present application also provides a task execution method, including S201-S203:
  • the task execution device determines that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task.
  • the task execution device detects whether non-volatile data is written during the execution of the periodic task.
  • the task execution device executes the FLASH simulation EEPROM operation task within at least one remaining duration according to the priority.
  • this embodiment of the present application also provides a task execution method, including S301-S303:
  • the task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
  • the task execution device detects whether non-volatile data is written during the execution of the periodic task.
  • the task execution device When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and triggers the execution of the FLASH simulation EEPROM operation task within at least one remaining duration.
  • this embodiment of the present application also provides a task execution method, including S401-S405:
  • the task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
  • the task executing device detects whether non-volatile data is written during the execution of the periodic task.
  • the task execution device When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and closes the verification interface.
  • the task execution device executes the FLASH simulation EEPROM operation task within at least one remaining time period.
  • the task execution device opens the verification interface after the FLASH simulation EEPROM operation task is executed.
  • this embodiment of the present application also provides a task execution method, including S501-S505:
  • the task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
  • the task executing device detects whether non-volatile data is written during the execution of the periodic task.
  • the task execution device When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and changes the scheduling state of the NVM scheduler to a waiting state.
  • the task execution device executes the FLASH simulation EEPROM operation task within at least one remaining duration, and changes the scheduling state to the execution state during execution of the FLASH simulation EEPROM operation task.
  • the task execution device changes the scheduling state to an idle state after the FLASH simulation EEPROM operation task is executed.
  • the task execution method provided by the embodiment of the present application includes S601-S604:
  • the task executing device executes periodic task A.
  • the task executing device executes the periodic task B.
  • the task executing device executes the periodic task C.
  • the task execution device can execute multiple periodic tasks at the same time.
  • one of the multiple periodic tasks can be selected, and the FLASH simulation EEPROM operation task can be executed within at least one remaining duration of the periodic task. . Therefore, the embodiment of the present application does not limit the order of the above steps S602-S604, and may be executed in parallel.
  • the task execution device executes steps S6021-S6025 during execution of step S602.
  • the first preset interval may be a time length determined artificially in advance, which is not limited in this embodiment of the present application.
  • the embodiment of the present application only shows three periodic tasks as an example, and the embodiment of the present application does not limit the number of periodic tasks.
  • a complete FLASH simulation EEPROM operation task can be executed by using the remaining duration of multiple continuous periodic tasks, and it can be executed according to the priority of the task during the implementation process.
  • the embodiment of the present application also provides a task execution device, which may include: a detection module 11 and an execution module 12 .
  • the detection module 11 may execute S101 in the above method embodiment, and the execution module 12 may execute S102 in the above method embodiment.
  • the detection module 11 is configured to detect whether non-volatile data is written during the execution module 12 executing the periodic task; the period of the periodic task is a preset duration;
  • the execution module 12 is configured to execute the FLASH simulation EEPROM operation task in at least one remaining duration of performing periodic tasks when the detection module 11 detects that non-volatile data is written; each cycle corresponds to a remaining duration; Each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
  • the task execution device may further include: a determination module configured to determine that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task;
  • the execution module 12 is configured to execute the FLASH simulation EEPROM operation task within at least one remaining duration according to the priority.
  • the determination module is also configured to determine that the FLASH simulation EEPROM operation task is triggered by the verification interface setting event of the NVM scheduler; the event trigger is used to trigger the execution of the FLASH simulation EEPROM operation task;
  • the execution module 12 is configured to, when the detection module 11 detects that non-volatile data is written, call the verification interface to set an event trigger, and trigger the execution of the FLASH simulation EEPROM operation task within at least one remaining duration.
  • the task execution device provided by the present application may also include a processing module, and the processing module is configured to close the verification interface after calling the verification interface to set an event trigger; the processing module also It is set to enable the verification interface after the FLASH simulation EEPROM operation task is completed.
  • the processing module is also configured to change the scheduling state of the NVM scheduling machine to a waiting state after calling the verification interface to set the event trigger;
  • the processing module is also configured to change the scheduling state to the execution state during the execution of the FLASH simulation EEPROM operation task;
  • the processing module is also configured to change the scheduling state to an idle state after the FLASH simulation EEPROM operation task is executed.
  • the foregoing "verification interface” is an RTE/C-S interface.
  • the detection module 11 is configured to: determine whether the write interface of the NVM scheduler detects a write request; if it is determined that the write interface detects a write request, determine There is non-volatile data written.
  • the task performing device may further include a storage module configured to store program codes of the task performing device and the like.
  • the embodiment of the present application also provides a task execution device, including a memory 41, a processor 42, a bus 43, and a communication interface 44; 43 connection; when the task execution device is running, the processor 42 executes the computer-executed instructions stored in the memory 41, so that the task execution device executes any one of the task execution methods provided in the above-mentioned embodiments.
  • a task execution device including a memory 41, a processor 42, a bus 43, and a communication interface 44; 43 connection; when the task execution device is running, the processor 42 executes the computer-executed instructions stored in the memory 41, so that the task execution device executes any one of the task execution methods provided in the above-mentioned embodiments.
  • the task execution device may further include a transceiver configured to perform the steps of sending and receiving data, signaling or information under the control of the processor of the task execution device, for example, receiving a write request.
  • a transceiver configured to perform the steps of sending and receiving data, signaling or information under the control of the processor of the task execution device, for example, receiving a write request.
  • the task execution device may be a physical machine for implementing task execution, or may be a part of the physical machine, for example, may be a chip system in the physical machine.
  • the chip system is configured to support the task execution device to implement the functions involved in any of the above task execution methods of the present application, for example, receive, send or process the data and/or information involved in the above task execution methods.
  • the chip system includes a chip, and may also include other discrete devices or circuit structures.
  • the processors 42 (42-1 and 42-2) may include at least one central processing unit (central processing unit, CPU), such as CPU0 and CPU1 shown in FIG. 8 .
  • the task execution apparatus may include multiple processors 42, such as the processor 42-1 and the processor 42-2 shown in FIG. 8 .
  • Each CPU in these processors 42 may be a single-core processor (single-CPU), or a multi-core processor (multi-CPU).
  • Processor 42 herein may refer to at least one device, circuit, and/or processing core for processing data (eg, computer program instructions).
  • Memory 41 can be read-only memory 41 (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions
  • Type of dynamic storage device also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), read-only disc (compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other medium accessed by a computer, but not limited to.
  • the memory 41 may exist independently, and is connected to the processor 42 through the bus 43 .
  • the memory 41 can also be integrated with the processor 42 .
  • the memory 41 is set to store the data in this application and the computer-executed instructions corresponding to executing the software program of this application.
  • the processor 42 can perform various functions of the device by running or executing software programs stored in the memory 41 and calling data stored in the memory 41 .
  • Communication interface 44 using any device such as a transceiver, configured to communicate with other devices or communication networks, such as control systems, wireless access networks (radio access network, RAN), wireless local area networks (wireless local area networks, WLAN), etc. .
  • the communication interface 44 may include a receiving unit to implement a receiving function, and a sending unit to implement a sending function.
  • the bus 43 may be an industry standard architecture (industry standard architecture, ISA) bus, a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, etc.
  • the bus 43 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.
  • the processing module in the task execution device implements the same function as the processor in Figure 8
  • the storage module in the task execution device implements the same function as the memory in Figure 8 .
  • the embodiment of the present application also provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium, and when the computer executes the instruction, the computer executes any one of the task execution methods provided in the foregoing embodiments.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connection with at least one lead, portable computer disk, hard disk, RAM, ROM, erasable programmable read-only memory (erasable programmable read-only memory) only memory, EPROM), registers, hard disks, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the above, or any other form of computer-readable storage media known in the art.
  • An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
  • the storage medium may also be a component of the processor.
  • the processor and storage medium may reside in an application specific integrated circuit (ASIC).
  • ASIC application specific integrated circuit
  • a computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, device or device.

Landscapes

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

Abstract

The present application relates to the field of computer technologies, and discloses a task execution method and apparatus, and a storage medium. The method comprises: during execution of a periodic task, detecting whether there is non-volatile data being written; and in response to detecting that there is non-volatile data being written, executing a FLASH emulating EEPROM operation task within at least one remaining duration for executing the periodic task, each period corresponding to one remaining duration, each remaining duration being determined according to a duration for executing the periodic task and a preset duration in the corresponding period, and the preset duration being the period of the periodic task.

Description

任务执行方法、装置及存储介质Task execution method, device and storage medium
本申请要求在2021年5月11日提交中国专利局、申请号为202110513244.X的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202110513244.X filed with the China Patent Office on May 11, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及计算机技术领域,例如涉及一种任务执行方法、装置及存储介质。The embodiments of the present application relate to the technical field of computers, for example, to a task execution method, device, and storage medium.
背景技术Background technique
车用实时控制系统中,车用控制器在程序运行过程中会写入大量的非易失性数据。随着新能源汽车的智能化发展,非易失性数据量逐渐增大,且非易失性数据的生成伴随着整个电子控制单元(Electronic Control Unit,ECU)的生命周期一直存在。所以,如何即时存储非易失性数据变得尤为重要。In the vehicle real-time control system, the vehicle controller will write a large amount of non-volatile data during program operation. With the intelligent development of new energy vehicles, the amount of non-volatile data is gradually increasing, and the generation of non-volatile data always exists along with the life cycle of the entire electronic control unit (Electronic Control Unit, ECU). Therefore, how to store non-volatile data in real time becomes particularly important.
带电可擦可编程只读存储器(Electrically Erasable Programmable read-only memory,EEPROM)具有即时读写的功能,存储芯片FLASH(即闪存)不具有即时读写的功能,所以一般采用EEPROM存储非易失性数据。但EEPROM的存储空间有限,因此目前常采用FLASH模拟EEPROM的读写功能来存储非易失性数据。Electrically Erasable Programmable read-only memory (EEPROM) has the function of instant reading and writing, and the memory chip FLASH (that is, flash memory) does not have the function of instant reading and writing, so EEPROM is generally used to store non-volatile data. However, the storage space of EEPROM is limited, so FLASH is often used to simulate the read and write functions of EEPROM to store non-volatile data.
然而,执行FLASH模拟EEPROM任务占用时间较长,为了避免影响其他任务的执行,相关技术中仅在下电阶段执行FLASH模拟EEPROM任务,实现非易失性数据的写入。这样,会导致下电阶段时间过长。However, it takes a long time to execute the FLASH emulation EEPROM task. In order to avoid affecting the execution of other tasks, in the related art, the FLASH emulation EEPROM task is only executed during the power-off stage to realize writing of non-volatile data. In this way, the power-off phase will take too long.
发明内容Contents of the invention
本申请提供一种任务执行方法、装置及存储介质,通过利用执行周期性任务的空闲时间执行FLASH模拟EEPROM任务,降低下电阶段的时长。The present application provides a task execution method, device and storage medium, which reduces the duration of the power-off phase by using the idle time of executing periodic tasks to execute FLASH simulation EEPROM tasks.
第一方面,本申请提供一种任务执行方法,包括:执行周期性任务期间, 检测是否有非易失性数据写入;响应于检测到有非易失性数据写入,在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务。其中,周期性任务的周期为预设时长;每个周期对应一个剩余时长;每个剩余时长根据对应的周期中,执行周期性任务的时长以及预设时长确定。In the first aspect, the present application provides a task execution method, including: during the execution of the periodic task, detecting whether there is non-volatile data writing; Execute the FLASH simulation EEPROM operation task in at least one remaining period of time. Wherein, the cycle of the periodic task is a preset duration; each cycle corresponds to a remaining duration; each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
第二方面,本申请提供一种任务执行装置,包括:检测模块和执行模块;In a second aspect, the present application provides a task execution device, including: a detection module and an execution module;
检测模块,设置为在执行模块执行周期性任务期间,检测是否有非易失性数据写入;周期性任务的周期为预设时长;The detection module is configured to detect whether non-volatile data is written during the execution of the periodic task by the execution module; the period of the periodic task is a preset duration;
执行模块,设置为响应于检测模块检测到有非易失性数据写入,在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务;每个周期对应一个剩余时长;每个剩余时长根据对应的周期中,执行周期性任务的时长以及预设时长确定。The execution module is configured to respond to the detection module detecting that there is non-volatile data writing, and executes the FLASH simulation EEPROM operation task in at least one remaining period of executing the periodic task; each period corresponds to a remaining period; each remaining period It is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
第三方面,本申请提供一种任务执行装置,包括存储器、处理器、总线和通信接口;存储器设置为存储计算机执行指令,处理器与存储器通过总线连接;当任务执行装置运行时,处理器执行存储器存储的计算机执行指令,以使任务执行装置执行如上述第一方面提供的任务执行方法。In a third aspect, the present application provides a task execution device, including a memory, a processor, a bus, and a communication interface; the memory is configured to store instructions executed by a computer, and the processor and the memory are connected through a bus; when the task execution device is running, the processor executes The computer stored in the memory executes instructions, so that the task execution device executes the task execution method provided in the first aspect above.
第四方面,本申请提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当计算机执行指令时,使得计算机执行如第一方面提供的任务执行方法。In a fourth aspect, the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer executes the instructions, the computer executes the task execution method as provided in the first aspect.
第五方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机指令,当计算机指令在计算机上运行时,使得计算机执行如第一方面提供的任务执行方法。In a fifth aspect, the present application provides a computer program product, the computer program product includes computer instructions, and when the computer instructions are run on a computer, the computer is made to execute the task execution method as provided in the first aspect.
需要说明的是,上述计算机指令可以全部或者部分存储在计算机可读存储介质上。其中,计算机可读存储介质可以与任务执行装置的处理器封装在一起的,也可以与任务执行装置的处理器单独封装,本申请对此不做限定。It should be noted that all or part of the above computer instructions may be stored on a computer-readable storage medium. Wherein, the computer-readable storage medium may be packaged together with the processor of the task execution device, or may be separately packaged with the processor of the task execution device, which is not limited in this application.
本申请中第二方面、第三方面、第四方面以及第五方面的描述,可以参考第一方面的详细描述。For the descriptions of the second aspect, the third aspect, the fourth aspect and the fifth aspect in this application, reference may be made to the detailed description of the first aspect.
在本申请中,上述任务执行装置的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。In this application, the names of the above-mentioned task performing apparatuses do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of the present application, they fall within the scope of the claims of the present application and their equivalent technologies.
附图说明Description of drawings
图1为本申请实施例提供的一种任务执行方法的流程示意图;FIG. 1 is a schematic flowchart of a task execution method provided by an embodiment of the present application;
图2为本申请实施例提供的另一种任务执行方法的流程示意图;FIG. 2 is a schematic flowchart of another task execution method provided by the embodiment of the present application;
图3为本申请实施例提供的又一种任务执行方法的流程示意图;FIG. 3 is a schematic flowchart of another task execution method provided by the embodiment of the present application;
图4为本申请实施例提供的又一种任务执行方法的流程示意图;FIG. 4 is a schematic flowchart of another task execution method provided in the embodiment of the present application;
图5为本申请实施例提供的又一种任务执行方法的流程示意图;FIG. 5 is a schematic flowchart of another task execution method provided by the embodiment of the present application;
图6为本申请实施例提供的又一种任务执行方法的流程示意图;FIG. 6 is a schematic flowchart of another task execution method provided by the embodiment of the present application;
图7为本申请实施例提供的一种任务执行装置的结构示意图;FIG. 7 is a schematic structural diagram of a task execution device provided by an embodiment of the present application;
图8为本申请实施例提供的另一种任务执行装置的结构示意图。FIG. 8 is a schematic structural diagram of another task execution device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图对本申请实施例提供的任务执行方法、装置及存储介质进行详细地描述。The task execution method, device and storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations.
本申请的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。The terms "first" and "second" in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different processes for the same object, rather than to describe a specific sequence of objects.
此外,本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选的还包括其 他没有列出的步骤或单元,或可选的还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。In addition, the terms "including" and "having" mentioned in the description of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other unlisted steps or units, or may optionally also include Other steps or elements inherent to the process, method, product or apparatus are included.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
在本申请的描述中,除非另有说明,“多个”的含义是指至少两个。In the description of the present application, unless otherwise specified, the meaning of "plurality" refers to at least two.
车用实时控制系统中,车用控制器在程序运行过程中会写入大量的非易失性数据。随着新能源汽车的智能化发展,非易失性数据量逐渐增大,且非易失性数据的生成伴随着ECU的生命周期一直存在。所以,如何即时存储非易失性数据变得尤为重要。In the vehicle real-time control system, the vehicle controller will write a large amount of non-volatile data during program operation. With the intelligent development of new energy vehicles, the amount of non-volatile data is gradually increasing, and the generation of non-volatile data always exists along with the life cycle of ECU. Therefore, how to store non-volatile data in real time becomes particularly important.
EEPROM具有即时读写的功能,FLASH不具有即时读写的功能,所以一般采用EEPROM存储非易失性数据。但EEPROM的存储空间有限,因此目前常采用FLASH模拟EEPROM的读写功能来存储非易失性数据。EEPROM has the function of reading and writing in real time, and FLASH does not have the function of reading and writing in real time, so EEPROM is generally used to store non-volatile data. However, the storage space of EEPROM is limited, so FLASH is often used to simulate the read and write functions of EEPROM to store non-volatile data.
相关技术中的FLASH模拟EEPROM可以通过同步和异步两种方式实现。在同步实现方式中,FLASH模拟EEPROM单次运行时间较长,且模拟操作不能中断,影响了其他任务的执行。异步实现过程中,虽然FLASH模拟EEPROM单次运行时间较短,但周期调度次数多,当存储数据量较大时,整体运行时间较长。The FLASH analog EEPROM in the related art can be implemented in two ways: synchronous and asynchronous. In the synchronous implementation mode, FLASH emulates EEPROM for a long time, and the emulation operation cannot be interrupted, which affects the execution of other tasks. In the process of asynchronous implementation, although the single running time of FLASH emulated EEPROM is short, the number of cycle scheduling is large, and when the amount of stored data is large, the overall running time is longer.
由于上述两种方式存在的缺陷,所以目前仅在下电阶段执行FLASH模拟EEPROM任务,实现非易失性数据的写入。然而,这样会导致下电阶段时间过长。Due to the defects of the above two methods, currently only the FLASH simulation EEPROM task is performed in the power-off stage to realize the writing of non-volatile data. However, this would result in an excessively long power-down phase.
针对上述相关技术中存在的问题,本申请实施例提供了一种任务执行方法、装置及存储介质,通过利用执行周期性任务的空闲时间执行FLASH模拟EEPROM任务,实现降低下电阶段的时长。In view of the problems existing in the above-mentioned related technologies, the embodiment of the present application provides a task execution method, device and storage medium, by using the idle time of executing periodic tasks to execute FLASH simulation EEPROM tasks, so as to reduce the duration of the power-off phase.
本申请实施例提供的任务执行方法可以适用于任务执行装置。任务执行装置可以为物理机(如服务器),也可以为部署在物理机上的虚拟机(virtual machine,VM)。任务执行装置内嵌入有实时操作系统(Real Time Operating System,RTOS),RTOS可设置为执行本申请实施例中涉及的周期性任务。The task execution method provided in the embodiment of the present application may be applicable to a task execution device. The task execution device may be a physical machine (such as a server), or a virtual machine (virtual machine, VM) deployed on the physical machine. A real-time operating system (Real Time Operating System, RTOS) is embedded in the task execution device, and the RTOS can be set to execute the periodic tasks involved in the embodiments of the present application.
可以理解的是,在任务执行装置为服务器的情况下,服务器可以是一台服务器,也可以是由多台服务器组成的服务器集群,本申请实施例对此不做限定。It can be understood that, in the case where the task execution device is a server, the server may be one server, or may be a server cluster composed of multiple servers, which is not limited in this embodiment of the present application.
下面结合对本申请提供的任务执行方法进行详细说明。The task execution method provided by this application will be described in detail below.
参照图1,本申请实施例提供的任务执行方法包括S101-S102:Referring to Figure 1, the task execution method provided by the embodiment of the present application includes S101-S102:
S101、任务执行装置执行周期性任务期间,检测是否有非易失性数据写入。S101. During the periodical task execution by the task execution device, detect whether non-volatile data is written.
其中,周期性任务的周期可以是人为事先确定的预设时长。Wherein, the period of the periodical task may be a preset duration determined artificially in advance.
任务执行装置中嵌入的实时操作系统在执行周期性任务期间,实时操作系统中的非易失性存储器(Non Volatile Memory,NVM)调度机可设置为控制FLASH实现模拟操作,NVM调度机的写入接口设置为接收非易失性数据的写入请求。所以,可选的,在一种可能的实现方式中,任务执行装置可以确定NVM调度机的写入接口是否检测到写入请求,在确定写入接口检测到写入请求的情况下,确定有非易失性数据写入。During the execution of periodic tasks by the real-time operating system embedded in the task execution device, the non-volatile memory (Non Volatile Memory, NVM) scheduler in the real-time operating system can be set to control the FLASH to realize the simulation operation, and the writing of the NVM scheduler The interface is set up to receive write requests for non-volatile data. Therefore, optionally, in a possible implementation, the task execution device may determine whether the write interface of the NVM scheduler detects a write request, and if it is determined that the write interface detects a write request, determine whether there is a write request. Non-volatile data writes.
S102、任务执行装置在检测到有非易失性数据写入的情况下,在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务。S102. The task execution device executes the FLASH simulation EEPROM operation task within at least one remaining period of execution of the periodic task when it detects that non-volatile data is written.
其中,每个周期对应一个剩余时长。每个剩余时长根据对应的周期中,执行周期性任务的时长以及预设时长确定。Wherein, each cycle corresponds to a remaining duration. Each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding period.
在一种可能的实现方式中,剩余时长可以根据预设时长与对应的周期中执行周期性任务的时长之差确定。示例性的,任务执行装置执行周期性任务期间,第一周期与第二周期的时间间隔为10ms,也即是本申请实施例中的预设时长为10ms。在第一周期内,任务执行装置执行周期性任务所需时长为5ms,在第二周期内,任务执行装置执行周期性任务所需时长为7ms。则可以确定在第一周期内的剩余时长为5ms,也即是在第一周期内执行FLASH模拟EEPROM操作任 务的时长为5ms,在第二周期内的剩余时长为3ms,也即是在第二周期内执行FLASH模拟EEPROM操作任务的时长为3ms。In a possible implementation manner, the remaining duration may be determined according to a difference between a preset duration and a duration for executing a periodic task in a corresponding period. Exemplarily, when the task executing device executes the periodic task, the time interval between the first period and the second period is 10ms, that is, the preset duration in the embodiment of the present application is 10ms. In the first cycle, the period required by the task execution device to execute the periodic task is 5 ms, and in the second cycle, the time required by the task execution device to execute the periodic task is 7 ms. Then it can be determined that the remaining time in the first cycle is 5ms, that is, the time for executing the FLASH simulation EEPROM operation task in the first cycle is 5ms, and the remaining time in the second cycle is 3ms, that is, in the second cycle The duration of executing the FLASH simulation EEPROM operation task in the cycle is 3ms.
在另一种可能的实现方式中,剩余时长还可以基于执行周期性任务时占用的资源以及执行FLASH模拟EEPROM操作任务占用的资源情况确定,也即是可以将执行周期性任务与执行FLASH模拟EEPROM操作任务占用资源不冲突的时间确定为剩余时长。示例性的,FLASH模拟EEPROM操作任务在多数情况下都是通过程序代码实现,执行程序代码时必须是单线程实现,不能与执行周期性任务并行。但是,当FLASH模拟EEPROM操作任务通过芯片等硬件实现时,是不与执行周期性任务冲突的,此时FLASH模拟EEPROM操作任务可以与周期性任务同时并行。In another possible implementation, the remaining duration can also be determined based on the resources occupied by executing periodic tasks and the resources occupied by executing FLASH simulation EEPROM operation tasks, that is, the execution of periodic tasks and the execution of FLASH simulation EEPROM can be determined. The time during which the resources occupied by the operation tasks do not conflict is determined as the remaining time. Exemplarily, the FLASH simulation EEPROM operation task is implemented by program code in most cases, and the program code must be implemented by a single thread, and cannot be executed in parallel with the periodic task. However, when the FLASH simulation EEPROM operation task is implemented by hardware such as a chip, it does not conflict with the execution of periodic tasks. At this time, the FLASH simulation EEPROM operation task can be paralleled with the periodic task at the same time.
可选的,在一种可能的实现方式中,可以通过设置周期性任务与FLASH模拟EEPROM操作任务的优先级的高低来实现在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务。例如,可以确定周期性任务的优先级高于FLASH模拟EEPROM操作任务的优先级,这样,任务执行装置在执行任务时,可以按照优先级的高低顺序执行任务。可实现优先执行周期性任务,在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务,这样,执行FLASH模拟EEPROM操作任务不会影响周期性任务的执行。Optionally, in a possible implementation manner, the FLASH simulation EEPROM operation task may be executed within at least one remaining period of execution of the periodic task by setting the priorities of the periodic task and the FLASH simulation EEPROM operation task. For example, it can be determined that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task, so that when the task execution device executes the task, it can execute the tasks in the order of priority. The periodic task can be executed preferentially, and the FLASH simulated EEPROM operation task is executed within at least one remaining period of execution of the periodic task. In this way, the execution of the FLASH simulated EEPROM operation task will not affect the execution of the periodic task.
可选的,在一种可能的实现方式中,可以设置FLASH模拟EEPROM操作任务由NVM调度机的校验接口设置事件触发,该事件触发用于触发执行FLASH模拟EEPROM操作任务。任务执行装置在检测到有非易失性数据写入的情况下,可以调用校验接口设置事件触发,触发在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。Optionally, in a possible implementation manner, the FLASH simulation EEPROM operation task can be set to be triggered by an event set by the verification interface of the NVM scheduler, and the event trigger is used to trigger the execution of the FLASH simulation EEPROM operation task. When the task execution device detects that non-volatile data is written, it can call the verification interface to set an event trigger to trigger the execution of the FLASH simulation EEPROM operation task within at least one remaining time period.
为了保证多个FLASH模拟EEPROM操作任务之间互不干扰,可以在一个FLASH模拟EEPROM操作子任务执行完之后再重新执行下一个FLASH模拟EEPROM操作子任务。所以,可选的,在一种可能的实现方式中,任务执行装置在调用校验接口设置事件触发之后,可以关闭校验接口,之后,在FLASH模 拟EEPROM操作任务执行完成后,重新开启校验接口。这样,由于若一个FLASH模拟EEPROM操作任务正在执行,由于校验接口关闭,任务执行装置无法调用校验接口设置事件触发,就无法启动另一个FLASH模拟EEPROM操作任务。In order to ensure that multiple FLASH simulation EEPROM operation tasks do not interfere with each other, the next FLASH simulation EEPROM operation subtask can be re-executed after a FLASH simulation EEPROM operation subtask is completed. Therefore, optionally, in a possible implementation, the task execution device can close the verification interface after calling the verification interface to set the event trigger, and then restart the verification after the FLASH simulation EEPROM operation task is completed. interface. In this way, if a FLASH simulation EEPROM operation task is being executed, because the verification interface is closed, the task execution device cannot call the verification interface to set an event trigger, and another FLASH simulation EEPROM operation task cannot be started.
可选的,在一种可能的实现方式中,校验接口可以为运行环境/客户端-服务端(Run-time environment/Cient-Server,RTE/C-S)接口。Optionally, in a possible implementation manner, the verification interface may be a runtime environment/client-server (Run-time environment/Client-Server, RTE/C-S) interface.
可以理解的是,在实际应用中,还可以通过其他方式设置事件触发,本申请实施例对此不做限定。示例性的,还可以通过修改实时操作系统中的程序代码实现事件触发。It can be understood that, in practical applications, event triggering may also be set in other ways, which is not limited in this embodiment of the present application. Exemplarily, event triggering can also be implemented by modifying program codes in the real-time operating system.
可选的,为了确保多个FLASH模拟EEPROM操作任务之间互不干扰,在一种可能的实现方式中,任务执行装置在调用校验接口设置事件触发之后,还可以将NVM调度机的调度状态变更为等待(PENDING)状态。PENDING状态下可以等待正在执行的周期性任务执行完成,在周期性任务执行完成后,将NVM调度机的调度状态变更为执行(BUSY)状态,BUSY状态和PENDING状态下NVM调度机不可以重新调度其他FLASH模拟EEPROM操作任务,待当前的FLASH模拟EEPROM操作任务执行完成后,将调度状态变更为空闲(IDLE)状态,在IDLE状态下可以重新调度其他FLASH模拟EEPROM操作任务。Optionally, in order to ensure that multiple FLASH simulated EEPROM operation tasks do not interfere with each other, in a possible implementation, after the task execution device calls the verification interface to set the event trigger, it can also set the scheduling status of the NVM scheduler to Change to PENDING state. In the PENDING state, you can wait for the periodic tasks being executed to complete. After the periodic tasks are executed, change the scheduling state of the NVM scheduler to the execution (BUSY) state. The NVM scheduler cannot be rescheduled in the BUSY state and the PENDING state. For other FLASH simulation EEPROM operation tasks, after the current FLASH simulation EEPROM operation task is completed, the scheduling state is changed to the idle (IDLE) state, and other FLASH simulation EEPROM operation tasks can be rescheduled in the IDLE state.
本申请实施例提供的任务执行方法中,由于在执行周期性任务期间,并不是所有时间都在执行任务。而是在一个周期内的周期性任务执行完之后,待至下个周期节点才继续执行周期性任务。所以,本申请实施例提供的技术方案可以将实现周期性任务过程中的空闲时间利用起来,执行FLASH模拟EEPROM操作任务。这样,FLASH模拟EEPROM可以即时完成非易失性数据的写入操作,不需要在下电阶段去执行FLASH模拟EEPROM操作任务。因此,本申请提供的技术方案相比相关技术中的任务执行方法可以降低下电阶段的时长。In the task execution method provided in the embodiment of the present application, during the execution of periodic tasks, the tasks are not executed all the time. Instead, after the periodic tasks in one cycle are executed, the periodic tasks will not be executed until the next cycle node. Therefore, the technical solution provided by the embodiment of the present application can utilize the idle time during the periodical task implementation to execute the FLASH simulation EEPROM operation task. In this way, the FLASH simulated EEPROM can complete the writing operation of non-volatile data in real time, and it is not necessary to perform the FLASH simulated EEPROM operation task in the power-off stage. Therefore, compared with the task execution method in the related art, the technical solution provided by the present application can reduce the duration of the power-off phase.
如图2所示,本申请实施例还提供了一种任务执行方法,包括S201-S203:As shown in Figure 2, the embodiment of the present application also provides a task execution method, including S201-S203:
S201、任务执行装置确定周期性任务的优先级高于FLASH模拟EEPROM 操作任务的优先级。S201. The task execution device determines that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task.
S202、任务执行装置在执行周期性任务期间,检测是否有非易失性数据写入。S202. The task execution device detects whether non-volatile data is written during the execution of the periodic task.
S203、在检测到有非易失性数据写入的情况下,任务执行装置根据优先级的高低,在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。S203. In the case of detecting that non-volatile data is written, the task execution device executes the FLASH simulation EEPROM operation task within at least one remaining duration according to the priority.
可选的,如图3所示,本申请实施例还提供了一种任务执行方法,包括S301-S303:Optionally, as shown in Figure 3, this embodiment of the present application also provides a task execution method, including S301-S303:
S301、任务执行装置确定FLASH模拟EEPROM操作任务由NVM调度机的校验接口设置事件触发。S301. The task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
S302、任务执行装置在执行周期性任务期间,检测是否有非易失性数据写入。S302. The task execution device detects whether non-volatile data is written during the execution of the periodic task.
S303、任务执行装置在检测到有非易失性数据写入的情况下,调用校验接口设置事件触发,触发在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。S303. When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and triggers the execution of the FLASH simulation EEPROM operation task within at least one remaining duration.
可选的,如图4所示,本申请实施例还提供了一种任务执行方法,包括S401-S405:Optionally, as shown in Figure 4, this embodiment of the present application also provides a task execution method, including S401-S405:
S401、任务执行装置确定FLASH模拟EEPROM操作任务由NVM调度机的校验接口设置事件触发。S401. The task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
S402、任务执行装置在执行周期性任务期间,检测是否有非易失性数据写入。S402. The task executing device detects whether non-volatile data is written during the execution of the periodic task.
S403、任务执行装置在检测到有非易失性数据写入的情况下,调用校验接口设置事件触发,并关闭校验接口。S403. When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and closes the verification interface.
S404、任务执行装置在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。S404. The task execution device executes the FLASH simulation EEPROM operation task within at least one remaining time period.
S405、任务执行装置在FLASH模拟EEPROM操作任务执行完成后,开启校验接口。S405. The task execution device opens the verification interface after the FLASH simulation EEPROM operation task is executed.
可选的,如图5所示,本申请实施例还提供了一种任务执行方法,包括S501-S505:Optionally, as shown in Figure 5, this embodiment of the present application also provides a task execution method, including S501-S505:
S501、任务执行装置确定FLASH模拟EEPROM操作任务由NVM调度机的校验接口设置事件触发。S501. The task execution device determines that the FLASH simulation EEPROM operation task is triggered by a verification interface setting event of the NVM scheduler.
S502、任务执行装置在执行周期性任务期间,检测是否有非易失性数据写入。S502. The task executing device detects whether non-volatile data is written during the execution of the periodic task.
S503、任务执行装置在检测到有非易失性数据写入的情况下,调用校验接口设置事件触发,且将NVM调度机的调度状态变更为等待状态。S503. When the task execution device detects that non-volatile data is written, it invokes the verification interface to set an event trigger, and changes the scheduling state of the NVM scheduler to a waiting state.
S504、任务执行装置在至少一个剩余时长内执行FLASH模拟EEPROM操作任务,在执行FLASH模拟EEPROM操作任务期间,将调度状态变更为执行状态。S504. The task execution device executes the FLASH simulation EEPROM operation task within at least one remaining duration, and changes the scheduling state to the execution state during execution of the FLASH simulation EEPROM operation task.
S505、任务执行装置在FLASH模拟EEPROM操作任务执行完成后,将调度状态变更为空闲状态。S505. The task execution device changes the scheduling state to an idle state after the FLASH simulation EEPROM operation task is executed.
为了更清楚的说明本申请实施例提供的任务执行方法,参照图6,下面将用一个实施例进行详细描述。如图6所示,本申请实施例提供的任务执行方法包括S601-S604:In order to more clearly illustrate the task execution method provided by the embodiment of the present application, referring to FIG. 6 , an embodiment will be used for a detailed description below. As shown in Figure 6, the task execution method provided by the embodiment of the present application includes S601-S604:
S601、任务执行装置中的实时操作系统启动,并初始化任务。S601. Start the real-time operating system in the task execution device, and initialize the task.
S602、任务执行装置执行周期任务A。S602. The task executing device executes periodic task A.
S603、任务执行装置执行周期任务B。S603. The task executing device executes the periodic task B.
S604、任务执行装置执行周期任务C。S604. The task executing device executes the periodic task C.
可以理解的是,任务执行装置是可以同时执行多个周期任务的,在实际应用中,可以任选多个周期任务中的一个,在该周期任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务。所以本申请实施例对于上述步骤S602-S604的先后顺序不做限定,可以并行执行。It can be understood that the task execution device can execute multiple periodic tasks at the same time. In practical applications, one of the multiple periodic tasks can be selected, and the FLASH simulation EEPROM operation task can be executed within at least one remaining duration of the periodic task. . Therefore, the embodiment of the present application does not limit the order of the above steps S602-S604, and may be executed in parallel.
示例性的,如图6所示,以在周期任务A的至少一个剩余时长内执行FLASH模拟EEPROM操作任务为例,任务执行装置在执行步骤S602期间,执行步骤 S6021-S6025。Exemplarily, as shown in FIG. 6 , taking the execution of the FLASH simulation EEPROM operation task within at least one remaining duration of periodic task A as an example, the task execution device executes steps S6021-S6025 during execution of step S602.
S6021、判断是否有非易失性数据写入。S6021. Determine whether there is non-volatile data written.
在任务执行装置确定有非易失性数据写入的情况下,执行S6022;在任务执行装置确定执行周期任务A期间无非易失性数据写入的情况下,仅需执行周期任务A。If the task execution device determines that there is non-volatile data written, execute S6022; if the task execution device determines that no non-volatile data is written during the execution of periodic task A, only periodic task A needs to be executed.
S6022、判断NVM调度机是否为IDLE状态。S6022. Determine whether the NVM scheduler is in the IDLE state.
在任务执行装置确定NVM调度机为IDLE状态的情况下,执行S6023;在任务执行装置确定NVM调度机不是IDLE状态,而是BUSY状态或者PENDING状态的情况下,在第一预设间隔之后重新执行S6022。When the task execution device determines that the NVM scheduler is in the IDLE state, execute S6023; when the task execution device determines that the NVM scheduler is not in the IDLE state, but in the BUSY state or the PENDING state, re-execute after the first preset interval S6022.
其中,第一预设间隔可以是人为事先确定的时长,本申请实施例对此不做限定。Wherein, the first preset interval may be a time length determined artificially in advance, which is not limited in this embodiment of the present application.
S6023、调用校验接口设置事件触发,关闭校验接口,将调度状态变更为PENDING状态。S6023. Call the verification interface to set an event trigger, close the verification interface, and change the scheduling state to the PENDING state.
S6024、在至少一个剩余时长内执行FLASH模拟EEPROM操作任务,在执行FLASH模拟EEPROM操作任务期间,将调度状态变更为BUSY状态。S6024. Execute the FLASH simulation EEPROM operation task within at least one remaining duration, and change the scheduling state to the BUSY state during the execution of the FLASH simulation EEPROM operation task.
S6025、在FLASH模拟EEPROM操作任务执行完成后,将调度状态变更为IDLE状态,且打开校验接口。S6025. After the execution of the FLASH simulation EEPROM operation task is completed, change the scheduling state to the IDLE state, and open the verification interface.
本申请实施例作为示例,仅示出了三个周期任务,本申请实施例对于周期任务的数量不做限定。The embodiment of the present application only shows three periodic tasks as an example, and the embodiment of the present application does not limit the number of periodic tasks.
可以理解的是,在实际应用中,任务执行装置执行周期任务B或者执行周期任务C期间,任务执行装置的处理过程与执行装置执行周期任务A期间的处理过程相同,可以参照前述步骤S6021-S6025的相关描述,本申请实施例不再赘述。It can be understood that, in practical applications, during the execution of periodic task B or periodic task C by the task execution device, the processing process of the task execution device is the same as that of the execution device during the execution of periodic task A, you can refer to the aforementioned steps S6021-S6025 Relevant descriptions are not repeated in this embodiment of the present application.
需要说明的是,在实际应用中,执行FLASH模拟EEPROM操作任务的时长较长,往往需要利用多个剩余时长。所以,可以利用多个连续周期性任务的剩余时长执行一个完整的FLASH模拟EEPROM操作任务,实现过程中可以根 据任务的优先级的高低执行。It should be noted that, in practical applications, it takes a long time to execute the FLASH simulation EEPROM operation task, and often needs to use multiple remaining time periods. Therefore, a complete FLASH simulation EEPROM operation task can be executed by using the remaining duration of multiple continuous periodic tasks, and it can be executed according to the priority of the task during the implementation process.
如图7所示,本申请实施例还提供了一种任务执行装置,该任务执行装置可以包括:检测模块11和执行模块12。As shown in FIG. 7 , the embodiment of the present application also provides a task execution device, which may include: a detection module 11 and an execution module 12 .
其中,检测模块11可以执行上述方法实施例中的S101,执行模块12可以执行上述方法实施例中的S102。Wherein, the detection module 11 may execute S101 in the above method embodiment, and the execution module 12 may execute S102 in the above method embodiment.
示例性地,检测模块11,设置为在执行模块12执行周期性任务期间,检测是否有非易失性数据写入;周期性任务的周期为预设时长;Exemplarily, the detection module 11 is configured to detect whether non-volatile data is written during the execution module 12 executing the periodic task; the period of the periodic task is a preset duration;
执行模块12,设置为在检测模块11检测到有非易失性数据写入的情况下,在执行周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务;每个周期对应一个剩余时长;每个剩余时长根据对应的周期中,执行周期性任务的时长以及预设时长确定。The execution module 12 is configured to execute the FLASH simulation EEPROM operation task in at least one remaining duration of performing periodic tasks when the detection module 11 detects that non-volatile data is written; each cycle corresponds to a remaining duration; Each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
可选的,在一种可能的实现方式中,本申请提供的任务执行装置还可以包括:确定模块,设置为确定周期性任务的优先级高于FLASH模拟EEPROM操作任务的优先级;Optionally, in a possible implementation, the task execution device provided by the present application may further include: a determination module configured to determine that the priority of the periodic task is higher than that of the FLASH simulation EEPROM operation task;
执行模块12设置为,根据优先级的高低,在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。The execution module 12 is configured to execute the FLASH simulation EEPROM operation task within at least one remaining duration according to the priority.
可选的,在另一种可能的实现方式中,确定模块还设置为确定FLASH模拟EEPROM操作任务由NVM调度机的校验接口设置事件触发;事件触发用于触发执行FLASH模拟EEPROM操作任务;Optionally, in another possible implementation, the determination module is also configured to determine that the FLASH simulation EEPROM operation task is triggered by the verification interface setting event of the NVM scheduler; the event trigger is used to trigger the execution of the FLASH simulation EEPROM operation task;
执行模块12设置为,在检测模块11检测到有非易失性数据写入的情况下,调用校验接口设置事件触发,触发在至少一个剩余时长内执行FLASH模拟EEPROM操作任务。The execution module 12 is configured to, when the detection module 11 detects that non-volatile data is written, call the verification interface to set an event trigger, and trigger the execution of the FLASH simulation EEPROM operation task within at least one remaining duration.
可选的,在另一种可能的实现方式中,本申请提供的任务执行装置还可以包括处理模块,处理模块设置为,在调用校验接口设置事件触发之后,关闭校验接口;处理模块还设置为,在FLASH模拟EEPROM操作任务执行完成后,开启校验接口。Optionally, in another possible implementation, the task execution device provided by the present application may also include a processing module, and the processing module is configured to close the verification interface after calling the verification interface to set an event trigger; the processing module also It is set to enable the verification interface after the FLASH simulation EEPROM operation task is completed.
可选的,在另一种可能的实现方式中,Optionally, in another possible implementation,
处理模块还设置为,在调用校验接口设置事件触发之后,将NVM调度机的调度状态变更为等待状态;The processing module is also configured to change the scheduling state of the NVM scheduling machine to a waiting state after calling the verification interface to set the event trigger;
处理模块还设置为,在执行FLASH模拟EEPROM操作任务期间,将调度状态变更为执行状态;The processing module is also configured to change the scheduling state to the execution state during the execution of the FLASH simulation EEPROM operation task;
处理模块还设置为,在FLASH模拟EEPROM操作任务执行完成后,将调度状态变更为空闲状态。The processing module is also configured to change the scheduling state to an idle state after the FLASH simulation EEPROM operation task is executed.
可选的,在另一种可能的实现方式中,上述“校验接口”为RTE/C-S接口。Optionally, in another possible implementation manner, the foregoing "verification interface" is an RTE/C-S interface.
可选的,在另一种可能的实现方式中,检测模块11设置为:确定NVM调度机的写入接口是否检测到写入请求;在确定写入接口检测到写入请求的情况下,确定有非易失性数据写入。Optionally, in another possible implementation, the detection module 11 is configured to: determine whether the write interface of the NVM scheduler detects a write request; if it is determined that the write interface detects a write request, determine There is non-volatile data written.
可选的,任务执行装置还可以包括存储模块,存储模块设置为存储该任务执行装置的程序代码等。Optionally, the task performing device may further include a storage module configured to store program codes of the task performing device and the like.
如图8所示,本申请实施例还提供一种任务执行装置,包括存储器41、处理器42、总线43和通信接口44;存储器41设置为存储计算机执行指令,处理器42与存储器41通过总线43连接;当任务执行装置运行时,处理器42执行存储器41存储的计算机执行指令,以使任务执行装置执行如上述实施例提供的任意一种任务执行方法。As shown in Figure 8, the embodiment of the present application also provides a task execution device, including a memory 41, a processor 42, a bus 43, and a communication interface 44; 43 connection; when the task execution device is running, the processor 42 executes the computer-executed instructions stored in the memory 41, so that the task execution device executes any one of the task execution methods provided in the above-mentioned embodiments.
可选的,该任务执行装置还可以包括收发器,该收发器设置为在任务执行装置的处理器的控制下,执行收发数据、信令或者信息的步骤,例如,接收写入请求。Optionally, the task execution device may further include a transceiver configured to perform the steps of sending and receiving data, signaling or information under the control of the processor of the task execution device, for example, receiving a write request.
可选的,该任务执行装置可以是用于实现任务执行的物理机,也可以是物理机中的一部分装置,例如可以是物理机中的芯片系统。该芯片系统设置为支持任务执行装置实现本申请上述任意一种任务执行方法中所涉及的功能,例如,接收,发送或处理上述任务执行方法中所涉及的数据和/或信息。该芯片系统包括芯片,也可以包括其他分立器件或电路结构。Optionally, the task execution device may be a physical machine for implementing task execution, or may be a part of the physical machine, for example, may be a chip system in the physical machine. The chip system is configured to support the task execution device to implement the functions involved in any of the above task execution methods of the present application, for example, receive, send or process the data and/or information involved in the above task execution methods. The chip system includes a chip, and may also include other discrete devices or circuit structures.
在具体的实现中,作为一种实施例,处理器42(42-1和42-2)可以包括至少一个中央处理器(central processing unit,CPU),例如图8中所示的CPU0和CPU1。且作为一种实施例,任务执行装置可以包括多个处理器42,例如图8中所示的处理器42-1和处理器42-2。这些处理器42中的每一个CPU可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器42可以指至少一个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the processors 42 (42-1 and 42-2) may include at least one central processing unit (central processing unit, CPU), such as CPU0 and CPU1 shown in FIG. 8 . And as an embodiment, the task execution apparatus may include multiple processors 42, such as the processor 42-1 and the processor 42-2 shown in FIG. 8 . Each CPU in these processors 42 may be a single-core processor (single-CPU), or a multi-core processor (multi-CPU). Processor 42 herein may refer to at least one device, circuit, and/or processing core for processing data (eg, computer program instructions).
存储器41可以是只读存储器41(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器41可以是独立存在,通过总线43与处理器42相连接。存储器41也可以和处理器42集成在一起。 Memory 41 can be read-only memory 41 (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions Type of dynamic storage device, also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), read-only disc (compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other medium accessed by a computer, but not limited to. The memory 41 may exist independently, and is connected to the processor 42 through the bus 43 . The memory 41 can also be integrated with the processor 42 .
在具体的实现中,存储器41,设置为存储本申请中的数据和执行本申请的软件程序对应的计算机执行指令。处理器42可以通过运行或执行存储在存储器41内的软件程序,以及调用存储在存储器41内的数据,任务执行装置的各种功能。In a specific implementation, the memory 41 is set to store the data in this application and the computer-executed instructions corresponding to executing the software program of this application. The processor 42 can perform various functions of the device by running or executing software programs stored in the memory 41 and calling data stored in the memory 41 .
通信接口44,使用任何收发器一类的装置,设置为与其他设备或通信网络通信,如控制系统、无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。通信接口44可以包括接收单元实现接收功能,以及发送单元实现发送功能。 Communication interface 44, using any device such as a transceiver, configured to communicate with other devices or communication networks, such as control systems, wireless access networks (radio access network, RAN), wireless local area networks (wireless local area networks, WLAN), etc. . The communication interface 44 may include a receiving unit to implement a receiving function, and a sending unit to implement a sending function.
总线43,可以是工业标准体系结构(industry standard architecture,ISA)总 线、外部设备互连(peripheral component interconnect,PCI)总线或扩展工业标准体系结构(extended industry standard architecture,EISA)总线等。该总线43可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 43 may be an industry standard architecture (industry standard architecture, ISA) bus, a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, etc. The bus 43 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.
作为一个示例,结合图7,任务执行装置中的处理模块实现的功能与图8中的处理器实现的功能相同,任务执行装置中的存储模块实现的功能与图8中的存储器实现的功能相同。As an example, with reference to Figure 7, the processing module in the task execution device implements the same function as the processor in Figure 8, and the storage module in the task execution device implements the same function as the memory in Figure 8 .
本实施例中相关内容的解释可参考上述方法实施例,此处不再赘述。For the explanation of relevant content in this embodiment, reference may be made to the foregoing method embodiment, and details are not repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the working process of the above-described system, device, and unit, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.
本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当计算机执行该指令时,使得计算机执行上述实施例提供的任意一种任务执行方法。The embodiment of the present application also provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium, and when the computer executes the instruction, the computer executes any one of the task execution methods provided in the foregoing embodiments.
其中,计算机可读存储介质,例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有至少一个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(erasable programmable read-only memory,EPROM)、寄存器、硬盘、光纤、CD-ROM、光存储器件、磁存储器件、或者上述的任意合适的组合、或者本领域熟知的任何其它形式的计算机可读存储介质。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于特定用途集 成电路(application specific integrated circuit,ASIC)中。在本申请实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Wherein, the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connection with at least one lead, portable computer disk, hard disk, RAM, ROM, erasable programmable read-only memory (erasable programmable read-only memory) only memory, EPROM), registers, hard disks, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the above, or any other form of computer-readable storage media known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be a component of the processor. The processor and storage medium may reside in an application specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, device or device.

Claims (10)

  1. 一种任务执行方法,包括:A method for performing tasks, comprising:
    执行周期性任务期间,检测是否有非易失性数据写入;所述周期性任务的周期为预设时长;During the execution of the periodic task, detect whether there is non-volatile data writing; the period of the periodic task is a preset duration;
    响应于检测到有所述非易失性数据写入,在执行所述周期性任务的至少一个剩余时长内执行FLASH模拟带电可擦可编程只读存储器EEPROM操作任务;每个周期对应一个剩余时长;每个剩余时长根据对应的周期中,执行所述周期性任务的时长以及所述预设时长确定。In response to detecting that the non-volatile data is written, execute the FLASH simulation chargeable erasable programmable read-only memory EEPROM operation task within at least one remaining period of performing the periodic task; each cycle corresponds to a remaining period ; Each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding period.
  2. 根据权利要求1所述的任务执行方法,还包括:The task execution method according to claim 1, further comprising:
    确定所述周期性任务的优先级高于所述FLASH模拟EEPROM操作任务的优先级;Determine that the priority of the periodic task is higher than the priority of the FLASH simulation EEPROM operation task;
    所述在执行所述周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务,包括:根据所述优先级的高低,在所述至少一个剩余时长内执行所述FLASH模拟EEPROM操作任务。The performing the FLASH simulation EEPROM operation task within at least one remaining period of executing the periodic task includes: executing the FLASH simulation EEPROM operation task within the at least one remaining period according to the priority.
  3. 根据权利要求1所述的任务执行方法,还包括:The task execution method according to claim 1, further comprising:
    确定所述FLASH模拟EEPROM操作任务由非易失性存储器NVM调度机的校验接口设置事件触发;所述事件触发用于触发执行所述FLASH模拟EEPROM操作任务;It is determined that the FLASH simulation EEPROM operation task is triggered by the verification interface setting event of the non-volatile memory NVM scheduler; the event trigger is used to trigger execution of the FLASH simulation EEPROM operation task;
    所述响应于检测到有所述非易失性数据写入,在执行所述周期性任务的至少一个剩余时长内执行FLASH模拟EEPROM操作任务,包括;In response to detecting that the non-volatile data is written, performing a FLASH simulation EEPROM operation task within at least one remaining period of executing the periodic task includes;
    响应于检测到有所述非易失性数据写入,调用所述校验接口设置所述事件触发,触发在所述至少一个剩余时长内执行所述FLASH模拟EEPROM操作任务。In response to detecting that the non-volatile data is written, calling the verification interface to set the event trigger triggers execution of the FLASH simulation EEPROM operation task within the at least one remaining duration.
  4. 根据权利要求3所述的任务执行方法,还包括:The task execution method according to claim 3, further comprising:
    在所述调用所述校验接口设置所述事件触发之后,关闭所述校验接口;After the event trigger is set by calling the verification interface, closing the verification interface;
    在所述FLASH模拟EEPROM操作任务执行完成后,开启所述校验接口。After the execution of the FLASH simulation EEPROM operation task is completed, the verification interface is opened.
  5. 根据权利要求3所述的任务执行方法,还包括:The task execution method according to claim 3, further comprising:
    在所述调用所述校验接口设置所述事件触发之后,将所述NVM调度机的调度状态变更为等待状态;After the event trigger is set by calling the verification interface, changing the scheduling state of the NVM scheduler to a waiting state;
    在执行所述FLASH模拟EEPROM操作任务期间,将所述NVM调度机的调度状态变更为执行状态;During the execution of the FLASH simulation EEPROM operation task, the scheduling state of the NVM scheduler is changed to an execution state;
    在所述FLASH模拟EEPROM操作任务执行完成后,将所述NVM调度机的调度状态变更为空闲状态。After the execution of the FLASH simulation EEPROM operation task is completed, the scheduling state of the NVM scheduling machine is changed to an idle state.
  6. 根据权利要求3-5中任意一项所述的任务执行方法,其中,所述校验接口为运行环境/客户端-服务端RTE/C-S接口。The task execution method according to any one of claims 3-5, wherein the verification interface is an operating environment/client-server RTE/C-S interface.
  7. 根据权利要求1所述的任务执行方法,其中,所述检测是否有非易失性数据写入,包括:The task execution method according to claim 1, wherein said detecting whether non-volatile data is written includes:
    确定NVM调度机的写入接口是否检测到写入请求;Determine whether the write interface of the NVM scheduler detects a write request;
    响应于确定所述NVM调度机的写入接口检测到所述写入请求,确定有所述非易失性数据写入。In response to determining that the write interface of the NVM scheduler detects the write request, it is determined that the non-volatile data is written.
  8. 一种任务执行装置,包括:A task performance device, comprising:
    检测模块,设置为在执行模块执行周期性任务期间,检测是否有非易失性数据写入;所述周期性任务的周期为预设时长;The detection module is configured to detect whether non-volatile data is written during the execution of the periodic task by the execution module; the period of the periodic task is a preset duration;
    所述执行模块,设置为响应于所述检测模块检测到有所述非易失性数据写入,在执行所述周期性任务的至少一个剩余时长内执行FLASH模拟带电可擦可编程只读存储器EEPROM操作任务;每个周期对应一个剩余时长;每个剩余时长根据对应的周期中,执行所述周期性任务的时长以及所述预设时长确定。The execution module is configured to, in response to the detection module detecting that the non-volatile data is written, execute the FLASH simulation charged erasable programmable read-only memory during at least one remaining period of executing the periodic task EEPROM operation tasks; each cycle corresponds to a remaining duration; each remaining duration is determined according to the duration of executing the periodic task and the preset duration in the corresponding cycle.
  9. 一种任务执行装置,包括存储器、处理器、总线和通信接口;所述存储器设置为存储计算机执行指令,所述处理器与所述存储器通过所述总线连接;A task execution device, comprising a memory, a processor, a bus, and a communication interface; the memory is configured to store instructions executed by a computer, and the processor is connected to the memory through the bus;
    在所述任务执行装置运行的情况下,处理器执行所述存储器存储的所述计算机执行指令,以使所述任务执行装置执行如权利要求1-7任意一项所述的任务执行方法。When the task execution device is running, the processor executes the computer-executed instructions stored in the memory, so that the task execution device executes the task execution method according to any one of claims 1-7.
  10. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令, 在计算机执行所述指令的情况下,使得所述计算机执行如权利要求1-7任意一项所述的任务执行方法。A computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer executes the instructions, the computer executes the task execution method according to any one of claims 1-7 .
PCT/CN2022/086072 2021-05-11 2022-04-11 Task execution method and apparatus, and storage medium WO2022237419A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110513244.X 2021-05-11
CN202110513244.XA CN113238842A (en) 2021-05-11 2021-05-11 Task execution method and device and storage medium

Publications (1)

Publication Number Publication Date
WO2022237419A1 true WO2022237419A1 (en) 2022-11-17

Family

ID=77133570

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/086072 WO2022237419A1 (en) 2021-05-11 2022-04-11 Task execution method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN113238842A (en)
WO (1) WO2022237419A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238842A (en) * 2021-05-11 2021-08-10 中国第一汽车股份有限公司 Task execution method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130055276A1 (en) * 2011-08-26 2013-02-28 Knu-Industry Cooperation Foundation Task scheduling method and apparatus
US10180855B1 (en) * 2017-06-13 2019-01-15 Parallels International Gmbh System and method for controlling idle state of operating system
CN110502294A (en) * 2019-07-20 2019-11-26 华为技术有限公司 The method, apparatus and electronic equipment of data processing
CN113238842A (en) * 2021-05-11 2021-08-10 中国第一汽车股份有限公司 Task execution method and device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130055276A1 (en) * 2011-08-26 2013-02-28 Knu-Industry Cooperation Foundation Task scheduling method and apparatus
US10180855B1 (en) * 2017-06-13 2019-01-15 Parallels International Gmbh System and method for controlling idle state of operating system
CN110502294A (en) * 2019-07-20 2019-11-26 华为技术有限公司 The method, apparatus and electronic equipment of data processing
CN113238842A (en) * 2021-05-11 2021-08-10 中国第一汽车股份有限公司 Task execution method and device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
FENG NING: "Research on Scheduling Scheme of a Distributed CNC System", MODULAR MACHINE TOOL & AUTOMATIC MANUFACTURING TECHNIQUE, no. 10, 31 October 2012 (2012-10-31), pages 87 - 90, XP093004748, ISSN: 1001-2265 *
LI DI, WAN JIAFU, YE FENG, LAI YIZONG: "Two-level Hierarchical Scheduling Scheme of Hybrid Tasks for Software CNC System", JIXIE GONEHENG XUEBAI - CHINESE JOURNAL OF MECHANICAL ENGINEERING, JIXIE GONGYE CHUBANCHE, BEIJING, CN, vol. 44, no. 12, 31 December 2008 (2008-12-31), CN , pages 157 - 162, XP093004753, ISSN: 0577-6686, DOI: 10.3901/JME.2008.12.157 *
WAN JIAFU, LI DI, YE FENG, LAI YI-ZONG: "Hybrid task scheduling algorithm oriented to software computer numerical control system", COMPUTER INTEGRATED MANUFACTURING SYSTEMS, BEIJING ADVANCED MANUFACTURING TECHNOLOGY CONSULTATION CENTER, CN, vol. 15, no. 3, 31 March 2009 (2009-03-31), CN , pages 529 - 536, XP093004751, ISSN: 1006-5911, DOI: 10.13196/j.cims.2009.03.115.wanjf.021 *
XIONG HAOLUN; YAN GUORUI; LI GUOJUN; LYU DA: "Design of On-orbit Software Reconfiguration System of Small Satellite Based on Minimum System", JOURNAL OF TELEMETRY, TRACKING AND COMMAND, vol. 41, no. 3, 31 May 2020 (2020-05-31), pages 48 - 55, XP009542803, ISSN: 2095-1000, DOI: 10.13435/j.cnki.ttc.003073 *

Also Published As

Publication number Publication date
CN113238842A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
US10073711B2 (en) Virtual machine monitor configured to support latency sensitive virtual machines
CN100573456C (en) A kind of paralleling multi-processor virtual machine system
US9384039B2 (en) Parallel memory migration
US20240264940A1 (en) Write data cache method and system, device, and storage medium
US20140282507A1 (en) Systems and methods of using a hypervisor with guest operating systems and virtual processors
WO2012131507A1 (en) Running a plurality of instances of an application
KR101901587B1 (en) Method and apparatus to guarantee real time processing of soft real-time operating system
US8943516B2 (en) Mechanism for optimized intra-die inter-nodelet messaging communication
WO2019028682A1 (en) Multi-system shared memory management method and device
US20120102012A1 (en) Cross-region access method for embedded file system
US10545890B2 (en) Information processing device, information processing method, and program
CN115658277A (en) Task scheduling method and device, electronic equipment and storage medium
KR102205899B1 (en) Method and apparatus for avoiding bank conflict in memory
CN112306669A (en) Task processing method and device based on multi-core system
US7818558B2 (en) Method and apparatus for EFI BIOS time-slicing at OS runtime
WO2024119988A1 (en) Process scheduling method and apparatus in multi-cpu environment, electronic device, and medium
CN113010265A (en) Pod scheduling method, scheduler, memory plug-in and system
WO2022237419A1 (en) Task execution method and apparatus, and storage medium
EP1760580A1 (en) Processing operation information transfer control system and method
EP3633507B1 (en) Technologies for secure and efficient native code invocation for firmware services
CN112306652A (en) Wake-up and scheduling with context-aware functionality
Hahn et al. Improving user experience of android smartphones using foreground app-aware I/O management
US20140136818A1 (en) Fetch less instruction processing (flip) computer architecture for central processing units (cpu)
CN110618794B (en) Method and system for accessing NandFlash by SSD firmware
WO2019117854A1 (en) Controller event queues

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22806389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22806389

Country of ref document: EP

Kind code of ref document: A1