Agricultural machinery high adaptability embedded software architecture system, method and terminal
The highly adaptable embedded software architecture system for agricultural machinery solves the problem of inflexible adaptation to multiple hardware platforms and operating systems in existing technologies, and realizes flexible adaptation of hardware drivers and system scheduling, reducing costs and improving response efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI HUANGUO INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-06-30
AI Technical Summary
The existing embedded software systems for agricultural machinery are difficult to adapt flexibly to multiple hardware platforms and operating systems at the same time, resulting in a high degree of binding between hardware drivers and system functions, which increases R&D costs and compatibility risks.
The system adopts an embedded software architecture that is highly adaptable to agricultural machinery, including a user interaction layer, an application service layer, a virtual service interface layer, a platform layer, a virtual function object interface layer, and underlying adaptation components. Through standardized service interfaces and function call instructions, it achieves flexible adaptation of hardware drivers and system scheduling.
It achieves compatibility with multiple hardware platforms and operating systems, ensuring efficient real-time response and reducing porting and reconstruction costs, while providing a unified user interaction experience.
Smart Images

Figure CN122308952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of embedded systems, and in particular to a highly adaptable embedded software architecture system, method, and terminal for agricultural machinery. Background Technology
[0002] Embedded software systems are the core support for intelligent operation of agricultural machinery. They are widely used in various agricultural equipment such as seeders, harvesters, plant protection drones, and precision irrigation equipment. Their performance directly affects the operating accuracy, response efficiency, and adaptability of agricultural machinery. With the upgrading of modern agriculture's demand for precision agriculture and intelligent management, agricultural machinery is developing towards multi-hardware configuration, multi-system compatibility, and real-time response. At the hardware level, this includes different models of control chips such as STM32 and IMXRT, as well as peripherals such as serial ports, CAN buses, and various sensors. At the operating system level, it needs to be compatible with multiple real-time kernels such as uCOS, FreeRTOS, and RT-Thread. At the same time, the software is required to quickly respond to real-time needs such as working condition switching and parameter adjustment during agricultural machinery operation.
[0003] However, existing embedded software systems for agricultural machinery struggle to simultaneously meet these core requirements. Traditional solutions are mostly designed for single hardware platforms, only compatible with a few operating systems within a fixed agricultural machinery hardware architecture. When agricultural machinery manufacturers need to replace hardware control modules or switch operating systems, the high degree of coupling between software layers—where hardware drivers, system functions, and upper-level operational applications are directly bound—forces R&D personnel to repeatedly develop a large amount of low-level adaptation code, and even refactor the upper-level operational logic. This not only prolongs product development and iteration cycles but also significantly increases labor costs and compatibility risks. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a highly adaptable embedded software architecture system, method and terminal for agricultural machinery, which solves the technical problem that multiple hardware platforms and multiple operating systems are difficult to adapt flexibly in the prior art.
[0005] To achieve the above and other related objectives, this invention provides a highly adaptable embedded software architecture system for agricultural machinery. The system includes: a user interaction layer, an application service layer, a virtual service interface layer, a platform layer, a virtual function object interface layer, and a bottom-level adaptation component. The user interaction layer receives agricultural machinery operation requests initiated by a user and transmits them to the application service layer. The application service layer, connected to the user interaction layer, invokes the corresponding service interface based on the agricultural machinery operation request. The virtual service interface layer, connected to the application service layer, provides standardized service interfaces and adapts corresponding function call instructions based on these service interfaces. The platform layer, connected to the virtual service interface layer, invokes the corresponding virtual function object based on the function call instruction. The virtual function object interface layer, connected to the platform layer, encapsulates agricultural machinery hardware functions and agricultural machinery system functions into virtual function objects and sends standardized call requests to the bottom-level adaptation component based on these virtual function objects. The bottom-level adaptation component, connected to the virtual function object interface layer, executes corresponding hardware driver operations and system scheduling operations based on the standardized call requests.
[0006] In one embodiment of the present invention, the application service layer includes a hardware application service layer and a system application service layer; wherein, the hardware application service layer is used to receive hardware agricultural machinery operation requests transmitted by the user interaction layer, and call hardware service interfaces based on the hardware agricultural machinery operation requests; the system application service layer is used to receive system agricultural machinery operation requests transmitted by the user interaction layer, and call system service interfaces and / or message service interfaces based on the system agricultural machinery operation requests.
[0007] In one embodiment of the present invention, the virtual service interface layer includes a hardware service interface layer, a system service interface layer, and a message service interface layer; wherein, the hardware service interface layer is used to provide standardized hardware service interfaces and adapt hardware function call instructions based on the hardware service interfaces to send to the platform layer; the system service interface layer is used to provide standardized system service interfaces and adapt system function call instructions based on the system service interfaces to send to the platform layer; the message service interface layer is used to provide standardized message service interfaces and adapt message function call instructions based on the message service interfaces to send to the platform layer.
[0008] In one embodiment of the present invention, the platform layer includes a hardware platform layer and an operating system platform layer; wherein, the hardware platform layer is used to receive the hardware function call instruction and call the corresponding hardware function object in the virtual function object interface layer based on the hardware function call instruction; the operating system platform layer is used to receive the system function call instruction and the message function call instruction, and call the corresponding system function object in the virtual function object interface layer based on the system function call instruction and the message function call instruction respectively.
[0009] In one embodiment of the present invention, the virtual function object interface layer includes a hardware object layer and a system object layer; wherein, the hardware object layer is used to encapsulate agricultural machinery hardware functions into hardware function objects, and issue hardware driver call requests to the underlying adapter components based on the hardware function objects; the system object layer is used to encapsulate agricultural machinery system functions into system function objects, and issue system scheduling call requests to the underlying adapter components based on the system function objects.
[0010] In one embodiment of the present invention, the hardware function object is used to uniformly call multiple child hardware objects through a parent hardware management object, the child hardware objects including I / O objects, serial port objects, and CAN objects; the system function object is used to uniformly call multiple subsystem objects through a parent system management object, the subsystem objects including memory objects and task objects.
[0011] In one embodiment of the present invention, the underlying adaptation component includes a hardware driver module and an operating system kernel module; wherein, the hardware driver module is used to respond to the hardware driver call request of the virtual function object interface layer and execute the corresponding hardware driver operation; the operating system kernel module is used to respond to the system scheduling call request of the virtual function object interface layer and execute the corresponding system scheduling operation.
[0012] In one embodiment of the present invention, the user interaction layer includes an information collection module and an information presentation module; wherein, the information collection module is used to receive agricultural machinery operation requests initiated by users, divide the agricultural machinery operation requests into hardware agricultural machinery operation requests and system agricultural machinery operation requests, and transmit them to the hardware application service layer and the system application service layer of the application service layer respectively; the information presentation module is used to present the agricultural machinery operation feedback information returned by the application service layer to the user.
[0013] To achieve the above and other related objectives, this invention provides a highly adaptable embedded software architecture method for agricultural machinery. The method includes: receiving a user-initiated agricultural machinery operation request and passing it to an application service layer; receiving the user-initiated agricultural machinery operation request and passing it to the application service layer; invoking a corresponding service interface based on the agricultural machinery operation request; providing standardized service interfaces and adapting corresponding function call instructions based on the service interfaces; invoking a corresponding virtual function object based on the function call instructions; encapsulating agricultural machinery hardware functions and agricultural machinery system functions into virtual function objects, and issuing standardized call requests to underlying adaptation components based on the virtual function objects; and executing corresponding hardware driver operations and system scheduling operations based on the standardized call requests.
[0014] To achieve the above and other related objectives, the present invention provides an electronic terminal, comprising: one or more memories and one or more processors; the one or more memories are used to store computer programs; the one or more processors are connected to the memories and are used to run the computer programs to execute the agricultural machinery highly adaptable embedded software architecture method.
[0015] As described above, this invention is a highly adaptable embedded software architecture system, method, and terminal for agricultural machinery, with the following beneficial effects: This invention receives agricultural machinery operation requests initiated by users and transmits them to the application service layer; based on the agricultural machinery operation request, it calls the corresponding service interface and further adapts it into a function call instruction; based on the function call instruction, it calls the corresponding virtual function object and sends a standardized call request to the underlying adaptation components; finally, it executes the corresponding hardware driver operation and system scheduling operation. This invention solves the problem in the prior art where hardware drivers and system functions on agricultural machinery are highly bound, making flexible adaptation between multiple hardware and operating systems difficult. This invention is designed for the special operating scenarios of agricultural machinery, possessing multi-hardware platform adaptation and multi-operating system compatibility capabilities, while ensuring efficient real-time response and reducing porting and reconstruction costs. Attached Figure Description
[0016] Figure 1 The diagram shows a module schematic of an agricultural machinery highly adaptable embedded software architecture system according to an embodiment of the present invention.
[0017] Figure 2 The diagram shown is a structural schematic of an agricultural machinery highly adaptable embedded software architecture method according to an embodiment of the present invention.
[0018] Figure 3 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of the present invention. Detailed Implementation
[0019] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0020] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of the invention. It should be understood that other embodiments may also be used, and changes in mechanical composition, structure, electrical system, and operation may be made without departing from the spirit and scope of the invention. The following detailed description should not be considered limiting, and the scope of the embodiments of the invention is defined only by the claims of the published patents. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. Spatially related terms, such as “upper,” “lower,” “left,” “right,” “below,” “below,” “lower part,” “above,” “upper part,” etc., may be used herein to illustrate the relationship between one element or feature shown in the figures and another element or feature.
[0021] Throughout this specification, when it is said that a part is "connected" to another part, this includes not only "direct connection" but also "indirect connection" by placing other elements in between. Furthermore, when it is said that a part "includes" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather means that other constituent elements may also be included.
[0022] The terms "first," "second," and "third," etc., used herein are for the purpose of describing various parts, components, regions, layers, and / or segments, but are not limiting. These terms are used only to distinguish one part, component, region, layer, or segment from others. Therefore, the "first part," "component," "region," "layer," or "segment" described below may refer to a "second part," "component," "region," "layer," or "segment" without departing from the scope of this invention.
[0023] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, operation, element, component, item, kind, and / or group, but do not preclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition arise only when combinations of elements, functions, or operations are inherently mutually exclusive in some manner.
[0024] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations: <1> CAN: Controller Area Network, a type of controller area network used for dedicated communication links in agricultural machinery, supporting command transmission and status data interaction between underlying adapter components and agricultural machinery hardware such as header drivers and Beidou navigation modules.
[0025] <2> RTOS: Real-Time Operating System, a type of real-time operating system, the core carrier of agricultural machinery operation systems, including but not limited to FreeRTOS, uCOS-III, and RT-Thread.
[0026] <3> STM32: A core control hardware for agricultural machinery, adapted to the HAL library driver framework, supporting the execution of control instructions for low- to mid-range agricultural machinery hardware.
[0027] <4> IMXRT: A core control hardware for agricultural machinery, adapted to its SDK native driver framework, to meet the high-precision, high-computing-power hardware control requirements of high-end intelligent agricultural machinery.
[0028] <5> FPGA: A hardware control platform specifically designed for agricultural machinery, with its own custom logic control interface for the hardware logic implementation of precision agricultural machinery operations.
[0029] This invention provides a highly adaptable embedded software architecture system, method, and terminal for agricultural machinery. The invention receives user-initiated agricultural machinery operation requests and passes them to the application service layer; based on the operation request, it calls the corresponding service interface and further adapts it into a function call instruction; based on the function call instruction, it calls the corresponding virtual function object and sends a standardized call request to the underlying adaptation components; finally, it executes the corresponding hardware driver operation and system scheduling operation. This invention solves the problem in existing technologies where hardware drivers and system functions on agricultural machinery are highly bound, making flexible adaptation between multiple hardware and operating systems difficult. Targeting the special operating scenarios of agricultural machinery, this invention possesses multi-hardware platform adaptation and multi-operating system compatibility capabilities, while ensuring efficient real-time response and reducing porting and reconstruction costs.
[0030] The present invention will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can readily implement it. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.
[0031] like Figure 1 This invention presents a schematic diagram of a highly adaptable embedded software architecture system 100 for agricultural machinery, as described in an embodiment of the present invention.
[0032] The system 100 includes: a user interaction layer 101, an application service layer 102, a virtual service interface layer 103, a platform layer 104, a virtual function object interface layer 105, and a bottom-level adaptation component 106; wherein, the user interaction layer 101 is used to receive agricultural machinery operation requests initiated by users and pass them to the application service layer 102; the application service layer 102 is connected to the user interaction layer 101 and is used to call the corresponding service interface based on the agricultural machinery operation request; the virtual service interface layer 103 is connected to the application service layer 102 and is used to provide standardized service interfaces and based on the service interfaces The platform layer 104, connected to the virtual service interface layer 103, is used to call the corresponding virtual function object based on the function call instruction. The virtual function object interface layer 105, connected to the platform layer 104, is used to encapsulate agricultural machinery hardware functions and agricultural machinery system functions into virtual function objects, and send standardized call requests to the underlying adaptation component 106 based on the virtual function objects. The underlying adaptation component 106, connected to the virtual function object interface layer 105, is used to execute corresponding hardware driver operations and system scheduling operations based on the standardized call requests.
[0033] In one embodiment, the user interaction layer 101 includes an information collection module 1011 and an information presentation module 1012; wherein, the information collection module 1011 is used to receive agricultural machinery operation requests initiated by users, divide the agricultural machinery operation requests into hardware agricultural machinery operation requests and system agricultural machinery operation requests, and transmit them to the hardware application service layer 1021 and the system application service layer 1022 of the application service layer 102 respectively; the information presentation module 1012 is used to present the agricultural machinery operation feedback information returned by the application service layer 102 to the user.
[0034] Specifically, the information acquisition module 1011 is used to receive agricultural machinery operation requests initiated by users through agricultural machinery-specific input devices such as operation control panel buttons, touch screens, mechanical knobs, and remote control terminals. Based on the attributes of the operation object, the agricultural machinery operation requests are divided into hardware agricultural machinery operation requests and system agricultural machinery operation requests. The hardware agricultural machinery operation requests refer to the control requirements of agricultural machinery-specific hardware, such as header height adjustment, threshing drum speed setting, Beidou navigation and positioning parameter configuration, and CAN bus peripheral start / stop control. The system agricultural machinery operation requests refer to the configuration and scheduling requirements of the operation system, such as operation mode switching, task priority setting, memory resource allocation, and multi-operation task coordination instructions. The two types of operation information are accurately transmitted to the hardware application service layer 1021 and the system application service layer 1022 corresponding to the application service layer 102, respectively, to ensure accurate matching between operation requirements and application service layer processing logic. The information presentation module 1012 is used to receive standardized agricultural machinery operation feedback information returned by the application service layer 102. The standardized agricultural machinery operation feedback information includes hardware operating status data, such as the current height of the cutting platform, navigation positioning accuracy, and sensor sampling values; system operating parameters, such as operating system kernel load, task execution progress, and memory usage; and fault alarm information, such as sensor communication interruption alarm, hardware driver abnormality prompt, and operation parameter over-limit warning. The information is presented to the user through agricultural machinery-compatible output devices such as high-definition LCD operation display screens, graded indicator lights, voice broadcast modules, buzzers, and remote monitoring platform push notifications. The presentation format and interaction logic of the feedback information remain standardized and are not affected by the underlying hardware platform or operation system model, ensuring that users obtain a consistent interactive experience on agricultural machinery equipment with different configurations.
[0035] In one embodiment, the application service layer 102 includes a hardware application service layer 1021 and a system application service layer 1022; wherein, the hardware application service layer 1021 is used to receive hardware agricultural machinery operation requests transmitted by the user interaction layer 101, and call hardware service interfaces based on the hardware agricultural machinery operation requests; the system application service layer 1022 is used to receive system agricultural machinery operation requests transmitted by the user interaction layer 101, and call system service interfaces and / or message service interfaces based on the system agricultural machinery operation requests.
[0036] Specifically, the hardware application service layer 1021 is used to accurately receive hardware agricultural machinery operation requests transmitted by the user interaction layer 101. These requests directly target the control needs of agricultural machinery-specific hardware, such as header height adjustment, Beidou navigation and positioning startup, CAN bus peripheral start / stop, and sensor sampling parameter configuration. Based on the mapping relationship between agricultural machinery hardware functions and service interfaces, it calls the corresponding hardware service interface in the virtual service interface layer 103. During the call process, the request is preprocessed according to agricultural machinery industry operating standards such as the ISO 11783 hardware control protocol, supplementing hardware device identification and operation priority parameters to ensure the accuracy and timeliness of hardware service interface calls. This lays the foundation for subsequent standardized instruction adaptation and adapts to the differentiated control needs of different agricultural machinery hardware configurations.
[0037] The system application service layer 1022 is used to receive system agricultural machinery operation requests transmitted by the user interaction layer 101. These requests cover configuration requirements of the agricultural machinery operation system, such as operation mode switching, task priority setting, memory resource allocation, and multi-module collaborative message transmission requirements, such as header control and Beidou navigation linkage, and communication between the operation system and the remote monitoring platform. Based on the request type, the corresponding interface is dynamically called: for single system configuration requests, such as FreeRTOS kernel scheduling cycle setting and memory allocation adjustment, only the system service interface of the virtual service interface layer 103 is called; for multi-module collaborative and remote communication requests, such as cross-regional operation data return of combine harvesters, both the system service interface and the message service interface are called simultaneously. The system service interface ensures kernel scheduling and resource adaptation, and the message service interface realizes standardized message interaction across modules and terminals, ensuring that the system operation requests are accurately matched with the real-time and collaborative requirements of agricultural machinery operations, while supporting cross-platform adaptation of different RTOS and communication links.
[0038] In one embodiment, the virtual service interface layer 103 includes a hardware service interface layer 1031, a system service interface layer 1032, and a message service interface layer 1033. The hardware service interface layer 1031 provides standardized hardware service interfaces and adapts hardware function call instructions based on these interfaces, sending them to the platform layer 104. The system service interface layer 1032 provides standardized system service interfaces and adapts system function call instructions based on these interfaces, sending them to the platform layer 104. The message service interface layer 1033 provides standardized message service interfaces and adapts message function call instructions based on these interfaces, sending them to the platform layer 104.
[0039] Specifically, the hardware service interface layer 1031 provides standardized hardware service interfaces for agricultural machinery, such as unified interfaces for hardware startup, parameter configuration, status query, and fault diagnosis. This interface shields the underlying differences between different hardware platforms such as STM32 / IMXRT / FPGA, exposing only the core control logic. Upon receiving an interface call request from the hardware application service layer 1021, based on the agricultural machinery industry hardware control specifications and unified adaptation rules, the hardware control requirements in the request are parsed and converted into standardized hardware function call instructions. These instructions include a unique hardware object identifier, such as header driver 0x01, a function execution code, such as height adjustment 0x001, precise control parameters, such as header target height, and anti-interference verification fields, such as CRC-16 checksums, ensuring reliable transmission of instructions under high temperature, vibration, and electromagnetic interference environments in the field. Subsequently, the instructions are sent to the corresponding hardware virtual function object call entry according to the instruction receiving specifications of the platform layer 104.
[0040] The system service interface layer 1032 provides standardized system service interfaces compatible with different RTOSs, such as unified interfaces for task management, resource allocation, mode switching, and interrupt configuration. This interface removes the API differences between different operating systems such as FreeRTOS / uCOS-III / RT-Thread and extracts the common logic of kernel scheduling and resource management. When it receives the interface call request from the system application service layer 1022 of the application service layer 102, it adapts the system configuration request into a standardized system function call instruction based on the real-time requirements of the agricultural machinery operation system. The instruction includes system function identifiers such as task creation 0x101, scheduling priority parameters such as core task P1 and monitoring task P3, and resource configuration thresholds such as memory allocation quota of 16KB. The instruction format is decoupled from the underlying operating system to ensure that different RTOSs can recognize and execute it. Then it is sent to the corresponding system virtual function object call entry point of the platform layer 104.
[0041] The message service interface layer 1033 provides standardized message service interfaces for multi-module collaboration and remote communication of agricultural machinery, such as unified interfaces for synchronous message transmission, asynchronous message queues, and remote command interaction. This interface conforms to the ISO agricultural machinery communication standard and is compatible with different communication links such as CAN bus, Ethernet, and Beidou short message. When receiving the interface call request from the system application service layer 1022 of the application service layer 102, the multi-module collaboration and remote interaction requirements are adapted into standardized message function call instructions. The instructions include message transmission types such as synchronous message 0x201 / asynchronous message 0x202, communication link identifiers such as CAN bus 0x0A / Ethernet 0x0B, message content such as collaboration parameters, status synchronization data, remote control instructions, and transmission fault tolerance configuration, ensuring reliable interaction between agricultural machinery hardware, operating system, and remote monitoring platform. Then, it is sent to the corresponding collaborative virtual function object call entry of the platform layer 104.
[0042] In one embodiment, the platform layer 104 includes a hardware platform layer 1041 and an operating system platform layer 1042; wherein, the hardware platform layer 1041 is used to receive the hardware function call instruction and call the corresponding hardware function object in the virtual function object interface layer 105 based on the hardware function call instruction; the operating system platform layer 1042 is used to receive the system function call instruction and the message function call instruction, and call the corresponding system function object in the virtual function object interface layer 105 based on the system function call instruction and the message function call instruction respectively.
[0043] Specifically, the hardware platform layer 1041 is used to accurately receive hardware function call instructions sent by the hardware service interface layer 1031. Based on the built-in virtual function object mapping table used to store the association between hardware object identifiers and corresponding virtual function objects in the virtual function object interface layer 105, it parses the unique hardware object identifiers in the instruction, such as cutter driver 0x01, Beidou navigation module 0x02, and function execution codes, such as parameter configuration 0x001 and action execution 0x002, to quickly locate the target virtual function object, such as cutter control object, navigation data processing object, and CAN bus peripheral object. During the call process, the anti-interference verification field of the instruction is synchronously verified to ensure that the instruction is not distorted during transmission. Then, a precise call request is initiated to the virtual function object interface layer 105 to realize the one-to-one binding between standardized hardware instructions and agricultural machinery-specific hardware function objects, ensuring the accurate implementation of hardware control requirements.
[0044] The operating system platform layer 1042 is used to receive system function call instructions sent by the system service interface layer 1032 and message function call instructions sent by the message service interface layer 1033, respectively, and to achieve orderly processing of the two types of instructions through hierarchical scheduling logic: For system function call instructions, the system function execution identifier and scheduling priority parameters in the instructions are parsed. Based on the cross-RTOS unified scheduling rules, system function objects such as task management objects and resource allocation objects in the virtual function object interface layer 105 are called. During the call process, the kernel scheduling characteristics of different RTOSs are compatible, ensuring that system configuration and resource management requirements can be executed in a standardized manner in different systems such as FreeRTOS and uCOS-III. For message function call commands, the message transmission type, communication link identifier, and message content in the command are parsed. The system function objects in the virtual function object interface layer 105 that involve operation collaboration, such as module interaction objects and remote communication objects, are called. The call priority is optimized according to the timing requirements of agricultural machinery operations to ensure real-time transmission and reliable response of multi-module collaboration messages and remote communication messages. Through the above layered call logic, the platform layer 104 realizes the orderly distribution of three types of requirements: hardware control, system scheduling, and multi-module collaboration. It builds a standardized scheduling bridge for the abstract encapsulation of the virtual function object interface layer 105 and the differentiated execution of the underlying adaptation component 106, while ensuring the real-time performance and cross-platform adaptability of agricultural machinery operations.
[0045] In one embodiment, the virtual function object interface layer 105 includes a hardware object layer 1051 and a system object layer 1052; wherein, the hardware object layer 1051 is used to encapsulate agricultural machinery hardware functions into hardware function objects, and send hardware driver call requests to the underlying adapter component 106 based on the hardware function objects; the system object layer 1052 is used to encapsulate agricultural machinery system functions into system function objects, and send system scheduling call requests to the underlying adapter component 106 based on the system function objects.
[0046] Specifically, the hardware object layer 1051 is used to abstract and encapsulate the hardware characteristics and control logic of agricultural machinery-specific hardware into standardized hardware function objects. These are categorized by function type into actuator objects (e.g., header drive objects, hydraulic actuator objects, sensor objects), and communication peripheral objects (e.g., CAN bus objects, Beidou navigation objects). Each hardware function object provides a unified standardized operation interface, such as start 0x01, stop 0x02, parameter configuration 0x03, and status query 0x04, shielding the underlying implementation differences of different hardware platforms like STM32 / IMXRT, such as differences in register configuration, communication protocols, and driver logic. When a virtual function object call instruction is received from the hardware platform layer 1041, a standardized hardware call request is generated based on the hardware identifier and functional requirements in the call request. This request includes the device operation code, precise control parameters, and anti-interference configuration, and is sent to the hardware driver module 1061 corresponding to the underlying adaptation component 106, achieving decoupling and adaptation between the upper-layer standardized call and the underlying hardware-differentiated driver.
[0047] The system object layer 1052 is used to extract the core scheduling features and resource management commonalities of agricultural machinery-adaptive operating systems such as FreeRTOS, uCOS-III, and RT-Thread, and encapsulate them into standardized system function objects. These are divided into task scheduling objects, resource management objects, and collaborative interaction objects according to their functions. Each system function object has standardized interfaces compatible with RTOS, such as task creation interfaces, memory allocation interfaces, and message queue creation interfaces, thus eliminating API differences between different operating systems, such as xTaskCreate in FreeRTOS versus uCOS. The differences in the OSTaskCreate call logic are as follows: When receiving system function calls and message coordination call instructions initiated by the operating system platform layer 1042 of the platform layer 104, a standardized system call request is generated through the corresponding system function object: for system scheduling requests, it includes task priority, resource allocation threshold, and scheduling timing parameters; for coordination interaction requests, it incorporates the adaptation logic of agricultural machinery industry communication standards, including message transmission timing, cross-module synchronization identifier, and remote communication adaptation parameters; the standardized system call request is sent to the operating system kernel module 1062 corresponding to the underlying adaptation component 106 to ensure that system functions and multi-module coordination requirements can be executed in a standardized manner in different RTOSs.
[0048] In one embodiment, the hardware functional object is used to uniformly schedule and manage multiple agricultural machinery-specific sub-hardware objects through a standardized parent hardware management object. The sub-hardware objects are all designed according to the requirements of agricultural machinery operation scenarios. The I / O objects correspond to agricultural machinery digital and analog I / O interfaces such as sensor signal acquisition ports and actuator control output ports, encapsulating I / O port initialization, data reading / writing, and interrupt configuration logic for different hardware platforms such as STM32 and IMXRT. The serial port objects adapt to agricultural machinery serial communication peripherals such as Beidou navigation modules and RS485 serial ports of soil sensors, shielding the differences in communication protocols between different serial port chips such as UART / SPI to serial ports. The CAN objects conform to the ISO 11783 agricultural machinery bus standard, encapsulating CAN bus initialization, data transmission / reception, and filtering configuration logic, adapting to the differences in CAN controllers of different hardware. The parent hardware management object provides a unified interface for sub-hardware registration, invocation, and status query. Upper-level calls do not need to concern themselves with the underlying implementation of the sub-hardware; multi-sub-hardware collaborative control can be completed solely through the parent interface, supporting the cross-platform standardized adaptation of agricultural machinery hardware in this invention.
[0049] The system function object is used to uniformly call multiple agricultural machinery operation-specific subsystem objects through a cross-RTOS compatible parent system management object. Among them, the memory object encapsulates the logic of memory allocation, release, and defragmentation to address the resource-constrained characteristics of agricultural machinery, and supports dynamic allocation of memory resources according to the priority of agricultural machinery operation tasks. The task object corresponds to the core agricultural machinery operation tasks such as header height control, fault alarm, and navigation coordination, and encapsulates operations such as task creation, priority configuration, suspension / resumption, etc., shielding the differences in task management APIs between different RTOSs such as FreeRTOS / uCOS-III. The parent system management object integrates the scheduling logic of the subsystem objects, provides standardized system resource configuration and task coordination interfaces, ensures that upper-layer system call instructions can be executed uniformly in different RTOSs, and adapts to the needs of multi-task concurrency and real-time response in agricultural machinery, laying the foundation for cross-system adaptation.
[0050] In one embodiment, the underlying adaptation component 106 includes a hardware driver module 1061 and an operating system kernel module 1062; wherein, the hardware driver module 1061 is used to respond to the hardware driver call request of the virtual function object interface layer 105 and execute the corresponding hardware driver operation; the operating system kernel module 1062 is used to respond to the system scheduling call request of the virtual function object interface layer 105 and execute the corresponding system scheduling operation.
[0051] Specifically, the hardware driver module 1061 is a standardized driver set adapted to agricultural machinery hardware, used to accurately respond to hardware driver call requests issued by the hardware object layer 1051. First, it parses the device operation code, precise control parameters, and anti-interference configuration in the request, and then adapts the differentiated driver execution logic according to the target hardware platform type: for example, it uses a standardized driver interface encapsulated in the HAL library for the STM32 platform, adapts to the SDK native driver framework for the IMXRT platform, and interfaces with a custom logic control link for the FPGA platform. However, all drivers follow a unified request parsing rule and feedback format; during the execution phase, it configures the hardware registers... The system uses precise control of signal levels and interaction with agricultural machinery-specific communication protocols to complete the operation of the corresponding agricultural machinery hardware driver module 1061. At the same time, it collects hardware operating status data in real time and generates standardized status feedback information to be sent back to the virtual function object interface layer 105. In response to the harsh environment of agricultural machinery field operations, such as high temperature and humidity, severe bumps, and electromagnetic interference, the system has built-in hardware fault self-diagnosis mechanisms, such as sensor disconnection detection, drive circuit overcurrent protection, communication link anomaly identification, and fault tolerance compensation strategies, such as automatic switching to backup sensors when hardware is abnormal and triggering retry mechanisms when drive commands fail, to ensure the stability and reliability of the operation of the agricultural machinery hardware driver module 1061.
[0052] The operating system kernel module 1062 is a collection of kernels compatible with agricultural machinery-adapted real-time operating systems such as FreeRTOS, uCOS-III, and RT-Thread. It is used to respond to system scheduling call requests issued by the system object layer 1052; parse the task priority configuration, resource allocation threshold, and scheduling timing parameters in the request; and adapt and execute corresponding system scheduling operations based on its own kernel characteristics. For example, in FreeRTOS, it adjusts the core job task priority through appropriate functions; in uCOS-III, it implements scheduling logic adaptation through appropriate interfaces; and in RT-Thread… The parameter configuration is completed through another interface adapted to the system, but all scheduling operations are based on a unified scheduling rule across RTOS to ensure compatibility and adaptation between upper-layer requests and the underlying kernel. For the needs of multi-module collaborative operation of agricultural machinery, the kernel task scheduling algorithm is optimized to ensure millisecond-level real-time response of core tasks such as header control, navigation and positioning, and fault alarm. At the same time, it provides standardized basic services such as memory management, interrupt handling, and message queues, supports concurrent execution and resource isolation of multiple tasks. When the underlying operating system kernel needs to be replaced, only the kernel implementation version corresponding to the module needs to be replaced. All layers such as the upper application service layer 102, virtual service interface layer 103, and platform layer 104 do not need to be modified, supporting the core goal of the present invention of rapid cross-system adaptation.
[0053] It should be understood that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0054] Similar in principle to the above embodiments, such as Figure 2 This invention provides a highly adaptable embedded software architecture method for agricultural machinery.
[0055] Step S21: Receive the agricultural machinery operation request initiated by the user and pass it to the application service layer.
[0056] Step S22: Invoke the corresponding service interface based on the agricultural machinery operation request.
[0057] Step S23: Provide standardized service interfaces and adapt corresponding function call instructions based on the service interfaces.
[0058] Step S24: Invoke the corresponding virtual function object based on the function call instruction.
[0059] Step S25: Encapsulate the agricultural machinery hardware functions and agricultural machinery system functions into virtual function objects, and issue standardized call requests to the underlying adapter components based on the virtual function objects.
[0060] Step S26: Execute the corresponding hardware driver operation and system scheduling operation based on the standardized call request.
[0061] Since the implementation principle of the highly adaptable embedded software architecture method for agricultural machinery has been described in the aforementioned embodiments, it will not be repeated here.
[0062] The agricultural machinery-adaptive embedded software architecture system provided in this invention can be implemented on the terminal side or the server side. For the hardware structure of the electronic terminal, please refer to... Figure 3 This is a schematic diagram of an optional hardware structure of an electronic terminal 3000 provided in an embodiment of the present invention. The electronic terminal 3000 can be a mobile phone, computer device, tablet device, personal digital processing device, factory back-end processing device, etc. The electronic terminal 3000 includes: at least one processor 3001, a memory 3002, at least one network interface 30010, and a user interface 3009. The various components in the device are coupled together through a bus system 3005. It is understood that the bus system 3005 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 3005 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general will label all buses as bus systems.
[0063] The user interface 3009 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.
[0064] It is understood that memory 3002 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.
[0065] In this embodiment of the invention, the memory 3002 is used to store various types of data to support the operation of the terminal 3000. Examples of this data include: any executable program for operation on the electronic terminal 3000, such as the operating system 30021 and application programs 30022; the operating system 30021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 30022 may contain various applications, such as media players, browsers, etc., for implementing various application services. The agricultural machinery highly adaptable embedded software architecture system provided in this embodiment of the invention can be included in the application program 30022.
[0066] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 3001. Processor 3001 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 3001 or by instructions in software form. Processor 3001 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 3001 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 3001 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the aforementioned methods.
[0067] In an exemplary embodiment, the electronic terminal 3000 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.
[0068] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented using computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0069] In the embodiments provided in this application, the computer-readable and writable storage medium may include read-only memory, random access memory, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, flash memory, USB flash drive, portable hard drive, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Additionally, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer-readable and writable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are intended for non-transient, tangible storage media. The disks and optical discs used in the application include compact optical discs (CDs), laser optical discs, optical discs, digital multifunction optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while optical discs use lasers to copy data optically.
[0070] In summary, this invention provides a highly adaptable embedded software architecture system, method, and terminal for agricultural machinery, offering the following advantages: The invention receives user-initiated agricultural machinery operation requests and transmits them to the application service layer; based on the operation request, it calls the corresponding service interface and further adapts it into a function call instruction; based on the function call instruction, it calls the corresponding virtual function object and sends a standardized call request to the underlying adaptation components; finally, it executes the corresponding hardware driver operation and system scheduling operation. This invention solves the problem of high hardware driver and system function binding on agricultural machinery equipment in existing technologies, making flexible adaptation between multiple hardware and operating systems difficult. Targeting the specific operating scenarios of agricultural machinery, this invention possesses multi-hardware platform adaptation and multi-operating system compatibility capabilities, while ensuring efficient real-time response and reducing porting and reconstruction costs.
[0071] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A highly adaptable embedded software architecture system for agricultural machinery, characterized in that, include: The layers consist of: user interaction layer, application service layer, virtual service interface layer, platform layer, virtual function object interface layer, and underlying adaptation components; among which... The user interaction layer is used to receive agricultural machinery operation requests initiated by users and pass them to the application service layer; The application service layer is connected to the user interaction layer and is used to call the corresponding service interface based on the agricultural machinery operation request. The virtual service interface layer is connected to the application service layer and is used to provide standardized service interfaces and adapt corresponding function call instructions based on the service interfaces. The platform layer is connected to the virtual service interface layer and is used to invoke the corresponding virtual function object based on the function call instruction. The virtual function object interface layer is connected to the platform layer and is used to encapsulate agricultural machinery hardware functions and agricultural machinery system functions into virtual function objects, and to send standardized call requests to the underlying adaptation components based on the virtual function objects. The underlying adaptation component is connected to the virtual function object interface layer and is used to execute corresponding hardware driver operations and system scheduling operations based on the standardized call request.
2. The agricultural machinery highly adaptable embedded software architecture system according to claim 1, characterized in that, The application service layer includes a hardware application service layer and a system application service layer; wherein... The hardware application service layer is used to receive hardware agricultural machinery operation requests transmitted from the user interaction layer and call the hardware service interface based on the hardware agricultural machinery operation requests. The system application service layer is used to receive system agricultural machinery operation requests transmitted from the user interaction layer, and to call system service interfaces and / or message service interfaces based on the system agricultural machinery operation requests.
3. The agricultural machinery highly adaptable embedded software architecture system according to claim 2, characterized in that, The virtual service interface layer includes a hardware service interface layer, a system service interface layer, and a message service interface layer; wherein... The hardware service interface layer is used to provide standardized hardware service interfaces and adapt hardware function call instructions based on the hardware service interfaces to send them to the platform layer. The system service interface layer is used to provide standardized system service interfaces and adapt system function call instructions based on the system service interfaces to send them to the platform layer. The message service interface layer is used to provide standardized message service interfaces and adapt message function call instructions based on the message service interfaces to send them to the platform layer.
4. The agricultural machinery highly adaptable embedded software architecture system according to claim 3, characterized in that, The platform layer includes a hardware platform layer and an operating system platform layer; wherein... The hardware platform layer is used to receive the hardware function call instruction and call the corresponding hardware function object in the virtual function object interface layer based on the hardware function call instruction. The operating system platform layer is used to receive the system function call instruction and the message function call instruction, and to call the corresponding system function object in the virtual function object interface layer based on the system function call instruction and the message function call instruction respectively.
5. The agricultural machinery highly adaptable embedded software architecture system according to claim 4, characterized in that, The virtual function object interface layer includes a hardware object layer and a system object layer; wherein... The hardware object layer is used to encapsulate agricultural machinery hardware functions into hardware function objects, and to send hardware driver call requests to the underlying adapter components based on the hardware function objects. The system object layer is used to encapsulate the functions of the agricultural machinery system into system function objects, and to send system scheduling call requests to the underlying adaptation components based on the system function objects.
6. The agricultural machinery highly adaptable embedded software architecture system according to claim 5, characterized in that, The hardware function object is used to uniformly call multiple child hardware objects through a parent hardware management object. The child hardware objects include I / O objects, serial port objects, and CAN objects. The system function object is used to uniformly call multiple subsystem objects through a parent system management object. The subsystem objects include memory objects and task objects.
7. The agricultural machinery highly adaptable embedded software architecture system according to claim 6, characterized in that, The underlying adaptation components include a hardware driver module and an operating system kernel module; wherein... The hardware driver module is used to respond to the hardware driver call request of the virtual function object interface layer and execute the corresponding hardware driver operation. The operating system kernel module is used to respond to the system scheduling call request of the virtual function object interface layer and execute the corresponding system scheduling operation.
8. The agricultural machinery highly adaptable embedded software architecture system according to claim 1, characterized in that, The user interaction layer includes an information collection module and an information presentation module; wherein... The information collection module is used to receive agricultural machinery operation requests initiated by users, and divide the agricultural machinery operation requests into hardware agricultural machinery operation requests and system agricultural machinery operation requests, and transmit them to the hardware application service layer and the system application service layer of the application service layer, respectively. The information presentation module is used to present the agricultural machinery operation feedback information returned by the application service layer to the user.
9. A highly adaptable embedded software architecture method for agricultural machinery, characterized in that, The method includes: Receive agricultural machinery operation requests initiated by users and pass them to the application service layer; The corresponding service interface is invoked based on the agricultural machinery operation request; Provide standardized service interfaces and adapt corresponding function call instructions based on the service interfaces; The corresponding virtual function object is invoked based on the function call instruction; Agricultural machinery hardware functions and agricultural machinery system functions are encapsulated into virtual function objects, and standardized call requests are sent to the underlying adapter components based on the virtual function objects. Based on the standardized call request, the corresponding hardware driver operation and system scheduling operation are executed.
10. An electronic terminal, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method of claim 9.