Parameter configuration method and device, computer readable storage medium and electronic equipment

By reading data in the storage medium in an embedded system and configuring the driver parameters, the problem of changing or redeveloping the driver when replacing the hardware device is solved, and the effect of reducing costs and improving driver portability is achieved.

CN119938149APending Publication Date: 2025-05-06CONTEMPORARY AMPEREX FUTURE ENERGY RES INST (SHANGHAI) LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311454101.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the driver design of existing embedded systems, driver changes or redevelopment is required when replacing hardware devices, resulting in high development and maintenance costs and poor driver porting and reuse.

Method used

When detecting that the preset storage medium is executed, the data stored in the storage medium is read, and parameterizes the hardware parameters corresponding to the target device in the driver according to the data, decoupling the driver and the hardware device is achieved.

Benefits of technology

No driver modification or redevelopment is required, reducing development and maintenance costs and improving driver portability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938149A_ABST
    Figure CN119938149A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of embedded development, and particularly relates to a parameter configuration method and device, a computer readable storage medium and electronic equipment. The method comprises the steps of reading data stored in a storage medium under the condition that a preset storage medium is detected to be subjected to data writing operation; and according to the data stored in the storage medium, performing parameter configuration on the hardware parameters corresponding to the target equipment in the driving program. According to the method, when the hardware equipment is replaced, the changed target equipment parameters can be written into the preset storage medium, so that the hardware parameters corresponding to the target equipment in the driving program can be subjected to parameter configuration by reading the data stored in the storage medium, the driving program does not need to be modified or re-developed, and the hardware configuration efficiency is improved. The development and maintenance cost can be reduced, and the portability of the driving program can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of embedded development technology, and in particular, relates to a parameter configuration method, device, computer-readable storage medium and electronic device. Background Art

[0002] In the existing driver design of embedded systems, the driver is strongly coupled with the hardware device, which means that when the hardware device is replaced, the driver needs to be changed or redeveloped; this will greatly increase the cost of development and maintenance, and is not conducive to the transplantation and reuse of the driver. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a parameter configuration method, apparatus, computer-readable storage medium and electronic device to solve the problem that in the driver design of existing embedded systems, when the hardware device is replaced, the driver needs to be changed or redeveloped, resulting in high development and maintenance costs, and poor driver porting and reuse.

[0004] A first aspect of an embodiment of the present application provides a parameter configuration method, which may include:

[0005] When it is detected that a data writing operation is performed on a preset storage medium, reading data stored in the storage medium;

[0006] The hardware parameters corresponding to the target device in the driver are configured according to the data stored in the storage medium.

[0007] In the above method, when the hardware device is replaced, the changed target device parameters can be written to the preset storage medium, so that the hardware parameters corresponding to the target device in the driver can be configured by reading the data stored in the storage medium without modifying or redeveloping the driver, which helps to reduce development and maintenance costs and improve the portability of the driver.

[0008] In a specific implementation of the first aspect, configuring the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium may include:

[0009] Parsing the data stored in the storage medium according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device;

[0010] The hardware parameters corresponding to the target device in the driver are configured according to the parameter configuration information.

[0011] Through the above method, the data stored in the storage medium can be parsed according to the preset parameter data structure, thereby improving the efficiency of data parsing and facilitating the protection of the consistency and accuracy of parameter configuration information.

[0012] In a specific implementation manner of the first aspect, the parameter data structure may include at least one parameter classification structure, and each parameter classification structure corresponds to a parameter category.

[0013] Through the above method, each parameter classification structure can correspond to a parameter category respectively, so that the configuration parameters can be more organized and the efficiency of the parameter configuration method can be improved.

[0014] In a specific implementation manner of the first aspect, the parameter category may include at least one of the following: a pin configuration class, a clock configuration class, a CAN configuration class, a UART configuration class, and a FPGA configuration class.

[0015] Through the above method, the parameter category can include at least one relatively common configuration category, thereby improving the applicability of the parameter configuration method.

[0016] In a specific implementation of the first aspect, configuring the hardware parameters corresponding to the target device in the driver according to the parameter configuration information may include:

[0017] Writing the parameter configuration information into a preset data cache;

[0018] The parameter configuration information in the data cache is assigned to the hardware parameters corresponding to the target device in the driver.

[0019] Through the above method, the read data can be extracted from the slow storage medium to the high-speed data cache, which can effectively speed up the running speed of the parameter configuration method and further improve the efficiency of the parameter configuration method.

[0020] In a specific implementation of the first aspect, configuring the hardware parameters corresponding to the target device in the driver according to the parameter configuration information may include:

[0021] The parameter configuration information obtained by parsing is assigned to the hardware parameters corresponding to the target device in the driver.

[0022] Through the above method, the parsed parameter configuration information can be assigned to the driver, so as to realize the parameter configuration of the hardware parameters corresponding to the target device in the driver without modifying or redeveloping the driver, which helps to reduce the development and maintenance costs and improve the portability of the driver.

[0023] In a specific implementation of the first aspect, reading the data stored in the storage medium may include:

[0024] The data stored in the storage medium is read through a data interaction interface preset in the storage medium.

[0025] Through the above method, the data stored in the storage medium can be read using the data interaction interface preset in the storage medium, so that when the hardware device is replaced, the parameter configuration information can be written and read through the storage medium to achieve the update of the parameter configuration information.

[0026] A second aspect of an embodiment of the present application provides a parameter configuration device, which may include:

[0027] A data reading module, configured to read data stored in a storage medium when detecting that a data writing operation is performed on the preset storage medium;

[0028] The parameter configuration module is used to configure the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium.

[0029] In the above-mentioned device, when the hardware device is replaced, the changed target device parameters can be written into the preset storage medium, so that the hardware parameters corresponding to the target device in the driver can be configured by reading the data stored in the storage medium without modifying or redeveloping the driver, which helps to reduce development and maintenance costs and improve the portability of the driver.

[0030] In a specific implementation of the second aspect, the parameter configuration module may include:

[0031] A data analysis submodule, used to analyze the data stored in the storage medium according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device;

[0032] The parameter configuration submodule is used to configure the hardware parameters corresponding to the target device in the driver according to the parameter configuration information.

[0033] Through the above device, the data stored in the storage medium can be parsed according to the preset parameter data structure, thereby improving the efficiency of data parsing and facilitating the protection of the consistency and accuracy of parameter configuration information.

[0034] In a specific implementation manner of the second aspect, the parameter data structure may include at least one parameter classification structure, and each parameter classification structure corresponds to a parameter category.

[0035] Through the above device, each parameter classification structure can correspond to a parameter category respectively, so that the configuration parameters can be more organized and the efficiency of the parameter configuration method can be improved.

[0036] In a specific implementation manner of the second aspect, the parameter category may include at least one of the following: a pin configuration class, a clock configuration class, a CAN configuration class, a UART configuration class, and a FPGA configuration class.

[0037] Through the above device, the parameter category can include at least one relatively common configuration category, thereby improving the applicability of the parameter configuration method.

[0038] In a specific implementation of the second aspect, the parameter configuration submodule may include:

[0039] An information writing unit, used for writing the parameter configuration information into a preset data cache;

[0040] An information assignment unit is used to assign the parameter configuration information in the data cache to the hardware parameters corresponding to the target device in the driver.

[0041] Through the above device, the read data can be extracted from the slow storage medium to the high-speed data cache, which can effectively speed up the operation speed of the parameter configuration method and further improve the efficiency of the parameter configuration method.

[0042] In a specific implementation of the second aspect, the information assignment unit may also be used to assign the parameter configuration information obtained through parsing to hardware parameters corresponding to the target device in the driver.

[0043] Through the above device, the parameter configuration information obtained by parsing can be assigned to the driver, so as to realize the parameter configuration of the hardware parameters corresponding to the target device in the driver without modifying or redeveloping the driver, which helps to reduce the cost of development and maintenance and improve the portability of the driver.

[0044] In a specific implementation of the second aspect, the data reading module may include:

[0045] The data reading submodule is used to read the data stored in the storage medium through a data interaction interface preset in the storage medium.

[0046] Through the above device, the data stored in the storage medium can be read using the data interaction interface preset in the storage medium, so that when the hardware device is replaced, the parameter configuration information can be written and read through the storage medium to achieve the update of the parameter configuration information.

[0047] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned parameter configuration methods are implemented.

[0048] A fourth aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned parameter configuration methods when executing the computer program.

[0049] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps of any one of the above parameter configuration methods. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 A brief schematic diagram of the present application method;

[0052] Figure 2 This is a flow chart of an embodiment of a parameter configuration method in an embodiment of the present application;

[0053] Figure 3 is a schematic diagram of the configuration table;

[0054] Figure 4 A schematic diagram of the general process of the present application method;

[0055] Figure 5 This is a structural diagram of an embodiment of a parameter configuration device in an embodiment of the present application;

[0056] Figure 6 This is a schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0059] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0060] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0061] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0062] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0063] With the development of chip technology, the pins of most chips are reusable, and the same pin can be used for different hardware functions. This pin reusability allows the chip to flexibly implement multiple functions in different application scenarios.

[0064] In the existing driver design of embedded systems, the chip can be connected to the hardware device through the corresponding pins, so that the chip can supplement and enhance the functions of the embedded system through the hardware device. Before the hardware device is used, it is usually necessary to use a preset driver to configure the hardware device, specifically, it can include initializing the default parameters, clocks, registers and other information of the hardware device. However, the driver in the existing solution is strongly coupled with the hardware device, which means that when the hardware device is replaced, the driver needs to be changed or redeveloped; this will greatly increase the cost of development and maintenance, and is not conducive to the transplantation and reuse of the driver.

[0065] In view of this, the embodiments of the present application provide a parameter configuration method, apparatus, computer-readable storage medium and electronic device to solve the problem that in the driver design of existing embedded systems, when the hardware device is replaced, the driver needs to be changed or redeveloped, resulting in high development and maintenance costs, and poor driver porting and reuse.

[0066] It should be understood that the executor of the method of the present application is an electronic device, specifically, it can be any common embedded electronic device in the prior art, including but not limited to mobile phones, tablet computers, wearable devices, smart displays, smart door locks, monitoring equipment, driving recorders, express cabinets and other common embedded electronic devices.

[0067] It should be noted that when a hardware device is replaced, the embodiment of the present application can write the relevant configuration parameters of the replaced hardware device into a preset storage medium, and can configure the parameters of the replaced hardware device by reading the configuration parameters stored in the storage medium, such as Figure 1 shown.

[0068] Specifically, see Figure 2 , an embodiment of a parameter configuration method in an embodiment of the present application may include:

[0069] Step S201: when it is detected that a data writing operation is performed on a preset storage medium, data stored in the storage medium is read.

[0070] Among them, the preset storage medium can be any common storage medium in the prior art, including but not limited to flash memory (Flash Memory), electrically erasable programmable read only memory (EEPROM), embedded Multi Media Card (embedded Multi Media Card, eMMC) and SD card (Secure Digital Card, SD) and other storage media.

[0071] When the hardware device is replaced, the user can write the modified parameter configuration information into the storage medium. Specifically, the data writing operation can be performed through a data interaction interface preset by the storage medium, or the data writing operation can be performed through a specific burning tool.

[0072] In an embodiment of the present application, a preset storage medium can be detected, and when a data write operation is detected on the storage medium, the data stored in the storage medium can be read. Specifically, the data stored in the storage medium can be read through a data interaction interface preset by the storage medium to update the parameter configuration information.

[0073] In a specific implementation of an embodiment of the present application, in order to be able to read the data stored in the storage medium in a timely manner when a data write operation is performed on the storage medium, the storage medium can be periodically detected, and the specific detection period can be set according to actual conditions. For example, it can be set to 1 millisecond, 2 milliseconds, 5 milliseconds or other values.

[0074] Step S202: configuring the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium.

[0075] In the embodiment of the present application, step S202 may specifically include the following process:

[0076] Step S2021: parse the data stored in the storage medium according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device.

[0077] The target device may be a replaced hardware device.

[0078] For example, a certain pin on the chip can be connected to a preset sound card device to realize functions such as audio processing, sound signal conversion, digital audio file production and playback, and multi-source synthesis. When the sound card device fails, the sound card device can be replaced. At this time, the target device can be the replaced sound card device.

[0079] For another example, a certain pin on the chip can be connected to a preset graphics card to realize functions such as graphics acceleration processing, video encoding, and 3D rendering; and for actual use needs, the graphics card can be replaced with a network card and connected to the pin to realize the data transmission function. At this time, the target device can be the network card.

[0080] It should be understood that during the parameter configuration process of the hardware device, configuration parameters of multiple parameter categories may be required. In order to more efficiently store the configuration parameters of each parameter category, the parameter configuration information corresponding to the target device can be written into the storage medium according to the preset parameter data structure; when performing data parsing, the data stored in the storage medium can be parsed according to the preset parameter data structure.

[0081] Here, the preset parameter data structure can be a table. Specifically, the parameter configuration information corresponding to the target device can be written into the storage medium according to the preset configuration table. When performing data analysis, the data stored in the storage medium can be analyzed according to the preset configuration table, thereby structuring the parameter configuration information, improving the efficiency of data analysis, and facilitating the protection of the consistency and accuracy of the parameter configuration information.

[0082] It should be understood that the parameter data structure may be further specified and contextualized according to actual needs. For example, the parameter data structure may be set as a tree, or the parameter data structure may be set as a graph.

[0083] The parameter data structure may include at least one parameter classification structure, and each parameter classification structure may correspond to a parameter category, thereby making the configuration parameters more organized and helping to improve the efficiency of the parameter configuration method. Specifically, the parameter categories in the configuration table may include at least one of a pin configuration class, a clock configuration class, a CAN configuration class, a UART configuration class, and an FPGA configuration class; wherein the pin configuration class may include pin configuration information such as pins and interfaces corresponding to each hardware device, the clock configuration class may include clock configuration information such as clock crystal oscillators and clock frequencies of hardware devices, the CAN configuration class may include CAN serial communication bus configuration information such as pins, clocks, working modes, baud rates, filtering modes, and communication protocols of a Controller Area Network (CAN) bus, the UART configuration class may include baud rates, start bits, data bits, and stop bits, and other Universal Asynchronous Receiver / Transmitter (UART) configuration information, the FPGA configuration class may include clocks, binary configuration files, configuration modes, and resource allocation, and other Field Programmable Gate Array (FPGA) configuration information; accordingly, the configuration table may include at least one type of common configuration parameters required to configure a hardware device, such as Figure 3 As shown, the applicability of the parameter configuration method is improved.

[0084] It should be understood that the parameter classification structure and the configuration information specifically contained therein can also be added, deleted, modified, etc. according to actual needs.

[0085] When the configuration information of any parameter classification structure changes, the configuration information of the corresponding parameter classification structure in the parameter data structure can be modified, and then written into the storage medium in the form of the parameter data structure. For example, if the value of the clock crystal oscillator changes, the clock crystal oscillator of the corresponding clock configuration class in the configuration table can be modified to obtain the changed configuration table, and then the storage medium can be written according to the changed configuration table.

[0086] Step S2022: configure the hardware parameters corresponding to the target device in the driver according to the parameter configuration information.

[0087] In a specific implementation of the embodiment of the present application, the parameter configuration information obtained by parsing can be assigned to the hardware parameters corresponding to the target device in the driver. The driver can provide a software interface for the target device, shielding the details of the hardware device, which is conducive to the electronic device to operate the hardware device more efficiently; specifically, the driver can initialize the target device and be responsible for functions such as data transmission between the target device and the electronic device.

[0088] It should be understood that, under normal circumstances, the reading and writing speed of the storage medium that stores the parameter configuration information may be relatively low. In order to improve the running speed of the parameter configuration, in another specific implementation method of the embodiment of the present application, the parameter configuration information read from the storage medium can be written into a preset data cache of the electronic device, wherein the data cache can be a storage medium with a relatively high reading and writing speed, for example, it can be a random access memory (RAM), and can be stored in a data structure such as a linked list or a queue; thereafter, the parameter configuration information in the data cache can be assigned to the hardware parameters corresponding to the target device in the driver; accordingly, the read data can be extracted from the slow storage medium to the high-speed data cache, thereby effectively speeding up the running speed of the parameter configuration method and further improving the efficiency of the parameter configuration method.

[0089] It is understandable that the driver can perform parameter configuration on the target device according to the configuration method in the prior art. For example, after assigning the parameter configuration information to the driver, the driver can initialize the interface type, communication protocol, baud rate, working mode, register configuration, etc. of the target device according to the acquired parameter configuration information, and then detect the connection status and working status of the target device to confirm whether the target device is working normally.

[0090] After completing the configuration of the hardware parameters corresponding to the target device in the driver, the target device can be used to implement the corresponding functions.

[0091] For ease of understanding, the parameter configuration method of the embodiment of the present application will be described below in conjunction with the accompanying drawings. Figure 4 When a hardware device is changed to a target device, the user can perform a data write operation through a preset burning tool or a preset data interaction interface in a preset storage medium to write various parameter categories that can be configured for the target device into a preset storage medium; wherein the storage medium can be any common storage medium in the prior art such as FLASH, eEPROM and eEMMC; when the electronic device detects that a data write operation is performed on the storage medium, the data stored in the storage medium can be read through the data interaction interface in the storage medium, and the read data can be parsed according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device; thereafter, the parameter configuration information can be written into a preset data cache, and the parameter configuration information in the data cache can be assigned to the driver program to perform parameter configuration on the hardware parameters corresponding to the target device in the driver program; accordingly, the adaptation of the target device can be completed without modifying or redeveloping the driver program, thereby realizing the decoupling of the driver program from the parameter configuration information of the hardware device, which helps to reduce the cost of development and maintenance, and improve the portability of the driver program.

[0092] In summary, in the embodiment of the present application, when it is detected that a data writing operation is performed on a preset storage medium, the data stored in the storage medium is read; and the hardware parameters corresponding to the target device in the driver are configured according to the data stored in the storage medium. In the embodiment of the present application, when the hardware device is replaced, the changed target device parameters can be written to the preset storage medium, so that the hardware parameters corresponding to the target device in the driver can be configured by reading the data stored in the storage medium without modifying or redeveloping the driver, which helps to reduce the cost of development and maintenance and improve the portability of the driver.

[0093] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0094] Corresponding to a parameter configuration method described in the above embodiment, Figure 5 A structural diagram of an embodiment of a parameter configuration device provided in an embodiment of the present application is shown.

[0095] In an embodiment of the present application, a parameter configuration device may include:

[0096] The data reading module 501 is used to read the data stored in the storage medium when it is detected that a data writing operation is performed on the preset storage medium;

[0097] The parameter configuration module 502 is used to configure the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium.

[0098] In the above-mentioned device, when the hardware device is replaced, the changed target device parameters can be written into the preset storage medium, so that the hardware parameters corresponding to the target device in the driver can be configured by reading the data stored in the storage medium without modifying or redeveloping the driver, which helps to reduce development and maintenance costs and improve the portability of the driver.

[0099] In a specific implementation of the embodiment of the present application, the parameter configuration module may include:

[0100] A data analysis submodule, used to analyze the data stored in the storage medium according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device;

[0101] The parameter configuration submodule is used to configure the hardware parameters corresponding to the target device in the driver according to the parameter configuration information.

[0102] Through the above device, the data stored in the storage medium can be parsed according to the preset parameter data structure, thereby improving the efficiency of data parsing and facilitating the protection of the consistency and accuracy of parameter configuration information.

[0103] In a specific implementation of the embodiment of the present application, the parameter data structure may include at least one parameter classification structure, and each parameter classification structure corresponds to a parameter category.

[0104] Through the above device, each parameter classification structure can correspond to a parameter category respectively, so that the configuration parameters can be more organized and the efficiency of the parameter configuration method can be improved.

[0105] In a specific implementation of the embodiment of the present application, the parameter category may include at least one of the following: a pin configuration class, a clock configuration class, a CAN configuration class, a UART configuration class, and a FPGA configuration class.

[0106] Through the above device, the parameter category can include at least one relatively common configuration category, thereby improving the applicability of the parameter configuration method.

[0107] In a specific implementation of the embodiment of the present application, the parameter configuration submodule may include:

[0108] An information writing unit, used for writing the parameter configuration information into a preset data cache;

[0109] An information assignment unit is used to assign the parameter configuration information in the data cache to the hardware parameters corresponding to the target device in the driver.

[0110] Through the above device, the read data can be extracted from the slow storage medium to the high-speed data cache, which can effectively speed up the operation speed of the parameter configuration method and further improve the efficiency of the parameter configuration method.

[0111] In a specific implementation of the embodiment of the present application, the information assignment unit can also be used to assign the parameter configuration information obtained by parsing to the hardware parameters corresponding to the target device in the driver.

[0112] Through the above device, the parameter configuration information obtained by parsing can be assigned to the driver, so as to realize the parameter configuration of the hardware parameters corresponding to the target device in the driver without modifying or redeveloping the driver, which helps to reduce the cost of development and maintenance and improve the portability of the driver.

[0113] In a specific implementation of the embodiment of the present application, the data reading module may include:

[0114] The data reading submodule is used to read the data stored in the storage medium through a data interaction interface preset in the storage medium.

[0115] Through the above device, the data stored in the storage medium can be read using the data interaction interface preset in the storage medium, so that when the hardware device is replaced, the parameter configuration information can be written and read through the storage medium to achieve the update of the parameter configuration information.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0117] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0118] Figure 6 A schematic block diagram of an electronic device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0119] like Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned various parameter configuration method embodiments are implemented, for example Figure 2 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 5 The functions of modules 501 to 502 are shown.

[0120] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the electronic device 6.

[0121] Those skilled in the art will understand that Figure 6 It is only an example of the electronic device 6 and does not constitute a limitation of the electronic device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 6 may also include input and output devices, network access devices, buses, etc.

[0122] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0123] The memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. The memory 61 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. Further, the memory 61 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 61 is used to store the computer program and other programs and data required by the electronic device 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0124] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0125] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0130] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0131] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A parameter configuration method, characterized in that: include: When it is detected that a data writing operation is performed on a preset storage medium, reading data stored in the storage medium; The hardware parameters corresponding to the target device in the driver are configured according to the data stored in the storage medium.

2. The parameter configuration method according to claim 1, characterized in that: The step of configuring the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium includes: Parsing the data stored in the storage medium according to a preset parameter data structure to obtain parameter configuration information corresponding to the target device; The hardware parameters corresponding to the target device in the driver are configured according to the parameter configuration information.

3. The parameter configuration method according to claim 2, characterized in that: The parameter data structure includes at least one parameter classification structure, and each parameter classification structure corresponds to a parameter category.

4. The parameter configuration method according to claim 3, characterized in that: The parameter category includes at least one of the following: a pin configuration category, a clock configuration category, a CAN configuration category, a UART configuration category, and an FPGA configuration category.

5. The parameter configuration method according to claim 2, characterized in that: The step of configuring the hardware parameters corresponding to the target device in the driver according to the parameter configuration information includes: Writing the parameter configuration information into a preset data cache; The parameter configuration information in the data cache is assigned to the hardware parameters corresponding to the target device in the driver.

6. The parameter configuration method according to claim 2, characterized in that: The step of configuring the hardware parameters corresponding to the target device in the driver according to the parameter configuration information includes: The parameter configuration information obtained by parsing is assigned to the hardware parameters corresponding to the target device in the driver.

7. The parameter configuration method according to any one of claims 1 to 6, characterized in that: The reading of data stored in the storage medium includes: The data stored in the storage medium is read through a data interaction interface preset in the storage medium.

8. A parameter configuration device, characterized in that: include: A data reading module, configured to read data stored in a storage medium when detecting that a data writing operation is performed on the preset storage medium; The parameter configuration module is used to configure the hardware parameters corresponding to the target device in the driver according to the data stored in the storage medium.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the parameter configuration method according to any one of claims 1 to 7 are implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the parameter configuration method according to any one of claims 1 to 7 are implemented.