Label topology generation method, data processing method, device, medium and product

CN122946568APending Publication Date: 2026-10-20BINZHOU WEIQIAO NATIONAL SCIENCE & TECHNOLOGY ADVANCED TECHNOLOGY RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611206285.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]现有技术生成标签的拓扑图效率低且耗时长,占用带宽和控制设备资源,干扰正常的生产控制任务

Benefits of technology

[0026]本公开的另一方面提供了一种计算机可读存储介质,存储有计算机可执行指令,指令在被执行时用于实现如上的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This disclosure provides a tag topology generation method, relating to the fields of industrial automation and industrial internet technology. The method includes: parsing a tag configuration file for a control device obtained offline to obtain primary tag analysis results; sending an online probe request to the control device if, based on tag type, the tag includes a tag group; parsing feedback information received from the control device to obtain secondary tag analysis results; and generating a tag topology map based on the primary and secondary tag analysis results, wherein the tag topology map indicates the association between the control device, tag identifier, and tag type. This disclosure also provides a data processing method, apparatus, storage medium, and program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of industrial automation and industrial internet technology, and more specifically, to tag topology generation methods, data processing methods, devices, storage media, and program products. Background Technology

[0002] In industrial data acquisition scenarios, the host computer needs to communicate with the underlying control devices, such as programmable logic controllers (PLCs). In order to accurately identify the operating status information of different control points of the control devices, the host computer can obtain the tags of each control point of the control devices, establish a tag topology map, and then monitor the status of each control point of the control devices based on the tag topology map.

[0003] Existing technologies for generating topology maps for tags are inefficient and time-consuming, consuming bandwidth and control equipment resources, and interfering with normal production control tasks. Summary of the Invention

[0004] In view of this, the present disclosure provides a tag topology generation method, a data processing method, an apparatus, a storage medium, and a program product.

[0005] One aspect of this disclosure provides a label topology generation method, comprising:

[0006] The tag configuration files for the control device obtained offline are parsed to obtain preliminary tag analysis results, which include the tag identifiers and tag types of the tags involved in the control device.

[0007] If, based on the tag type, it is determined that the tag includes a tag group, an online detection request is sent to the control device;

[0008] In response to receiving feedback information from the control device, the feedback information is parsed to obtain secondary tag analysis results. The feedback information is generated by the control device in response to an online detection request. The secondary tag analysis results include the tag identifier and tag type of each sub-tag in the tag group; and

[0009] Based on the results of primary and secondary label analysis, a label topology map is generated, which is used to indicate the relationship between control devices, label identifiers, and label types.

[0010] According to embodiments of this disclosure, feedback information is extracted to obtain an information header and an information body, wherein the information body includes tag information of tag groups, and the information header is used to describe the information body; the information body is parsed to determine a member description string and a tag identifier string, wherein the member description string includes the tag type of each sub-tag, and the tag identifier string includes the tag identifier of each sub-tag; based on the number of members of the sub-tags included in the information header and the first string length of the member description string, information is extracted from the member description string to determine the tag type of each sub-tag; based on the number of members included in the information header and the second string length of the tag identifier string, information is extracted from the tag identifier string to determine the tag identifier of each sub-tag; and based on the tag type and the tag identifier of each sub-tag, the secondary tag analysis result is determined.

[0011] According to embodiments of this disclosure, the type string length and offset of the tag type of each sub-tag are determined based on the number of members of the sub-tags included in the information header and the first string length of the tag type string; and information is extracted from the tag type string based on the type string length and offset of the tag type of each sub-tag to determine the tag type of each sub-tag.

[0012] According to embodiments of this disclosure, a tag node includes a first-level tag node representing a tag and a second-level tag node representing a sub-tag; a first-level edge is provided between a device tag node and the first-level tag node, wherein the device tag node indicates a device tag controlling a device; when there is a hierarchical relationship between the tag represented by the first-level tag node and the sub-tag represented by the second-level tag node, a second-level edge is provided between the first-level tag node and the second-level tag node; and a tag topology graph is generated based on the first-level tag node, the second-level tag node, the first-level edge, and the second-level edge.

[0013] According to embodiments of this disclosure, information is extracted from the tag configuration file to determine the communication address and communication protocol type of the control device; based on the tag identifier of the tag group and the target query instruction, an online probe request matching the communication protocol type is generated, wherein the target query instruction indicates the tag information of each sub-tag of the tag group; and an online probe request is sent to the control device through the communication address.

[0014] According to embodiments of this disclosure, a tag topology graph is displayed on an interactive interface; and in response to an update operation of the subscription identifier of a target tag node in the tag topology graph, the rendering parameters of the target tag node are updated so that the color of the target tag node displayed on the interactive interface matches the updated subscription identifier, wherein the subscription identifier is a node attribute of the tag node in the tag topology graph, and the subscription identifier is used to indicate whether the tag indicated by the tag node is subscribed.

[0015] According to embodiments of this disclosure, the field identifiers of the tag configuration file are identified to obtain index information; and based on the index information, the tag identifier and tag type of the tag are extracted from the tag configuration file to obtain the initial tag analysis results.

[0016] Another aspect of this disclosure provides a data processing method, including:

[0017] Acquire tag data about the tag sent from the control device;

[0018] The tag data is processed according to a data processing strategy that matches the tag type to obtain the processing results; and

[0019] Update the processing results to the label topology graph.

[0020] According to embodiments of this disclosure, when a tag is determined to be in a subscription state based on the tag subscription identifier of the tag topology graph, the processing result and time identifier are updated to the target attribute field of the tag topology graph, wherein the time identifier is used to indicate the time of tag data collection.

[0021] According to embodiments of this disclosure, when the data processing strategy includes a data extraction strategy, character extraction is performed on the tag data according to the data extraction strategy to obtain a processing result; and when the data processing strategy includes a data conversion strategy, the tag data is converted according to the data conversion strategy to obtain a processing result.

[0022] Another aspect of this disclosure provides an electronic device comprising:

[0023] One or more processors;

[0024] Memory, used to store one or more programs.

[0025] Specifically, when one or more programs are executed by one or more processors, the one or more processors implement the above method.

[0026] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the methods described above.

[0027] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, are used to implement the methods described above.

[0028] According to the tag topology generation method disclosed herein, a primary tag analysis result is generated by first parsing the offline configuration file, allowing industrial sites to obtain data from the control equipment without interrupting production, continuing operation, or updating control equipment hardware. Furthermore, based on the network connection status, an online structure query is initiated only for tags with complex structures. Finally, the queried substructures are dynamically attached to the primary tag analysis result to generate a secondary tag analysis result. This achieves rapid construction of a complete tag topology tree by probing only the complex types listed in the offline configuration file without performing a full online scan or consuming significant control equipment resources. This solves the pain point of traditional offline configuration file imports being unable to access the internal members of complex structures, achieving accessibility to deep-level data. Consequently, industrial sites can obtain data from the control equipment without replacing expensive control equipment or incurring production stoppages due to equipment replacement, enabling data reading, statistics, prediction, and reverse control. Attached Figure Description

[0029] The above and other objects, features, and advantages of this disclosure will become clearer from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0030] Figure 1 The illustrations illustrate application scenarios of the tag topology generation method, data processing method, and electronic device according to embodiments of the present disclosure.

[0031] Figure 2 A flowchart illustrating a label topology generation method according to an embodiment of the present disclosure is shown schematically.

[0032] Figure 3 A flowchart illustrating the online detection and secondary tag analysis results according to an embodiment of the present disclosure is shown in the schematic diagram.

[0033] Figure 4 A schematic diagram illustrating an interactive interface displaying a label topology diagram according to an embodiment of the present disclosure is shown.

[0034] Figure 5 This illustration schematically shows a diagram of constructing a tag topology tree according to an embodiment of the present disclosure;

[0035] Figure 6 A flowchart illustrating a data processing method according to another embodiment of the present disclosure is shown schematically;

[0036] Figure 7 A block diagram of an electronic device 700 suitable for implementing a tag topology generation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0037] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0038] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0039] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0040] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0041] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0042] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.

[0043] In industrial data acquisition scenarios, host computers (e.g., edge gateways, Supervisory Control and Data Acquisition (SCADA) systems, Manufacturing Execution Systems (MES)) need to communicate with the underlying control devices. To read data, the host computer first needs to obtain the tag list within the control device, establish a mapping relationship between tag names and data types (i.e., a tag topology tree), and then use the tag names and corresponding data types to construct a Common Industrial Protocol (CIP) path to obtain data from the control device. This data is then used to monitor device status, make predictions, or perform statistics. Knowing only the tag name without knowing its data type will lead to incorrect data reading, which is unacceptable in actual industrial applications.

[0044] The closest existing technology is automatic enumeration, which uses virtual tags to automatically enumerate controller-level and program-level tags within control equipment. However, this method is unreliable. In practice, some control equipment refuses to automatically enumerate controller-level and program-level tags using virtual tags, especially when the control equipment is already deployed in industrial settings where replacing or updating the hardware is impractical. Furthermore, large control equipment programs may contain tens or even hundreds of thousands of tags. A full scan requires extensive network interactions, typically lasting several minutes or longer, resulting in slow system startup, extremely low efficiency, and long processing times. Simultaneously, automatically enumerating controller-level and program-level tags consumes bandwidth and control equipment resources. High-frequency traversal requests consume the central processing unit (CPU) processing power and communication bandwidth, potentially interfering with normal production control tasks. Moreover, this technology cannot generate an effective tag topology.

[0045] In view of the above problems, embodiments of this disclosure provide a tag topology generation method, the method comprising: parsing a tag configuration file for a control device obtained offline to obtain a primary tag analysis result, wherein the primary tag analysis result includes tag identifiers and tag types of tags involved in the control device; if it is determined based on the tag type that the tag includes a tag group, sending an online probe request to the control device; in response to receiving feedback information sent by the control device, parsing the feedback information to obtain a secondary tag analysis result, wherein the feedback information is generated by the control device in response to the online probe request, and the secondary tag analysis result includes tag identifiers and tag types of each sub-tag in the tag group; and generating a tag topology map based on the primary tag analysis result and the secondary tag analysis result, wherein the tag topology map is used to indicate the association relationship between the control device, tag identifiers, and tag types.

[0046] Figure 1 The illustrations schematically depict application scenarios of the tag topology generation method, data processing method, apparatus, medium, and program product according to embodiments of the present disclosure. It should be noted that... Figure 1 The examples shown are merely examples of application scenarios that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0047] like Figure 1 As shown, the application scenario 100 of the tag topology generation method, data processing method, device, medium, and program product in this application embodiment may include a control device 101, a host computer 102, and a network 103. The network 103 is used as a medium to provide a communication link between the control device 101 and the host computer 102. The network 103 may include various connection types, such as wired and / or wireless communication links, etc.

[0048] Users can use the host computer 102 to obtain the tag configuration file of the control device 101 offline, parse it to obtain the primary tag analysis results; use the host computer 102 to send an online probe request to the control device 101 through the network 103, receive the feedback information from the control device 101, and further parse it to obtain the secondary tag analysis results.

[0049] Users can use the host computer 102 to generate a tag topology map based on the primary tag analysis results and secondary tag results.

[0050] The host computer 102 can be various system devices with a display screen, or it can be a configuration software client or platform.

[0051] It should be noted that the tag topology generation method provided in this embodiment can generally be executed by the host computer 102. Correspondingly, the data processing method provided in this embodiment can generally be set in the host computer 102.

[0052] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.

[0053] Figure 2 A flowchart illustrating a label topology generation method according to an embodiment of the present disclosure is shown schematically.

[0054] like Figure 2 As shown, the method includes operations S201 to S204.

[0055] In operation S201, the tag configuration file for the control device obtained offline is parsed to obtain the primary tag analysis results, which include the tag identifier and tag type of the tags involved in the control device.

[0056] Control equipment is the core device used for automated control in industrial production. It is an important carrier for realizing automation and intelligence, improving production efficiency and quality by coordinating the operation of various machines and systems. For example, Programmable Logic Controllers (PLCs), including the Rockwell ControlLogix and CompactLogix series, are the most widely used basic controllers in industrial scenarios. They are designed specifically for industrial environments and can perform logical operations, timing and counting functions, replacing traditional relay control systems.

[0057] Tag configuration files are dedicated configuration files used for centralized management of various tag definitions, attributes, and behavioral rules in a system or device. They decouple tag-related parameters from business code, significantly improving configuration flexibility and maintainability. Tag configuration files can include formats such as Extensible Markup Language (XML), YAML (YAML Ain't Markup Language), JSON (JavaScript Object Notation), INI (Initialization File), and TOML (Tom's Obvious, Minimal Language). Data sources for tag configuration files include: external temperature, humidity, pressure, light intensity, external control devices, and internal logical variables.

[0058] Obtaining tag configuration files offline refers to obtaining tag configuration files for control devices in an environment without a network connection. For example, this could be a point list file (usually in CSV format) exported by an electrical engineer from the control device's original programming software (e.g., Rockwell Studio 7000), or a CSV file created by the user based on the format of the aforementioned file, containing the tag name and basic type.

[0059] According to embodiments of this disclosure, a tag configuration file is parsed to generate a preliminary tag analysis result, wherein the preliminary tag analysis result includes the tag identifier and tag type of the tags involved in the control device.

[0060] Labels are a general term for various marking carriers used to identify information about items. Their core function is to convey key information and facilitate identification, traceability and management.

[0061] The tag types are classified by scope, including: global tags (VAR_GLOBAL), local tags (VAR), constant tags (VAR_GLOBAL_CONSTANT / VAR_CONSTANT), and function block interface tags (VAR_INPUT / VAR_OUTPUT / VAR_IN_OUT).

[0062] All program blocks and function blocks within the global tag controller can be called to share common data, such as device readiness signals and system operating status. After modification, all associated programs will be automatically updated synchronously.

[0063] Local tags only take effect within the single program / function block in which they are declared. No hardware components need to be specified. The system automatically allocates memory during compilation. Different program domains can have the same name, improving code reusability.

[0064] The constant label represents a fixed constant within a global / local scope. Its value cannot be modified during program execution. It is often used to define fixed parameters, such as the rated speed of equipment or safety threshold.

[0065] Function block interface tags are only effective within the function block and are used to receive external input parameters, output results, and transmit data bidirectionally, respectively, avoiding hard coding and reducing the error rate of integration.

[0066] Tag types are categorized by data type, including: bit type (BOOL), integer type, floating-point type (REAL), special structure type, and user-defined type (UDT). Bit types store only 0 / 1 (OFF / ON) states and are used to identify switch signals such as buttons and motor start / stop, occupying only 1 bit of memory. Integer types include WORD (16-bit unsigned, range 0~65535), INT (16-bit signed, range -32768~+32767), DWORD (32-bit unsigned), DINT (32-bit signed), and SINT (8-bit signed, range -128~+127), used to store integer values ​​such as counts and positions. Floating-point types are 32-bit single-precision real numbers used to store analog data with decimals, such as temperature and pressure. Special structure types include timers and counters, which are built-in composite data types in control devices, directly corresponding to the states and parameters of hardware timers and counters. Custom types allow users to create their own structures to package multiple related data. For example, product part numbers, serial numbers, and catalog numbers can be integrated into a "Product_ID" type for easy batch management of similar data.

[0067] In operation S202, if it is determined that the tag includes a tag group based on the tag type, an online detection request is sent to the control device.

[0068] According to embodiments of this disclosure, if the type code (Type ID) of the target tag identifies the tag as a tag group, that is, the type code (Type ID) of the target tag inside the control device is a special structure type, the system initiates an online detection request to the control device to query the internal structure of the tag type.

[0069] Online detection requests can be requests from the system based on the EtherNet / IP protocol to send the tag identifier (List Identity) of the tag to the control device and / or to obtain the tag type (Get InstanceAttribute) of the tag inside the control device, to verify the existence of the target tag and obtain its internal type code (Type ID).

[0070] In operation S203, in response to receiving feedback information sent by the control device, the feedback information is parsed to obtain secondary tag analysis results. The feedback information is generated by the control device in response to the online detection request. The secondary tag analysis results include the tag identifier and tag type of each sub-tag in the tag group.

[0071] The feedback information sent by the control device is a Common Industrial Protocol (CIP) request packet defined by the control device.

[0072] According to embodiments of this disclosure, the system receives feedback information from the control device, including tags in a tag group, and further parses it to obtain secondary tag analysis results.

[0073] In operation S204, a tag topology map is generated based on the primary tag analysis results and the secondary tag analysis results. The tag topology map is used to indicate the relationship between control devices, tag identifiers, and tag types.

[0074] A tag topology diagram is a visual representation of the relationships between tags on control devices in the field of industrial automation. It treats all tags within a control device as nodes, clearly showing the hierarchical relationships of tag groups, the data flow between different tags, and the communication mapping links across tags on different devices. This intuitively presents the tag data flow logic of the entire control system, significantly reducing the difficulty of debugging and maintaining large-scale control equipment projects.

[0075] According to embodiments of this disclosure, primary tag analysis results are generated by first parsing offline configuration files, and then secondary tag analysis results are generated by online detection when the tags include tag groups. Finally, a tag topology map is generated, which allows industrial sites to obtain data from control equipment without interrupting production, continuing operation, or updating control equipment hardware. This enables the acquisition of data from control equipment without performing a full online scan or consuming a large amount of control equipment resources, thereby facilitating reading, statistics, prediction, and reverse control.

[0076] According to embodiments of this disclosure, the field identifiers of the tag configuration file are identified to obtain index information; and, based on the index information, the tag identifier and tag type of the tag are extracted from the tag configuration file to obtain the initial tag analysis results.

[0077] The field identifiers in the tag configuration file are symbols used to uniquely identify data items within the configuration, enabling accurate data location, addressing, and interaction. Field identifier keywords include type (TYPE), scope (SCOPE), name (NAME), and data type (DATATYPE).

[0078] Identifying the field identifiers in the tag configuration file involves parsing the structural rules of the configuration file to accurately locate and confirm the unique identifier, meaning, and attributes of each field.

[0079] In one embodiment, identifying field identifiers in the tag configuration file involves traversing each line of the tag configuration file, searching for lines containing field identifier keywords, continuing to traverse subsequent lines, reading the content of the TYPE column, and determining that the line is a valid tag definition line only if the content is a tag; otherwise, skipping it (ignoring comments, aliases, or blank lines).

[0080] Index information is a structured mapping information used to establish configuration files and datasets for fast retrieval, enabling precise location and retrieval at the millisecond level. To accommodate differences in column order between files exported from different software versions, the index information refers to the column index number of the field identifier keyword for each valid label definition row record. For example, "col_name = 2, col_datatype = 4". Index information can include information corresponding to keywords such as type, scope, name, and data type.

[0081] In one embodiment, extracting the tag identifier from the tag configuration file includes: reading the contents of the scope (SCOPE) column and the name (NAME) column according to the index information; if the scope (SCOPE) is empty, the tag identifier of the tag is equal to the name (NAME); if the scope (SCOPE) is not empty, the tag identifier of the tag is equal to the scope (SCOPE) + . + name (NAME). For example, if the scope (SCOPE) is "MainProgram" and the name (NAME) is "Tag1", then the tag identifier of the tag is "MainProgram.Tag1".

[0082] In one embodiment, extracting the tag type from the tag configuration file includes:

[0083] Based on the index information, read the raw string from the data type (DATATYPE) column;

[0084] The regular expression \[(\d+)\]$ is used to perform end-match detection on the string. The regular expression that enables efficient text filtering and manipulation is a "rule string" composed of specific character combinations (ordinary characters and metacharacters), including anchors, quantifiers, character classes and predefined abbreviations, grouping and logic. The core technology that relies on the anchor "$" for end-match detection is used to verify whether the end of the string conforms to a specific pattern.

[0085] If the end match detection is successful, the numeric string within the parentheses is extracted and converted into an integer as the array dimension. At the same time, the end match part of the original string is removed, and the remaining part is used as the basic type name. For example, if the original string of the data type column is "SINT

[10] ", after a successful match, the "10" within the parentheses is extracted and converted into an integer as the array dimension. At the same time, the end match part "

[10] " of the original string is removed, and the remaining part "SINT" is used as the basic type name.

[0086] If the end-match detection fails, the array dimension is set to 0, and the original string is the basic type name;

[0087] Use the extracted basic type name as the tag type.

[0088] According to embodiments of this disclosure, the primary tag analysis results may include the tag identifier of the tags involved in the control device, the tag type of the tags, and the tag array dimension.

[0089] According to embodiments of this disclosure, by parsing offline configuration files to generate primary tag analysis results, i.e., basic tag indexes, data from control equipment can still be obtained in industrial settings without interrupting production, continuing operation, or updating control equipment hardware.

[0090] In one embodiment, the tag topology generation method further includes, during the parsing of the offline tag configuration file, if the tag includes a tag group, generating secondary tag results through online probing and combining them with the primary tag analysis results to generate a tag topology map; otherwise, generating a tag topology map directly based on the primary tag analysis results.

[0091] In one embodiment, when the tag includes a tag group, i.e., the tag type of the tag is a custom type tag, the historical online probe request record is read and the secondary tag analysis result is called; if there is no tag group type code for the tag in the historical record, an online probe request is initiated to the control device to query the internal structure of the tag type and obtain the secondary tag analysis result.

[0092] In one embodiment, when reading historical online probe request records, the type code (Type ID) of the tag is used as a probe (Key) to directly call the structure definition of the tag group that has already been parsed in the history.

[0093] In one embodiment, before initiating an online probe request to the control device, the system confirms whether it is in "online enhancement mode". If the system confirms that it is in "online enhancement mode", it initiates an online probe request to the control device to query the internal structure of the tag type.

[0094] According to embodiments of this disclosure, information is extracted from the tag configuration file to determine the communication address and communication protocol type of the control device; based on the tag identifier of the tag group and the target query instruction, an online probe request matching the communication protocol type is generated, wherein the target query instruction indicates the tag information of each sub-tag of the tag group; and an online probe request is sent to the control device through the communication address.

[0095] In one embodiment, the system determines the communication address and communication protocol type of the control device based on the offline tag configuration file.

[0096] The communication address may include the IP address of the target control device and the backplane slot number (Routing Path, for example, 1.0), which is used to accurately locate the specific control device CPU module in a complex workshop LAN.

[0097] The communication protocol type can be a specific generic industrial protocol service code extracted from the offline tag configuration file, such as a query command for Symbol Class 0x6B.

[0098] In one embodiment, an online probe request based on the tag group's tag identity (Target Tag Name string) extracted from the offline tag configuration file and the target query command is generated using the EtherNet / IP protocol. A request to the target control device is sent via the communication address to obtain the tag group's tag identity (List Identity) and / or to retrieve the tag type (Get Instance Attribute) of the tag within the control device, verifying the existence of the target tag and obtaining its internal type code (Type ID).

[0099] In one embodiment, before sending an online probe request to the target control device, the system of this disclosure and the target control device shall perform a protocol handshake.

[0100] Protocol handshake is a crucial process after the host computer and control device complete the basic Transmission Control Protocol (TCP) connection. It's essential for confirming communication identities, negotiating parameters, and establishing a dedicated application-layer communication channel. The handshake logic varies between different brands of control devices. For example, Siemens' S7 protocol requires two additional dedicated handshakes on top of the three-way handshake of the TCP, also known as a "five-way handshake": First, a COTP (Connection-Oriented Transport Protocol) connection request message is sent to negotiate the maximum Protocol Data Unit (PDU) transmission size. After the control device returns a connection confirmation, the S7 layer communication parameters are negotiated before data read / write operations can begin. Omron's FinsTCP protocol, on the other hand, requires only one handshake after completing the TCP connection. The host computer sends a Fins protocol (Factory Interface Network Service) handshake message containing its own node number, and the control device returns an confirmation message carrying its own node number. After verifying the matching of node information, subsequent tag data interaction can proceed directly.

[0101] According to embodiments of this disclosure, based on the network connection status, online structure queries are initiated only for tags identified as tag groups in the offline tag configuration file, thereby enabling the detection of only the custom tag types listed in the offline tag configuration file without performing a full online scan or consuming a large amount of control device resources.

[0102] According to embodiments of this disclosure, feedback information is extracted to obtain an information header and an information body, wherein the information body includes tag information of tag groups, and the information header is used to describe the information body; the information body is parsed to determine a member description string and a tag identifier string, wherein the member description string includes the tag type of each sub-tag, and the tag identifier string includes the tag identifier of each sub-tag; based on the number of members of the sub-tags included in the information header and the first string length of the member description string, information is extracted from the member description string to determine the tag type of each sub-tag; based on the number of members included in the information header and the second string length of the tag identifier string, information is extracted from the tag identifier string to determine the tag identifier of each sub-tag; and based on the tag type and the tag identifier of each sub-tag, the secondary tag analysis result is determined.

[0103] Figure 3 A flowchart illustrating the online detection of secondary tag analysis results according to an embodiment of the present disclosure is shown.

[0104] like Figure 3 As shown, the method includes operations S301 to S305.

[0105] In operation S301, the feedback information is extracted to obtain the information header and information body. The information body includes the tag information of the tag group, and the information header is used to describe the information body.

[0106] In one embodiment, the system extracts information from the feedback information sent by the control device, obtaining a header and a body. The feedback information is an industrial protocol request packet defined by the control device. The header information in the feedback information describes the maximum capacity and actual length of the string. The system extracts the header by parsing the binary stream header of the feedback information. The header includes the number of structure members in the tag group and the corresponding string length. Based on the header, the system determines the corresponding body in the feedback information.

[0107] In operation S302, the information body is parsed to determine the member description string and the tag identifier string. The member description string includes the tag type of each sub-tag, and the tag identifier string includes the tag identifier of each sub-tag.

[0108] In one embodiment, the system extracts tag string information from the information body, determines the member description string and tag identifier string, and constructs the basic framework for subsequent parsing.

[0109] In operation S303, based on the number of members of the sub-tags included in the information header and the length of the first string of the member description string, information is extracted from the member description string to determine the tag type of each sub-tag.

[0110] In one embodiment, the system reads the member description string based on the number of members in the information header and the first string length of the member description string, extracts the tag type and array dimension of each sub-tag used to describe the information from the string, and temporarily stores the tag type and array dimension of each sub-tag in a memory list. At this time, the binary stream pointer skips the descriptor region.

[0111] In operation S304, based on the number of members included in the information header and the second string length of the tag identifier string, information is extracted from the tag identifier string to determine the tag identifier of each sub-tag.

[0112] In one embodiment, the system reads the custom-type tag group name string immediately following the member description string based on the number of members in the header and the length of the second string of the tag identifier string. Then, based on the number of members in the header, it performs a loop operation, sequentially reading the member name strings from the tightly packed tag identifier strings in the binary stream, and determining the extracted member name strings as the tag identifiers of each sub-tag. Simultaneously, the system maps the tag identifiers of each sub-tag to the previously stored tag types and array dimensions of each sub-tag.

[0113] In one embodiment, determining the tag identifier of each sub-tag further includes name cleaning of the extracted member name string: if the member name string contains a semicolon ";", the content before the semicolon is extracted as a valid member name, and the valid member name is output as the member name string of that member, and the member name string is determined as the tag identifier of the sub-tag.

[0114] In operation S305, the secondary label analysis results are determined based on the label type and label identifier of each sub-label.

[0115] In one embodiment, the secondary tag analysis results may include the tag type of each sub-tag, the tag identifier of each sub-tag, and the array dimension of each sub-tag.

[0116] In one embodiment, the parsed secondary tag analysis results are stored in the historical online probe request record. When a tag with the same tag group type code is encountered during the subsequent offline tag configuration file parsing process, the historical record is read directly, and no network request is initiated for online probe.

[0117] According to embodiments of this disclosure, a historical online probe request record is established during the parsing process. Only one network query is requested for the structural definition of the same type of tag group, and the historical record is reused subsequently, further reducing communication overhead.

[0118] According to embodiments of this disclosure, based on the number of members of the sub-tags included in the information header and the first string length of the member description string, information is extracted from the member description string to determine the tag type of each sub-tag. The method further includes: based on the number of members of the sub-tags included in the information header and the first string length of the tag type string, determining the type string length and offset of the tag type of each sub-tag; and based on the type string length and offset of the tag type of each sub-tag, information is extracted from the tag type string to determine the tag type of each sub-tag.

[0119] In one embodiment, the system reads a list of member descriptors based on the number of members in the header and the length of the first string of the member description string. The system performs a loop operation based on the number of members in the header, calculates and locates the immediately following member description string, and sequentially reads the member type string and offset string for each member. The member type string can be 2 bytes, and the offset string can be 4 bytes. The extracted member type string represents the tag type of each sub-tag, and the extracted offset string represents the array dimension of each sub-tag.

[0120] Member Type is a core identifier field in the context of controlling device tag groups and defining structured data. It is used to uniquely identify the data type attribute of each member within the tag group and is a key parameter for achieving accurate parsing of structured data.

[0121] The offset in the tag group is the starting address identifier of the data in the control device's memory, usually in bytes, and is one of the core parameters for controlling data reading and writing in the control device. The offset indicates the starting byte position of the target data within the storage area. For example, if a variable is stored at address 0x0010, the corresponding offset value is 0x0010. If it is bit-level data, it will also be used with a bit offset (BitOffset) to specify the starting bit position of the data within the current byte (values ​​range from 0 to 7).

[0122] In one embodiment, the label topology generation method further includes, before starting to construct the label topology graph structure, the system needs to prepare a runtime context, including:

[0123] Connection check: Determine if a control device IP address is provided and if an active communication connection has been established in the system's connection manager. If not connected, mark the system as operating in "pure offline mode"; if connected, mark it as "online enhanced mode".

[0124] Subscription snapshot generation: The system stores the tag identifiers of all tags in a hash set based on the list of currently subscribed tags, generating a "subscription status snapshot", or subscription snapshot for short.

[0125] Hash sets are efficient data containers that provide unordered, unique elements based on hash tables. Their core characteristic is element uniqueness, disallowing duplicate values. On average, lookup, insertion, and deletion operations achieve O(1) efficiency, far superior to ordinary linear lists. Using hash sets allows for quick filtering of duplicate tag names and verification of member type uniqueness, significantly improving the efficiency of batch data validation.

[0126] According to embodiments of this disclosure, a first-level edge is set between a device tag node and a first-level tag node, wherein the device tag node indicates a device tag controlling the device; when there is a hierarchical relationship between the tag represented by the first-level tag node and the sub-tag represented by the second-level tag node, a second-level edge is set between the first-level tag node and the second-level tag node; and a tag topology graph is generated based on the first-level tag node, the second-level tag node, the first-level edge, and the second-level edge.

[0127] In one embodiment, the system iterates through the tag analysis results of the offline tag configuration file to obtain the tag identifier, tag type, and tag array dimension of the device tag node, and calls a recursive algorithm for each tag node. The tag analysis results include: primary tag analysis results and secondary tag analysis results.

[0128] The input to a recursive algorithm is the tag identifier, tag type, and tag array dimension of the device tag node. Recursion is a widely used algorithmic strategy in programming. Its core idea is that a function calls itself directly or indirectly, solving complex large problems by breaking them down into smaller subproblems with the same structure. The recursion stops and returns the result when the problem size is reduced to its simplest, directly solvable state.

[0129] The system creates a new topology node object for the device tag node. The attribute "Label Identifier" is set in this node object and assigned the value of "Label Identifier of Device Tag Node" from the input parameters.

[0130] The system sets the attribute subscription status in this node object: the system searches for the tag identifier of the device tag node in the "Subscription Status Snapshot". If the tag identifier exists in the subscription snapshot, the subscription status is set to True; if the tag identifier does not exist in the subscription snapshot, the subscription status is set to False. A list of attribute child nodes is reserved in this node object, and the initial value of the child node list is empty.

[0131] In one embodiment, the system executes different branching algorithms based on the tag type of the device tag node, including:

[0132] The label type of the device label node is an array type. That is, when the dimension of the label array in the input parameter is greater than 0, the system creates a loop with the index value i ranging from "0" to "array dimension - 1". In the loop: construct the first-level label node, and set the label identifier of the first-level label node to "label identifier of device label node + . + [ i ]"; use "label identifier of first-level label node, label type, label array dimension 0" as calculation parameters, recursively call this construction function to construct the second-level label node, the third-level label node, ... leaf nodes with a label array dimension of 0; mark the label type of the leaf node as "BOOL" and inject the subscription state; after the recursion stops, add all the label nodes returned by the recursion to the attribute child node list of the current topology graph node.

[0133] The label type of the device label node is a label group (custom type). That is, when the system is in "online enhancement mode" and this label type is not defined in the offline configuration file, the system creates a loop for the secondary label analysis results obtained by calling the online detection algorithm. The index value i ranges from "0" to "the array dimension of the sub-labels - 1". The system traverses the member list of the secondary label analysis results. For each member: construct a first-level label node, and set the label identifier of the first-level label node to "device label node + . + the label identifier of the sub-label + . + [ i ]"; use "the label identifier of the first-level label node, the label type of the sub-label, and the array dimension of the sub-labels 0" as calculation parameters, and recursively call this construction function to construct the second-level label node, the third-level label node, ... leaf nodes with a label array dimension of 0; mark the label type of the leaf node as "BOOL" and inject the subscription state; after the recursion stops, add all the label nodes returned by the recursion to the attribute child node list of the current topology graph node.

[0134] When the label type of a device label node is an atomic type, i.e., the label type is a basic integer type (such as SINT, INT, DINT), the system creates a loop based on the bit width determined by the basic integer type name (such as SINT=8, DINT=32), with the index value i ranging from "0" to "bit width - 1". The loop body executes: constructing leaf nodes, setting the label identifier of the leaf nodes to "label identifier of device label node + . + [ i ]"; marking the label type of the leaf nodes as "BOOL" and injecting the subscription state; after the recursion stops, adding all the leaf nodes returned by the recursion to the attribute child node list of the current topology graph node.

[0135] In one embodiment, if the tag type of the device tag node does not satisfy the above branching algorithm, for example, if the system encounters an unknown tag group (custom type) tag in pure offline mode, or if the system fails to detect online in online enhancement mode, then the first-level tag node is not generated, the device tag node is returned directly, and the original tag type description in the offline tag configuration file is retained.

[0136] Based on the algorithm described above, the system recursively generates a complete tree-like topology graph object, which is the label topology graph.

[0137] According to embodiments of this disclosure, by first parsing the offline tag configuration file to generate primary tag analysis results, and then, based on the network connection status, initiating online probe requests only for tag groups with complex structure types, and finally dynamically attaching the queried secondary tag analysis results to the primary tag analysis results, a complete tag topology map with subscription status can be quickly constructed by probing only the custom types listed in the offline tag configuration file without performing a full online scan or consuming a large amount of control equipment resources. This solves the pain point of traditional offline tag configuration file imports being unable to access the internal members of custom structures, and achieves accessibility to deep-level data. As a result, data from control equipment can be obtained in industrial settings without replacing expensive control equipment or incurring losses such as production stoppages caused by replacing control equipment.

[0138] According to embodiments of this disclosure, a tag topology graph is displayed on an interactive interface; and in response to an update operation of the subscription identifier of a target tag node in the tag topology graph, the rendering parameters of the target tag node are updated so that the color of the target tag node displayed on the interactive interface matches the updated subscription identifier, wherein the subscription identifier is a node attribute of the tag node in the tag topology graph, and the subscription identifier is used to indicate whether the tag indicated by the tag node is subscribed.

[0139] In one embodiment, the system serializes the recursively generated complete tag topology graph object into a JSON format string and returns it to the host computer as the final result. After receiving this serialized tag topology graph JSON text, the host computer parses it and renders it into a visual checkbox tree diagram for the user to select configurations on the screen.

[0140] Tag topology diagrams are extremely complex low-level computer objects, including pointers, nested containers, memory addresses, and other information. Such memory objects cannot be directly shared via network cables. "Serialization" transforms this complex, three-dimensional memory data structure into a continuous, standard plain text string according to certain rules; the embodiments disclosed here specifically refer to JSON format strings. After serialization, the tag topology diagram can be transmitted as ordinary text to other devices over the network.

[0141] The serialized tag topology graph includes: tag identifiers for all tag nodes, their subordinate array elements, internal structure members, and expanded boolean bits (.0 ~ .31). Each node also includes its "tag type" and current "sampling status" (i.e., whether it has been subscribed to).

[0142] Figure 4 A schematic diagram illustrating an interactive interface displaying a label topology diagram according to an embodiment of the present disclosure is shown.

[0143] like Figure 4 As shown, the host computer interface displays the tag node topology of control devices 401 and 402. Tag nodes related to control device 401 include nodes 403, 404, and 405, while tag nodes related to control device 402 include node 406. The tag node subscription identifiers in the interface are updated synchronously based on the update of the target tag node's subscription status. For example, subscription identifier 407 indicates that node 403's tag is not subscribed, subscription identifier 408 indicates that node 404's tag is subscribed, subscription identifier 409 indicates that node 405's tag is subscribed, and subscription identifier 410 indicates that node 406's tag is not subscribed.

[0144] According to embodiments of this disclosure, the tag topology tree overlays the current subscription status, allowing users to select tags of interest from a wide range of tags for reading and writing. Users can also visually see which points are already being collected in the import interface, avoiding redundant configuration.

[0145] Figure 5 A schematic diagram illustrating the construction of a tag topology tree according to an embodiment of the present disclosure is shown.

[0146] like Figure 5 As shown, the system iterates through the tag analysis results of the offline tag configuration file to obtain the tag identifier, tag type, and tag array dimension of the device tag node, and calls a recursive algorithm for each tag node. The system creates new topology graph node objects 501, 507, and 510 for the current tag item. In this object, the system sets the attribute tag identifier (name), assigning it the value of "the tag identifier of the device tag node" from the input parameters. In this object, the system sets the attribute subscription status (status): the system searches for the current tag identifier (name) in the "subscription status snapshot." If the tag identifier (name) exists in the subscription snapshot, the subscription status (status) is set to True; if the tag identifier (name) does not exist in the subscription snapshot, the subscription status (status) is set to False.

[0147] This node object reserves a child node list attribute (children), which is initially empty. The system executes different branching algorithms based on the tag type of the device tag node.

[0148] When the dimension of the label array in the input parameters is greater than 0, the system creates a loop with the index value i ranging from "0" to "array dimension - 1". In the loop: construct the first-level label nodes 502, 505, and 508, and set the label identifier (name) of the first-level label nodes to "the label identifier of the device label node + . + [ i ]".

[0149] Call this constructor function to construct second-level tag nodes 503, 504, 506, and 509. Set the tag identifier (name) of the second-level tag nodes to "the tag identifier of the first-level tag node + . + [ i ]".

[0150] Using "the tag identifier of the first-level tag node, the tag type, and the tag array dimension 0" as calculation parameters, this constructor function is recursively called to construct the third-level tag node... leaf nodes with a tag array dimension of 0, marking the tag type of the leaf node as "BOOL", and injecting the subscription status; after the recursion stops, all the tag nodes returned by the recursion are added to the attribute child node list of the current topology graph node.

[0151] Figure 6 A flowchart illustrating a data processing method according to another embodiment of the present disclosure is shown.

[0152] like Figure 6 As shown, the method includes operations S601 to S602.

[0153] In operation S601, tag data about the tag is obtained from the control device.

[0154] The system receives user-uploaded tag definition files (usually plain text data in CSV format) via an application programming interface (API), as well as optional control devices and their connection parameters, such as IP address and port number.

[0155] The label definition file can be exported from the original programming software of the control device, and contains the label name and basic type. Alternatively, it can be a label definition file written by the user according to the format of the above file content.

[0156] IP address and port number represent the network routing address of the physical hardware device (the control device) within the factory's local area network (LAN). For two devices within the LAN to communicate securely, they must know each other's IP address and port number.

[0157] In operation S602, the tag data is processed according to the data processing strategy that matches the tag type to obtain the processing result.

[0158] According to embodiments of this disclosure, when the data processing strategy includes a data extraction strategy, character extraction is performed on the tag data according to the data extraction strategy to obtain a processing result; and when the data processing strategy includes a data conversion strategy, the tag data is converted according to the data conversion strategy to obtain a processing result.

[0159] According to embodiments of this disclosure, when the data processing strategy includes a data extraction strategy, the tag data is processed, including:

[0160] Convert the original string into a byte array according to the specified character encoding (such as UTF-8 or GBK). At this time, each character in the string will occupy one or more byte positions according to its encoding rules.

[0161] Based on the given starting byte offset and length, perform slicing operations directly on the byte array to extract binary data within the target range;

[0162] The truncated byte subarray is then re-decoded into a string using the same character encoding.

[0163] During this process, it is important to be aware of the risk of "truncating multi-byte characters". If the truncation end point happens to be in the middle of a multi-byte character (such as a Chinese character), direct decoding will result in garbled text. Therefore, it is usually necessary to check the integrity of the last byte after truncation, or to ensure that the truncation boundary falls at the end of a complete character by traversing the characters and accumulating the byte length, thereby ensuring the accuracy of the extraction results.

[0164] According to embodiments of this disclosure, when the data processing strategy includes a data transformation strategy, the tag data is processed, including:

[0165] The data memory structure is pre-organized by performing a memory traversal on the complex three-dimensional structures (such as nested linked lists, custom structures with circular references, multidimensional arrays, and class instances with private attributes) that were originally scattered across different memory pages and linked by pointers / references. All business fields that need to be retained are marked, and memory address pointers, temporary runtime variables, and non-serialized system attributes are filtered out. At the same time, circular references are handled to avoid serialization infinite loops, and mapping rules are defined for the nesting level. For example, C language structures are directly mapped to JSON objects, dynamic arrays are mapped to JSON arrays, and enumeration values ​​are converted to corresponding string identifiers.

[0166] The system performs data structuring and transformation, breaking down the originally scattered memory data into basic elements (strings, numbers, booleans, null, ordered arrays, key-value objects) that fully conform to the JSON syntax specification according to the preset field sorting and nesting level rules. It organizes all the previously scattered and non-contiguous memory data into a logically continuous key-value sequence, ensuring that each nested field has a valid string key name and that there are no special data types that are not supported by JSON.

[0167] The system generates a continuous JSON string by calling a standard JSON serialization engine. It encodes and concatenates the well-organized structured data character by character, automatically handles the escaping of special characters (such as double quotes, newlines, and backslashes), and completes all necessary curly braces, square brackets, and comma separators. Finally, it outputs a standard JSON string that is syntax-free, continuous, and directly parsable, ensuring data integrity and format compliance throughout the process.

[0168] In operation S603, the processing results are updated in the label topology graph.

[0169] The recursively generated complete tree object is serialized into a JSON format string and returned to the host computer as the final processing result. After receiving this serialized label topology JSON text, the host computer parses it and renders it into a visual checkbox tree diagram for the user to select configurations on the screen.

[0170] According to an embodiment of this disclosure, when it is determined that a tag is in a subscription state based on the tag subscription identifier of the tag topology graph, the processing result and time identifier are updated to the target attribute field of the tag topology graph, wherein the time identifier is used to indicate the time of tag data collection.

[0171] During the recursive process of generating the topology tree, the system compares and updates the currently running subscription list in real time, outputting subscription status indicators in the tree nodes. Users can intuitively see which points are already being collected in the import interface, avoiding duplicate configurations.

[0172] Figure 7 A block diagram of an electronic device 700 suitable for implementing a tag topology generation method according to an embodiment of the present disclosure is shown schematically.

[0173] Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0174] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0175] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.

[0176] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0177] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0178] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0179] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0180] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0181] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the tag topology generation method provided in the embodiments of this disclosure.

[0182] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0183] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0184] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0186] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A label topology generation method, characterized in that, The method includes: The tag configuration file for the control device obtained offline is parsed to obtain preliminary tag analysis results, wherein the preliminary tag analysis results include the tag identifier and tag type of the tags involved in the control device; If, based on the tag type, it is determined that the tag includes a tag group, an online detection request is sent to the control device; In response to receiving feedback information sent by the control device, the feedback information is parsed to obtain secondary tag analysis results. The feedback information is generated by the control device in response to the online detection request. The secondary tag analysis results include the tag identifier of each sub-tag in the tag group and the tag type of each sub-tag. Based on the primary label analysis results and the secondary label analysis results, a label topology map is generated, wherein the label topology map is used to indicate the association between control devices, label identifiers, and label types.

2. The method according to claim 1, characterized in that, The step of parsing the feedback information to obtain secondary tag analysis results includes: The feedback information is extracted to obtain an information header and an information body, wherein the information body includes the tag information of the tag group, and the information header is used to describe the information body; The information body is parsed to determine the member description string and the tag identifier string, wherein the member description string includes the tag type of each sub-tag, and the tag identifier string includes the tag identifier of each sub-tag; Based on the number of members of the sub-tags included in the information header and the first string length of the member description string, information is extracted from the member description string to determine the tag type of each sub-tag; Based on the number of members included in the header and the second string length of the tag identifier string, information is extracted from the tag identifier string to determine the tag identifier of each sub-tag; and The secondary tag analysis results are determined based on the tag type and tag identifier of each sub-tag.

3. The method according to claim 2, characterized in that, The step of extracting information from the member description string based on the number of members of the sub-tags included in the information header and the first string length of the member description string, and determining the tag type of each sub-tag, includes: Based on the number of members of the sub-tags included in the header and the first string length of the tag type string, determine the type string length and offset of each sub-tag's tag type; and Based on the length and offset of the type string of each sub-tag, information is extracted from the tag type string to determine the tag type of each sub-tag.

4. The method according to claim 1, characterized in that, The tag node includes a first-level tag node representing the tag and a second-level tag node representing the sub-tag; The step of generating a tag topology map based on the primary tag analysis results and the secondary tag analysis results includes: A first-level edge is set between the device tag node and the first-level tag node, wherein the device tag node indicates the device tag of the control device; When a hierarchical relationship exists between a label represented by a first-level label node and a sub-label represented by a second-level label node, a second-level edge is set between the first-level label node and the second-level label node; and The label topology graph is generated based on the first-level label nodes, the second-level label nodes, the first-level edges, and the second-level edges.

5. The method according to claim 1, characterized in that, Sending an online detection request to the control device includes: Information is extracted from the tag configuration file to determine the communication address and communication protocol type of the control device; Based on the tag identifiers and target query instructions of the tag group, an online probe request matching the communication protocol type is generated, wherein the target query instructions indicate how to query the tag information of each sub-tag of the tag group; and The online detection request is sent to the control device via the communication address.

6. The method according to claim 1, characterized in that, The method further includes: Display the label topology map on the interactive interface; and In response to an update operation on the subscription identifier of a target tag node in the tag topology graph, the rendering parameters of the target tag node are updated so that the color displayed by the target tag node in the interactive interface matches the updated subscription identifier. The subscription identifier is a node attribute of the tag node in the tag topology graph, and the subscription identifier is used to indicate whether the tag indicated by the tag node is subscribed to.

7. The method according to claim 1, characterized in that, The process of parsing the tag configuration file for the control device obtained offline yields preliminary tag analysis results, including: The field identifiers of the tag configuration file are identified to obtain index information; and Based on the index information, the tag identifier and tag type of the tag are extracted from the tag configuration file to obtain the primary tag analysis results.

8. A data processing method, characterized in that, The method includes: Acquire tag data about the tag sent from the control device; The tag data is processed according to a data processing strategy that matches the tag type to obtain a processing result; and The processing result is then updated in the label topology graph.

9. The method according to claim 8, characterized in that, Adding the processing result to the label topology graph includes: If, based on the subscription identifier of the tag in the tag topology graph, it is determined that the tag is in a subscription state, the processing result and time identifier are updated to the target attribute field of the tag topology graph, wherein the time identifier is used to indicate the collection time of the tag data.

10. The method according to claim 8, characterized in that, The step of processing the tag data according to a data processing strategy matching the tag type to obtain a processing result includes: When the data processing strategy includes a data extraction strategy, the tag data is subjected to character extraction according to the data extraction strategy to obtain the processing result; and When the data processing strategy includes a data transformation strategy, the tag data is transformed according to the data transformation strategy to obtain the processing result.

11. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 10.

13. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 10.