A method for implementing modular management of printer firmware

Through the modular management method of printer firmware, layered configuration and model extraction, the problem of code duplication and maintenance difficulty in printer development is solved, the code consistency and efficient management are achieved, and development efficiency and maintenance convenience are improved.

CN113934417BActive Publication Date: 2025-01-07ZHUHAI QUIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111162854.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-01-07
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

During the printer development process, R&D personnel need to frequently replace the main control chip, resulting in a lot of duplicate work in code development and maintenance management, making it difficult to ensure the consistency of code and resource sharing, and the maintenance work is large.

Method used

The modular management method of printer firmware is adopted, and modular code is established through layered configuration and model extraction, and coordinated scheduling is carried out according to different needs to realize hierarchical management and modular development of code.

Benefits of technology

A standard model development solution was built, which improved the general performance of the code and structural clarity, facilitated derivation and maintenance, and reduced duplicate work and maintenance difficulties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113934417B_ABST
    Figure CN113934417B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for implementing modular management of printer firmware, which is characterized by comprising: from the perspective of code architecture, hierarchically configuring various functional modules required for printer printing according to the hardware resources and functional applications of the printer, and expressing the hierarchical codes; extracting models of the hardware resources or functional applications in each layer of the configuration respectively; establishing modular codes for the extracted models; and first searching according to the hierarchical codes and then coordinating and scheduling according to the modular codes according to different printing requirements. This method constructs a standard model development solution, which not only has high general performance, but also makes the code structure clear and easy to understand, and is easy to derive and maintain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of printers, and in particular to a method for implementing modular management of printer firmware. Background Art

[0002] With the improvement of the quality of life, thermal portable printer products have become the new favorite of consumer products. In response to different application scenarios and various customized needs, R&D personnel need to constantly innovate and achieve product iteration and upgrading. At the same time, in order to better meet the functional requirements of printers and take into account the optimal solution of cost and benefit, R&D personnel also need to keep pace with the times and choose different main control chips for product development.

[0003] In the current development mode, R&D personnel need to constantly select appropriate main control chips and redevelop codes according to development needs, and at the same time, they need to constantly maintain and manage the codes of existing products. Under this situation, R&D personnel have a lot of repetitive work, it is difficult to ensure the consistency of codes during the product development iteration process, there are problems such as high difficulty in sharing code resources and high maintenance workload. Summary of the invention

[0004] Based on the deficiencies of the prior art, the present invention provides a method for implementing modular management of printer firmware, which provides a solution to the above problems.

[0005] A method for implementing modular management of printer firmware, characterized by comprising:

[0006] From the perspective of code architecture, the functional modules required for the printer to print are configured in layers according to the hardware resources and functional applications of the printer, and the layers are represented in code.

[0007] Extract models for hardware resources or functional applications in each configured layer;

[0008] Establish modular code for the extracted models;

[0009] According to different printing requirements, first search according to the hierarchical code and then coordinate and schedule according to the modular code.

[0010] Furthermore, when various functional modules required for printing of the printer are configured in layers according to the hardware resources and functional applications of the printer, the layers include a hardware configuration layer, a hardware interface layer, and a functional application layer;

[0011] Among them, in the hardware configuration layer, the configuration of various hardware resources required by the printer is unified, including the configuration of the chip clock and interrupt system, GPIO resource allocation and initialization, timer resource allocation and working mode setting, ADC conversion resource allocation and working mode setting, and each communication port resource allocation and working mode initialization, providing a basic working environment for the normal operation of the system;

[0012] At the hardware interface layer, the functions of the operation interface are encapsulated, including the actions required to be implemented by various hardware resources;

[0013] The functional application layer extracts the model of the functional modules according to the functional requirements of the printer, and implements the system scheduling of the working logic according to the overall management method of the working logic.

[0014] Furthermore, in the process of performing model extraction on the hardware resources or functional applications in each configured layer, the method for extracting the model for the hardware configuration layer includes: firstly extracting the model by horizontal classification according to the allocated or configured resources or working modes, and coding the extracted models, and then performing phased model extraction according to the operation stages of each category, and coding the extracted models.

[0015] Furthermore, in the process of performing model extraction on the hardware resources or functional applications in each configured layer, the method for extracting the model for the hardware interface layer includes: performing horizontal model extraction on the interfaces according to the printed functions, and coding the extracted models, and then performing vertical model extraction on the interfaces according to the different functions in each type of interfaces, and coding the extracted models.

[0016] Furthermore, the interfaces are classified according to the printed functions. The functions printed in the horizontal model extraction include GPIO operation class, hardware resource start and stop control class, communication data receiving and sending class, and operation result transfer class.

[0017] Furthermore, in the model extraction of the hardware resources or functional applications in each configured layer, the method of model extraction for the application layer includes: performing horizontal model extraction according to the operation category, and coding the extracted model, and then performing total line model extraction according to the hierarchy of the unified function model provided by the calling interface layer in each category, and coding the extracted model.

[0018] Furthermore, the operation categories include human-computer interaction operation category, input status monitoring category, output status refresh control category, communication analysis and processing category, and printing operation corresponding category.

[0019] Furthermore, the scheduling method for overall scheduling according to modular codes includes realizing the branch jump coordination of the code through macro definition.

[0020] Furthermore, the method also includes hierarchical management of files, and the method for hierarchical management of files includes:

[0021] For the original files, they are divided and stored according to the code framework and grouping and layering mode. At the same time, the engineering data management in the engineering project is also carried out according to the same code framework and grouping and layering mode;

[0022] The code header files are horizontally classified into categories: data class and function class header files; the data class header files are further subdivided vertically into: type definition header files, parameter definition header files, and parameter external declaration header files; the function class header files are further subdivided vertically into: system framework function header files, hardware configuration layer header files, hardware interface layer header files, functional logic layer header files, and system logic scheduling layer header files.

[0023] Beneficial effects: This method constructs a standard development solution, which not only has high general performance, but also makes the code structure clear and easy to understand, and is easy to derive and maintain. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flow chart of a method provided by an embodiment of the present invention;

[0026] Figure 2 A structural block diagram of horizontal classification provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0028] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0029] A method for implementing modular management of printer firmware, comprising:

[0030] Step 1: From the perspective of code architecture, various functional modules required for the printer to print are configured in layers according to the hardware resources and functional applications of the printer, and the layers are represented in code.

[0031] When implementing this step, it is necessary to subdivide the code into hardware configuration layer, hardware interface layer, and functional application layer from the perspective of code architecture. The divided layers must be coded first, and then the specific classification categories of each layer must be coded again.

[0032] Specifically, the configuration of various hardware resources required for the printer is unified. In the hardware configuration layer, according to the specific classification of each layer, the categories that can be divided include: chip clock and interrupt system configuration category, GPIO resource allocation and initialization category, timer resource allocation and working mode setting category, ADC conversion resource allocation and working mode setting category, and each communication port resource allocation and working mode initialization category. These categories provide the basic working environment for the normal operation of the system and are coded.

[0033] At the hardware interface layer, the functions of the operation interface are encapsulated according to the actions required to be implemented by various hardware resources, and the functions of the operation interface are coded so that in subsequent functional applications, a unified operation function interface can be used to control the allocation of hardware resources, providing a modular foundation for the functional application layer code in the next stage.

[0034] At the functional application layer, the model of the functional module is extracted according to the functional requirements of the printer, and the system scheduling of the work logic is realized according to the overall management method of the work logic.

[0035] Step 2: extract models of hardware resources or functional applications in each layer after configuration;

[0036] The requirements of printers vary greatly, but various functional requirements are composed of some similar functional parts. According to these similar functional groups, some common functional models can be extracted to provide a modular basis for subsequent system logic scheduling. In the model extraction stage, firstly carry out horizontal classification, then carry out vertical stage method to establish the corresponding model.

[0037] To illustrate the above method, Figure 2 The structural block diagram of the horizontal layering and the functional modules of each layer is listed. This figure is only an enumeration and explanation. You can also optimize, increase, reduce or change the layers or the division of each functional module in this figure under the inspiration of this figure.

[0038] Among them, at the functional application layer, the printer's requirements may include UI part, communication part, printing function and other functions, wherein the UI part may include fault detection, button control, indicator light output, etc., the communication part may include timed reporting, query response, command control, etc., the printing function may include motor control, heating time control, etc., and other functions include timed shutdown, low-voltage shutdown, etc.

[0039] In some embodiments, when performing model extraction at the hardware configuration layer, taking GPIO resource allocation and initialization as an example, first, according to the different GPIO working modes, they are divided into: digital port class, analog port class, and communication port class; then, for each subdivided class, a vertically phased operation model of this type of GPIO is established, and the parameter configuration of each stage is implemented in turn, thereby completing the functions required to be implemented at this level.

[0040] In the hardware configuration layer, other categories can also be horizontally classified according to different working modes, and then a vertical phased operation model can be established based on the classification, and the operation model can be coded to complete the functions required by this layer.

[0041] Similarly, at the hardware interface layer, the horizontal classification is divided into: GPIO operation class, hardware resource start and stop control class, communication data reception and transmission class, operation result transfer class, etc., and the horizontal classification is coded; then according to each classification, the corresponding vertical model is coded to complete the operation function interface model required to be implemented at this level.

[0042] Similarly, at the functional application layer, it is horizontally classified into: human-computer interaction operation class, input status monitoring class, output status refresh control class, communication analysis and processing class, and printing operation corresponding class, and each class is coded; then according to each classification, the unified function model provided by the interface layer is called, the function model is coded, and the vertical code model is implemented step by step, thereby completing the establishment of each functional module model.

[0043] Step 3 is to establish modular codes for the extracted models. This step can be integrated after each classification in step 2, or modular codes can be uniformly established after step 2 is completely classified.

[0044] The above steps, through model extraction, can establish a relatively unified modular code, just like obtaining the doors, windows, walls, and roofs required to build a high-rise building. In addition to the model establishment of the above-mentioned "component parts", it is also necessary to establish a model architecture for system operation, just like the structure required to build a high-rise building: foundation, body, and roof.

[0045] Step 4: According to different printing requirements, first search according to the hierarchical code and then coordinate and schedule according to the modular code.

[0046] Since the requirements of printers vary greatly, in order to achieve different functional requirements, different code logic scheduling is required. Based on the system model architecture established above and various modular code components, the branch jump of the code can be coordinated through macro definition. The operation of this step is like establishing a bill of materials and a list of assembly steps for building a house. Through the scheduling of this macro file, the various project requirements can be combined and implemented using the above framework and components to complete the functional combination.

[0047] Through the above implementation methods, various indicators can be met from the perspective of functional requirements. However, in order to solve the code reliability, consistency, and subsequent maintenance work, the above code files can also be well managed.

[0048] In some embodiments, the hierarchical management method for program files can be approached from two perspectives:

[0049] First of all, from the perspective of functional codes, the original files are divided and stored according to the code framework and grouping and layering mode. At the same time, the engineering data management is also carried out in the engineering project according to the same code framework and grouping and layering mode. This facilitates the subsequent code file replacement and maintenance, thereby achieving the goal of solving code management.

[0050] Secondly, the header files of the code are also horizontally classified into: data class and function class header files.

[0051] For data class header files, they are further subdivided vertically into: type definition header files, parameter definition header files, and parameter external declaration header files. For function class header files, they are further subdivided vertically into: system framework function header files, hardware configuration layer header files, hardware interface layer header files, function logic layer header files, and system logic scheduling layer header files. Code modeling is performed on all horizontally and vertically classified files.

[0052] According to the above model processing method, the organizational structure of each file is clear, the division of labor is clear, the content is concise and easy to understand, and it can effectively solve the common derivative and maintenance problems of developers.

[0053] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for implementing modular management of printer firmware, characterized in that: include: From the perspective of code architecture, the functional modules required for the printer to print are configured in layers according to the hardware resources and functional applications of the printer, and the layers are represented in code. Extract models for hardware resources or functional applications in each configured layer; Establish modular code for the extracted models; According to different printing requirements, first search according to the hierarchical code and then coordinate and dispatch according to the modular code; According to the hardware resources and functional applications of the printer, the various functional modules required for the printer to print are configured in layers, including the hardware configuration layer, the hardware interface layer, and the functional application layer; Among them, in the hardware configuration layer, the configuration of various hardware resources required by the printer is unified, including the configuration of the chip clock and interrupt system, GPIO resource allocation and initialization, timer resource allocation and working mode setting, ADC conversion resource allocation and working mode setting, and each communication port resource allocation and working mode initialization, providing a basic working environment for the normal operation of the system; At the hardware interface layer, the functions of the operation interface are encapsulated, including the actions required to be implemented by various hardware resources; The functional application layer extracts the model of the functional module according to the functional requirements of the printer, and performs system scheduling of the work logic according to the overall management method of the work logic; The method also includes hierarchical management of files. The method for hierarchical management of files includes: For the original files, they are divided and stored according to the code framework and grouping and layering mode. At the same time, the engineering data management in the engineering project is also carried out according to the same code framework and grouping and layering mode; The code header files are horizontally classified into categories: data class and function class header files; the data class header files are further subdivided vertically into: type definition header files, parameter definition header files, and parameter external declaration header files; the function class header files are further subdivided vertically into: system framework function header files, hardware configuration layer header files, hardware interface layer header files, functional logic layer header files, and system logic scheduling layer header files.

2. The method for implementing modular management of printer firmware according to claim 1, characterized in that: In respectively extracting models from hardware resources or functional applications in each configured layer, the method for extracting models from the hardware configuration layer includes: firstly extracting models by horizontal classification according to the allocated or configured resources or working modes, and coding the extracted models, and then extracting models in stages according to the operation stages of each category, and coding the extracted models.

3. The method for implementing modular management of printer firmware according to claim 1, characterized in that: In the process of extracting models for the hardware resources or functional applications in each configured layer, the method for extracting models for the hardware interface layer includes: extracting models horizontally by classifying the interfaces according to the printed functions, and coding the extracted models, and then extracting models vertically according to the different functions in each type of interface, and coding the extracted models.

4. The method for implementing modular management of printer firmware according to claim 3, characterized in that: The interfaces are classified according to the printed functions. The functions printed in the horizontal model extraction include GPIO operation class, hardware resource start and stop control class, communication data receiving and sending class, and operation result transfer class.

5. The method for implementing modular management of printer firmware according to claim 1, characterized in that: In the process of performing model extraction on the hardware resources or functional applications in each configured layer, the method for model extraction at the application layer includes: performing horizontal model extraction according to the operation category, and coding the extracted model, and then performing head office model extraction according to the hierarchy of the unified function model provided by the calling interface layer in each category, and coding the extracted model.

6. The method for implementing modular management of printer firmware according to claim 5, characterized in that: The operation categories include human-computer interaction operation category, input status monitoring category, output status refresh control category, communication analysis and processing category, and printing operation corresponding category.

7. The method for implementing modular management of printer firmware according to claim 1, characterized in that: The scheduling method for coordinated scheduling according to modular code includes realizing the coordinated branch jump of code through macro definition.