Code recognition method based on coupled oscillator model
By grouping standard pattern sets and establishing coupled oscillator models, and utilizing the strength values of uncoupled terms, the problems of high computational load and slow recognition speed in existing technologies are solved, achieving fast and accurate code recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2026-03-10
AI Technical Summary
Existing code recognition methods involve large computational loads and slow recognition speeds, especially when the pattern is occluded or subject to noise interference, making it difficult to quickly and accurately identify defective patterns.
The standard mode group is divided into groups using a coupled oscillator model. For each group, a coupled oscillator model including coupled and uncoupled terms is established. By taking appropriate values for the strength of the uncoupled terms, the standard mode that is closest to the defect mode is identified.
It reduces the computational load of the code recognition process and improves the recognition speed, especially when the dimension is large.
Smart Images

Figure CN116363666B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of code recognition technology, and in particular to a coupled oscillator model and code recognition method for code recognition. Background Technology
[0002] A code represents a binary pattern, which is a vector whose components take values in the range {-1, 1}. In a typical scenario, it represents a binary color image. Suppose we have a given set of standard binary patterns and a collected defect pattern. This defect pattern is obtained by perturbing one of the standard binary patterns and is represented as a vector whose components take values in the closed interval [-1, 1]. How can we identify the defect pattern to determine which standard binary pattern was perturbed to obtain it?
[0003] Binary pattern recognition often encounters situations where parts of the pattern are occluded or interfered with by noise. For example, license plates may be obscured by mud, or images may be distorted, blurred, or have trailing edges. Accurate identification of the corresponding standard pattern is crucial to addressing these defective patterns. However, existing code recognition methods are computationally intensive and slow. Summary of the Invention
[0004] This invention provides a coupled oscillator model and a code recognition method for code recognition, which can reduce the computational load of the code recognition process and thus improve the code recognition speed.
[0005] In a first aspect, embodiments of the present invention provide a coupled oscillator model for code recognition, wherein the coupled oscillator model is as follows:
[0006]
[0007] in, Yes The first derivative, It means the first Each phase oscillator at time... phase value, It means the first Each phase oscillator at time... phase value, For the number of oscillators, This refers to the connection topology of the coupled oscillator model. The strength of the uncoupled term.
[0008] Secondly, embodiments of the present invention provide a code recognition method based on the above-described coupled oscillator model, comprising:
[0009] S1. Obtain the standard pattern group of the corresponding standard image and the defect pattern of the corresponding image to be identified;
[0010] S2. Group the multiple standard patterns in the standard pattern group;
[0011] S3. For each group, determine whether the group includes a standard pattern. If so, output the standard pattern as the one in the group that is closest to the defect pattern. If not, execute S4 for the group.
[0012] S4. Establish a corresponding coupled oscillator model for the group; and determine the strength value of the uncoupled term in the coupled oscillator model based on the number of standard modes in the group and the relationship between the standard modes, so as to use the coupled oscillator model to output the standard mode in the group that is closest to the defect mode.
[0013] S5. Summarize the standard patterns output from all groups and determine whether the number of standard patterns currently summarized is one. If so, identify the defect pattern as the standard pattern currently summarized; otherwise, take the standard patterns currently summarized as a new standard pattern group and execute S2 for the new standard pattern group.
[0014] Thirdly, embodiments of the present invention also provide a code recognition device based on the above-described coupled oscillator model, comprising:
[0015] The pattern acquisition unit is used to acquire the standard pattern group of the corresponding standard image and the defect pattern of the corresponding image to be identified;
[0016] A grouping unit is used to group multiple standard patterns in the standard pattern group;
[0017] The determination unit is used to determine whether each group contains a standard pattern. If so, the standard pattern is directly output as the standard pattern in the group that is closest to the defect pattern. If not, the model building and processing unit is triggered to perform corresponding operations for the group.
[0018] The model building and processing unit is used to build a corresponding coupled oscillator model for the group; and to determine the strength value of the uncoupled term in the coupled oscillator model according to the number of standard modes in the group and the relationship between the standard modes, and to output the standard mode in the group that is closest to the defect mode using the coupled oscillator model.
[0019] The summary processing unit is used to summarize the standard patterns output in all groups and determine whether the number of standard patterns currently summarized is one. If so, the defect pattern is identified as the standard pattern currently summarized; otherwise, the standard pattern currently summarized is used as a new standard pattern group to trigger the grouping unit to group, so as to further trigger the determination unit, the model building and processing unit and the summary processing unit to repeat the corresponding operations.
[0020] Fourthly, embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method described in any embodiment of this specification.
[0021] Fifthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods described in any embodiment of this specification.
[0022] This invention provides a coupled oscillator model and a code recognition method for code recognition. The method involves grouping multiple standard patterns from a standard pattern set, identifying the standard patterns in each group, and outputting the standard pattern in that group that is closest to the defective pattern. A corresponding coupled oscillator model is established when identifying the standard patterns in each group. This coupled oscillator model includes coupled and uncoupled terms. Due to the presence of uncoupled terms, and by appropriately selecting the strength of the uncoupled terms, the computational load in the code recognition process is significantly reduced compared to a coupled oscillator model with two coupled terms, especially when the dimension is large. This reduction in computational load improves the code recognition speed. Attached Figure Description
[0023] 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.
[0024] Figure 1 This is a flowchart of a code recognition method based on a coupled oscillator model provided by an embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of a standard pattern of mutual orthogonality provided in an embodiment of the present invention;
[0026] Figure 3 This is an embodiment of the present invention that provides a solution for... Figure 2 The recognition comparison chart;
[0027] Figure 4 This is a schematic diagram of a set of standard patterns and a defective pattern provided in an embodiment of the present invention;
[0028] Figure 5 This is an identification comparison image provided in one embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of grayscale image decoding that evolves over time, provided by an embodiment of the present invention;
[0030] Figure 7 This is a hardware architecture diagram of a code recognition device based on a coupled oscillator model provided in an embodiment of the present invention;
[0031] Figure 8 This is a structural diagram of a code recognition device based on a coupled oscillator model provided in an embodiment of the present invention. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 some embodiments of the present invention, but 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.
[0033] Please refer to Figure 1 This invention provides a code recognition method based on a coupled oscillator model, comprising:
[0034] S1. Obtain the standard pattern group of the corresponding standard image and the defect pattern of the corresponding image to be identified;
[0035] S2. Group the multiple standard patterns in the standard pattern group;
[0036] S3. For each group, determine whether the group includes a standard pattern. If so, output the standard pattern as the one in the group that is closest to the defect pattern. If not, execute S4 for the group.
[0037] S4. Establish a corresponding coupled oscillator model for the group; and determine the strength value of the uncoupled term in the coupled oscillator model based on the number of standard modes in the group and the relationship between the standard modes, and use the coupled oscillator model to output the standard mode in the group that is closest to the defect mode.
[0038] S5. Summarize the standard patterns output from all groups and determine whether the number of standard patterns currently summarized is one. If so, identify the defect pattern as the standard pattern currently summarized; otherwise, take the standard patterns currently summarized as a new standard pattern group and execute S2 for the new standard pattern group.
[0039] In this embodiment of the invention, multiple standard patterns in a standard pattern group are grouped, and for each group, the standard pattern is identified and the standard pattern in that group that is closest to the defective pattern is output. When identifying the standard pattern for each group, a corresponding coupled oscillator model is established. This coupled oscillator model includes coupled and uncoupled terms. Due to the presence of uncoupled terms, and by appropriately selecting the strength of the uncoupled terms, the computational load in the code recognition process is significantly reduced compared to a coupled oscillator model that includes two coupled terms, especially when the dimension is large. Because the computational load of the recognition process is reduced, the code recognition speed can be improved.
[0040] The following describes Figure 1 Before explaining the execution method of each step shown, the coupled oscillator model used for code recognition in the embodiment of the present invention will be described first.
[0041] The existing coupled oscillator model contains two coupling terms. During code recognition, it is necessary to perform a first-order coupling operation on each coupling term. The phase oscillator and the first phase oscillator The phase coupling calculation of each phase oscillator is computationally intensive, thus affecting the code recognition speed. Therefore, this invention provides a new coupled oscillator model, which is as follows:
[0042]
[0043] in, Yes The first derivative, It means the first Each phase oscillator at time... phase value, It means the first Each phase oscillator at time... phase value, This represents the number of oscillators. In this coupled oscillator model, the first term on the right-hand side is the coupling term, and the second term is the non-coupling term. The connection topology of the coupling terms in the coupled oscillator model is given. This represents the strength of the uncoupled term. Since the uncoupled term only contains the first term... A phase oscillator in The phase value at time , excluding the first . A phase oscillator in The phase value at any given time, and no need to perform... The calculation and summation of the second sine function can greatly reduce the amount of computation.
[0044] Assume the binary pattern group is Each pattern has components that take values in the range {1, -1}. Based on this pattern set, the connection topology in the first term on the right-hand side of the coupled oscillator model is designed according to the Hebbian rule using a dimensional vector. That is, take:
[0045] .
[0046] The connection topology selected using the above formula can reflect the mode group. The information, that is, the "storage" of this set of patterns. Therefore, it can be called This is the memory mode group for the coupled oscillator model.
[0047] For standard pattern grouping Therefore, in the coupled oscillator model established for this group, the following should be taken:
[0048] .
[0049] For standard pattern grouping Therefore, in the coupled oscillator model established for this group, the following should be taken:
[0050] .
[0051] It should be noted that, due to the presence of uncoupled terms, the coupled oscillator model does not possess global translation invariance. Each binary mode... Both are related to the following two types of phase-locked equilibrium states of the coupled oscillator model: and ,correspond:
[0052]
[0053] when When, satisfy The equilibrium state is always unstable; similarly, when When, satisfy The equilibrium state is always unstable. Therefore, if the parameters are... If the value is limited to non-negative, then only the standard mode needs to be used. With the first kind of equilibrium state Correspondingly, there is no need to consider the second type of equilibrium state. Similarly, if the parameters... If the value is limited to negative, then only the standard mode needs to be changed. With the second type of equilibrium state Correspondingly, there is no need to consider the first kind of equilibrium state anymore. Let's consider the parameters... The value of is limited to non-negative values, thus it can be directly obtained through the formula. This yields the equilibrium states corresponding to any standard mode in the coupled oscillator model. At this point, the first type of equilibrium state... Stability and nonnegativity parameters The selection is closely related; in general, The larger, The greater the stability, the stronger the stability.
[0054] Specifically, in this embodiment of the invention, the following are selected: And each standard pattern This corresponds to the following equilibrium state in the coupled oscillator model:
[0055]
[0056] in, For standard mode The One portion, For the coupled oscillator model and the standard mode The corresponding equilibrium state of the first The phase of each oscillator.
[0057] Furthermore, in this embodiment of the invention, groups are arranged in a standard pattern. or As a set of memory patterns, given a defect pattern in an image to be identified. It can be done according to the set rules. Based on this defect mode Obtain the initial state of the coupled oscillator model. , initial state The input is fed into the coupled oscillator model corresponding to the standard mode group, and the solution of the corresponding coupled oscillator model is obtained. If for a certain standard pattern in the standard pattern group have Then the standard model The standard pattern that is closest to the defect pattern in this standard pattern group will be output:
[0058]
[0059] Used for identification Compared with standard mode The degree of closeness, if This indicates that the standard mode Closest. Among them, For standard mode The Each component.
[0060] The above completes the coupled oscillator model required in the embodiments of the present invention. Due to the non-coupling terms... Relative to the second-order Fourier coupling term It is simple, thus reducing the hardware and time requirements for model computation, and reducing the dimensionality. This is especially evident when the value is large; furthermore, the model does not possess translation invariance with respect to the phase variable, making it possible to... Establish pattern With phase The correspondence between them simplifies the correspondence between the phase state and mode in the coupled oscillator model.
[0061] The following description Figure 1 The execution method for each step is shown.
[0062] First, for S1, obtain the standard pattern group corresponding to the standard image and the defect pattern corresponding to the image to be identified. The defect pattern can be a binary pattern or a non-binary pattern representing a grayscale image, and its components are intervals. A vector of real numbers on the x-axis, i.e. .
[0063] In this embodiment of the invention, a standard image (corresponding to a standard mode) refers to an image that is not occluded, damaged, or interfered with, and an image to be identified (corresponding to a defect mode) is an image of a standard image that has been occluded, damaged, or interfered with. The standard mode group includes at least two standard modes.
[0064] For example, if the standard pattern set includes the digits 0-9, then the defective pattern is a digit that is obscured or damaged. As another example, if the standard pattern set includes the digits 0-9 and the letters A-Z, then the defective pattern is a digit or letter that is obscured or damaged. Therefore, identifying which standard pattern perturbation caused the defective pattern can enable the recognition of muddy license plates, damaged images, faces, etc.
[0065] Then, S2 and S3 will be explained simultaneously.
[0066] In this embodiment of the invention, for a set of standard patterns and defective patterns, the simplest method is to directly use all standard patterns as a memory pattern group to establish the coupled oscillator model of this embodiment, that is, to omit the grouping process and treat the entire standard pattern group as a single group, referring to the identification process for a single group in this invention. However, considering that this processing method may lead to inaccurate identification, a strategy of grouping and identifying standard pattern groups is adopted. When grouping multiple standard patterns in a standard pattern group, it may specifically include: determining the maximum number of standard patterns included in each group based on the relationship between multiple standard patterns in the standard pattern group, and grouping the multiple standard patterns in the standard pattern group based on the maximum number.
[0067] In this embodiment of the invention, the orthogonality relationship between multiple standard modes in the standard mode group includes the following two types:
[0068] The first type of orthogonality: The orthogonality between multiple standard patterns in a standard pattern group is pairwise orthogonal.
[0069] For a pairwise orthogonal standard pattern group, the simplest method is to directly use the standard pattern group as a memory pattern group to generate the corresponding coupled oscillator model, i.e., omitting the grouping process and treating the entire standard pattern group as a single group, as described in this invention's identification process for a single group. In this case, the equilibrium state corresponding to each memory pattern for any... All are asymptotically stable; this "good" stability is called... - Irrelevant to asymptotic stability. Binary model. - Regardless of asymptotic stability, it can be characterized in two ways. First, it is equivalent to the sum of the squares of the inner products of the binary pattern and each memory pattern equaling the number of phases. The square of; second, equivalent to the binary pattern being linearly represented by a set of memory patterns. When the set of memory patterns contains the number of patterns... At that time, only these memory patterns are -Irrelevant to asymptotic stability (i.e., good stability); however, this property is... This may not be entirely true at that time. In addition to memory patterns, other factors may also exist. - An unrelated binary mode with asymptotic stability cannot be determined by selecting parameters. This makes it difficult to distinguish between memory patterns and these patterns in terms of stability, which could lead to the model failing to accurately identify standard patterns. Therefore, in this embodiment of the invention, when grouping pairs of orthogonal standard pattern groups, the maximum number of standard patterns included in each group is three. For coupled oscillator models corresponding to standard pattern groups containing only two standard patterns, this embodiment of the invention provides formulas for calculating the upper and lower bounds of the critical strength that makes the two standard patterns stable while the remaining binary modes are unstable.
[0070] Specifically, if the orthogonality between multiple standard patterns in the standard pattern group is pairwise orthogonal, then the maximum number of standard patterns included in each group is determined to be three. Preferably:
[0071] If the standard pattern group includes a number of standard patterns If the value is less than or equal to 3, then all standard patterns in the standard pattern group will be grouped into one group.
[0072] If the standard pattern group includes a number of standard patterns If the value is greater than or equal to 4, then:
[0073] If the standard pattern group includes a number of standard patterns If it is a multiple of 3, then it is divided into There are 1 group, and each group includes three standard patterns;
[0074] If the standard pattern group includes a number of standard patterns If the remainder after dividing by 3 is 1, then it is divided into There are 1 group, among which... One group contains three standard patterns, and another group contains one standard pattern;
[0075] If the number of standard patterns M in a standard pattern group leaves a remainder of 2 when divided by 3, then it is divided into... There are 1 group, among which... One group contains three standard patterns, and another group contains two standard patterns.
[0076] The second type of orthogonality: The orthogonality between multiple standard patterns in a standard pattern group is not pairwise orthogonal. Therefore, the maximum number of standard patterns included in each group is determined to be two. Preferably,
[0077] If the standard pattern group includes a number of standard patterns If the value is 2, then the two standard patterns in the standard pattern group will be directly grouped into one group;
[0078] If the standard pattern group includes a number of standard patterns If the value is greater than or equal to 3, then:
[0079] If the number of standard patterns in the standard pattern group If it is even, then we can get There are 1 group, and each group contains 2 standard patterns;
[0080] If the number of standard patterns in the standard pattern group If the number is odd, then there are (M-1) / 2+1 groups, meaning that one of the (M-1) / 2+1 groups contains one standard pattern, and the other groups contain two standard patterns.
[0081] It should be noted that, in addition to determining the grouping method based on orthogonality as described above, pairwise grouping can also be used for identification regardless of whether the orthogonality relationship is pairwise orthogonal. It can be understood that when multiple standard patterns in a standard pattern group are pairwise orthogonal, identifying them as groups of three reduces the number of groups, thus allowing for faster identification results and further reducing computational load compared to pairwise grouping. Direct pairwise grouping simplifies the processing of step S2 or the grouping unit, and grouping by two standard patterns ensures the reliability of the strength selection range of the uncoupled terms.
[0082] Furthermore, regardless of the type of orthogonality mentioned above, and regardless of the quantity... For a group containing one standard mode, the unique standard mode in the group can be output directly without executing S4; for a group containing two or three standard modes, S4 needs to be executed to identify the standard mode in the group that is closest to the defect mode by establishing a coupled oscillator model.
[0083] Then, the following explanation is given for S4 and S5.
[0084] In this embodiment of the invention, when a group includes two or three standard modes, the following steps need to be performed for each group: establishing a corresponding coupled oscillator model for the group, the coupled oscillator model including coupled and uncoupled terms; determining the strength value of the uncoupled terms in the coupled oscillator model based on the number of standard modes in the group and the relationship between the standard modes; and using the coupled oscillator model to output the standard mode in the group that is closest to the defect mode.
[0085] As can be seen, due to the different numbers of standard modes included in the standard mode group and the different relationships between the standard modes, the values of the strengths of the uncoupled terms in the coupled oscillator model are also different. The following application example includes an explanation of step S4.
[0086] For the first type of orthogonality relation, the orthogonality relation between multiple standard patterns in a standard pattern group is pairwise orthogonal, which can be applied to... (Application Example 1) and (Application Example 2) Examples are given respectively.
[0087] Application Example 1:
[0088] Please refer to Figure 2 The standard pattern set contains three mutually orthogonal binary patterns, namely the letters A, F, and U. These standard patterns are denoted as... Let the defect pattern of letter A be denoted as ,Will Each memory mode group establishes a corresponding coupled oscillator model, wherein the connection topology in the coupled oscillator model is as follows: .because yes - Since it is unrelated to asymptotic stability, the strength of the uncoupled term in the coupled oscillator model is a positive number not greater than a set value, which is less than 0.1, to ensure the standard mode. The stability. Meanwhile, by selecting a smaller [value] in the coupled oscillator model... This value ensures that the other binary modes are not unstable. Preferably, this setting value is 0.02, i.e. .
[0089] Furthermore, when using the coupled oscillator model to output the standard mode that most closely matches the defect mode for this group, it is necessary to obtain the initial state of the coupled oscillator model based on the defect mode. Specifically:
[0090] If the defect mode is a binary mode, then the initial state for: ,in Defect mode, It is a small, randomly generated perturbation.
[0091] If the defect pattern is a grayscale image, then the grayscale value vector of the defect pattern grayscale image is linearly transformed into a vector. Its weight is Real numbers in the interval, and the initial state for: .
[0092] The obtained initial state Input the coupled oscillator model, and solve the coupled oscillator model. This determines its final convergence value. Please refer to [reference needed]. Figure 3 , , , Therefore, the output standard mode is used. Therefore, it can be concluded that the standard pattern is ultimately identified for the three standard patterns. The defect pattern corresponds to the letter A, which matches the actual situation.
[0093] Application Example 2:
[0094] Suppose there are pairwise orthogonal standard pattern sets , Defect mode is Therefore, the identification process is as follows:
[0095] Group the standard pattern groups so that each group includes three standard patterns (if...). If it is not divisible by 3, then the last group contains one or two standard patterns. Groups, ( Indicates not less than (the smallest integer). For each group consisting of two or three standard patterns, the defect patterns are processed using the method described in Application Example 1. The system identifies and outputs the standard pattern that is closest to the defect pattern in the group; for groups that include a standard pattern, the standard pattern is output directly.
[0096] Collect the standard patterns from each group's output, and then... Each standard pattern is treated as a new group of standard patterns, and the grouping and identification steps described above are repeated. After multiple operations, only one standard pattern will be obtained in the end. This standard pattern is the one that is closest to the defect pattern among all the standard patterns.
[0097] For the second type of orthogonality relation, the orthogonality relation between multiple standard patterns in a standard pattern group is not pairwise orthogonal. In this case, the maximum number of standard patterns included in each group is two.
[0098] For groups that include a standard pattern, simply output the standard pattern.
[0099] For each group comprising two standard modes, a coupled oscillator model needs to be established for that group to identify and output the standard mode that most closely resembles the defect mode. The strength of the uncoupled term in the coupled oscillator model is then determined to be... ;in,
[0100]
[0101] in, It is the number of corresponding equal components in the two standard modes within this group. It represents the number of unequal corresponding components in the two standard modes within this group. It is the total number of standard mode components.
[0102] Application Example 3:
[0103] Suppose there is a set of standard patterns that are not pairwise orthogonal. , Defect mode is Therefore, the identification process is as follows:
[0104] Group the standard pattern groups so that each group includes two standard patterns (if...). (If the number is odd, and the last group contains only one pattern), the total is... Groups, ( Indicates not less than (The smallest integer). For a group containing one standard pattern, simply output the standard pattern. For each group containing two standard patterns, use this group as a memory pattern group to build corresponding coupled oscillator models. The strength of the uncoupled term in the coupled oscillator model takes the value of The method for determining the initial state is the same as in Application Example 1.
[0105] By group Let's take an example to illustrate. Establish corresponding coupled oscillator models as memory mode groups, and select model parameters as described above. And generate the corresponding initial state based on the defect pattern. ,Will As the initial state input to the coupled oscillator model and solved, if Then output ,like Then output .
[0106] After identifying each group, the standard patterns output by each group are summarized. Then this... Each standard pattern is treated as a new group of standard patterns, and the grouping and identification steps described above are repeated. After multiple operations, only one standard pattern will be obtained in the end. This standard pattern is the one that is closest to the defect pattern among all the standard patterns.
[0107] The recognition method described above in Application Example 3 will be illustrated below with a specific example.
[0108] Please refer to Figure 4 A set of standard patterns , respectively representing the corresponding numbers Defect mode is .
[0109] Step 1: Randomly group the standard pattern into pairs, for example, into the following groups: {1,2}, {3,4}, {5,6}, {7,8}, {9,0}.
[0110] Step 2: Perform defect pattern recognition for each group.
[0111] Let's take the first group {1,2} as an example for a detailed explanation.
[0112] Step 1: With As a memory mode group, a corresponding coupled oscillator model is established, that is, taking , and take , and Relevant. At this time, only... It is an asymptotically stable binary model, while the other binary models are unstable.
[0113] Step 2: Command The initial state is used as input to the coupled oscillator model for solution. Please refer to the identification results. Figure 5 ,untie satisfy , Therefore, the output standard mode is used. That is, the number 1.
[0114] Similar operations are performed on the other groups. For group 2 {3,4}, this defect pattern... The digit 3 will be identified and output; for the third group {5,6}, this defect pattern... The output will be the number 5; for the 4th group {7,8}, this defect pattern... The output will be the number 8; for the 5th group {9,0}, this defect pattern... The output will be the number 0.
[0115] Step 3: Summarize the standard patterns identified in Step 2 to obtain {1,3,5,8,0}, and select it as the new standard pattern group. Repeat the pairwise grouping process from Step 1 (e.g., {1,3},{5,8},{0}) and the grouping identification process from Step 2. Defect Pattern Identify and output the 3 in the first group {1,3} and the 8 in the second group {5,8} respectively. The single pattern {0} in the third group does not need to be identified; simply output the number 0.
[0116] Step 4: Summarize the patterns {3,8,0} output in Step 3 and select them as the new standard pattern group. Repeat the grouping (e.g., taking {3,8}, {0}) and recognition process. In the first group {3,8}, recognize and output pattern 8; in the second group {0}, simply output the pattern directly.
[0117] Step 5: Summarize the numbers {8,0} output in Step 4 as a new standard pattern group for identification, outputting pattern 8. At this point, there is only one standard pattern after summarization, the identification is complete, and it indicates the defective pattern. Pattern 8 was ultimately identified, which matched the actual situation.
[0118] In step five, the solution is retrieved at different time points. and using formulas Will "Decoding" transforms the solution into a corresponding grayscale mode, depicting the evolution of the solution over time. The corresponding grayscale image is as follows: Figure 6 As shown.
[0119] like Figure 7 , Figure 8 As shown, this embodiment of the invention provides a code recognition device based on a coupled oscillator model. The device embodiment can be implemented in software, hardware, or a combination of both. From a hardware perspective, as... Figure 7 The diagram shown is a hardware architecture diagram of an electronic device for a code recognition device based on a coupled oscillator model provided in an embodiment of the present invention. Except for... Figure 7In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing packets. Taking software implementation as an example, such as... Figure 8 As shown, a logical device is formed by the CPU of its host electronic device reading the corresponding computer program from non-volatile memory into memory and running it. This embodiment provides a code recognition device based on the coupled oscillator model provided in the above embodiment, comprising:
[0120] The pattern acquisition unit 801 is used to acquire the standard pattern group of the corresponding standard image and the defect pattern of the corresponding image to be identified;
[0121] Grouping unit 802 is used to group multiple standard patterns in the standard pattern group;
[0122] The determining unit 803 is used to determine whether a standard pattern is included in each group. If so, the standard pattern is directly output as the standard pattern in the group that is closest to the defect pattern. If not, the model building and processing unit is triggered to perform corresponding operations for the group.
[0123] The model building and processing unit 804 is used to build a corresponding coupled oscillator model for the group; and determine the strength value of the uncoupled term in the coupled oscillator model according to the number of standard modes in the group and the relationship between the standard modes, and use the coupled oscillator model to output the standard mode in the group that is closest to the defect mode.
[0124] The summary processing unit 805 is used to summarize the standard patterns output in all groups and determine whether the number of standard patterns currently summarized is one. If so, the defect pattern is identified as the standard pattern currently summarized; otherwise, the standard pattern currently summarized is used as a new standard pattern group to trigger the grouping unit to group, so as to further trigger the determining unit, the model building and processing unit and the summary processing unit to repeatedly perform the corresponding operations.
[0125] In one embodiment of the present invention, the grouping unit is specifically used to: determine the maximum number of standard patterns included in each group based on the orthogonality between multiple standard patterns in the standard pattern group; and group the multiple standard patterns in the standard pattern group based on the maximum number.
[0126] In one embodiment of the present invention, when the grouping unit determines the maximum number of standard patterns included in each group based on the orthogonality between multiple standard patterns in the standard pattern group, the specific steps include: if the orthogonality between multiple standard patterns in the standard pattern group is pairwise orthogonal, then the maximum number of standard patterns included in each group is determined to be three; if the orthogonality between multiple standard patterns in the standard pattern group is not pairwise orthogonal, then the maximum number of standard patterns included in each group is determined to be two.
[0127] In one embodiment of the present invention, the model building and processing unit, when performing the step of determining the value of the strength of the uncoupled term in the coupled oscillator model based on the number of standard modes contained in the group and the relationship between the standard modes, specifically includes:
[0128] If the group contains three standard modes and the orthogonality between the standard modes is pairwise orthogonal, then the strength of the uncoupled term in the coupled oscillator model is determined to be a positive number not greater than a set value, where the set value is less than 0.1.
[0129] If the group contains two standard modes, regardless of whether these two standard modes are orthogonal, then the strength of the uncoupled term in the coupled oscillator model is determined to be... ;in,
[0130]
[0131] in, It is the number of corresponding equal components in the two standard modes within this group. It represents the number of unequal corresponding components in the two standard modes within this group. It is the total number of standard mode components.
[0132] In one embodiment of the present invention, each standard mode The following equilibrium state corresponds to the coupled oscillator model:
[0133]
[0134] in, For standard mode The One portion, For the coupled oscillator model and the standard mode The corresponding equilibrium state of the first The phase of an oscillator;
[0135] When the model building and processing unit uses the coupled oscillator model to output the standard mode that is closest to the defect mode for this group, it specifically includes:
[0136] The initial state of the coupled oscillator model is obtained based on the defect mode, and the solution of the coupled oscillator model is obtained using this initial state. , if hour, Then the standard model The standard pattern that is closest to the defect pattern in this group is output; wherein, the for
[0137]
[0138] in, For pattern The Each component.
[0139] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on a code recognition device based on a coupled oscillator model. In other embodiments of the present invention, a code recognition device based on a coupled oscillator model may include more or fewer components than illustrated, or combine some components, or split some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0140] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.
[0141] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements a code recognition method based on a coupled oscillator model according to any embodiment of this invention.
[0142] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program causes the processor to perform a code recognition method based on a coupled oscillator model according to any embodiment of this invention.
[0143] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0144] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0145] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0146] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0147] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion module connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion module execute some and all of the actual operations, thereby realizing the function of any of the above embodiments.
[0148] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0149] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0150] 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A code recognition method based on a coupled oscillator model, characterized by, The coupling oscillator model comprises a coupling term and a non-coupling term; the coupling oscillator model is: wherein, is a first derivative of , is a phase value of the th phase oscillator at time , is a phase value of the th phase oscillator at time , is the number of oscillators, is the connection topology of the coupled oscillator model, is the strength of the uncoupled term; The method comprises: S1, obtaining a standard mode group corresponding to a standard image and a defect mode corresponding to a to-be-identified image; S2, grouping a plurality of standard modes in the standard mode group; S3, for each group, determining whether a standard mode is included in the group, if yes, directly outputting the standard mode as a standard mode in the group that is closest to the defect mode; if not, performing S4 for the group; S4, establishing a corresponding coupling oscillator model for the group; and determining a value of a strength of a non-coupling term in the coupling oscillator model according to a number of standard modes in the group and a relationship between the standard modes, and outputting a standard mode in the group that is closest to the defect mode by using the coupling oscillator model; S5, aggregating the standard modes output in all groups, and determining whether a number of the current aggregated standard modes is one, if yes, identifying the defect mode as the current aggregated standard mode; otherwise, taking the current aggregated standard mode as a new standard mode group, and performing S2 for the new standard mode group.
2. The method of claim 1, wherein, The grouping of the plurality of standard modes in the standard mode group comprises: determining a maximum number of standard modes included in each group based on an orthogonal relationship between the plurality of standard modes in the standard mode group; grouping the plurality of standard modes in the standard mode group based on the maximum number.
3. The method of claim 2, wherein, The determining of the maximum number of standard modes included in each group based on the orthogonal relationship between the plurality of standard modes in the standard mode group comprises: if the orthogonal relationship between the plurality of standard modes in the standard mode group is pairwise orthogonal, determining that the maximum number of standard modes included in each group is three; if the orthogonal relationship between the plurality of standard modes in the standard mode group is not pairwise orthogonal, determining that the maximum number of standard modes included in each group is two.
4. The method of claim 1, wherein, The determining of the value of the strength of the non-coupling term in the coupling oscillator model according to the number of standard modes in the group and the relationship between the standard modes comprises: if the group contains three standard modes, and the relationship between the standard modes in the group is pairwise orthogonal, determining that the value of the strength of the non-coupling term in the coupling oscillator model is a positive number not greater than a set value, and the set value is less than 0.
1. If the group contains two standard patterns, the value of the strength of the non-coupling term in the coupled oscillator model is determined as ; wherein, wherein, is the number of corresponding equal components among the components of the two standard patterns in the group, is the number of corresponding unequal components among the components of the two standard patterns in the group, is the total number of standard pattern components.
5. The method of claim 1 or claim 4, wherein: Each standard mode corresponds to the following equilibrium state of the coupled oscillator model: wherein is the standard mode of the first component, is the phase of the first oscillator of the equilibrium state of the coupled oscillator model corresponding to the standard mode . The outputting of the standard mode in the group that is closest to the defect mode by using the coupling oscillator model comprises: Based on the defect pattern, an initial state of a coupled oscillator model is obtained, and the coupled oscillator model corresponding to the group is solved by using the initial state , and the output standard pattern is determined according to the following formula: if when , , the standard pattern closest to the defect pattern in the group is output as the output standard pattern; wherein the is wherein is the mode of the first component.
6. A code recognition apparatus based on a coupled oscillator model, characterized by A device for performing the method of any one of claims 1-5, comprising: a mode obtaining unit configured to obtain a standard mode group corresponding to a standard image and a defect mode corresponding to a to-be-identified image; a grouping unit configured to group a plurality of standard modes in the standard mode group; The determining unit is configured to determine, for each group, whether a standard pattern is included in the group, and if yes, directly output the standard pattern as the standard pattern closest to the defect pattern in the group, and if not, trigger the model establishing and processing unit to perform corresponding operations for the group; The model establishing and processing unit is configured to establish a corresponding coupled oscillator model for the group, and determine the value of the strength of a non-coupling term in the coupled oscillator model according to the number of standard patterns in the group and the relationship between the standard patterns, and output the standard pattern closest to the defect pattern in the group by using the coupled oscillator model; The summary processing unit is configured to summarize the output standard patterns in all groups, and determine whether the number of the currently summarized standard patterns is one, and if yes, identify the defect pattern as the currently summarized standard pattern, and if not, take the currently summarized standard pattern as a new standard pattern group to trigger the grouping unit to group, so as to further trigger the determining unit, the model establishing and processing unit and the summary processing unit to repeatedly perform corresponding operations.
7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of any one of claims 1-5.
8. A computer readable storage medium, having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-5.
Citation Information
Patent Citations
Data processing packet modeling method for decoupling mode of lightweight design of car body
CN103034754A
Pipeline defect identification method and device, electronic equipment and storage medium
CN115511821A