A software and hardware cooperative character matching system and a matching method thereof
By integrating modules for character acquisition, semantic encoding, matching verification, self-evolution correction, and resource scheduling, the problem of effectively fusing matching results and perception states in existing technologies has been solved. This enables collaborative work between software and hardware, improves the system's robustness, accuracy, and adaptability, optimizes resource allocation and scheduling, and enhances the system's adaptability and operational efficiency in dynamic environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHAOHU UNIV
- Filing Date
- 2025-11-05
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies cannot effectively integrate matching results, semantic encoding, and perceptual states to generate multiple semantic hypotheses. They cannot dynamically realize the interaction and feedback between generation and perceptual verification, nor can they jointly evaluate semantic consistency and perceptual adaptability to select the optimal hypothesis. They are unable to achieve a 'recognition-correction-learning' closed loop and cannot generate an optimal scheduling scheme that balances resource efficiency and task performance, thus reducing the system's adaptability, robustness, and operational efficiency in dynamic environments.
By integrating a character acquisition and preprocessing module, a character semantic encoding module, a character matching and verification module, a self-evolving semantic correction module, and an adaptive resource scheduling module, the system enables collaborative work between software and hardware. It integrates perception state and task complexity, generates multiple semantic hypotheses, dynamically adjusts encoding depth, optimizes resource allocation, and achieves cross-level collaborative control.
It enhances the system's robustness, accuracy, and adaptability in complex scenarios, improves the system's adaptability, robustness, and operational efficiency in dynamic environments, and realizes a closed loop of 'identification-correction-learning' and an optimal scheduling scheme.
Smart Images

Figure CN121415416B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hardware and software collaborative character matching technology, and more specifically, to a hardware and software collaborative character matching system and matching method. Background Technology
[0002] With the development of digitalization, the scale of data in fields such as cybersecurity, financial transactions, and bioinformatics has grown rapidly, placing higher demands on the real-time performance and accuracy of character matching. However, existing methods still face many bottlenecks: software implementation is often inefficient or consumes too much memory; hardware acceleration is fast, but the rigid architecture makes it difficult to update rules and has high maintenance costs; and current software and hardware collaboration mostly just assigns some tasks to hardware for execution without deep integration, which often leads to problems such as data migration delays, low processing efficiency, and inflexible scheduling.
[0003] Reference patent application CN102023858A discloses a hardware and software collaborative character matching system and its matching method in the field of computer recognition technology. The system includes a front-end compilation module and a back-end matching calculation module. The front-end compilation module performs front-end processing on the input information and outputs the execution code and the first letter of the string to the back-end matching calculation module. The back-end matching calculation module completes the matching calculation and returns the calculation result to the front-end compilation module. This invention combines the specific application requirements of network routing protocols for string pattern matching, and improves the string pattern matching speed of regular expressions through hardware and software collaboration and high-speed hardware transportation.
[0004] However, while the aforementioned reference patents achieve efficient and flexible high-speed regular expression matching through the design of a hardware-software co-architecture for network routing protocols and a dedicated FPGA acceleration unit, significantly improving string pattern matching speed and possessing both versatility and technological inspiration, they cannot integrate matching results, semantic encoding, and perception states to generate multiple semantic hypotheses. They cannot dynamically realize the interaction and feedback between generation and perception verification, nor can they jointly evaluate semantic consistency and perception adaptability to select the optimal hypothesis, making it difficult to achieve a "recognition-correction-learning" closed loop. Furthermore, they cannot integrate perception states and task complexity to accurately predict resource requirements, cannot generate an optimal scheduling scheme that balances resource efficiency and task performance, and cannot combine closed-loop feedback from hardware, operating system, and algorithm layers to achieve cross-level collaborative control, thus reducing the system's adaptability, robustness, and operational efficiency in dynamic environments.
[0005] To address these issues, we propose a character matching system and method that combines hardware and software collaboration. Summary of the Invention
[0006] The purpose of this invention is to provide a character matching system and method that works in conjunction with hardware and software. This invention solves the problems of existing technologies that cannot integrate matching results, semantic encoding, and perception state to generate multiple semantic hypotheses, cannot dynamically realize the interaction and feedback between generation and perception verification, cannot jointly evaluate semantic consistency and perception adaptability to select the optimal hypothesis, and are difficult to achieve a "recognition-correction-learning" closed loop; at the same time, they cannot integrate perception state and task complexity to accurately predict resource requirements, cannot generate an optimal scheduling scheme that takes into account both resource efficiency and task performance, and cannot combine closed-loop feedback from hardware, operating system, and algorithm layers to achieve cross-level collaborative control, thus reducing the system's adaptability, robustness, and operating efficiency in dynamic environments.
[0007] The objective of this invention is achieved through the following technical solution:
[0008] A hardware and software collaborative character matching system, integrated into a character matching management platform, includes:
[0009] The character acquisition preprocessing module is used to receive the character image pixel matrix and its perception state parameters generated during the process of sensing signal digitization, image frame generation, system timing synchronization, ambient light quantization, acquisition posture calculation, initial image quality assessment and character region detection. It performs denoising, contrast enhancement, binarization and geometric normalization on the character image, preprocesses the perception state parameters, and finally outputs standardized character images and structured perception state parameters.
[0010] The character semantic encoding module performs attention-enhanced convolutional encoding on standardized character images, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state.
[0011] The character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in combination with the perceptual state parameters, and outputs the results through parallel recognition and semantic consistency verification.
[0012] The self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, it performs semantic correction and reversely optimizes the encoding and matching parameters.
[0013] The adaptive resource scheduling module predicts resource requirements based on perceived state parameters and task complexity at each stage, dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback.
[0014] The character semantic encoding module performs attention-enhanced convolutional encoding on the standardized character image, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state, including:
[0015] Obtain a standardized character image, perform convolution operation on the standardized character image to generate a feature map, perform nonlinear transformation on the feature map, perform convolution operation on the input feature map in each stage to generate an updated feature map, perform global aggregation on each channel of the final obtained feature map to generate a scalar array, and perform linear and nonlinear transformations on the scalar array to generate a new feature representation;
[0016] Based on the final feature map, a channel attention weight vector is generated, and it is multiplied element-wise with the feature map to generate a channel weighted feature map. The channel weighted feature map is aggregated by maximum and average to form a two-dimensional attention map. The two-dimensional attention maps are merged and generated by convolution to generate a spatial attention weight map, and then multiplied element-wise with the channel weighted feature map to generate an attention enhancement feature map.
[0017] The system receives and normalizes the perceptual state parameters to generate a normalized vector, which is then converted into a state embedding vector. The attention-enhanced feature map is unfolded into a one-dimensional array and concatenated with the state embedding vector to form a fused input. The fused input undergoes linear and nonlinear transformations to generate a semantic vector. The perceptual state parameters are calculated to determine the actual number of convolutional layers executed, and the semantic vector is output.
[0018] In a preferred embodiment of the present invention, the character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in conjunction with the perceptual state parameters, and outputs the results through parallel recognition and semantic consistency verification, including:
[0019] Obtain semantically encoded character features and a standard character library. For each character in the standard character library, iterate through its template features at each scale, calculate the cross-scale similarity between the template features and the input character features, and select the scale corresponding to the maximum value as the optimal alignment scale.
[0020] The three perceptual state parameters of blur degree, contrast and illumination uniformity associated with the input character features are extracted. For each pixel position of the input feature map, the feature vector of the current pixel position is concatenated with the three perceptual state parameters and input into a linear transformation layer. The transformation result is output by the Sigmoid function to generate the weight factor of the current pixel position.
[0021] Under the optimal alignment scale, for each character template in the standard character library, the weighted matching degree between the character template and the input character features is calculated, and the weighted matching degree of each character is used as the matching confidence of the character to form a candidate character list and its confidence.
[0022] For candidate character sequences, the language model is called to calculate the joint probability of the sequence in the context, and the comprehensive score is calculated. Among all possible character sequences, the sequence with the highest comprehensive score is selected and output as the final result.
[0023] In a preferred embodiment of the present invention, the process by which the self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters includes:
[0024] Receive character matching results, receive semantic encoding vectors, receive perceptual state parameters, and generate an initial candidate hypothesis sequence based on the character matching results and semantic encoding vectors, with each sequence corresponding to a possible semantic parsing;
[0025] For each initial candidate hypothesis sequence, a context fusion operation is performed. The context fusion operation calculates the correlation between candidate characters and semantic encoding vectors, adjusts character weights, generates an intermediate hypothesis sequence, and searches for the corresponding perturbation rule in a preset mapping table based on the value of the perceptual state parameter.
[0026] Apply perturbation rules to each intermediate hypothesis sequence to generate perturbed hypotheses. Collect all perturbed hypotheses to form a multi-semantic hypothesis set. Stop generating when the number of elements in the multi-semantic hypothesis set reaches a preset positive integer, and output the multi-semantic hypothesis set.
[0027] In a preferred embodiment of the present invention, the process of feedback interaction between the self-evolving semantic correction module and the perception verification unit through the dynamic semantic generation unit includes:
[0028] Initialize the hypothesis index to point to the first candidate hypothesis in the multi-semantic hypothesis set. When the candidate hypothesis pointed to by the hypothesis index exists in the multi-semantic hypothesis set, perform the following sequence of operations: The dynamic semantic generation unit reads the candidate hypothesis pointed to by the current index; the dynamic semantic generation unit generates the semantic representation of the candidate hypothesis; the dynamic semantic generation unit calculates the difference between the semantic representation and the global semantic encoding and outputs the semantic deviation value; the perception verification unit reads the candidate hypothesis pointed to by the current index and the perception state parameter; the perception verification unit generates the perception response of the candidate hypothesis under the current perception conditions; the perception verification unit calculates the difference between the perception response and the ideal perception response target and outputs the perception deviation value; and the comprehensive evaluation unit calculates the comprehensive evaluation value of the candidate hypothesis.
[0029] Store candidate hypotheses and their comprehensive evaluation values, move the hypothesis index to the next candidate hypothesis in the multi-semantic hypothesis set, select the candidate hypothesis with the smallest comprehensive evaluation value as the optimal hypothesis after all candidate hypotheses have been processed, output the optimal hypothesis, feed the optimal hypothesis back to the dynamic semantic generation unit and the perception verification unit, and update the internal model parameters of the dynamic semantic generation unit and the perception verification unit.
[0030] In a preferred embodiment of the present invention, the process by which the self-evolving semantic correction module performs semantic correction and reverse optimization of encoding and matching parameters includes:
[0031] Receive the optimal hypothesis, perform character-level correction operations, generate the corrected hypothesis, calculate the semantic consistency loss, calculate the match fidelity loss (expressed as character-level edit distance), calculate the perceptual adaptation loss, and add the semantic consistency loss, match fidelity loss, and perceptual adaptation loss according to preset weight coefficients to obtain the total loss.
[0032] Calculate the gradient of the total loss with respect to the model parameters, update the model parameters based on the gradient, perform a gradient descent update, and after the parameter update is completed, the new parameters are used for character matching, semantic encoding and hypothesis generation in the next cycle.
[0033] In a preferred embodiment of the present invention, the process by which the adaptive resource scheduling module predicts resource requirements based on perceived state parameters and the complexity of tasks at each stage includes:
[0034] Receive the perception state parameters and the task stage complexity of each stage of the task, arrange the perception state parameters and the task stage complexity in a preset order to form a joint input vector, and input the joint input vector into the resource demand prediction model.
[0035] The resource demand forecasting model is a deterministic function mapping. The input is a joint input vector, and the output is the specific demand value of five types of resources. The parameters of the resource demand forecasting model are fixed through offline training. The training data is historical task execution records. The model output constitutes a resource demand vector. Each component of the resource demand vector corresponds to the demand value of a type of resource, and the output is the resource demand vector.
[0036] In a preferred embodiment of the present invention, the adaptive resource scheduling module dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback, including the following process:
[0037] Receive the current task execution graph, perception state parameters, task stage complexity and resource requirement vectors of each subtask, detect whether the perception state parameters or the execution state of the subtasks have changed. If no change is detected, maintain the current task execution graph. If a change is detected, perform a task graph reconstruction operation, insert new subtask nodes, add corresponding new processing logic, merge consecutive subtasks with the same input and output into a single node, delete subtask nodes with no output or no predecessor and not started, and recalculate the critical path and parallel execution sequence of the task graph.
[0038] Based on the reconstructed task execution graph, the resource allocation optimization problem is solved to generate the optimal resource allocation scheme. The optimization objective is to minimize the overall cost, which is a weighted sum of resource consumption cost and task performance loss. The optimal resource allocation scheme satisfies the following constraints: the total occupancy of various resources does not exceed the physical limit; for subtasks with data dependencies, the start time of the successor task is not earlier than the completion time of the predecessor task.
[0039] A scheduling table is generated based on the optimal resource allocation scheme. The scheduling table includes the resource binding, start time and priority of each subtask. The priority is determined by a linear combination of the task stage complexity and preset weights. Cross-layer feedback coordination is performed, and the cross-layer feedback is completed within the current cycle to form a closed-loop control.
[0040] As a preferred embodiment of the present invention, a character matching method with hardware and software collaboration includes the following steps:
[0041] Step 1: Receive the character image pixel matrix and its sensing state parameters generated during the process of receiving and digitizing the sensing signal, generating image frames, synchronizing the system timing, quantizing ambient light, calculating the acquisition posture, conducting initial image quality assessment, and detecting character regions. Perform denoising, contrast enhancement, binarization, and geometric normalization on the character image, preprocess the sensing state parameters, and finally output the standardized character image and structured sensing state parameters.
[0042] Step 2: Perform attention-enhanced convolutional coding on the standardized character image, fuse the perceptual state parameters to generate semantic vectors, and dynamically adjust the coding depth based on the perceptual state;
[0043] Step 3: Perform multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjust the matching strategy in combination with the perceptual state parameters, and output the results through parallel recognition and semantic consistency verification;
[0044] Step 4: Generate multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, perform semantic correction and reverse optimize the encoding and matching parameters.
[0045] Step 5: Based on the perceived state parameters and the task complexity of each stage, predict resource requirements, dynamically reconstruct the task execution graph and allocate computing resources, and coordinate the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback.
[0046] Compared with the prior art, the advantages of this invention are:
[0047] (1) In this invention, the matching results, semantic encoding and perception state are fused by the self-evolving semantic correction module to generate multiple semantic hypotheses and improve diversity. Through the feedback interaction of dynamic generation and perception verification, semantic consistency and perception adaptability are jointly evaluated, the optimal hypothesis is selected, and a multi-objective loss is constructed based on the correction results. The encoding and matching parameters are optimized in reverse to realize the "identification-correction-learning" closed loop and enhance the robustness, accuracy and adaptability of the system in complex scenarios.
[0048] (2) In this invention, the adaptive resource scheduling module integrates the perceived state and task complexity to accurately predict resource demand, dynamically reconstruct the task graph and optimize resource allocation. By solving the constraint optimization problem of minimizing the comprehensive cost, the optimal scheduling scheme that takes into account both resource efficiency and task performance is generated. Combined with the closed-loop feedback of hardware, operating system and algorithm layers, cross-level collaborative regulation is realized to improve the system's adaptability, robustness and operating efficiency in dynamic environments. Attached Figure Description
[0049] Figure 1 This is a system block diagram of Embodiment 1 of the present invention;
[0050] Figure 2 This is a system block diagram of Embodiment 2 of the present invention;
[0051] Figure 3 This is a flowchart illustrating the steps of the character matching method that utilizes both hardware and software collaboration in this invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0053] Example 1: As Figure 1 As shown, the present invention proposes a hardware and software collaborative character matching system, integrated into a character matching management platform, comprising:
[0054] The character acquisition preprocessing module receives the character image pixel matrix and its perception state parameters generated during the processes of sensing signal digitization, image frame generation, system timing synchronization, ambient light quantization, acquisition posture calculation, initial image quality assessment, and character region detection. The perception state parameters include image resolution, acquisition timestamp, light intensity, image blur, device acquisition angle, and character region coordinates. The module performs denoising, contrast enhancement, binarization, and geometric normalization on the character image and preprocesses the perception state parameters. The preprocessing operations include parameter validity verification, unit unification and dimensional normalization, missing value completion and interpolation, parameter spatiotemporal alignment, parameter fusion and feature construction, and parameter encoding and encapsulation. Finally, it outputs standardized character images and structured perception state parameters for subsequent feature extraction, resource scheduling, and semantic correction.
[0055] The character acquisition preprocessing module eliminates device differences, lighting variations, pose shifts, and noise interference through image standardization and perceptual state structuring, thereby improving character recognizability. It performs denoising, enhancement, binarization, and geometric normalization on the image, and verifies, normalizes, completes, aligns, and encodes the perceptual state parameters to generate standardized character images and structured state vectors in a unified format. This provides a temporally consistent, computable, and shareable front-end input for feature extraction, resource scheduling, and semantic correction, ensuring system collaboration and robustness.
[0056] The character semantic encoding module performs attention-enhanced convolutional encoding on standardized character images, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state.
[0057] The character semantic encoding module performs attention-enhanced convolutional encoding on standardized character images, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state, including:
[0058] A standardized character image is acquired, a convolution operation is performed on the standardized character image to generate a feature map, a nonlinear transformation is performed on the feature map to enhance the feature representation, and a series of consecutive feature processing stages are performed. In each stage, a convolution operation is performed on the input feature map to generate an updated feature map, and then a nonlinear transformation is applied. Global aggregation is performed on each channel of the final obtained feature map to generate a scalar array. The scalar array is then subjected to linear and nonlinear transformations to compress the dimensions and enhance the expression, generating a new feature representation.
[0059] Based on the final feature map, a channel attention weight vector is generated, and it is multiplied element-wise with the feature map to generate a channel weighted feature map. The channel weighted feature map is aggregated by maximum and average to form a two-dimensional attention map. The two-dimensional attention maps are merged and generated by convolution to generate a spatial attention weight map, and then multiplied element-wise with the channel weighted feature map to generate an attention enhancement feature map.
[0060] The system receives the perceptual state parameters and normalizes them to generate a normalized vector, which is then converted into a state embedding vector. The attention-enhanced feature map is unfolded into a one-dimensional array and concatenated with the state embedding vector to form a fusion input. The fusion input undergoes linear and nonlinear transformations to generate a semantic vector. The perceptual state parameters are calculated to determine the actual number of convolutional layers to be executed, and the semantic vector is output.
[0061] The character semantic encoding module improves the quality of feature representation by focusing on key features and suppressing noise interference through attention-enhanced convolutional encoding; it generates context-aware semantic vectors by fusing normalized perceptual state parameters to enhance semantic discriminability; and it dynamically adjusts the encoding depth based on the perceptual state to balance computational efficiency and recognition robustness. Overall, it achieves high-precision and highly adaptive character-to-semantic mapping, providing reliable semantic representations for subsequent modules.
[0062] The character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in combination with the perceptual state parameters, and outputs the results through parallel recognition and semantic consistency verification.
[0063] The character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in conjunction with perceptual state parameters, and outputs results through parallel recognition and semantic consistency verification.
[0064] Obtain semantically encoded character features and a standard character library. The standard character library contains template features of all target characters at multiple preset scales. For each character in the standard character library, iterate through its template features at each scale and calculate the cross-scale similarity between the template features and the input character features. The cross-scale similarity is obtained by calculating the cosine similarity pixel by pixel and taking the average value. Record the similarity value corresponding to each scale and select the scale corresponding to the maximum value as the optimal alignment scale.
[0065] The three perceptual state parameters of blur degree, contrast and illumination uniformity associated with the input character features are extracted. For each pixel position of the input feature map, the feature vector of the current pixel position is concatenated with the three perceptual state parameters and input into a linear transformation layer. The weights and biases of the linear transformation layer are learnable parameters. The transformation result is output by the Sigmoid function to generate the weight factor of the current pixel position.
[0066] Under the optimal alignment scale, for each character template in the standard character library, the weighted matching degree between the character template and the input character features is calculated. The weighted matching degree is the mean of the product of the cosine similarity at all corresponding pixel positions and the weight factor at the corresponding position. The weighted matching degree of each character is used as the matching confidence of the character, forming a candidate character list and its confidence.
[0067] For candidate character sequences, the language model is called to calculate the joint probability of the sequence in the context, and a comprehensive score is calculated. The comprehensive score is the weighted sum of the product of the matching confidence of all characters in the candidate character sequence and the sequence log probability output by the language model. The weight coefficient is a preset fixed value. Among all possible character sequences, the sequence with the highest comprehensive score is selected and the character sequence with the highest comprehensive score is output as the final result.
[0068] The character matching and verification module achieves robust matching through multi-scale semantic alignment and perceptual adaptive weighting; it dynamically adjusts pixel-level matching weights based on perceptual state to suppress interference from low-quality regions; it integrates matching confidence with language model context verification, and outputs highly accurate and semantically consistent character sequences through parallel recognition and comprehensive scoring optimization, thereby improving the reliability of recognition in complex environments.
[0069] The self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, it performs semantic correction and reversely optimizes the encoding and matching parameters.
[0070] The self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. The process includes:
[0071] The system receives character matching results, which consist of a set of candidate characters, their matching confidence scores, and position coordinates. It also receives a semantic encoding vector, which represents the overall semantic representation of the input content. Furthermore, it receives perceptual state parameters, including ambiguity, contrast, illumination intensity, and occlusion ratio, each of which is a scalar value. Based on the character matching results and the semantic encoding vector, the system generates an initial candidate hypothesis sequence, which consists of one or more character permutations and combinations, with each sequence corresponding to a possible semantic parsing.
[0072] For each initial candidate hypothesis sequence, a context fusion operation is performed. The context fusion operation calculates the correlation between candidate characters and semantic encoding vectors, adjusts character weights, and generates an intermediate hypothesis sequence. Based on the value of the perceptual state parameter, the corresponding perturbation rule is searched in a preset mapping table. The perturbation rule is one or more combinations of character replacement, character insertion, character deletion, and character position offset.
[0073] Apply perturbation rules to each intermediate hypothesis sequence to generate perturbed hypotheses. Collect all perturbed hypotheses to form a multi-semantic hypothesis set. Stop generating when the number of elements in the multi-semantic hypothesis set reaches a preset positive integer, and output the multi-semantic hypothesis set.
[0074] The self-evolving semantic correction module's feedback interaction with the dynamic semantic generation unit and the perceptual verification unit includes:
[0075] Initialize the hypothesis index to point to the first candidate hypothesis in the multi-semantic hypothesis set. When the candidate hypothesis pointed to by the hypothesis index exists in the multi-semantic hypothesis set, perform the following sequence of operations: The dynamic semantic generation unit reads the candidate hypothesis pointed to by the current index; the dynamic semantic generation unit generates the semantic representation of the candidate hypothesis; the dynamic semantic generation unit calculates the difference between the semantic representation and the global semantic encoding, and outputs the semantic deviation value; the perception verification unit reads the candidate hypothesis pointed to by the current index and the perception state parameters; the perception verification unit generates the perception response of the candidate hypothesis under the current perception conditions; the perception verification unit calculates the difference between the perception response and the ideal perception response target, and outputs the perception deviation value; the comprehensive evaluation unit calculates the comprehensive evaluation value of the candidate hypothesis, expressed by the following formula:
[0076] ,in The optimal hypothesis selected from the set of multiple semantic hypotheses. For any candidate hypothesis in the set of multiple semantic hypotheses, For semantic reconstruction functions, the assumptions will be... Mapped to semantic vectors Global semantic encoding of the input data. For the perception modeling function, the input is the hypothesis. and perceived state parameters The output is a sensor response. To achieve the ideal perception and response target, and The value is a preset constant, which takes the value of a positive real number. The comprehensive evaluation value of each candidate hypothesis is calculated using the above formula, and the hypothesis with the smallest comprehensive evaluation value is selected as the optimal hypothesis.
[0077] Store candidate hypotheses and their comprehensive evaluation values, move the hypothesis index to the next candidate hypothesis in the multi-semantic hypothesis set, select the candidate hypothesis with the smallest comprehensive evaluation value as the optimal hypothesis after all candidate hypotheses have been processed, output the optimal hypothesis, feed the optimal hypothesis back to the dynamic semantic generation unit and the perception verification unit, and update the internal model parameters of the dynamic semantic generation unit and the perception verification unit.
[0078] The process by which the self-evolving semantic correction module performs semantic correction and reverse-optimizes encoding and matching parameters includes:
[0079] The system receives the optimal hypothesis, performs character-level correction operations (character replacement, character insertion, character deletion, and character order adjustment), and bases the correction on the semantic deviation direction. It then generates a corrected hypothesis, calculates the semantic consistency loss (a measure of the difference between the semantic vector output by the semantic reconstruction function and the global semantic code), calculates the match fidelity loss (a measure of the structural difference between the corrected hypothesis and the initial character matching result, expressed as character-level edit distance), and calculates the perceptual adaptation loss (a measure of the difference between the perceptual response output by the perceptual modeling function and the ideal perceptual response target). Finally, it adds the semantic consistency loss, match fidelity loss, and perceptual adaptation loss according to preset weighting coefficients to obtain the total loss.
[0080] Calculate the gradient of the total loss with respect to the model parameters. The model parameters include all trainable parameters of the matching network, encoder, attention module, semantic reconstruction function, and perceptual modeling function. Update the model parameters based on the gradient using the following formula:
[0081] ,in This refers to all trainable parameters of the model, including the parameters of the matching network, encoder, attention module, semantic reconstruction function, and perceptual modeling function. Let be the learning rate, and be a preset positive real constant. This is the gradient vector of the total loss with respect to the model parameters. The weighted sum of the three losses is used to perform a gradient descent update. After the parameter update is completed, the new parameters are used for character matching, semantic encoding and hypothesis generation in the next cycle.
[0082] The self-evolving semantic correction module integrates character matching results, semantic encoding vectors, and perceptual state parameters to generate a multi-semantic hypothesis set. It enhances hypothesis diversity through context fusion and perceptual-driven perturbation. By leveraging the feedback interaction between dynamic semantic generation and perceptual verification, it jointly evaluates semantic consistency and perceptual adaptability, selects the optimal hypothesis, and enhances semantic discrimination capabilities in complex scenarios. Based on the optimal hypothesis, it performs character-level correction and constructs a multi-objective loss that includes semantics, matching, and perception. It then optimizes the parameters of modules such as encoding and matching in reverse to achieve a "recognition-correction-learning" closed loop, thereby improving the system's robustness, accuracy, and long-term adaptive capabilities.
[0083] Example 2: The technical solution of this embodiment of the invention differs from that of Example 1 in that:
[0084] like Figure 2 As shown, the adaptive resource scheduling module predicts resource requirements based on the perceived state parameters and the task complexity at each stage, dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback.
[0085] The adaptive resource scheduling module predicts resource requirements based on perceived state parameters and the complexity of tasks at each stage. This process includes:
[0086] The system receives sensing state parameters and task stage complexity for each task stage. Sensing state parameters include: sensor data quality, light intensity, noise level, CPU utilization, GPU utilization, memory usage, and network congestion. Task stage complexity is a non-negative real number corresponding to each task stage, determined by the state variables and algorithm features. The sensing state parameters and task stage complexity are arranged in a preset order to form a joint input vector. The dimension of the joint input vector is the sum of the number of sensing state parameters and the number of task stages. The joint input vector is then input into the resource demand prediction model.
[0087] The resource demand prediction model is a deterministic function mapping. The input is a joint input vector, and the output is the specific demand value of five types of resources: number of CPU cores, number of GPU computing units, memory capacity, storage input / output throughput, and network bandwidth. The parameters of the resource demand prediction model are fixed through offline training. The training data is historical task execution records, which include the correspondence between state parameters, task stage complexity, and actual resource consumption. The model output constitutes a resource demand vector, and each component of the resource demand vector corresponds to the demand value of one type of resource.
[0088] The adaptive resource scheduling module dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback. The process includes:
[0089] Receive the current task execution graph, perception state parameters, and task stage complexity and resource requirement vectors of each subtask. Detect whether the perception state parameters or subtask execution status have changed. Changes include: sensor data quality, light intensity, noise level, CPU utilization, GPU utilization, memory usage, network congestion exceeding a preset threshold, actual subtask execution time exceeding the predicted time, or subtask execution status failure. If no change is detected, maintain the current task execution graph. If a change is detected, perform a task graph reconstruction operation (update the resource requirement vectors of all subtasks), insert new subtask nodes, add corresponding new processing logic, merge consecutive subtasks with the same input and output into a single node, delete subtask nodes with no output or no predecessor and not started, and recalculate the critical path and parallelizable execution sequence of the task graph.
[0090] Based on the reconstructed task execution graph, the resource allocation optimization problem is solved to generate the optimal resource allocation scheme. The optimization objective is to minimize the overall cost, which is composed of the weighted sum of resource consumption cost and task performance loss. The resource consumption cost is the sum of the products of the square of the occupancy of each type of resource and its unit consumption cost coefficient. The task performance loss is the weighted sum of the task stage complexity and execution delay. The weight coefficient is a constant. The resource consumption cost and task performance loss are combined into the total cost function through a fixed trade-off coefficient.
[0091] The optimal resource allocation scheme satisfies the following constraints: the total usage of all types of resources does not exceed the physical limit; for subtasks with data dependencies, the start time of the successor task is not earlier than the completion time of the predecessor task; and the optimal resource allocation scheme is determined by the following formula:
[0092] ,in This represents the optimal resource allocation scheme, indicating the number of CPU cores, GPU computing units, memory capacity, storage I / O rate, and network bandwidth allocated to each subtask. This represents the amount of resource type j used by the i-th subtask. This represents the unit consumption cost coefficient for the j-th type of resource, and its value is uniquely determined by the resource type. Let represent the task stage complexity of the i-th subtask. This represents the execution delay of the i-th subtask caused by the change in the state vector. This represents the weighting coefficient of task phase complexity in performance overhead, and its value is a constant. This represents the weighting factor of execution latency in performance overhead, and its value is a constant. This represents the trade-off between resource consumption and task performance degradation; its value is a system configuration parameter. This represents the restructured task execution graph. This indicates a task dependency constraint, meaning that the start time of a subsequent task is no earlier than the completion time of the preceding task.
[0093] A scheduling table is generated based on the optimal resource allocation scheme. The scheduling table includes the resource binding, start time and priority of each subtask. The priority is determined by a linear combination of the task stage complexity and preset weights. Cross-layer feedback coordination is performed: the hardware layer reports temperature, voltage, power consumption and device load, the operating system layer receives the hardware status, executes the scheduling table, sets thread priorities, binds computing cores, and sends scheduling signals to the algorithm layer. The algorithm layer receives the scheduling signals, adjusts the parallel computing scale, computing graph structure and numerical precision parameters, and submits resource change requests to the operating system. Cross-layer feedback is completed within this cycle, forming a closed-loop control.
[0094] The adaptive resource scheduling module integrates perception state and task complexity to accurately predict resource demand, dynamically reconstruct the task graph, and optimize resource allocation. By solving the constraint optimization problem of minimizing the comprehensive cost, it generates the optimal scheduling scheme that balances resource efficiency and task performance. Combined with closed-loop feedback from hardware, operating system, and algorithm layers, it achieves cross-level collaborative regulation and control, improving the system's adaptability, robustness, and operating efficiency in dynamic environments.
[0095] Example 3: The technical solution of this embodiment of the invention differs from that of Example 1 and Example 2 in that:
[0096] like Figure 3 As shown, a character matching method that combines software and hardware includes the following steps:
[0097] Step 1: Receive the character image pixel matrix and its sensing state parameters generated during the process of receiving and digitizing the sensing signal, generating image frames, synchronizing the system timing, quantizing ambient light, calculating the acquisition posture, conducting initial image quality assessment, and detecting character regions. Perform denoising, contrast enhancement, binarization, and geometric normalization on the character image, preprocess the sensing state parameters, and finally output the standardized character image and structured sensing state parameters.
[0098] Step 2: Perform attention-enhanced convolutional coding on the standardized character image, fuse the perceptual state parameters to generate a semantic vector, and dynamically adjust the coding depth based on the perceptual state;
[0099] Step 3: Perform multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjust the matching strategy in conjunction with the perceptual state parameters, and output the results through parallel recognition and semantic consistency verification;
[0100] Step 4: Generate multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, perform semantic correction and reverse optimize the encoding and matching parameters.
[0101] Step 5: Based on the perception state parameters and the task complexity of each stage, predict resource requirements, dynamically reconstruct the task execution graph and allocate computing resources, and coordinate the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback;
[0102] This hardware-software collaborative character matching method achieves efficient hardware-software linkage through closed-loop collaboration of preprocessing, encoding, matching, correction, and scheduling. Unified image and state representation at the front end improves input quality; semantic encoding integrates attention mechanisms and perceptual adaptive adjustment to enhance feature expression; multi-scale alignment and contextual verification ensure matching accuracy and semantic rationality; self-evolutionary correction generates multiple hypotheses and back-optimizes model parameters, continuously improving accuracy; resource scheduling dynamically predicts demand, reconstructs the task graph, and provides cross-layer feedback, ensuring efficient system operation; overall, it possesses strong robustness, adaptability, and high reliability, making it suitable for complex and ever-changing real-world scenarios.
[0103] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and its improved concept, should be covered within the scope of protection of the present invention.
Claims
1. A character matching system that works in conjunction with hardware and software, integrated into a character matching management platform, characterized in that, include: The character acquisition preprocessing module is used to receive the character image pixel matrix and its perception state parameters generated during the process of sensing signal digitization, image frame generation, system timing synchronization, ambient light quantization, acquisition posture calculation, initial image quality assessment and character region detection. It performs denoising, contrast enhancement, binarization and geometric normalization on the character image, preprocesses the perception state parameters, and finally outputs standardized character images and structured perception state parameters. The character semantic encoding module performs attention-enhanced convolutional encoding on standardized character images, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state. The character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in combination with the perceptual state parameters, and outputs the results through parallel recognition and semantic consistency verification. The self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, it performs semantic correction and reversely optimizes the encoding and matching parameters. The process by which the self-evolving semantic correction module generates multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters includes: Receive character matching results, receive semantic encoding vectors, receive perceptual state parameters, and generate an initial candidate hypothesis sequence based on the character matching results and semantic encoding vectors, with each sequence corresponding to a possible semantic parsing; For each initial candidate hypothesis sequence, a context fusion operation is performed. The context fusion operation calculates the correlation between candidate characters and semantic encoding vectors, adjusts character weights, generates an intermediate hypothesis sequence, and searches for the corresponding perturbation rule in a preset mapping table based on the value of the perceptual state parameter. Apply perturbation rules to each intermediate hypothesis sequence to generate perturbed hypotheses. Collect all perturbed hypotheses to form a multi-semantic hypothesis set. Stop generating when the number of elements in the multi-semantic hypothesis set reaches a preset positive integer, and output the multi-semantic hypothesis set. The adaptive resource scheduling module predicts resource requirements based on perceived state parameters and task complexity at each stage, dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback.
2. The character matching system with hardware and software collaboration according to claim 1, characterized in that, The character semantic encoding module performs attention-enhanced convolutional encoding on the standardized character image, fuses perceptual state parameters to generate semantic vectors, and dynamically adjusts the encoding depth based on the perceptual state, including: Obtain a standardized character image, perform convolution operation on the standardized character image to generate a feature map, perform nonlinear transformation on the feature map, perform convolution operation on the input feature map in each stage to generate an updated feature map, perform global aggregation on each channel of the final obtained feature map to generate a scalar array, and perform linear and nonlinear transformations on the scalar array to generate a new feature representation; Based on the final feature map, a channel attention weight vector is generated, and it is multiplied element-wise with the feature map to generate a channel weighted feature map. The channel weighted feature map is aggregated by maximum and average to form a two-dimensional attention map. The two-dimensional attention maps are merged and generated by convolution to generate a spatial attention weight map, and then multiplied element-wise with the channel weighted feature map to generate an attention enhancement feature map. The system receives and normalizes the perceptual state parameters to generate a normalized vector, which is then converted into a state embedding vector. The attention-enhanced feature map is unfolded into a one-dimensional array and concatenated with the state embedding vector to form a fused input. The fused input undergoes linear and nonlinear transformations to generate a semantic vector. The perceptual state parameters are calculated to determine the actual number of convolutional layers executed, and the semantic vector is output.
3. The character matching system with hardware and software collaboration according to claim 1, characterized in that, The character matching and verification module performs multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjusts the matching strategy in conjunction with perceptual state parameters, and outputs results through parallel recognition and semantic consistency verification. The process includes: Obtain semantically encoded character features and a standard character library. For each character in the standard character library, iterate through its template features at each scale, calculate the cross-scale similarity between the template features and the input character features, and select the scale corresponding to the maximum value as the optimal alignment scale. The three perceptual state parameters of blur degree, contrast and illumination uniformity associated with the input character features are extracted. For each pixel position of the input feature map, the feature vector of the current pixel position is concatenated with the three perceptual state parameters and input into a linear transformation layer. The transformation result is output by the Sigmoid function to generate the weight factor of the current pixel position. Under the optimal alignment scale, for each character template in the standard character library, the weighted matching degree between the character template and the input character features is calculated, and the weighted matching degree of each character is used as the matching confidence of the character to form a candidate character list and its confidence. For candidate character sequences, the language model is called to calculate the joint probability of the sequence in the context, and the comprehensive score is calculated. Among all possible character sequences, the sequence with the highest comprehensive score is selected and output as the final result.
4. A character matching system with hardware and software collaboration according to claim 1, characterized in that, The self-evolving semantic correction module's feedback interaction process with the dynamic semantic generation unit and the perception verification unit includes: Initialize the hypothesis index to point to the first candidate hypothesis in the multi-semantic hypothesis set. When the candidate hypothesis pointed to by the hypothesis index exists in the multi-semantic hypothesis set, perform the following sequence of operations: The dynamic semantic generation unit reads the candidate hypothesis pointed to by the current index; the dynamic semantic generation unit generates the semantic representation of the candidate hypothesis; the dynamic semantic generation unit calculates the difference between the semantic representation and the global semantic encoding and outputs the semantic deviation value; the perception verification unit reads the candidate hypothesis pointed to by the current index and the perception state parameter; the perception verification unit generates the perception response of the candidate hypothesis under the current perception conditions; the perception verification unit calculates the difference between the perception response and the ideal perception response target and outputs the perception deviation value; and the comprehensive evaluation unit calculates the comprehensive evaluation value of the candidate hypothesis. Store candidate hypotheses and their comprehensive evaluation values, move the hypothesis index to the next candidate hypothesis in the multi-semantic hypothesis set, select the candidate hypothesis with the smallest comprehensive evaluation value as the optimal hypothesis after all candidate hypotheses have been processed, output the optimal hypothesis, feed the optimal hypothesis back to the dynamic semantic generation unit and the perception verification unit, and update the internal model parameters of the dynamic semantic generation unit and the perception verification unit.
5. A character matching system with hardware and software collaboration according to claim 4, characterized in that, The process by which the self-evolving semantic correction module performs semantic correction and reverse-optimizes the encoding and matching parameters includes: Receive the optimal hypothesis, perform character-level correction operations, generate the corrected hypothesis, calculate the semantic consistency loss, calculate the match fidelity loss (expressed as character-level edit distance), calculate the perceptual adaptation loss, and add the semantic consistency loss, match fidelity loss, and perceptual adaptation loss according to preset weight coefficients to obtain the total loss. Calculate the gradient of the total loss with respect to the model parameters, update the model parameters based on the gradient, perform a gradient descent update, and after the parameter update is completed, the new parameters are used for character matching, semantic encoding and hypothesis generation in the next cycle.
6. A character matching system with hardware and software collaboration according to claim 1, characterized in that, The adaptive resource scheduling module predicts resource requirements based on perceived state parameters and the complexity of tasks at each stage, including the following process: Receive the perception state parameters and the task stage complexity of each stage of the task, arrange the perception state parameters and the task stage complexity in a preset order to form a joint input vector, and input the joint input vector into the resource demand prediction model. The resource demand forecasting model is a deterministic function mapping. The input is a joint input vector, and the output is the specific demand value of five types of resources. The parameters of the resource demand forecasting model are fixed through offline training. The training data is historical task execution records. The model output constitutes a resource demand vector. Each component of the resource demand vector corresponds to the demand value of a type of resource.
7. A character matching system with hardware and software collaboration according to claim 6, characterized in that, The process by which the adaptive resource scheduling module dynamically reconstructs the task execution graph and allocates computing resources, and coordinates the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback, includes: Receive the current task execution graph, perception state parameters, task stage complexity and resource requirement vectors of each subtask, detect whether the perception state parameters or the execution state of the subtasks have changed. If no change is detected, maintain the current task execution graph. If a change is detected, perform a task graph reconstruction operation, insert new subtask nodes, add corresponding new processing logic, merge consecutive subtasks with the same input and output into a single node, delete subtask nodes with no output or no predecessor and not started, and recalculate the critical path and parallel execution sequence of the task graph. Based on the reconstructed task execution graph, the resource allocation optimization problem is solved to generate the optimal resource allocation scheme. The optimization objective is to minimize the overall cost, which is a weighted sum of resource consumption cost and task performance loss. The optimal resource allocation scheme satisfies the following constraints: the total occupancy of various resources does not exceed the physical limit; for subtasks with data dependencies, the start time of the successor task is not earlier than the completion time of the predecessor task. A scheduling table is generated based on the optimal resource allocation scheme. The scheduling table includes the resource binding, start time and priority of each subtask. The priority is determined by a linear combination of the task stage complexity and preset weights. Cross-layer feedback coordination is performed, and the cross-layer feedback is completed within the current cycle to form a closed-loop control.
8. A character matching method that uses hardware and software collaboration, applied to a character matching system that uses hardware and software collaboration as described in claim 1, characterized in that, Includes the following steps: Step 1: Receive the character image pixel matrix and its sensing state parameters generated during the process of receiving and digitizing the sensing signal, generating image frames, synchronizing the system timing, quantizing ambient light, calculating the acquisition posture, conducting initial image quality assessment, and detecting character regions. Perform denoising, contrast enhancement, binarization, and geometric normalization on the character image, preprocess the sensing state parameters, and finally output the standardized character image and structured sensing state parameters. Step 2: Perform attention-enhanced convolutional coding on the standardized character image, fuse the perceptual state parameters to generate semantic vectors, and dynamically adjust the coding depth based on the perceptual state; Step 3: Perform multi-scale semantic alignment between the semantically encoded character features and the standard character library, adjust the matching strategy in combination with the perceptual state parameters, and output the results through parallel recognition and semantic consistency verification; Step 4: Generate multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters. Through feedback interaction between the dynamic semantic generation unit and the perceptual verification unit, perform semantic correction and reverse optimize the encoding and matching parameters. The process of generating multiple semantic hypotheses based on character matching results, semantic encoding vectors, and perceptual state parameters includes: Receive character matching results, receive semantic encoding vectors, receive perceptual state parameters, and generate an initial candidate hypothesis sequence based on the character matching results and semantic encoding vectors, with each sequence corresponding to a possible semantic parsing; For each initial candidate hypothesis sequence, a context fusion operation is performed. The context fusion operation calculates the correlation between candidate characters and semantic encoding vectors, adjusts character weights, generates an intermediate hypothesis sequence, and searches for the corresponding perturbation rule in a preset mapping table based on the value of the perceptual state parameter. Apply perturbation rules to each intermediate hypothesis sequence to generate perturbed hypotheses. Collect all perturbed hypotheses to form a multi-semantic hypothesis set. Stop generating when the number of elements in the multi-semantic hypothesis set reaches a preset positive integer, and output the multi-semantic hypothesis set. Step 5: Based on the perceived state parameters and the task complexity of each stage, predict resource requirements, dynamically reconstruct the task execution graph and allocate computing resources, and coordinate the scheduling strategies of hardware, operating system and algorithm layers through cross-layer feedback.
Citation Information
Patent Citations
Software and hardware collaborative character matching system and matching method thereof
CN102023858A
Lycium barbarum insect pest recognition method based on image-text multi-modal feature fusion
CN116563707A