A method and apparatus for encoding urban infrastructure
Patent Information
- Application Number
- CN202511280438.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-09-09
AI Technical Summary
[0003](1)编码规则分散且不统一:不同部门或项目自行设定编码规则,导致编码冲突、重复率高,难以进行跨系统数据整合
[0036] (1) Modular code segments and configurable coding schemes: Through code segments with customizable length, format and combination order, unified and flexible coding rules are achieved, which facilitates reuse and expansion across departments and facility types.
Smart Images

Figure CN121145906B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban information management technology, specifically providing a method and apparatus for coding urban infrastructure. Background Technology
[0002] With the acceleration of urban construction and smart city development, urban infrastructure types are becoming increasingly diversified, including roads, bridges, light poles, mountains, and water conservancy facilities. Data on these various facilities is often distributed across different business systems and databases, lacking a unified standard for coding rules, data formats, and management methods. Existing facility coding methods generally suffer from the following problems:
[0003] (1) Coding rules are scattered and inconsistent: different departments or projects set their own coding rules, resulting in coding conflicts, high duplication rates, and difficulty in cross-system data integration.
[0004] (2) Lack of flexible combination and expansion mechanism: Most existing solutions are fixed rule coding generation methods, which cannot quickly adjust the coding structure or add new classification elements according to business changes.
[0005] (3) Insufficient data deduplication and lifecycle management: Traditional methods lack effective uniqueness detection and historical traceability mechanisms in the processes of adding, updating and canceling facility data, which can easily lead to data redundancy and management chaos.
[0006] (4) Lack of permission and order control: When multiple people or departments enter facility data in parallel, the lack of authorization management for coding order and scope of use can easily lead to conflicts.
[0007] Therefore, how to design a modularly configurable urban infrastructure coding method and system that supports dynamic authorization and has data deduplication and lifecycle management capabilities has become a technical problem that urgently needs to be solved in the current construction of smart cities. Summary of the Invention
[0008] This invention addresses the shortcomings of the prior art by providing a highly practical method for coding urban infrastructure.
[0009] A further technical objective of this invention is to provide a reasonably designed, safe, and applicable device for coding urban infrastructure.
[0010] The technical solution adopted by this invention to solve its technical problem is:
[0011] A method for coding urban infrastructure includes the following steps:
[0012] S1. Users define one or more code segments in the system. The code segment types include existing data code segments, newly added data code segments, mapped data code segments, and sequential code segments, and configure the length, format, and value retrieval method.
[0013] S2. Combine multiple code segments into an encoding scheme in a predetermined order, supporting cross-facility type applications, and setting delimiters and verification rules;
[0014] S3. The start and end value range of the sequential code segment requested by the user shall be approved by the administrator to control the uniqueness and order of the encoding when using it concurrently;
[0015] S4. Select the source database table and encoding scheme for storing facility data. The system reads the code segment authorization and generates the code according to the scheme rules. The sequential code segment is incremented for each data and deduplication is performed according to the identification code mechanism.
[0016] S5. For abandoned facility data, the corresponding code is logically deregistered and can be restored for use when needed. Historical record queries and traceability are also supported.
[0017] Furthermore, in step S1, the existing data code segments directly import existing standardized information, which is imported in batches from the system's built-in data dictionary, external standard interfaces, or historical databases;
[0018] The newly added data code segment is manually entered by the user and is used to identify specific project numbers, special purpose facilities or temporary identifiers. The system supports format restrictions and content verification for the newly added code segment.
[0019] The mapped data code segment automatically extracts values from specific fields in the facility data table and performs character truncation, case conversion, and special symbol replacement.
[0020] The sequential code segment is automatically generated by the system backend into an increasing sequence, supporting user-defined starting value, step size, fixed length, and automatic zero-padding rules, as well as setting a maximum value loop strategy.
[0021] Furthermore, in step S2, the system will verify in real time whether the combination of each code segment exceeds the total length limit and whether it can meet the uniqueness requirement, and provide the simulation generation result for user confirmation. The encoding scheme is used for encoding generation of new facilities, and also supports batch complementation and rule migration of historical data.
[0022] To enhance the versatility of the solution, users are allowed to configure multiple application scenarios for the same solution. Meanwhile, the coding scheme can be migrated across systems through import and export functions.
[0023] Furthermore, in step S3, a fine-grained code segment authorization mechanism is introduced. Before performing an encoding task, the user needs to submit an authorization application through the system, specifying the start value, end value, and expected quantity of the required sequential code segments. The application information will be processed by the authorization administrator or the system's automatic approval process.
[0024] After successful authorization, the system will bind the authorization information to the user account, project number or task identifier, and strictly verify its legality and validity during the code generation process;
[0025] When a user attempts to generate a sequential code segment that is outside the authorized scope, the system will automatically block it and display an error message.
[0026] Furthermore, in step S4, when performing the coding task, the user selects the target data source, specifies the facility data table, and associates the selected coding scheme through the system interface or API call.
[0027] The system will automatically load the value rules for each code segment in the scheme. For the mapped data code segment, the system will extract field values from the source database in real time and perform predefined formatting or data cleaning operations.
[0028] For sequential code segments, the system will generate them incrementally according to the authorized range, and can ensure the uniqueness of the generated segments through a distributed lock mechanism when multiple threads execute concurrently.
[0029] Furthermore, during the encoding process, an identification code is generated according to a preset unique identification code generation strategy and compared with existing records before being written into the encoding library. If a matching record already exists, the encoding generation of that data is skipped.
[0030] Furthermore, in step S5, the user locates the target code through facility identifier, code value or other query conditions, and updates its status to "unavailable" after confirmation. This status will prevent it from being referenced again in subsequent business processes.
[0031] The system retains a complete history when performing a deregistration operation, including the reason for deregistration, the operator, and the time of the operation, in order to meet compliance and traceability requirements.
[0032] An apparatus for encoding urban infrastructure includes: at least one memory and at least one processor;
[0033] The at least one memory is used to store a machine-readable program;
[0034] The at least one processor is configured to invoke the machine-readable program to execute a method for coding urban infrastructure.
[0035] Compared with the prior art, the urban infrastructure coding method and apparatus of the present invention have the following outstanding advantages:
[0036] (1) Modular code segments and configurable coding schemes: Through code segments with customizable length, format and combination order, unified and flexible coding rules are achieved, which facilitates reuse and expansion across departments and facility types.
[0037] (2) Sequence code authorization control to ensure order and uniqueness: The introduction of a sequence code segment interval application and administrator approval mechanism effectively avoids coding conflicts caused by multiple concurrent users, ensuring the uniqueness and orderly allocation of codes.
[0038] (3) Field mapping and dynamic value retrieval, supporting multi-source automation: Automatically extract and format data from source table fields by mapping data code segments to achieve automatic encoding of multi-source data, reduce manual intervention and improve encoding efficiency.
[0039] (4) Deduplication mechanism based on identification code to ensure data quality: The identification code is generated by combining fields and compared with the coding library to automatically remove duplicate records, reduce redundancy and improve data consistency.
[0040] (5) Logical cancellation and restoration, supporting lifecycle management: Logically cancel abandoned codes and retain historical records, and restore them for use when necessary, to meet the traceability and compliance of the facility throughout its entire lifecycle. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a method for coding urban infrastructure. Detailed Implementation
[0043] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] The following is a preferred embodiment:
[0045] like Figure 1 As shown, a method for coding urban infrastructure in this embodiment includes the following steps:
[0046] S1. Encoding Segment Definition: Users define one or more code segments in the system. The code segment types include existing data code segments, newly added data code segments, mapped data code segments, and sequential code segments, and configure the length, format, and value retrieval method.
[0047] Existing data code segments can be directly imported from existing standardized information, such as national standard administrative division codes, industry classification codes, and road numbers. They can be imported in batches from the system's built-in data dictionary, external standard interfaces, or historical databases to ensure consistency with existing specifications.
[0048] New data segments are manually entered by users and are used to identify specific project numbers, special-purpose facilities, or temporary identifiers. The system supports format restrictions and content verification for new segments to avoid human input errors.
[0049] The mapped data code segment can automatically extract values from specific fields in the facility data table and supports various formatting methods such as character truncation, case conversion, and special symbol replacement to ensure the rigor and adaptability of the encoding rules.
[0050] The sequential code segment is automatically generated by the system backend into an increasing sequence. It supports user-defined starting value, step size, fixed length, and automatic zero-padding rules, and can set a maximum value loop strategy to prevent overflow.
[0051] All code segments can be previewed during definition, and the order, length, and placeholders can be modified to flexibly adapt to the coding requirements of different business systems.
[0052] S2. Encoding Scheme Formulation: Combining multiple code segments into an encoding scheme in a predetermined order, supporting cross-facility type applications, and setting delimiters and verification rules;
[0053] It allows users to combine multiple predefined code segments in a set order to form a complete facility code. Users can flexibly define the code segment arrangement order, separator style, total code length and verification rules to meet the coding standards of multiple industries and regions.
[0054] During the configuration process, the system verifies in real time whether the combination of each code segment exceeds the total length limit and whether it meets the uniqueness requirement, and provides simulated generation results for user confirmation. The encoding scheme can not only be used for encoding new facilities, but also supports batch complementation and rule migration of historical data, reducing redundant development work.
[0055] To enhance the versatility of the solution, this invention allows users to configure multiple application scenarios for the same solution. For example, the same facility can use different delimiter styles in different business departments without redefining all code segments. Simultaneously, the encoding scheme can be migrated across systems via import / export functions, facilitating the promotion of unified encoding rules in large enterprise groups, cross-regional projects, or industry associations, thereby achieving standardized data management and shared exchange.
[0056] S3, Code Segment Authorization Management: The start and end value range of a user's application for the use of a sequential code segment is approved by the administrator to control the uniqueness and order of the encoding when using it concurrently;
[0057] A fine-grained code segment authorization mechanism has been introduced. Before performing an encoding task, users need to submit an authorization application through the system, specifying the start value, end value and expected quantity of the required sequential code segments. The application information will be processed by the authorization administrator or the system's automatic approval process.
[0058] After successful authorization, the system will bind the authorization information to the user account, project number, or task identifier, and strictly verify its legality and validity during the code generation process. When a user attempts to generate sequential code segments that exceed the authorized scope, the system will automatically block and display an error message to prevent unauthorized use.
[0059] Meanwhile, it supports full traceability of authorization records. Administrators can query authorization history, usage status and remaining available range at any time, thereby ensuring that the sequence code segment can maintain its uniqueness and order in a multi-person collaborative or multi-project parallel environment.
[0060] In addition, for large batch tasks, batch range authorization is supported, and unused code ranges can be automatically reclaimed after the task is completed, improving resource utilization.
[0061] S4. Encoding Task Execution: Select the source database table and encoding scheme for storing facility data. The system reads the code segment authorization and generates the code according to the scheme rules. For each piece of data, the sequential code segment is incremented in turn, and deduplication is performed according to the identification code mechanism.
[0062] When performing coding tasks, users can select the target data source, specify the facility data table, and associate the selected coding scheme through the system interface or API calls. The system will automatically load the value rules of each code segment in the scheme. For mapped data code segments, the system will extract field values from the source database in real time and perform predefined formatting or data cleaning operations. For sequential code segments, the system will generate them incrementally according to the authorized range, and can ensure the uniqueness of the generated code segments through a distributed lock mechanism when multiple threads execute concurrently.
[0063] During the encoding process, an identification code is generated based on a preset unique identification code generation strategy (such as a hash value based on facility name, geographical coordinates, region, etc.). Before being written to the encoding library, the code is compared with existing records. If a matching record already exists, the encoding of that data is skipped to avoid duplicate allocation. This task execution module supports batch processing, segmented execution, and breakpoint resume functionality, adapting to the efficient encoding needs of large-scale datasets. Detailed log files are generated during execution for easy subsequent auditing and troubleshooting.
[0064] S5. Code cancellation and restoration: For abandoned facility data, the corresponding code is logically cancelled and restored for use when needed. Historical record query and tracing are also supported.
[0065] The code cancellation function allows users to logically delete generated codes when facilities are abandoned, dismantled, merged, or business rules are adjusted.
[0066] Users can quickly locate the target code using facility identifiers, code values, or other query criteria, and update its status to "unavailable" upon confirmation. This status will prevent it from being referenced again in subsequent business processes. The system retains a complete historical record when performing a deregistration operation, including the reason for deregistration, the operator, and the operation time, to meet compliance and traceability requirements.
[0067] In special circumstances, such as when a facility is restored to use or a code is mistakenly deactivated, the administrator can reactivate the code through the recovery function and restore its normal usage rights in the business system.
[0068] In addition, this embodiment provides batch cancellation and batch recovery functions, which support processing a large amount of coded data at once based on filtering conditions, thereby improving data management efficiency and reducing human error.
[0069] Based on the above method, an apparatus for encoding urban infrastructure in this embodiment includes: at least one memory and at least one processor;
[0070] The at least one memory is used to store a machine-readable program;
[0071] The at least one processor is configured to invoke the machine-readable program to execute a method for coding urban infrastructure.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of encoding of urban infrastructure, characterized by, It has the following steps: S1. Users define one or more code segments in the system. The code segment types include existing data code segments, newly added data code segments, mapped data code segments, and sequential code segments, and configure the length, format, and value retrieval method. The existing data code segments are directly imported from existing standardized information, which are imported in batches from the system's built-in data dictionary, external standard interfaces, or historical databases. The newly added data code segment is manually entered by the user and is used to identify specific project numbers, special purpose facilities or temporary identifiers. The system supports format restrictions and content verification for the newly added code segment. The mapped data code segment automatically extracts values from specific fields in the facility data table and performs character truncation, case conversion, and special symbol replacement. The sequential code segment is automatically generated by the system backend into an increasing sequence, supporting user-defined starting value, step size, fixed length, and automatic zero-padding rules, as well as setting a maximum value loop strategy; S2. Combine multiple code segments into an encoding scheme in a predetermined order, supporting cross-facility type applications, and setting delimiters and verification rules; The system will verify in real time whether the combination of each code segment exceeds the total length limit and whether it can meet the uniqueness requirement, and provide simulated generation results for user confirmation. The encoding scheme is used for encoding generation of new facilities, and also supports batch complementation and rule migration of historical data. To enhance the versatility of the solution, users can configure multiple application scenarios for the same solution. At the same time, the coding scheme can be migrated across systems through import and export functions. S3. The start and end value range of the sequential code segment requested by the user shall be approved by the administrator to control the uniqueness and order of the encoding when using it concurrently; A fine-grained code segment authorization mechanism is introduced. Before performing an encoding task, users need to submit an authorization application through the system, specifying the start value, end value and expected quantity of the required sequential code segments. The application information will be processed by the authorization administrator or the system's automatic approval process. After successful authorization, the system will bind the authorization information to the user account, project number or task identifier, and strictly verify its legality and validity during the code generation process; When a user attempts to generate a sequential code segment that is outside the authorized scope, the system will automatically block it and display an error message; S4. Select the source database table and encoding scheme for storing facility data. The system reads the code segment authorization and generates the code according to the scheme rules. The sequential code segment is incremented for each data and deduplication is performed according to the identification code mechanism. When performing coding tasks, users can select the target data source, specify the facility data table, and associate the selected coding scheme through the system interface or API call. The system will automatically load the value rules for each code segment in the scheme. For the mapped data code segment, the system will extract field values from the source database in real time and perform predefined formatting or data cleaning operations. For sequential code segments, the system will generate them incrementally according to the authorized range, and can ensure the uniqueness of the generated segments through a distributed lock mechanism when multiple threads execute concurrently. During the encoding process, an identification code is generated according to a preset unique identification code generation strategy and compared with existing records before being written into the encoding library. If a matching record already exists, the encoding generation of that data is skipped. S5. For abandoned facility data, the corresponding code is logically deregistered and can be restored for use when needed. Historical record query and tracing are also supported. Users locate the target code by facility identifier, code value or other query conditions, and update its status to "unavailable" after confirmation. This status will prevent it from being referenced again in subsequent business processes. The system retains a complete history when performing a deregistration operation, including the reason for deregistration, the operator, and the time of the operation, in order to meet compliance and traceability requirements.
2. An apparatus for encoding of urban infrastructure, characterized by include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute the method of claim 1.
Citation Information
Patent Citations
Material information management method and application platform
CN106056276A
Equipment identification code generation method and device, and equipment identification code analysis method and device
CN115796124A