Dynamic identifier generation method based on multi-level distributed download
By hierarchically encoding the master recipe ID and step index and constructing a binary tree, the problem of data communication in the prior art is solved, a dynamic identifier generation method is generated, data integrity and accuracy are determined, and omissions and errors in data transmission are avoided.
Patent Information
- Application Number
- CN202511351747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Existing data communication methods are ineffective in determining whether the data sent by the sending end is complete and error-free, and whether all data is sent to the receiving end in a hierarchical manner.
A dynamic identifier generation method based on multi-level distributed download is adopted. Global sub-identifiers are generated by hierarchically encoding the main recipe ID and step index. ADO is used to connect to the SQL database to query recipe parameters and write them into the PLC data block. The host computer triggers the status bit to receive index parameters and constructs a binary tree to verify the sequence consistency.
It enables dynamic updating of identifiers during data transmission and reception, effectively preventing missed or incorrect transmissions and ensuring data integrity.
Smart Images

Figure CN120881004B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data communication, and more particularly, relates to a dynamic identifier generation method based on multi-level distributed download. BACKGROUND
[0002] In the field of data communication, the receiving end needs to know whether the data of the sending end is completely downloaded, that is, a termination flag of complete data reception is needed. At the same time, each step data of the sequential download should be correct, and the misdelivery situation should be avoided as much as possible. However, the existing data communication method aims to determine whether the receiving end receives the data downloaded by the sending end, and it is difficult to consider whether the data of the sending end is completely and correctly downloaded to the receiving end according to the level. SUMMARY
[0003] To solve the problems in the prior art, the purpose of the present application is to solve the above-mentioned defects, and further to provide a dynamic identifier generation method based on multi-level distributed download.
[0004] The present application adopts the following technical scheme.
[0005] The first aspect of the present application discloses a dynamic identifier generation method based on multi-level distributed download, which comprises: hierarchically encoding a master recipe ID and a step index to generate a global sub-identifier; connecting a SQL database through ADO, and querying the recipe parameters corresponding to the master recipe ID according to the hierarchical batch based on the global sub-identifier, so as to write the recipe parameters into a PLC data block; triggering a state bit through a host computer, and receiving index parameters from the PLC data block according to the current step parameters; based on the index parameters, dynamically updating the global sub-identifier to generate a dynamic identifier, which is used to represent whether the step index under the master recipe ID is completely downloaded.
[0006] Further, the hierarchically encoding of the master recipe ID and the step index to generate the global sub-identifier comprises: taking the master recipe ID as an integer part, taking the step index under the master recipe ID as a decimal part, combining the integer part and the decimal part to obtain a combination result; based on the combination result of the integer part and the decimal part, hierarchically encoding the master recipe ID and the step index to generate the global sub-identifier.
[0007] Further, each recipe has a unique master recipe ID, and the recipe under the master recipe ID has a plurality of different steps, and each step has a unique corresponding step index.
[0008] Further, the method further comprises: connecting the SQL database through the ADO, and querying the recipe parameters corresponding to the main recipe ID according to the hierarchical batches in the global sub-identifier, to write the recipe parameters into the PLC data block; and calling the VBS script of the upper computer to connect the SQL database through the ADO, and querying the step index under the main recipe ID as the recipe parameter according to the hierarchical batches in the global sub-identifier; and writing the recipe parameters into the PLC data block through the process Ethernet protocol, to call the PLC data block to verify the global sub-identifier, to obtain a verification result of whether the global sub-identifier meets the preset requirement.
[0009] Further, the method further comprises: connecting the SQL database through the ADO, and querying the recipe parameters corresponding to the main recipe ID according to the hierarchical batches in the global sub-identifier, to write the recipe parameters into the PLC data block; and calling the VBS script of the upper computer to connect the SQL database through the ADO, and querying the step index under the main recipe ID as the recipe parameter according to the hierarchical batches in the global sub-identifier; and writing the recipe parameters into the PLC data block through the process Ethernet protocol, to call the PLC data block to verify the global sub-identifier, to obtain a verification result of whether the global sub-identifier meets the preset requirement.
[0010] Further, the method further comprises: connecting the SQL database through the ADO, and querying the recipe parameters corresponding to the main recipe ID according to the hierarchical batches in the global sub-identifier, to write the recipe parameters into the PLC data block; and calling the VBS script of the upper computer to connect the SQL database through the ADO, and querying the step index under the main recipe ID as the recipe parameter according to the hierarchical batches in the global sub-identifier; and writing the recipe parameters into the PLC data block through the process Ethernet protocol, to call the PLC data block to verify the global sub-identifier, to obtain a verification result of whether the global sub-identifier meets the preset requirement.
[0011] Further, the method further comprises: connecting the SQL database through the ADO, and querying the recipe parameters corresponding to the main recipe ID according to the hierarchical batches in the global sub-identifier, to write the recipe parameters into the PLC data block; and calling the VBS script of the upper computer to connect the SQL database through the ADO, and querying the step index under the main recipe ID as the recipe parameter according to the hierarchical batches in the global sub-identifier; and writing the recipe parameters into the PLC data block through the process Ethernet protocol, to call the PLC data block to verify the global sub-identifier, to obtain a verification result of whether the global sub-identifier meets the preset requirement.
[0012] The second aspect of the present application discloses a dynamic identifier generation device based on multi-level distributed download, which is used to realize the dynamic identifier generation method based on multi-level distributed download of any one of the first aspect, and the device comprises: a hierarchical encoding module, which is used to hierarchically encode a master formula ID and a step index to generate a global sub-identifier; a parameter query module, which is used to connect a SQL database through ADO and query formula parameters corresponding to the master formula ID according to a hierarchical batch based on the global sub-identifier, so as to write the formula parameters into a PLC data block; a state detection module, which is used to trigger a state bit through a host computer, and receive index parameters from the PLC data block according to current step parameters; and an identifier updating module, which is used to dynamically update the global sub-identifier based on the index parameters to generate a dynamic identifier, and the dynamic identifier is used to represent whether the step index under the master formula ID is completely issued.
[0013] The third aspect of the present application discloses a terminal, comprising a processor and a storage medium; characterized in that: the storage medium is used to store instructions; and the processor is used to operate according to the instructions to execute the steps of the method of the first aspect.
[0014] The fourth aspect of the present application discloses a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps of the method of the first aspect.
[0015] The present application has the following advantages compared with the prior art: (1) the present application hierarchically encodes a master formula ID and a step index to generate a global sub-identifier, then connects a SQL database through ADO, and queries formula parameters corresponding to the master formula ID according to a hierarchical batch based on the global sub-identifier, so as to write the formula parameters into a PLC data block, then triggers a state bit through a host computer, and receives index parameters from the PLC data block according to current step parameters, and finally, dynamically updates the global sub-identifier based on the index parameters to generate a dynamic identifier, which represents whether the step index under the master formula ID is completely issued, and through the way of dynamically updating the identifier, the transmitting and receiving ends can constantly update the identifier to determine whether the data transmission is completely finished.
[0016] (2) the present application constructs a binary tree according to a master formula ID and a corresponding step index, takes the master formula as a parent node, and takes the step index under the master formula as a child node, and further determines whether the master formula ID and the corresponding step index are completely and accurately issued to a receiving end by combining a verification sequence, which effectively avoids the occurrence of missing and wrong issues. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1is a flowchart of a dynamic identifier generation method based on multi-level distributed download provided by the present application.
[0018] Figure 2 is a structural diagram of a dynamic identifier generation device based on multi-level distributed download provided by the present application. DETAILED DESCRIPTION
[0019] The present application will be further described below with reference to the accompanying drawings. The following examples are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.
[0020] As shown in Figure 1 in one embodiment, a dynamic identifier generation method based on multi-level distributed download includes the following steps: step S110, hierarchical encoding of the master recipe ID and the step index to generate a global sub-identifier.
[0021] In some embodiments, the dynamic identifier generation method based on multi-level distributed download provided by the present application, step S110 specifically includes the following steps: step S111, taking the master recipe ID as the integer part and the step index under the master recipe ID as the decimal part, combining the integer part and the decimal part to obtain a combination result.
[0022] Step S112, hierarchical encoding of the master recipe ID and the step index based on the combination result of the integer part and the decimal part to generate a global sub-identifier.
[0023] It should be noted that each recipe has a unique master recipe ID, and the recipe under the master recipe ID has a plurality of different steps, and each step has a unique corresponding step index.
[0024] In a specific embodiment, the dynamic identifier generation method based on multi-level distributed download provided by the present application includes steps S1-S4: step S1, hierarchical encoding of the master recipe ID and the step index.
[0025] Specifically, by the formula RCP_DETAIL_ID = DINT_TO_REAL(RCP_ID) + INT_TO_REAL(RCP1_P_INDEX) * 0.01, the master recipe ID (integer part) and the step index (decimal part) are combined to generate a globally unique sub-identifier, and the recipe hierarchical encoding is realized (for example, the master recipe ID = 110, and the identifier of step 1 is 110.01), to ensure data traceability.
[0026] It should be noted that in the actual communication process, there is more than one recipe, so each recipe itself corresponds to a unique identifier, i.e. the main recipe ID (RCP ID). In addition, there are multiple different steps in the recipe, so each step also needs to correspond to a unique identifier, i.e. the step index (RCP1 P INDEX). In hierarchical encoding, both are combined, i.e. the globally unique sub-identifier (RCP DETAIL ID).
[0027] It should be further noted that in the above formula, there is only a first step index. If there is a second step index under the first step index (for example, second step 1.1 under first step 1), or a third step under the second step (for example, 1.1.1 under second step 1.1), then the globally unique sub-identifier As shown in the following formula: ; In the formula, represents the number of steps; is a constant, (or the reciprocal of ) must be greater than the number of elements after decomposition of each data set, which is usually 100.
[0028] In step S120, the SQL database is connected through ADO, and the recipe parameters corresponding to the main recipe ID are queried based on the global sub-identifier in hierarchical batches to write the recipe parameters into the PLC data block.
[0029] In some embodiments, the dynamic identifier generation method based on multi-level distributed download provided by the present application, step S120 specifically includes the following steps: step S121, calling the host computer to run the VBS script to connect the SQL database through ADO, and querying the step index under the main recipe ID as the recipe parameter according to the hierarchical batch in the global sub-identifier.
[0030] Step S122, write the recipe parameters into the PLC data block through the process Ethernet protocol, to call the PLC data block to verify the global sub-identifier, and obtain the verification result whether the global sub-identifier meets the preset requirement.
[0031] In some embodiments, the dynamic identifier generation method based on multi-level distributed download provided by the present application, step S120 specifically further includes the following steps: step S123, write the recipe parameters queried by the global sub-identifier which meets the preset requirement of the verification result into the register array according to the level of the step index, to control the device action through the register array according to the step index.
[0032] Step S124, store the recipe list and the corresponding recipe parameter list under all main recipe IDs through the SQL database, and associate multiple recipe lists through the dynamic identifier, to perform field retrieval on the recipe list according to the recipe parameters.
[0033] In specific embodiments, the application provides a multi-level distributed download-based dynamic identifier generation method, step S2, multi-module collaborative data transmission.
[0034] Specifically, the host computer (VBS script): connect to the SQL database through ADO, and query the recipe parameters in batches according to the dynamic identifier (for example: SELECT * FROM rcp_detail WHERE rcp_name='u6' AND PINDEX='s2'). Then, write the parameters into the PLC data block through the process Ethernet protocol (for example: DOWNLOAD data block_RCP1P_BLENDTIME). PLC (S7-1500 code): after receiving the dynamic identifier, check the formula legality (for example: check whether RCP1_P_INDEX is continuously increased); write the parameters into the register array according to the step index (for example: RCPX_RM_PERCENT[RCP1_P_INDEX]), and then implement the control of device action through the register array according to the step execution. Database (SQL Server): store the main recipe table (rcp_detail) and the sub-parameter table (rcp_fremode), and associate the multi-table data through the dynamic identifier, so as to support the quick retrieval according to the step index (for example: the PINDEX field in the rcp_detail table).
[0035] It should be noted that for the sender of the recipe, the specific recipe parameters of the recipe u6 and step s2 can be obtained based on the query recipe parameter statement, for example: SELECT * FROM rcp_detail WHERE rcp_name='u6' AND PINDEX='s2'.
[0036] Step S130, trigger the state bit through the host computer, and receive the index parameters from the PLC data block according to the current step parameters.
[0037] In some embodiments, the application provides a multi-level distributed download-based dynamic identifier generation method, step S130 specifically includes the following steps: step S131, trigger the state bit of the first value through the host computer, so as to send the current step parameters to the PLC data block, and call the PLC data block to set the state bit after receiving.
[0038] Step S132, when the host computer detects that the state bit changes, send the subsequent step parameters corresponding to the current step parameters to the PLC data block, and terminate the data transmission between the host computer and the PLC data block when the current step index is the set field.
[0039] In specific embodiments, the application provides a multi-level distributed download-based dynamic identifier generation method, and step S3 is a step-by-step handshake protocol.
[0040] Specifically, the interactive transmission between the PLC and the host computer is realized through the state bits (RCP_DOWN_ST, RCP_DOWN_ST_DELAY). First, the host computer triggers RCP_DOWN_START=1 to send the current step parameter. After the PLC receives it, RCP_DOWN_ST=0 is set. After the host computer detects the state change, the next index parameter is sent. When RCP_P_INDEX=RCP_STEPNO, the data transmission between the host computer and the PLC is terminated. At this time, the completion flag ST_RCP_DOWNOK=1 is set.
[0041] Step S140, based on the index parameter, dynamically updating the global sub-identifier to generate a dynamic identifier, the dynamic identifier being used to represent whether the step index under the main formula ID is issued completely.
[0042] In some embodiments, the application provides a multi-level distributed download-based dynamic identifier generation method, which further comprises the following steps: step S210, taking the main formula ID as the parent node and the step index under the main formula ID as the child node, constructing a binary tree, and the different step indexes at the same level in the binary tree are different child nodes on different sides.
[0043] Step S220, when the step index has a secondary sub-step, taking the sub-step index corresponding to the secondary sub-step as the child node of the secondary sub-step, updating the binary tree.
[0044] Step S230, the binary tree is verified by verifying the sequence, and when the verification sequence of the receiving end and the verification end is consistent, it is determined that all step indexes and sub-step indexes under the main formula ID are issued completely.
[0045] In specific embodiments, the application provides a multi-level distributed download-based dynamic identifier generation method, and step S4 is the construction and modification of the binary tree.
[0046] Specifically, a binary tree is constructed by taking the main recipe ID as the parent node and the step index under the main recipe ID as the child node. In the constructed binary tree, the peer subsequent step of each step is taken as a side child node (for example, a left child node), and the subordinate (first) step of each step is taken as the other side child node (for example, a right child node). Taking step 1.2 (corresponding to node D12) as an example, its peer subsequent step is 1.3, and therefore, node D13 is taken as the left child node of D12; and the subordinate (first) step of step 1.2 is step 1.2.1, and therefore, node D121 is taken as the right child node of D12. Then, the constructed binary tree is represented by a unique verification sequence, for example, the verification sequence can be a string of unique corresponding characters such as "001011000101101011", and the length of the verification sequence needs to be exactly twice the number of nodes in the binary tree. If the number of nodes in the binary tree does not exceed 5000, the above verification sequence usually occupies no more than 10 KB of data. The verification sequence is used for collation between the receiving party and the verifying party, and only when the collation result is consistent, it is indicated that the data communicated between the receiving party and the transmitting party has no missing and incorrect transmission. If there is missing, it is indicated that there is a missing value in the verification sequence, and if there is incorrect transmission, there is an inconsistent value in the verification sequence.
[0047] The following describes a dynamic identifier generation device based on multi-level distributed download provided by the present application. The dynamic identifier generation device based on multi-level distributed download described below can be correspondingly referred to the dynamic identifier generation method based on multi-level distributed download described above.
[0048] As shown in Figure 2 In one embodiment, a dynamic identifier generation device based on multi-level distributed download includes a hierarchical encoding module, a parameter query module, a state detection module, and an identifier updating module.
[0049] The hierarchical encoding module is configured to hierarchically encode the main recipe ID and the step index to generate a global sub-identifier.
[0050] The parameter query module is configured to connect a SQL database through ADO, query the recipe parameters corresponding to the main recipe ID according to the hierarchical batch based on the global sub-identifier, and write the recipe parameters into a PLC data block.
[0051] The state detection module is configured to trigger a state bit through a host computer, and receive the index parameters from the PLC data block according to the current step parameters.
[0052] The identifier updating module is configured to dynamically update the global sub-identifier based on the index parameters to generate a dynamic identifier, and the dynamic identifier is used to represent whether the step index under the main recipe ID is issued completely.
[0053] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that the hierarchical encoding module is specifically configured to: take the main formula ID as an integer part, take the step index under the main formula ID as a decimal part, combine the integer part and the decimal part, and obtain a combination result.
[0054] The main formula ID and the step index are hierarchically encoded based on the combination result of the integer part and the decimal part to generate a global sub-identifier.
[0055] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that each formula has a unique main formula ID, the formula under the main formula ID has a plurality of different steps, and each step has a unique corresponding step index.
[0056] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that the parameter query module is specifically configured to: call the upper computer to run a VBS script to connect a SQL database through ADO and query the step index under the main formula ID as a formula parameter according to the hierarchical batch in the global sub-identifier.
[0057] The formula parameter of the global sub-identifier that meets the preset requirement is written into a PLC data block through a process Ethernet protocol to call the PLC data block to verify the global sub-identifier to obtain a verification result of whether the global sub-identifier meets the preset requirement.
[0058] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that the parameter query module is specifically configured to: write the formula parameter of the global sub-identifier that meets the preset requirement into a register array according to the hierarchical step index to control the device action through the register array according to the step index.
[0059] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that the parameter query module is specifically configured to: write the formula parameter of the global sub-identifier that meets the preset requirement into a register array according to the hierarchical step index to control the device action through the register array according to the step index.
[0060] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application is characterized in that the state detection module is specifically configured to: trigger a state bit of the first value through the upper computer to send the current step parameter to the PLC data block and call the PLC data block to set the state bit after receiving.
[0061] When the upper computer detects that the state bit changes, the subsequent step parameter corresponding to the current step parameter is sent to the PLC data block, and when the current step index is a set field, the data transmission between the upper computer and the PLC data block is terminated.
[0062] In the embodiment, the dynamic identifier generation device based on multi-level distributed download provided by the application further comprises a binary tree verification module, configured to: take the main recipe ID as a parent node, and take the step index under the main recipe ID as a child node, to construct a binary tree, and the different step indexes at the same level in the binary tree are child nodes of different sides.
[0063] When the step index has a secondary sub-step, the binary tree is updated by taking the sub-step index corresponding to the secondary sub-step as the child node of the secondary sub-step.
[0064] The binary tree is verified by the verification sequence, and when the verification sequence at the receiving end is consistent with that at the verification end, it is determined that all the step indexes and sub-step indexes under the main recipe ID are completed.
[0065] The present disclosure can be a system, a method, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.
[0066] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched tape, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
[0067] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0068] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0069] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0070] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer readable storage medium having no data signals on it. The instructions can be executed by one or more processors to produce a computer-implemented process such that the instructions, which execute via one or more processors of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0071] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable data processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0072] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable data processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0073] Finally, it should be noted that the above-described embodiments are merely intended for describing and illustrating, but not limiting, the technical solutions of the present application. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or equivalent replacement without departing from the spirit and scope of the present application should be covered within the protection scope of the claims of the present application.
Claims
1. A method for dynamic identifier generation based on multi-level distributed download, characterized in that, The method comprises: hierarchical coding of the main recipe ID and the step index to generate a global sub-identifier; connecting the SQL database through ADO, and querying the recipe parameters corresponding to the main recipe ID in hierarchical batches based on the global sub-identifier to write the recipe parameters into the PLC data block; triggering the state bit through the upper computer, and receiving the index parameters from the PLC data block according to the current step parameters; based on the index parameters, dynamically updating the global sub-identifier to generate a dynamic identifier, which is used to represent whether the step index under the main recipe ID is completed. The method comprises: connecting the SQL database through ADO, and querying the recipe parameters corresponding to the main recipe ID in hierarchical batches based on the global sub-identifier to write the recipe parameters into the PLC data block; triggering the state bit through the upper computer, and receiving the index parameters from the PLC data block according to the current step parameters; based on the index parameters, dynamically updating the global sub-identifier to generate a dynamic identifier, which is used to represent whether the step index under the main recipe ID is completed. The method comprises: connecting the SQL database through ADO, and querying the recipe parameters corresponding to the main recipe ID in hierarchical batches based on the global sub-identifier to write the recipe parameters into the PLC data block; triggering the state bit through the upper computer, and receiving the index parameters from the PLC data block according to the current step parameters; based on the index parameters, dynamically updating the global sub-identifier to generate a dynamic identifier, which is used to represent whether the step index under the main recipe ID is completed. The method further comprises: taking the main recipe ID as a parent node and the step index under the main recipe ID as a child node to construct a binary tree, wherein different step indexes at the same level in the binary tree are child nodes of different sides; when the step index has a secondary sub-step, taking the sub-step index corresponding to the secondary sub-step as a child node of the secondary sub-step to update the binary tree; verifying the binary tree through a verification sequence, and determining that all step indexes and sub-step indexes under the main recipe ID are completed when the verification sequences of the receiving end and the verification end are consistent.
2. The method for generating dynamic identifier based on multi-level distributed download according to claim 1, characterized in that, The method comprises: taking the main recipe ID as an integer part and the step index under the main recipe ID as a decimal part, combining the integer part and the decimal part to obtain a combination result; and based on the combination result of the integer part and the decimal part, hierarchically coding the main recipe ID and the step index to generate the global sub-identifier.
3. The method for generating dynamic identifier based on multi-level distributed download according to claim 2, characterized in that, Each recipe has a unique main recipe ID, and the recipe under the main recipe ID has a plurality of different steps, and each step has a unique corresponding step index.
4. The method for generating dynamic identifier based on multi-level distributed download according to claim 1, characterized in that, The SQL database is connected through ADO, and the recipe parameters corresponding to the main recipe ID are queried based on the global sub-identifier in hierarchical batches to write the recipe parameters into the PLC data block, including writing the recipe parameters into the PLC data block through an industrial Ethernet protocol, and calling the PLC data block to verify the global sub-identifier to obtain a verification result of whether the global sub-identifier meets preset requirements.
5. The method for generating dynamic identifier based on multi-level distributed download according to claim 4, characterized in that, The SQL database is connected through ADO, and the recipe parameters corresponding to the main recipe ID are queried based on the global sub-identifier in hierarchical batches to write the recipe parameters into the PLC data block, and further including writing the recipe parameters queried by the global sub-identifier meeting the preset requirements into a register array in a hierarchical manner according to the step index, to control device actions in the register array according to the step index; the recipe list and the corresponding recipe parameter list under all main recipe IDs are stored through the SQL database, and multiple recipe lists are associated through dynamic identifiers, to perform field retrieval on the recipe list according to the recipe parameters.
6. A dynamic identifier generation apparatus based on multi-level distributed download, characterized by, The device for implementing the dynamic identifier generation method based on multi-level distributed download according to any one of claims 1 to 5 comprises: a hierarchical encoding module for hierarchically encoding the main recipe ID and the step index to generate a global sub-identifier; a parameter query module for connecting a SQL database through ADO, and querying recipe parameters corresponding to the main recipe ID based on the global sub-identifier in hierarchical batches to write the recipe parameters into a PLC data block; a state detection module for triggering a state bit through a host computer, and receiving index parameters from the PLC data block according to current step parameters; and an identifier updating module for dynamically updating the global sub-identifier based on the index parameters to generate a dynamic identifier, the dynamic identifier being used to represent whether the step index under the main recipe ID is completed. 7.A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; and the processor is used to operate according to the instructions to perform the steps of the dynamic identifier generation method based on multi-level distributed download according to any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the dynamic identifier generation method based on multi-level distributed download according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-level graph-model integration method and system for electric power system modeling
CN118378448A
Synchronization of hierarchical data
US20190139637A1