A data processing method and device for configuring file custom logic operation, equipment and storage medium
By automatically generating or editing configuration files and compiling them into a linked list structure, the problem of high system adjustment complexity in existing technologies is solved, and optimized processing that meets the requirements of system changes without changing the internal program is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2026-03-24
AI Technical Summary
When adding, removing, or modifying devices in a system, existing technologies require adjustments to the internal programs and data structures of the integrated management devices, leading to increased workload for developers and higher program maintenance complexity. Furthermore, the universality of configuration files is limited by predefined mapping relationships, making them unsuitable for undefined configuration change scenarios.
Configuration files can be automatically generated or manually edited using logic definition tools. Combinational logic OR, NAND, analog comparison, conditional assignment, and unconditional assignment programs can be used to generate configuration files that meet user requests. These files are then transmitted to the integrated management device via a file transfer protocol, compiled into a linked list structure, and rewritten into memory to realize custom logic operations in the configuration files.
Without altering the internal program of the integrated management device, the configuration file modification can meet system requirements after adding, removing, or modifying devices in the system, thereby improving system optimization processing speed and reducing workload and program maintenance costs.
Smart Images

Figure CN120523504B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a data processing method and device for configuration file self-defined logical operation, equipment and storage medium. BACKGROUND
[0002] In the system, a comprehensive management device is needed to collect, process and integrate the information of the whole system. When part of the device is added, reduced or modified in the system, the information structure and content may change. In general processing, the program and data structure inside the comprehensive management device need to be adjusted, which is not universal, increases the workload of the developers and the complexity of program maintenance.
[0003] CN202010929711.2 proposes a system data processing logic updating method, device, data processing system and storage medium, including: when the system configuration file is updated, identifying the updated configuration item in the updated system configuration file and determining the data processing logic of the system main framework, the data processing logic is obtained by loading the configuration parameters and configuration plug-ins in the read system configuration file to the system main framework in response to the system start operation, determining the preset action corresponding to the updated configuration item, the preset action includes any one of parameter update, plug-in reloading and system restart, based on the updated configuration item, executing the preset action to update the data processing logic of the system main framework, so that the system can be conveniently updated without human intervention. The system data processing logic is updated only by modifying the configuration file, the system "hot plug" is realized, and the automation of system updating is improved. Although the method proposed by the patent realizes the "hot plug" of the system data processing logic by dynamically updating the configuration file, the universality of the configuration file may be limited, and it requires to define the corresponding action for each updated configuration item in advance. This design needs to fix the mapping relationship between the configuration item and the action in the system in advance, which leads to the fact that the configuration file must strictly match the preset action and cannot adapt to the configuration change scene that is not predefined. SUMMARY
[0004] In order to overcome the above technical defects, the present application provides a data processing method, device, equipment and storage medium for configuration file self-defined logical operation. After adding, reducing or modifying part of the device in the system, the configuration file is automatically / manually generated by configuring the combined logic without changing the internal program of the comprehensive management device, so that the output data of the comprehensive management device meets the requirements of the changed system.
[0005] In order to solve the above problems, the present application is realized according to the following technical scheme:
[0006] The present application discloses a data processing method for configuration file self-defined logical operation, comprising the following steps:
[0007] S1. Configure combinational logic using the logic definition tool to automatically generate a configuration file or manually obtain and generate a configuration file;
[0008] The configuration file generated in step S1 includes:
[0009] The combinational logic OR, NAND, and NOT program adopts a combination of several input pointers and one output pointer, and several input flags and one output flag.
[0010] The analog quantity comparison and calculation program adopts a combination of an analog quantity data source pointer x, an analog quantity data source pointer y, and an output pointer z;
[0011] The conditional assignment procedure takes the form of a combination of a conditional switch pointer, a data source pointer as a set of inputs, a structure containing several sets of inputs, and an output pointer.
[0012] An unconditional assignment procedure takes an input address pointer and an output address pointer as a group of information, and the structure contains multiple groups of information and a group number variable as a combination form;
[0013] According to the user's request, the configuration file is automatically or manually generated by any one or more of the following programs: the combinational logic OR AND NOT program, the analog quantity comparison program, the calculation program, the conditional assignment program, and the unconditional assignment program.
[0014] S2. Transmit the configuration file to the integrated management device via a file transfer protocol, detect the contents of the configuration file, reset the integrated manager, or execute compilation instructions.
[0015] S3. Erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory;
[0016] S4. The integrated manager creates an execution task and, based on the linked list structure, traverses and executes all contents in the linked list.
[0017] Furthermore, in the configuration file generation step S1, the combinational logic OR and NOT program includes the following steps:
[0018] S111, Execute the delayed function;
[0019] S112. Call the combinational logic processing function and obtain its return value;
[0020] S1121. Obtain the input value according to the input pointer, and perform an XOR operation between the input value and the flag bit;
[0021] S1122. Determine if the result of the XOR operation is 1;
[0022] S11221, If yes, return the negation of the output flag;
[0023] S11222. If not, determine whether the input value has been traversed;
[0024] If the entire sequence has been traversed, return the output flag;
[0025] If the traversal is not completed, obtain the input value according to the next input pointer, perform an XOR operation between the input value and the flag bit, and repeat step S1122.
[0026] S1123. Assign a value to the output pointer based on the return value and the delay parameter;
[0027] S113, Execution complete.
[0028] Furthermore, in step S1, the analog quantity comparison and calculation program in generating the configuration file includes the following steps:
[0029] S114, Execute the delayed function;
[0030] S115. Based on the information in the configuration file, assign the corresponding function address to the function pointer in the structure, and then call the function pointed to by the function pointer in the structure.
[0031] S116. Obtain analog data source pointers x and y, and output pointer z, from the structure information;
[0032] S117. Perform the corresponding operation or comparison operation on x and y according to the operation or comparison function pointed to by the function pointer;
[0033] S118. Output the calculation result through the output pointer z;
[0034] S119, Execution complete.
[0035] Furthermore, in step S1, the conditional assignment procedure for generating the configuration file includes the following steps:
[0036] S120. Execution begins from the function entry pointer;
[0037] S121. Determine if the data pointed to by the condition pointer is 1;
[0038] S1211. If yes, proceed to step S122;
[0039] S1212. If not, proceed to step S123;
[0040] S122. Assign the data pointed to by the data source pointer in the input group to the address pointed to by the output pointer, and then execute step S124.
[0041] S123. Check if all inputs have been processed and the judgment is complete;
[0042] S1231. If yes, then proceed to step S124;
[0043] S1232. If not, proceed to the next input judgment and return to step S121 to continue checking the condition pointer data of the next set of inputs;
[0044] S124, Execution complete.
[0045] Furthermore, in step S1, the unconditional assignment procedure in generating the configuration file includes the following steps:
[0046] S125. Obtain the number of groups in the structure;
[0047] S126. Based on the number of groups, repeatedly assign the data pointed to by the input address pointer in each group of information to the address pointed to by the output address pointer;
[0048] S127. End the loop, execution complete.
[0049] Further, step S2 involves transmitting the configuration file to the integrated management device via a file transfer protocol, detecting the configuration file content, resetting the integrated manager, or executing compilation instructions, including the following steps:
[0050] S21. When resetting the integrated management device, the program automatically detects whether the configuration file has been updated;
[0051] S211. If so, the program will automatically execute the compilation instructions;
[0052] S212. If not, skip the compilation and load the existing configuration file directly.
[0053] S22. Manually execute compilation instructions via console commands.
[0054] Further, step S3, which erases the corresponding memory area inside the integrated management device, compiles the contents of the configuration file into a directly callable linked list, and then rewrites it into the memory, includes the following steps:
[0055] S31. When the program executes compilation instructions, the task scheduler is suspended;
[0056] S32. Erase the linked list stored in the internal Flash memory of the chip, parse the configuration file, set the processing functions and other parameters of the structure in the linked list according to the contents of the configuration file, and build and replace the original linked list.
[0057] S33, Restore Task Scheduler.
[0058] Further, in step S4, the comprehensive manager creates an execution task and, based on the linked list structure, traverses all contents of the execution linked list, including the following steps:
[0059] S41. Create an execution task and execute the task at a scheduled time;
[0060] S42. Use a pointer variable to point to the head of the linked list and determine whether the address of the next structure is within the address range of the Flash memory where the linked list is stored.
[0061] S421. If so, execute the processing function in the structure, and point the pointer to the next structure to continue the loop;
[0062] S422. If not, exit the loop and the current execution ends.
[0063] According to another aspect of the present invention, a data processing apparatus for configuring custom logical operations includes:
[0064] The configuration file generation module is used to automatically generate configuration files by configuring combinational logic through the logic definition tool or to manually edit and generate configuration files.
[0065] The configuration file transmission module is used to transmit the configuration file to the integrated management device via a file transfer protocol, detect the configuration file content, reset the integrated management device, or execute compilation instructions.
[0066] The compilation configuration file module is used to erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory;
[0067] The task execution module is used by the integrated manager to create execution tasks and traverse all contents of the execution linked list according to the linked list structure.
[0068] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0069] At least one processor; and a memory communicatively connected to said at least one processor;
[0070] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the data processing method for custom logic operations of configuration files as described in this invention.
[0071] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program,
[0072] The computer program is used to enable the processor to implement the data processing method for custom logical operations of the configuration file as described in this invention when executed.
[0073] Compared with the prior art, the beneficial effects of the present invention are:
[0074] This invention provides a data processing method for custom logic operations in configuration files. Without changing the internal program of the integrated management device, the program of the integrated management device does not need to be modified after adding, removing, or modifying some devices in the system. By modifying the configuration file, the output data of the integrated management device can meet the changed system requirements, which greatly improves the speed of system improvement and optimization, reduces the workload of staff, and reduces the cost and complexity of program maintenance. Attached Figure Description
[0075] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein:
[0076] Figure 1 This is a flowchart of a data processing method for custom logical operations on configuration files disclosed in this invention;
[0077] Figure 2 This is a flowchart of the combinational logic OR and AND NOT functions in a data processing method for custom logic operations of configuration files disclosed in this invention;
[0078] Figure 3 This is a flowchart of the analog quantity comparison and calculation process in a data processing method for custom logic operations in a configuration file disclosed in this invention.
[0079] Figure 4 This is a flowchart of a data processing method for custom logical operations in configuration files, disclosed in this invention, which includes a conditional assignment function.
[0080] Figure 5 This is a flowchart of the main function of a data processing method for custom logical operations in configuration files disclosed in this invention;
[0081] Figure 6 This is a block diagram of a data processing device for custom logic operations on configuration files disclosed in this invention;
[0082] Figure 7 This is a schematic diagram of the structure of an electronic device according to the present invention. Detailed Implementation
[0083] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0084] This embodiment discloses a data processing method for custom logical operations in configuration files, such as... Figure 1 As shown, it includes the following steps:
[0085] S1. Configure combinational logic using the logic definition tool to automatically generate a configuration file or manually edit and generate a configuration file;
[0086] The configuration file generated in step S1 includes: combinational logic OR AND NOT program, analog quantity comparison program, calculation program, conditional assignment program, and unconditional assignment program.
[0087] According to the user's request, the configuration file is automatically or manually generated by any one or more of the following programs: the combinational logic OR AND NOT program, the analog quantity comparison program, the calculation program, the conditional assignment program, and the unconditional assignment program.
[0088] The configuration file supports the four program functions mentioned above. Functions not exceeding these four can be added to, modified, or deleted from the configuration file. The logic definition tool (combinational logic editing software) generates configuration files for combinational logic, including but not limited to: graphical operation; in addition to automatic software generation, professionals can also manually write configuration files according to the rules.
[0089] S2. Transmit the configuration file to the integrated management device via a file transfer protocol, detect the contents of the configuration file, reset the integrated manager, or execute compilation instructions.
[0090] The file transfer protocol is the FTP file transfer protocol.
[0091] S3. Erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory;
[0092] The compilation process involves converting the configuration file into a linked list and storing it in Flash memory. This operation improves program loading speed, reduces RAM usage, and also enhances stability, effectively preventing errors caused by factors such as pointer overflow.
[0093] S4. The integrated manager creates execution tasks and traverses all contents of the execution chain according to the linked list structure.
[0094] In this embodiment, the headers of each type of structure are the same. By using the headers to form a linked list, different functional modules can be compatible. During program execution and compilation, all functional modules are processed uniformly, making the process simpler.
[0095] Different function pointers for the same function: During compilation, each structure occupies a lot of memory, but in actual use, the entire structure may not be used. Different function pointers can choose to discard the unused parts without affecting the execution of the function and reduce the use of Flash.
[0096] Function pointers: Function pointers are located at the beginning of a structure. The existence of function pointers allows a single program to be compatible with all modules.
[0097] This embodiment provides a data processing method for custom logical operations in a configuration file. Without changing the internal program of the integrated management device, the program of the integrated management device does not need to be modified after adding, removing, or modifying some devices in the system. By modifying the configuration file, the output data of the integrated management device can meet the changed system requirements, which greatly improves the speed of system improvement and optimization, reduces the workload of staff, and reduces the cost and complexity of program maintenance.
[0098] The configuration file in this embodiment supports four functions. Any functions not exceeding these four can be implemented by adding, modifying, or deleting from the configuration file.
[0099] The following provides a further explanation of Function 1 (Combinatorial Logic OR NAND), such as... Figure 2 As shown:
[0100] The configuration file generated in step S1 includes combinational logic OR and NAND programs, which take the form of a combination of several (based on the byte alignment characteristics of the Cortex-M4 core and actual usage requirements, this embodiment uses seven) input pointers and one output pointer, as well as several input flags and one output flag, and includes the following steps:
[0101] S111, Execute the delayed function;
[0102] S112. Call the combinational logic processing function and obtain its return value;
[0103] S1121. Obtain the input value according to the input pointer, and perform an XOR operation between the input value and the flag bit;
[0104] S1122. Determine if the result of the XOR operation is 1;
[0105] S11221, If yes, return the negation of the output flag;
[0106] S11222. If not, determine whether the input value has been traversed;
[0107] If the entire sequence has been traversed, return the output flag;
[0108] If the traversal is not completed, obtain the input value according to the next input pointer, perform an XOR operation between the input value and the flag bit, and repeat step S1122.
[0109] S1123. Assign a value to the output pointer based on the return value and the delay parameter;
[0110] S113, Execution complete.
[0111] This embodiment utilizes the bit-band region and bit-band alias region of the Cortex-M4 processor to quickly read, write, and perform logical operations on switch quantities. The Cortex-M4 core supports bit-band operations, which can extend data in some address segments into 32-bit data and associate it in another address. Therefore, for bit write operations, only its bit-band address needs to be obtained, avoiding the steps of reading, modifying, and writing, and the write operation can be completed directly; for bit read operations, the steps of reading, shifting, and bit fetching can be avoided, and the read operation can be completed directly, improving processing speed.
[0112] In logical operations, the input and output are a bit in the register. To improve the program's running speed, the program actually stores the register in the bit band area. Therefore, when reading or writing switch quantities, the address pointed to by the pointer is set to the address of the bit band alias area of the corresponding bit in the register, which can greatly improve the speed of bit logic operations.
[0113] Function 1 uses pointers to point to bits with bit addresses, allowing for rapid reading, writing, and manipulation of the corresponding bits. To ensure compatibility with OR, NAND, and NOT logic within a single function, Function 1 assigns a flag variable to each pointer. The result is obtained through bitwise AND operations with the flags, enabling rapid logical operations. The specific rules for the flag values are shown in the table "Combinational Logic Input / Output Flag Logic Table".
[0114]
[0115] To improve processing speed, different functions (implemented via function pointers) are used depending on the number of logic gate inputs. In the program, simply calling the function pointers within the structure is sufficient to complete all operations from functions one to four, without requiring additional differentiation. When adding program functionality later, this method only requires adding the functionality without modifying the processing components.
[0116] Additionally, the delay function uses a pointer to point to an unused RAM block. Depending on the delay method, operations such as addition, subtraction, and resetting to zero are performed on the value at the address pointed to by this pointer, and finally, the corresponding value is written to the address pointed to by the output pointer. In industrial applications, some inputs require filtering. In this embodiment, a delay function is used to filter some inputs, preventing malfunctions due to interference or other reasons.
[0117] The following provides further explanation of Function 2 (analog comparison and calculation), such as... Figure 3 As shown:
[0118] The configuration file generated in step S1 includes an analog quantity comparison and calculation program, which takes the form of a combination of an analog quantity data source pointer x, an analog quantity data source pointer y, and an output pointer z, and includes the following steps:
[0119] S114, Execute the delayed function;
[0120] S115. Based on the information in the configuration file, assign the corresponding function address to the function pointer in the structure, and then call the function pointed to by the function pointer in the structure.
[0121] S116. Obtain analog data source pointers x and y, and output pointer z, from the structure information;
[0122] S117. Perform the corresponding operation or comparison operation on x and y according to the operation or comparison function pointed to by the function pointer;
[0123] S118. Output the calculation result through the output pointer z;
[0124] S119, Execution complete.
[0125] The following provides further explanation of Function 3 (Conditional Assignment), such as... Figure 4 As shown:
[0126] The configuration file generated in step S1 includes a conditional assignment procedure, which takes the form of a combination of a conditional switch pointer, a data source pointer as a group of inputs, a structure containing several groups of inputs, and an output pointer, and includes the following steps:
[0127] S120. Execution begins from the function entry pointer;
[0128] S121. Determine if the data pointed to by the condition pointer is 1;
[0129] S1211. If yes, proceed to step S122;
[0130] S1212. If not, proceed to step S123;
[0131] S122. Assign the data pointed to by the data source pointer in the input group to the address pointed to by the output pointer, and then execute step S124.
[0132] S123. Check if all inputs have been processed and the judgment is complete;
[0133] S1231. If yes, then proceed to step S124;
[0134] S1232. If not, proceed to the next input judgment and return to step S121 to continue checking the condition pointer data of the next set of inputs;
[0135] S124, Execution complete.
[0136] Because this embodiment uses different function pointers and linked list structures, even if multiple sets of inputs are set, the unused parts of the structure can be truncated during the compilation stage, thereby reducing Flash usage. Using function pointers not only allows for compatibility with multiple functions but also reduces Flash usage.
[0137] Function 3 of this embodiment is often used in hot standby devices, specifically as follows: At any given time, only one device is operating. If devices A, B, and C exist, the monitoring device can only read data from all three devices. Function 3, however, can pre-process the data to reflect which device is currently running. Specifically: Device A's output is 120, device B's output is 119 when not running, and device C's output is 121 when not running. When obtaining the device output via communication, the output is 120. If the system switches to running device B, reading this address again yields an output of 119.
[0138] In this embodiment, function three can be combined with function two and applied to a hysteresis comparator. The specific implementation method of the hysteresis comparator is as follows:
[0139] 1. If the data source x > constant y1, then z1 = 1; otherwise, z1 = 0. (Function 2)
[0140] 2. If the data source x < constant y2, then z2 = 1; otherwise, z2 = 0. (Function 2, Note: y1 > y2)
[0141] 3. If z1 == 1, then z3 = z1; if z2 == 1, then z3 = z1 (Function 3)
[0142] The above steps can achieve that when x is monotonically increasing, x > y1 and z3 = 1; when x is monotonically decreasing and x < y2, z3 = 0; when y2 < x < y1, z3 maintains the previous state.
[0143] Hysteresis comparators are generally used in industry for the output of some status information, which can prevent the output status from repeatedly jumping at the critical state. Compared with the anti-shake (delay function of Function 1), the response of the hysteresis comparator is more stable and faster.
[0144] The following further describes Function 4 (unconditional assignment):
[0145] In the configuration file generated by step S1, there is an unconditional assignment program, which adopts a combination form of one input address pointer + one output address pointer as a group of information, the structure contains multiple groups of information, and a group number variable, including the following steps:
[0146] S125. Obtain the number of groups in the structure;
[0147] S126. According to the number of groups, loop and assign the data pointed to by the input address pointer in each group of information to the address pointed to by the output address pointer;
[0148] S127. End the loop and execute the end.
[0149] The application scenarios of Function 4 in this embodiment mostly exist in being compatible with devices of other manufacturers. Because each manufacturer has its own data arrangement habit, for the system using the device, when replacing the device of other manufacturers, it is necessary to modify other devices related to the replaced device. The Function 4 provided in this embodiment, combined with other functions, can quickly and conveniently modify the output of its own device without modifying other devices to make it compatible with the device before replacement.
[0150] In this embodiment, step S2 transmits the configuration file to the integrated management device through the file transfer protocol, detects the content of the configuration file, and resets the integrated manager or executes the compilation instruction, including the following steps:
[0151] S21. When resetting the integrated management device, the program automatically detects whether the configuration file is updated;
[0152] S211. If so, the program automatically executes the compilation instruction;
[0153] S212. If not, skip compilation and directly load the original configuration file.
[0154] S22. Manually execute compilation instructions via console commands.
[0155] In this embodiment, step S3, which erases the corresponding memory area inside the integrated management device, compiles the contents of the configuration file into a directly callable linked list, and then rewrites it into the memory, includes the following steps:
[0156] S31. When the program executes compilation instructions, the task scheduler is suspended;
[0157] S32. Erase the linked list stored in the internal Flash memory of the chip, parse the configuration file, set the processing functions and other parameters of the structure in the linked list according to the contents of the configuration file, and build and replace the original linked list.
[0158] S33, Restore Task Scheduler.
[0159] In this embodiment, step S4, where the comprehensive manager creates an execution task and traverses all contents of the execution list according to the linked list structure, includes the following steps:
[0160] S41. Create an execution task and execute the task at a scheduled time;
[0161] S42. Use one of the pointers to point to the head of the linked list and determine whether the address of the next structure is within the address range of the Flash memory where the linked list is stored.
[0162] S421. If so, execute the processing function in the structure, and point the pointer to the next structure to continue the loop;
[0163] S422. If not, exit the loop and the current execution ends.
[0164] This embodiment provides a data processing device for custom logical operations on configuration files. When using this device, the data processing method for custom logical operations on configuration files described above is included. Figure 6 As shown, the data processing device for custom logic operations in the configuration file includes:
[0165] The configuration file generation module is used to automatically generate configuration files by configuring combinational logic through the logic definition tool or to manually edit and generate configuration files.
[0166] The configuration file transmission module is used to transmit the configuration file to the integrated management device via a file transfer protocol, detect the configuration file content, reset the integrated management device, or execute compilation instructions.
[0167] The compilation configuration file module is used to erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory;
[0168] The task execution module is used by the integrated manager to create execution tasks and traverse all contents of the execution linked list according to the linked list structure.
[0169] This embodiment provides an electronic device, the electronic device comprising:
[0170] At least one processor; and a memory communicatively connected to said at least one processor;
[0171] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the data processing method for custom logic operations of configuration files as described in this invention.
[0172] This embodiment provides a computer-readable storage medium storing a computer program.
[0173] The computer program is used to enable the processor to implement the data processing method for custom logical operations of the configuration file as described in this invention when executed.
[0174] Figure 7 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present invention is shown. Electronic device 600 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0175] like Figure 7 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0176] The electronic device 600 has several components connected to the I / O interface 605, including: an input unit 606, such as a keyboard or mouse; an output unit 607, such as various types of displays or speakers; a storage unit 608, such as a disk or optical disk; and a communication unit 609, such as a network interface card (NIC), a modem, or a wireless transceiver. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0177] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a data processing method for configuration file-custom logic operations. For example, in some embodiments, a data processing method for configuration file-custom logic operations can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of a data processing method for configuration file-custom logic operations described above can be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform a data processing method with configuration file-defined logical operations.
[0178] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0179] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0180] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include, based on one or more wires of electrical connection, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0181] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0182] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0183] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0184] Other structures of the data processing method, apparatus, device, and storage medium for custom logical operations of configuration files described in this embodiment are found in the prior art.
[0185] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0186] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Therefore, any modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A data processing method for custom logical operations in a configuration file, characterized in that, Includes the following steps: S1. Configure combinational logic using the logic definition tool to automatically generate a configuration file or manually obtain and generate a configuration file; The configuration file generated in step S1 includes: The combinational logic OR / NAND NOT program uses a combination of seven input pointers and one output pointer, along with several input flags and one output flag. The steps include: executing a delay function; calling the combinational logic processing function, obtaining the input value from the input pointers, and performing an XOR operation between the input value and the flag; determining if the XOR result is 1, and if so, returning the NOT of the output flag; otherwise, determining if the input value has been traversed; and assigning a value to the output pointer based on the return value and the delay parameters. The analog quantity comparison and calculation program uses a combination of an analog quantity data source pointer x, an analog quantity data source pointer y, and an output pointer z. The program includes the following steps: executing a delay function; assigning the corresponding function address to the function pointer in the structure according to the information in the configuration file, and then calling the function pointed to by the function pointer in the structure; retrieving the analog quantity data source pointers x and y, and the output pointer z, from the structure information; performing the corresponding calculation or comparison operation on x and y according to the calculation or comparison function pointed to by the function pointer; and outputting the calculation result through the output pointer z. The conditional assignment program uses a combination of a conditional switch pointer, a data source pointer as a group of inputs, a structure containing several groups of inputs, and an output pointer. It includes the following steps: execution starts from the function entry pointer; it checks whether the data pointed to by the condition pointer is 1. If it is, it assigns the data pointed to by the data source pointer in the input group to the address pointed to by the output pointer. Otherwise, it checks whether all inputs have been judged and then proceeds to the next group of judgments or ends based on the result of the judgment. The unconditional assignment program takes an input address pointer and an output address pointer as a group of information. The structure contains multiple groups of information and a group number variable. The program includes the following steps: obtain the group number in the structure; according to the group number, iteratively assign the data pointed to by the input address pointer in each group of information to the address pointed to by the output address pointer. According to the user's request, the configuration file is automatically or manually generated by any one or more of the following programs: the combinational logic OR AND NOT program, the analog quantity comparison program, the calculation program, the conditional assignment program, and the unconditional assignment program. S2. Transmit the configuration file to the integrated management device via a file transfer protocol, detect the contents of the configuration file, reset the integrated manager, or execute compilation instructions. S3. Erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory; S4. The integrated manager creates an execution task and, based on the linked list structure, traverses and executes all contents in the linked list.
2. The data processing method for custom logical operations in a configuration file according to claim 1, characterized in that, Step S2 involves transmitting the configuration file to the integrated management device via a file transfer protocol, detecting the configuration file content, resetting the integrated manager, or executing compilation instructions, including the following steps: S21. When resetting the integrated management device, the program automatically detects whether the configuration file has been updated; S211. If so, the program will automatically execute the compilation instructions; S212. If not, skip compilation and load the existing configuration file directly. S22. Manually execute compilation instructions via console commands.
3. The data processing method for custom logical operations in a configuration file according to claim 1, characterized in that, Step S3, which erases the corresponding memory area inside the integrated management device, compiles the contents of the configuration file into a directly callable linked list, and then rewrites it into the memory, includes the following steps: S31. When the program executes compilation instructions, the task scheduler is suspended; S32. Erase the linked list stored in the internal Flash memory of the chip, parse the configuration file, set the processing functions and other parameters of the structure in the linked list according to the contents of the configuration file, and build and replace the original linked list. S33, Restore Task Scheduler.
4. The data processing method for custom logical operations in a configuration file according to claim 1, characterized in that: Step S4, where the comprehensive manager creates an execution task, traverses all contents of the execution list according to the linked list structure, including the following steps: S41. Create an execution task and execute the task at a scheduled time; S42. Use a pointer variable to point to the head of the linked list and determine whether the address of the next structure is within the address range of the Flash memory where the linked list is stored. S421. If so, execute the processing function in the structure, and point the pointer to the next structure to continue the loop; S422. If not, exit the loop and the current execution ends.
5. A data processing device for custom logical operations in a configuration file, characterized in that, include: The configuration file generation module is used to automatically generate configuration files through the logic definition tool or to manually edit and generate configuration files, including: The combinational logic OR / NAND NOT program uses a combination of seven input pointers and one output pointer, along with several input flags and one output flag. The steps include: executing a delay function; calling the combinational logic processing function, obtaining the input value from the input pointers, and performing an XOR operation between the input value and the flag; determining if the XOR result is 1, and if so, returning the NOT of the output flag; otherwise, determining if the input value has been traversed; and assigning a value to the output pointer based on the return value and the delay parameters. The analog quantity comparison and calculation program uses a combination of an analog quantity data source pointer x, an analog quantity data source pointer y, and an output pointer z. The program includes the following steps: executing a delay function; assigning the corresponding function address to the function pointer in the structure according to the information in the configuration file, and then calling the function pointed to by the function pointer in the structure; retrieving the analog quantity data source pointers x and y, and the output pointer z, from the structure information; performing the corresponding calculation or comparison operation on x and y according to the calculation or comparison function pointed to by the function pointer; and outputting the calculation result through the output pointer z. The conditional assignment program uses a combination of a conditional switch pointer, a data source pointer as a group of inputs, a structure containing several groups of inputs, and an output pointer. It includes the following steps: execution starts from the function entry pointer; it checks whether the data pointed to by the condition pointer is 1. If it is, it assigns the data pointed to by the data source pointer in the input group to the address pointed to by the output pointer. Otherwise, it checks whether all inputs have been judged and then proceeds to the next group of judgments or ends based on the result of the judgment. The unconditional assignment program takes an input address pointer and an output address pointer as a group of information. The structure contains multiple groups of information and a group number variable. The program includes the following steps: obtain the group number in the structure; according to the group number, iteratively assign the data pointed to by the input address pointer in each group of information to the address pointed to by the output address pointer. The configuration file transmission module is used to transmit the configuration file to the integrated management device via a file transfer protocol, detect the configuration file content, reset the integrated management device, or execute compilation instructions. The compilation configuration file module is used to erase the corresponding memory area inside the integrated management device, compile the contents of the configuration file into a linked list structure that can be directly called, and then rewrite it into the memory; The task execution module is used by the integrated manager to create execution tasks and traverse all contents of the execution linked list according to the linked list structure.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the data processing method for custom logic operations of the configuration file as described in any one of claims 1 to 4.
Citation Information
Patent Citations
System data processing logic updating method and device and data processing system
CN112099858A
Method for improving reading and writing efficiency of embedded equipment configuration file
CN107329782A
Service logic implementation method and device based on configuration file
CN118760442A