Parameter processing method and apparatus, electronic device, and storage medium

CN115309328BActive Publication Date: 2026-10-30DONGGUAN ANDA AUTOMATIC EQUIP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210889979.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2026-10-30
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

这种做法需要频繁地从非易失性存储器读取数据,处理过程耗时比较长,效率低下

Benefits of technology

[0010]根据本申请实施例的参数处理方法,至少具有如下有益效果:本申请实施例的参数处理方法应用于主控设备,主控设备设有易失性存储器与非易失性存储器,主控设备连接有从控设备,先获取由从控设备发送的第一参数,第一参数具有第一数据,将第一参数与存储于易失性存储器中对应的第二参数进行对比检测,第二参数具有第二数据,若检测到第一数据与第二数据不相同,将第二数据更新为第一数据,将更新后的第二参数存储于非易失性存储器。本申请实施例的参数处理方法无需从非易失性存储器中读取数据就能判断第一参数的第一数据与第二参数的第二数据是否相同,若检测到第一数据与第二数据不相同,将第二参数的第二参数更新为第一参数的第一数据,并将更新后的第二参数存储于非易失性存储器,无需频繁地从非易失性存储器中读取数据,能够提高处理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309328B_ABST
    Figure CN115309328B_ABST
Patent Text Reader

Abstract

The application discloses a parameter processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first parameter sent by a slave device, the first parameter having first data; comparing and detecting the first parameter with corresponding second parameter stored in a volatile memory, the second parameter having second data; if it is detected that the first data is not the same as the second data, updating the second data as the first data; and storing the updated second parameter in a non-volatile memory. The parameter processing method provided by the embodiment of the application can determine whether the first data of the first parameter is the same as the second data of the second parameter without reading data from the non-volatile memory. If it is detected that the first data is not the same as the second data, the second data of the second parameter is updated as the first data of the first parameter, and the updated second parameter is stored in the non-volatile memory. Therefore, the data in the non-volatile memory does not need to be frequently read, and the processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and in particular to a parameter processing method, apparatus, electronic device and storage medium. Background Technology

[0002] In automated production, in order to save equipment parameters after a power outage, the equipment parameters are usually stored in non-volatile memory. When storing equipment parameters, it is necessary to first retrieve the current parameters from the equipment, and then determine whether the equipment parameters in the non-volatile memory are consistent with the current parameters. If they are inconsistent, the equipment parameters in the non-volatile memory need to be modified.

[0003] The common practice in related technologies is to obtain the current parameters from the device, then read the device parameters from the non-volatile memory, and then compare the read device parameters with the current device parameters. If they are different, the device parameters in the non-volatile memory are replaced with the current device parameters. This approach requires frequent readings from the non-volatile memory, which is time-consuming and inefficient. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a parameter processing method, apparatus, electronic device, and storage medium that eliminates the need for frequent data readings from non-volatile memory, thereby improving processing efficiency.

[0005] In a first aspect, embodiments of this application provide a parameter processing method applied to a master control device, wherein the master control device is equipped with volatile memory and non-volatile memory, and a slave control device is connected to the master control device; the method includes:

[0006] Obtain a first parameter sent by the slave device; wherein the first parameter has first data;

[0007] The first parameter is compared and detected with the corresponding second parameter stored in the volatile memory; wherein, the second parameter has second data;

[0008] If the first data is detected to be different from the second data, the second data will be updated to the first data;

[0009] The updated second parameter is stored in the non-volatile memory.

[0010] The parameter processing method according to the embodiments of this application has at least the following beneficial effects: The parameter processing method of the embodiments of this application is applied to a master control device, which is provided with volatile memory and non-volatile memory. The master control device is connected to a slave control device. First, a first parameter sent by the slave control device is obtained. The first parameter has first data. The first parameter is compared and detected with a corresponding second parameter stored in the volatile memory. The second parameter has second data. If the first data and the second data are detected to be different, the second data is updated to the first data, and the updated second parameter is stored in the non-volatile memory. The parameter processing method of the embodiments of this application can determine whether the first data of the first parameter and the second data of the second parameter are the same without reading data from the non-volatile memory. If the first data and the second data are detected to be different, the second parameter of the second parameter is updated to the first data of the first parameter, and the updated second parameter is stored in the non-volatile memory. This eliminates the need for frequent reading of data from the non-volatile memory and improves processing efficiency.

[0011] According to some embodiments of the first aspect of this application, the non-volatile memory stores a third parameter corresponding to the second parameter, and the third parameter has third data;

[0012] After storing the updated second parameter in the non-volatile memory, the method further includes:

[0013] Replace the third data with the updated second data.

[0014] According to some embodiments of the first aspect of this application, after replacing the third data with the updated second data, the method further includes:

[0015] The third parameter is retrieved from the non-volatile memory, and compared with the second parameter to determine whether the third parameter has been successfully updated.

[0016] According to some embodiments of the first aspect of this application, after comparing and detecting the first parameter with the corresponding second parameter stored in the volatile memory, the method further includes:

[0017] If the first data is detected to be the same as the second data, the second data is not updated.

[0018] According to some embodiments of the first aspect of this application, obtaining the first parameter sent by the slave device includes:

[0019] Obtain the preset target acquisition time conditions;

[0020] If the current time meets the target acquisition time condition, the first parameter sent by the slave control device is acquired.

[0021] According to some embodiments of the first aspect of this application, before comparing and detecting the first parameter with the corresponding second parameter stored in the volatile memory, the method further includes:

[0022] If it is detected that the corresponding second parameter does not exist in the volatile memory, the first parameter is stored in the volatile memory;

[0023] The first parameter stored in the volatile memory is used as the second parameter.

[0024] According to some embodiments of the first aspect of this application, storing the first parameter in the volatile memory includes:

[0025] Determine the data length of the first parameter;

[0026] According to the data length, allocate corresponding storage space in the volatile memory;

[0027] The first parameter is stored in the storage space.

[0028] Secondly, embodiments of this application provide a parameter processing device applied to a master control device. The master control device is equipped with a volatile memory and a non-volatile memory, and a slave control device is connected to the master control device. The device includes:

[0029] A parameter acquisition module is used to acquire a first parameter sent by the slave device; wherein the first parameter has first data;

[0030] The comparison and detection module is used to compare and detect the first parameter with the corresponding second parameter stored in the volatile memory; wherein the second parameter has second data;

[0031] The update module is used to update the second data to the first data if it is detected that the first data and the second data are different;

[0032] A storage module is used to store the updated second parameter in the non-volatile memory.

[0033] Thirdly, embodiments of this application provide an electronic device, the electronic device including a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, wherein when the program is executed by the processor, it implements the steps of the parameter processing method as described in any embodiment of the first aspect.

[0034] Fourthly, embodiments of this application provide a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the parameter processing method described in any embodiment of the first aspect.

[0035] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0036] The present application will be further described below with reference to the accompanying drawings and embodiments, wherein:

[0037] Figure 1 This is a flowchart illustrating the parameter processing method provided in the embodiments of this application;

[0038] Figure 2 This is a flowchart illustrating the storage of data into non-volatile memory provided in an embodiment of this application;

[0039] Figure 3 This is a schematic diagram illustrating the mapping relationship between non-volatile memory and volatile memory provided in the embodiments of this application;

[0040] Figure 4 This is a flowchart of a parameter processing method provided in another embodiment of this application;

[0041] Figure 5 This is a flowchart of a parameter processing method provided in another embodiment of this application;

[0042] Figure 6 This is a flowchart of a parameter processing method provided in another embodiment of this application;

[0043] Figure 7 This is a flowchart of a parameter processing method provided in another embodiment of this application;

[0044] Figure 8 This is a flowchart illustrating the storage in volatile memory provided in an embodiment of this application;

[0045] Figure 9 This is a schematic diagram of the parameter processing device provided in this embodiment;

[0046] Figure 10 This is the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0047] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0048] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0049] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0050] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0051] In the description of this application, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0052] First, the names involved in the embodiments of this application will be explained.

[0053] Random Access Memory (RAM): Random access memory is similar to portable storage in a PC, used to store and save data. RAM is typically used as temporary storage for the operating system or other running programs.

[0054] Non-volatile memory (NVM): Non-volatile memory (NVM) refers to computer memory whose stored data will not be lost when the power is turned off.

[0055] EtherCAT (Ethernet Control Automation Technology): EtherCAT is an open architecture, Ethernet-based fieldbus system. The "CAT" in its name is an abbreviation for Control Automation Technology. EtherCAT is a deterministic industrial Ethernet. It uses a full-duplex Ethernet physical layer, and slave devices may have two or more ports. If a device does not detect other downstream devices, the slave's controller will automatically close the corresponding port and send back an Ethernet frame. Due to these characteristics, EtherCAT supports almost all network topologies, including bus, tree, and star topologies. The bus topology commonly used in fieldbuses can also be used in Ethernet.

[0056] Understandably, in automated production, in order to save equipment parameters after a power outage, such as between an EtherCAT master and an EtherCAT slave, it is usually necessary to save the equipment parameters in the EtherCAT slave to the non-volatile memory in the EtherCAT master. When storing equipment parameters, it is necessary to first obtain the current parameters from the EtherCAT slave, and then determine whether the equipment parameters in the non-volatile memory are consistent with the current parameters. If they are inconsistent, the equipment parameters in the non-volatile memory need to be modified.

[0057] The common practice in related technologies is to first obtain the current parameters from the EtherCAT slave station, then read the device parameters from the non-volatile memory, and then compare the read device parameters with the current device parameters. If they are different, the device parameters in the non-volatile memory are replaced with the current device parameters. This approach requires frequent data reading from the non-volatile memory, which is time-consuming and inefficient.

[0058] Based on this, embodiments of this application provide a parameter processing method, apparatus, electronic device, and storage medium that eliminates the need for frequent data reading from non-volatile memory, thereby improving processing efficiency.

[0059] Firstly, referring to Figure 1 , Figure 1 This is a flowchart illustrating the parameter processing method provided in the embodiments of this application. The parameter processing method in the embodiments of this application is applied to a master control device. The master control device is equipped with volatile memory and non-volatile memory. The master control device is connected to a slave control device. The method may include, but is not limited to, steps S110, S120, S130 and S140.

[0060] Step S110: Obtain the first parameter sent by the slave device; wherein the first parameter has first data;

[0061] Step S120: Compare and detect the first parameter with the corresponding second parameter stored in the volatile memory; wherein the second parameter has second data;

[0062] Step S130: If the first data and the second data are detected to be different, update the second data to the first data;

[0063] Step S140: Store the updated second parameter in non-volatile memory.

[0064] The parameter processing method of this application embodiment first obtains a first parameter sent by a slave device. The first parameter has first data. The first parameter is compared and detected with a corresponding second parameter stored in volatile memory. The second parameter has second data. If the first data and the second data are detected to be different, the second data is updated to the first data, and the updated second parameter is stored in non-volatile memory. The parameter processing method of this application embodiment can determine whether the first data of the first parameter and the second data of the second parameter are the same without reading data from non-volatile memory. If the first data and the second data are detected to be different, the second parameter of the second parameter is updated to the first data of the first parameter, and the updated second parameter is stored in non-volatile memory. This avoids frequent data reading from non-volatile memory and can improve processing efficiency.

[0065] It is understood that, in one embodiment, the corresponding second parameter in the volatile memory can be the first parameter previously acquired by the slave device. Therefore, in steps S120 and S130, by comparing the second parameter with the currently acquired first parameter, it can be determined whether the first parameter of the slave device has changed. If the first data of the first parameter is detected to be different from the second data of the second parameter, it indicates that the first data of the first parameter of the slave device has changed. In this embodiment, it is not necessary to read data from the non-volatile memory to determine whether the first data of the first parameter of the slave device has changed, which can improve processing efficiency.

[0066] It should be noted that the first data, the second data, and the third data can be used to characterize the status of the slave device. This application does not limit the specific content of the first data, the second data, and the third data. Those skilled in the art can configure the specific content of the first data, the second data, and the third data according to actual needs.

[0067] It is understood that, in another embodiment, the corresponding second parameter in the volatile memory is pre-stored in the volatile memory. The second parameter is the initial parameter of the first parameter. Therefore, in steps S120 and S130, by comparing the second parameter with the currently acquired first parameter, it can be determined whether the first parameter of the slave device has changed. If the first data of the first parameter is detected to be different from the second data of the second parameter, it indicates that the first data of the first parameter of the slave device has changed. In this embodiment, it is not necessary to read data from the non-volatile memory to determine whether the first parameter of the slave device has changed, which can improve processing efficiency.

[0068] It is worth noting that, in one embodiment, the slave device is also provided with volatile memory. The first parameter is stored in the volatile memory of the slave device. The master device obtains the first parameter from the volatile memory of the slave device and compares and detects the first parameter in the volatile memory of the slave device with the second parameter in the volatile memory of the master device. If the first data and the second data are detected to be different, the second data is updated to the first data. The updated second parameter is stored in the non-volatile memory of the master device.

[0069] It is worth noting that, in one embodiment, the master device can be an EtherCAT master station, and the slave device can be an EtherCAT slave station. The EtherCAT master station and the EtherCAT slave station are connected via a bus. The volatile memory of the EtherCAT master station stores a second parameter, which serves as the initial parameter for the EtherCAT slave station. The EtherCAT master station sends the initial parameter to the EtherCAT slave station, and the EtherCAT slave station operates according to the initial parameter. During operation, the initial parameter can be changed. The EtherCAT slave sends a first parameter to the EtherCAT master. The EtherCAT master compares the first parameter with the corresponding second parameter stored in volatile memory. If the first data of the first parameter is different from the second data of the second parameter, it indicates that the initial parameters of the EtherCAT slave have changed during operation. The EtherCAT master then updates the second data of the second parameter to the first data of the first parameter. The EtherCAT master stores the second parameter in non-volatile memory. In the event of a power outage, the EtherCAT master can retrieve the second parameter from the non-volatile memory to avoid parameter loss after power failure. After power is restored, the EtherCAT master can send the parameter stored in non-volatile memory to the EtherCAT slave.

[0070] It should be noted that the master control device mentioned above is an EtherCAT master station and the slave control device is an EtherCAT slave station. This is just an example and should not be construed as limiting the embodiments of this application. The master control device and the slave control device can also be other electronic devices, and this application does not limit them.

[0071] It is worth noting that the first parameter can refer to a single parameter or an array. When the first parameter is a single parameter, the second parameter is also a single parameter. When the first parameter is an array, the second parameter is also an array, and the parameters in the two arrays correspond one-to-one.

[0072] Understandably, referring to Figure 2 and Figure 3 , Figure 2 A flowchart illustrating the storage of data into non-volatile memory provided in this application embodiment; Figure 3 This is a schematic diagram illustrating the mapping relationship between non-volatile memory and volatile memory provided in an embodiment of this application. The non-volatile memory stores a third parameter corresponding to the second parameter, and the third parameter has third data; after step S140, steps including but not limited to S141 may also be included.

[0073] Step S141: Replace the third data with the updated second data.

[0074] It is worth noting that, referring to Figure 3 The non-volatile memory can be an EEPROM, where the third parameter in the EEPROM corresponds one-to-one with the second parameter in the RAM. In one embodiment, the master device's EEPROM pre-stores the third parameter and sends it to the RAM for storage, where it is recorded as the second parameter. The second parameter is then sent to the slave device, where it is recorded as the first parameter. When the first parameter sent by the slave device is obtained, a comparison is performed between the first parameter and the second parameter. If the first data of the first parameter is detected to be different from the second data of the second parameter, it indicates that the first data of the first parameter in the slave device has changed. The second data of the second parameter in the RAM is updated to the first data of the first parameter, and the third data of the third parameter in the EEPROM is replaced with the updated second data of the second parameter in the RAM, thereby storing the changed first data of the first parameter in the EEPROM.

[0075] It should be noted that the above-mentioned non-volatile memory that can be EEPROM is just an example and should not be construed as a limitation of this application. Those skilled in the art can use other non-volatile memories according to actual needs.

[0076] Understandably, referring to Figure 4 , Figure 4The flowchart of a parameter processing method provided in another embodiment of this application may include, but is not limited to, step S142 after step S141.

[0077] Step S142: Obtain the third parameter from the non-volatile memory, compare the third parameter with the second parameter, and determine whether the third parameter has been successfully updated.

[0078] The third parameter is compared with the second parameter. If the third data of the third parameter is the same as the second data of the second parameter, the third parameter update is successful. If the third data of the third parameter is different from the second data of the second parameter, the third parameter update fails, and the third data of the third parameter needs to be updated to the second data of the second parameter again, and the comparison test is repeated until the third parameter update is successful. In one embodiment, an error is recorded each time the third data of the third parameter is detected to be different from the second data of the second parameter. When three errors are detected, an alarm message is generated to notify relevant personnel for handling. For example, the relevant personnel are equipped with a terminal connected to the main control device, and the main control device sends the alarm message to the terminal.

[0079] Understandably, referring to Figure 5 , Figure 5 This is a flowchart of a parameter processing method provided in another embodiment of this application. After step S120, step S510 may also be included, but is not limited to.

[0080] Step S510: If the first data is detected to be the same as the second data, the second data is not updated.

[0081] If the first data of the first parameter is detected to be the same as the second data of the second parameter, it indicates that the first data of the first parameter of the slave device has not changed compared with the second data of the second parameter. Therefore, there is no need to update the second data of the second parameter or store it in the non-volatile memory.

[0082] Understandably, referring to Figure 6 , Figure 6 This is a flowchart of a parameter processing method provided in another embodiment of this application. Step S110 may include, but is not limited to, steps S111 and S112.

[0083] Step S111: Obtain the preset target acquisition time conditions;

[0084] Step S112: If the current time meets the target acquisition time condition, acquire the first parameter sent by the slave control device.

[0085] It is worth noting that, in this embodiment, when the target acquisition time condition is met at the current moment, the first parameter sent by the slave device is acquired to determine whether the first parameter has changed compared to the second parameter within a preset time period. For example, the target acquisition time condition may be that the time elapsed since the last acquisition of the first parameter has reached a preset time period, that is, the first parameter sent by the slave device is acquired every preset time period to determine whether the first parameter has changed compared to the second parameter within the preset time period. This application does not limit the preset time period, and those skilled in the art can set the specific time of the preset time period according to actual needs. It is worth noting that, in one embodiment, the target acquisition time condition may be that the application of the master device is in an idle state. When the application of the master device is idle, the first parameter sent by the slave device is acquired to determine whether the first parameter has changed compared to the second parameter.

[0086] Understandably, referring to Figure 7 , Figure 7 This is a flowchart of a parameter processing method provided in another embodiment of this application. Before step S120, steps S710 and S720 may also be included, but are not limited to.

[0087] Step S710: If the corresponding second parameter is not detected in the volatile memory, the first parameter is stored in the volatile memory;

[0088] Step S720: The first parameter stored in the volatile memory is used as the second parameter.

[0089] It is worth noting that, in one embodiment, if the corresponding second parameter is not detected in the volatile memory, the first parameter is stored in the volatile memory, and the first parameter stored in the volatile memory is used as the second parameter. This allows the first parameter sent by the slave device to be received subsequently to be compared with the second parameter stored in the volatile memory. If the first data of the first parameter is detected to be different from the second data of the second parameter, it indicates that the first parameter of the slave device has changed. In this embodiment, it is not necessary to read data from the non-volatile memory to determine whether the first parameter of the slave device has changed, which can improve processing efficiency.

[0090] Understandably, referring to Figure 8 , Figure 8 This is a flowchart illustrating the storage of parameters in volatile memory according to an embodiment of this application. In step S710, storing the first parameter in volatile memory may include, but is not limited to, steps S711, S712, and S713.

[0091] Step S711: Determine the data length of the first parameter;

[0092] Step S712: Allocate corresponding storage space in the volatile memory according to the data length;

[0093] Step S713: Store the first parameter in the storage space.

[0094] It is worth noting that, referring to Figure 3 For example, the first parameter can include parameter 1, parameter 2, and parameter 3, where parameter 1 has a data length of 2 bytes, parameter 2 has a data length of 4 bytes, and parameter 3 has a data length of 2 bytes. An array of structures is defined in RAM, containing pointers to the parameters to be stored and their data lengths. Specifically, 2 bytes of storage space are allocated for parameter 1, 4 bytes for parameter 2, and 2 bytes for parameter 3. A pointer is also assigned to each parameter, and parameters 1, 2, and 3 are stored into their corresponding storage spaces based on the pointers. It should be noted that... Figure 3 The first parameter shown includes parameter 1, parameter 2 and parameter 3, but it is only an example and should not be construed as a limitation of this application.

[0095] Secondly, referring to Figure 9 This application provides a parameter processing device applied to a master control device. The master control device is equipped with volatile memory and non-volatile memory, and a slave control device is connected to the master control device. The device includes:

[0096] The parameter acquisition module 901 is used to acquire a first parameter sent by the slave device; wherein the first parameter has first data;

[0097] The comparison and detection module 902 is used to compare and detect the first parameter with the corresponding second parameter stored in the volatile memory; wherein the second parameter has second data.

[0098] The update module 903 is used to update the second data to the first parameter if the first data and the second data are detected to be different.

[0099] Storage module 904 is used to store the updated second parameter in non-volatile memory.

[0100] First, the parameter acquisition module 901 acquires the first parameter sent by the slave device. Then, the comparison and detection module 902 compares the first parameter with the corresponding second parameter stored in volatile memory. If the update module 903 detects that the first data of the first parameter and the second data of the second parameter are different, it updates the second data of the second parameter to the first data of the first parameter. Finally, the storage module 904 stores the second parameter in non-volatile memory. This method can determine whether the first data of the first parameter and the second data of the second parameter are the same without reading data from the non-volatile memory. When a difference is detected, the second data of the second parameter is updated to the first data of the first parameter, and the updated second parameter is stored in the non-volatile memory. This reduces the need for frequent data reading from the non-volatile memory, improving processing efficiency.

[0101] It should be noted that the parameter processing device in the above-mentioned embodiments is based on the same inventive concept as the parameter processing method in the above-mentioned embodiments. Therefore, the corresponding content of the parameter processing method in the above-mentioned embodiments is also applicable to the parameter processing device in the above-mentioned embodiments, and has the same implementation principle and technical effect. To avoid redundancy, it will not be described in detail here.

[0102] Thirdly, embodiments of this application provide an electronic device, which includes a memory 1002, a processor 1001, a program stored in the memory 1002 and executable on the processor 1001, and a data bus 1005 for implementing communication between the processor 1001 and the memory 1002. When the program is executed by the processor 1001, it implements the steps of the parameter processing method as described in any of the above embodiments.

[0103] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0104] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The processor 1001 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 1001 can be a microprocessor or any conventional processor 1001, etc.

[0105] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the image processing method of the embodiments of this application.

[0106] Input / output interface 1003 is used to implement information input and output; input / output interface 1003 can display media content, for example, it may include one or more speakers and / or one or more visual displays. Input / output interface 1003 is used to implement information input, for example, input / output interface 1003 may include a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0107] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0108] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0109] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0110] Furthermore, memory 1002, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Memory 1002 may include high-speed random access memory 1002, and may also include non-transitory memory 1002, such as at least one disk storage device 1002, flash memory device, or other non-transitory solid-state memory 1002. In some embodiments, memory 1002 may optionally include memory 1002 remotely located relative to processor 1001, and these remote memories 1002 can be connected to processor 1001 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0111] The processor 1001 executes non-transient software instructions, commands, and signals stored in the memory 1002 to perform various functional applications and data processing, thereby implementing the parameter processing method of the above embodiments.

[0112] The non-transient software instructions required to implement the parameter processing method of the above embodiments are stored in the memory 1002. When executed by the processor 1001, the parameter processing method of the present application embodiments is executed, for example, the method described above. Figure 1 Method steps S110 to S140 in the text Figure 2 Method steps S141 Figure 4 Method steps S142 in the middle Figure 5 Method steps S510, Figure 6 Method steps S111 to S112 in the text Figure 7 Method steps S710 to S720 in the text Figure 8 Method steps S711 to S713.

[0113] Fourthly, embodiments of this application also provide a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the parameter processing method of any of the above embodiments.

[0114] The storage medium stores one or more programs, which can be executed by one or more processors. For example, executing the above-described... Figure 1 Method steps S110 to S140 in the text Figure 2 Method steps S141 Figure 4 Method steps S142 in the middle Figure 5 Method steps S510, Figure 6 Method steps S111 to S112 in the text Figure 7 Method steps S710 to S720 in the text Figure 8 Method steps S711 to S713.

[0115] Based on the above description of the embodiments, those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable signals, data structures, instruction modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable signals, data structures, instruction modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0116] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application. Furthermore, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other.

Claims

1. A parameter processing method, characterized in that, Applied to a master control device, the master control device is equipped with volatile memory and non-volatile memory, and the master control device is connected to a slave control device. The method includes: Obtain the preset target acquisition time conditions; If the current time meets the target acquisition time condition, then the first parameter sent by the slave device is acquired; wherein the first parameter has first data; The first parameter is compared and detected with the corresponding second parameter stored in the volatile memory; wherein, the second parameter has second data; the first data and the second data are used to characterize the state of the slave device; If it is detected that the first data and the second data are different, then the second data is updated to the first data to obtain the updated second data; The updated second parameter is stored in the non-volatile memory; The second parameter corresponding to the volatile memory is the first parameter that was previously obtained and sent by the slave device and directly stored in the volatile memory; Before comparing and detecting the first parameter with the corresponding second parameter stored in the volatile memory, the method further includes: If it is detected that the corresponding second parameter does not exist in the volatile memory, then the first parameter is stored in the volatile memory; The first parameter stored in the volatile memory is used as the second parameter.

2. The parameter processing method according to claim 1, characterized in that, The non-volatile memory stores a third parameter corresponding to the second parameter, and the third parameter has third data; After storing the updated second parameter in the non-volatile memory, the method further includes: Replace the third data with the updated second data.

3. The parameter processing method according to claim 2, characterized in that, After replacing the third data with the updated second data, the method further includes: The third parameter is retrieved from the non-volatile memory, and compared with the second parameter to determine whether the third parameter has been successfully updated.

4. The parameter processing method according to claim 1, characterized in that, After comparing and detecting the first parameter with the corresponding second parameter stored in the volatile memory, the method further includes: If the first data is detected to be the same as the second data, the second data is not updated.

5. The parameter processing method according to claim 1, characterized in that, The step of storing the first parameter in the volatile memory includes: Determine the data length of the first parameter; According to the data length, allocate corresponding storage space in the volatile memory; The first parameter is stored in the storage space.

6. A parameter processing device, characterized in that, Applied to a master control device, the master control device is equipped with volatile memory and non-volatile memory, and the master control device is connected to a slave control device. The device includes: The parameter acquisition module is used to acquire a preset target acquisition time condition; if the current time meets the target acquisition time condition, the module acquires a first parameter sent by the slave device; wherein the first parameter has first data. The comparison and detection module is used to compare and detect the first parameter with the corresponding second parameter stored in the volatile memory; wherein the second parameter has second data; the first data and the second data are used to characterize the state of the slave device; The update module is used to update the second data to the first data if it is detected that the first data and the second data are different; A storage module is used to store the updated second parameter in the non-volatile memory; The second parameter corresponding to the volatile memory is the first parameter that was previously obtained and sent by the slave device and directly stored in the volatile memory; Before comparing and detecting the first parameter with the corresponding second parameter stored in the volatile memory, the method further includes: If it is detected that the corresponding second parameter does not exist in the volatile memory, then the first parameter is stored in the volatile memory; The first parameter stored in the volatile memory is used as the second parameter.

7. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the parameter processing method as described in any one of claims 1 to 5.

8. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the parameter processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • System and method for reducing programming power consumption of phase-change memory

    CN101329907A

  • Data storage device configured to perform a non-blocking control update operation

    CN108509480A