C #-based instruction type Word batch editing method

Through the C#-based instructional Word batch editing method, combined with the Hidden Markov model and particle swarm optimization algorithm, the problems of destruction and load pressure of Zhongyuan file batch editing of Word files are solved, and efficient and flexible editing solutions are achieved, reducing learning and implementation costs.

CN119088359APending Publication Date: 2024-12-06SHENZHEN HAIGUI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411105942.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the batch editing of Word files, the original file is destroyed based on the template regeneration method, which increases the load pressure of the device and makes it difficult to handle the rapid editing of template variables.

Method used

Adopting C#-based instructional Word batch editing method, the add-in program Worder and intermediate service Worder API are executed through instructions, combined with the language recognition and particle swarm optimization algorithm of the Hidden Markov model, realize asynchronous execution and intelligent recognition, and provide a visual console and SDK Services, reduce learning costs and achieve complexity.

Benefits of technology

It realizes the efficiency of instructive Word content editing, reduces learning and implementation costs, improves editing efficiency, reduces the load on reconstruction and destruction of the original file, and provides a flexible visual confirmation solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088359A_ABST
    Figure CN119088359A_ABST
Patent Text Reader

Abstract

The invention discloses a C #-based instruction type Word batch editing method, which belongs to the technical field of Word file editing, and comprises the following steps of: S1, starting an instruction execution external program Worder when a Word program runs, receiving an instruction in real time, translating the instruction into a program command which can be directly executed by the Word program, and calling back a reported result after asynchronously finishing execution; and S2, an intermediate service WorderAPI and a Windows background automatically run a service program, provide a console instruction panel program and various program language docking SDK service, provide a real-time interaction service, manage multiple actuators, gather execution results, and open a local API to be docked with a user and other programs. According to the method, instruction type Word content editing is adopted, the learning and implementation cost is reduced, an instruction execution external program executes an instruction in real time, the efficiency is improved, an intermediate service provides a visual confirmation scheme which has more use and implementation possibilities, is more flexible and can be better accepted by a user, and meanwhile, the number of solutions for destroying existing files and reconstructing loads is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Word file editing, and in particular relates to a C#-based command-type Word batch editing method. Background Art

[0002] With the development of technology, all walks of life have more and more demands for editing Word files, which are no longer limited to editing a single file. As file templates gradually solidify and Word formats become similar, batch processing needs have become a demand in many business scenarios. For batch processing, there are roughly the following technical solutions: bat batch processing programs can batch edit file names and file systems; Word batch processing programs developed through POI dependencies, Python libraries or other third-party dependencies; batch processing through Word embedded automation scripts; batch generation based on templates instead of batch editing.

[0003] Bat batch processing program: too limited to conveniently batch edit Word content;

[0004] Relying on third-party batch processing programs: The user cost is high, and it is necessary to learn the development language and the usage method of third-party reliance. Applications must be designed and developed according to business conditions, and batch processing can only be achieved through triggering functions. Problems are difficult to discover and solve;

[0005] Batch processing by embedding automated scripts in Word: This is difficult for ordinary users to implement, as they cannot simply control the batch situation and cannot intuitively confirm the batch editing effect;

[0006] Batch regenerating Word files based on templates to overwrite the original files is a commonly used method to replace editing. The disadvantage is that regeneration destroys the original files, and re-creating and writing files adds more load pressure to the device, making it difficult to handle fast editing of template variables.

[0007] Based on this, the present invention designs a C#-based command-based Word batch editing method to solve the above problems. Summary of the invention

[0008] The purpose of the present invention is to solve the problem of regenerating Word files in batches based on templates and overwriting original files. It is a currently commonly used method for replacing editing. The disadvantage is that the original files are destroyed during regeneration and re-creation. Writing files adds more load pressure to the device, and it is difficult to handle the problem of fast editing of template variables. A C#-based imperative Word batch editing method is proposed.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] A C#-based command-based Word batch editing method, comprising:

[0011] S1: Worder, an instruction execution add-in, is started when the Word program is running, and is used to receive instructions in real time, translate them into program commands that can be directly executed by the Word program, and report the results through callback after asynchronous execution;

[0012] S2: Intermediate service WorderAPI, Windows background automatically runs service programs, provides console command panel programs and various programming languages ​​to connect SDK services, provides real-time interactive services, manages multiple executors, aggregates execution results, and opens local APIs to connect users and other programs;

[0013] S3: User-level access application, directly introduces the corresponding development language SDK, triggers interface calls through the SDK, and transmits interface specification instructions and parameters.

[0014] As a further description of the above technical solution:

[0015] The user-level access application builds a simple visualization window locally, accesses the local open API, triggers instructions and passes parameters, and visualizes the results.

[0016] As a further description of the above technical solution:

[0017] The user-level access application does not rely on other applications. It can directly and quickly learn the console command panel provided by the intermediate service. According to the prompt of the command panel, enter 1, 2 and 3 or a, b and c to quickly trigger the command, and then enter the command parameters according to the command parameter prompt. It also supports chained command arrangement. Multiple commands and parameters are arranged by command 0 to start simple multi-command arrangement, and then select the command input parameters one by one and press Enter. Multiple command operations are submitted by entering # and pressing Enter.

[0018] As a further description of the above technical solution:

[0019] The development language SDK is based on language recognition of hidden Markov models:

[0020] During speech recognition training, the speech signal is first preprocessed and feature processed to obtain the characteristic parameters of the language, and an acoustic model is created to identify the basic unit;

[0021] During the basic unit recognition process, the input language signal is compared and verified according to certain standards and measures, and finally the recognition result is obtained.

[0022] As a further description of the above technical solution:

[0023] In the language recognition process, the hidden Markov model is a probability model, and the hidden Markov chain is used to simulate the double random process, and the statistical characteristics of the language signal will change.

[0024] As a further description of the above technical solution:

[0025] In the language recognition process, a language library is first constructed according to recognition requirements, and then hidden Markov models are respectively established for all words in the language library. The data in the hidden Markov model is modified through continuous training to obtain the best hidden Markov model.

[0026] As a further description of the above technical solution:

[0027] The training algorithm of the hidden Markov model is based on the steepest gradient descent local optimization algorithm Baum-Welch. The training sequence Q and model γ are set. At time t, the hidden Markov model chain is in state p t When w i , at time t+1, state p t+1 When w j :

[0028] ξ t (i, j) = M(Q, p t =w i , p t+1 =w j |γ)

[0029] The forward and backward variables are inferred as:

[0030] ξ t (i, j) = [s t (i)s ij c j (Q t+1 )μ t+1 (j)] / M(Q|γ)

[0031] As a further description of the above technical solution:

[0032] The hidden Markov model chain at time t is w i Status Probability:

[0033]

[0034] The revaluation formula for the three parameters is:

[0035]

[0036] In the formula, s t (i) The forward probability when the state is i at time t, μ t+1(j) is the backward probability when the state is j at time t+1. Given the model γ, the probability of observing the sequence Q is M(Q|γ), and the element of the state transition probability matrix A is s ij , the element of the observation probability matrix B is c j (Q t+1 ), state w i The expected number of transfers is w i The state is transferred to w j The expected number of states is

[0037] As a further description of the above technical solution:

[0038] The particle swarm optimization hidden Markov model algorithm is adopted:

[0039] Given the initialization conditions, determine the maximum speed, learning factors α1 and α2, particle swarm size β, inertia weight θ and the maximum number of iterations, and also determine the number of states, number of observations and observation sequence of the hidden Markov model;

[0040] Normalize the π, A and B matrices, and further update the velocity and displacement;

[0041] Update the inertia weight value, further update the individual and global optimal values, and obtain the fitness function through calculation;

[0042] Depending on whether a perturbation operator is added, if the termination condition is met, the fitness value and the optimal solution are output, otherwise the perturbation operator is added.

[0043] As a further description of the above technical solution:

[0044] The steps of intelligently identifying instruction and parameter errors using the hidden Markov model include:

[0045] First, extract error information from the command and parameter signals as feature extraction;

[0046] The characteristic parameters are optimized and used for training the hidden Markov model to obtain the HMM training models under different states, which are used as the test data for the input HMM model.

[0047] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0048] 1. In the present invention, the imperative Word content editing reduces the learning and implementation costs, the instruction execution add-in executes instructions in real time to improve efficiency, the intermediate service provides more usage and implementation possibilities, and is more flexible and better accepted by users. Visual confirmation solutions also reduce the destruction and reconstruction load of existing files.

[0049] 2. In the present invention, the Windows operating system is connected to the SDK communication secondary development interface to build a language recognition platform, and then the speech recognition technology is used to extract language instructions, and the language control system is further designed according to the Word program. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flowchart of a C#-based command-based Word batch editing method proposed by the present invention;

[0051] Figure 2 This is a basic architecture diagram of a C#-based command-based Word batch editing method proposed by the present invention;

[0052] Figure 3 A schematic diagram of the language recognition process in a C#-based command-based Word batch editing method proposed by the present invention;

[0053] Figure 4 A schematic diagram of the HMM algorithm flow based on particle swarm optimization in a C#-based imperative Word batch editing method proposed by the present invention;

[0054] Figure 5 The present invention provides a schematic diagram of the HMM fault diagnosis process in a C#-based imperative Word batch editing method. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Embodiment 1

[0057] A C#-based command-based Word batch editing method, comprising:

[0058] S1: Worder, an instruction execution add-in, is started when the Word program is running, and is used to receive instructions in real time, translate them into program commands that can be directly executed by the Word program, and report the results through callback after asynchronous execution;

[0059] S2: Intermediate service WorderAPI, Windows background automatically runs service programs, provides console command panel programs and various programming languages ​​to connect SDK services, provides real-time interactive services, manages multiple executors, aggregates execution results, and opens local APIs to connect users and other programs;

[0060] S3: User-level access application, directly introduces the corresponding development language SDK, triggers interface calls through the SDK, and transmits interface specification instructions and parameters.

[0061] Specifically, the development language SDK is based on language recognition of the Hidden Markov Model:

[0062] During speech recognition training, the speech signal is first preprocessed and feature processed to obtain the characteristic parameters of the language, and an acoustic model is created to identify the basic unit;

[0063] During the basic unit recognition process, the input language signal is compared and verified according to certain standards and measures, and finally the recognition result is obtained.

[0064] Specifically, in the language recognition process, the hidden Markov model is a probabilistic model, and the hidden Markov chain is used to simulate the double random process, and the statistical characteristics of the language signal will change.

[0065] Specifically, in the language recognition process, a language library is first constructed according to recognition requirements, and then hidden Markov models are respectively established for all words in the language library. The data in the hidden Markov model is modified through continuous training to obtain the best hidden Markov model.

[0066] Specifically, the training algorithm of the hidden Markov model is based on the steepest gradient descent local optimization algorithm Baum-Welch, setting the training sequence Q and model γ, and the hidden Markov model chain is w in state pt at time t i , at time t+1, state p t+1 When w j :

[0067] ξ t (i, j) = M(Q, p t =w i , p t+1 =w j |γ)

[0068] The forward and backward variables are inferred as:

[0069] ξ t (i, j) = [s t (i)s ij c j (Q t+1 )μ t+1 (j)] / M(Q|γ)

[0070] Specifically, the hidden Markov model chain at time t is w i Status Probability:

[0071]

[0072] The revaluation formula for the three parameters is:

[0073]

[0074] In the formula, s t (i) The forward probability when the state is i at time t, μ t+1 (j) is the backward probability when the state is j at time t+1. Given the model γ, the probability of observing the sequence Q is M(Q|γ), and the element of the state transition probability matrix A is s ij , the element of the observation probability matrix B is c j (Q t+1 ), state w i The expected number of transfers is w i The state is transferred to w j The expected number of states is

[0075] Specifically, the particle swarm optimization hidden Markov model algorithm is used:

[0076] Given the initialization conditions, determine the maximum speed, learning factors α1 and α2, particle swarm size β, inertia weight θ and the maximum number of iterations, and also determine the number of states, number of observations and observation sequence of the hidden Markov model;

[0077] Normalize the π, A and B matrices, and further update the velocity and displacement;

[0078] Update the inertia weight value, further update the individual and global optimal values, and obtain the fitness function through calculation;

[0079] Depending on whether a perturbation operator is added, if the termination condition is met, the fitness value and the optimal solution are output, otherwise the perturbation operator is added.

[0080] Specifically, the steps of intelligently identifying instruction and parameter errors using the hidden Markov model include:

[0081] First, extract error information from the command and parameter signals as feature extraction;

[0082] The characteristic parameters are optimized and used for training the hidden Markov model to obtain the HMM training models under different states, which are used as the test data for the input HMM model.

[0083] Embodiment 2

[0084] A C#-based command-based Word batch editing method, comprising:

[0085] S1: Worder, an instruction execution add-in, is started when the Word program is running, and is used to receive instructions in real time, translate them into program commands that can be directly executed by the Word program, and report the results through callback after asynchronous execution;

[0086] S2: Intermediate service WorderAPI, Windows background automatically runs service programs, provides console command panel programs and various programming languages ​​to connect SDK services, provides real-time interactive services, manages multiple executors, aggregates execution results, and opens local APIs to connect users and other programs;

[0087] S3: User-level access application, through the local construction of a simple visualization window, access to the local open API, trigger instructions and pass parameters, visual display results.

[0088] Specifically, the development language SDK is based on language recognition of the Hidden Markov Model:

[0089] During speech recognition training, the speech signal is first preprocessed and feature processed to obtain the characteristic parameters of the language, and an acoustic model is created to identify the basic unit;

[0090] During the basic unit recognition process, the input language signal is compared and verified according to certain standards and measures, and finally the recognition result is obtained.

[0091] Specifically, in the language recognition process, the hidden Markov model is a probabilistic model, and the hidden Markov chain is used to simulate the double random process, and the statistical characteristics of the language signal will change.

[0092] Specifically, in the language recognition process, a language library is first constructed according to recognition requirements, and then hidden Markov models are respectively established for all words in the language library. The data in the hidden Markov model is modified through continuous training to obtain the best hidden Markov model.

[0093] Specifically, the training algorithm of the hidden Markov model is based on the steepest gradient descent local optimization algorithm Baum-Welch, setting the training sequence Q and model γ, and the hidden Markov model chain is w in state pt at time t i , at time t+1, state p t+1 When w j :

[0094] ξ t (i, j) = M(Q, p t =w i , p t+1 =w j |γ)

[0095] The forward and backward variables are inferred as:

[0096] ξ t (i, j) = [s t (i)s ij c j (Q t+1 )μ t+1 (j)] / M(Q|γ)

[0097] Specifically, the hidden Markov model chain at time t is w i Status Probability:

[0098]

[0099] The revaluation formula for the three parameters is:

[0100]

[0101] In the formula, s t (i) The forward probability when the state is i at time t, μ t+1 (j) is the backward probability when the state is j at time t+1. Given the model γ, the probability of observing the sequence Q is M(Q|γ), and the element of the state transition probability matrix A is s ij , the element of the observation probability matrix B is c j (Q t+1 ), state w i The expected number of transfers is w i The state is transferred to w j The expected number of states is

[0102] Specifically, the particle swarm optimization hidden Markov model algorithm is used:

[0103] Given the initialization conditions, determine the maximum speed, learning factors α1 and α2, particle swarm size β, inertia weight θ and the maximum number of iterations, and also determine the number of states, number of observations and observation sequence of the hidden Markov model;

[0104] Normalize the π, A and B matrices, and further update the velocity and displacement;

[0105] Update the inertia weight value, further update the individual and global optimal values, and obtain the fitness function through calculation;

[0106] Depending on whether a perturbation operator is added, if the termination condition is met, the fitness value and the optimal solution are output, otherwise the perturbation operator is added.

[0107] Specifically, the steps of intelligently identifying instruction and parameter errors using the hidden Markov model include:

[0108] First, extract error information from the command and parameter signals as feature extraction;

[0109] The characteristic parameters are optimized and used for training the hidden Markov model to obtain the HMM training models under different states, which are used as the test data for the input HMM model.

[0110] Embodiment 3

[0111] A C#-based command-based Word batch editing method, comprising:

[0112] S1: Worder, an instruction execution add-in, is started when the Word program is running, and is used to receive instructions in real time, translate them into program commands that can be directly executed by the Word program, and report the results through callback after asynchronous execution;

[0113] S2: Intermediate service WorderAPI, Windows background automatically runs service programs, provides console command panel programs and various programming languages ​​to connect SDK services, provides real-time interactive services, manages multiple executors, aggregates execution results, and opens local APIs to connect users and other programs;

[0114] S3: The user-level access application does not rely on other applications. It can directly and quickly learn the console command panel provided by the intermediate service. According to the prompt of the command panel, enter 1, 2 and 3 or a, b and c to quickly trigger the command, and then enter the command parameters according to the command parameter prompt. It also supports chained command arrangement. Multiple commands and parameters are arranged by command 0 to start simple multi-command arrangement, and then select the command input parameters one by one and press Enter. Multiple command operations are submitted by entering # and pressing Enter.

[0115] Specifically, the development language SDK is based on language recognition of the Hidden Markov Model:

[0116] During speech recognition training, the speech signal is first preprocessed and feature processed to obtain the characteristic parameters of the language, and an acoustic model is created to identify the basic unit;

[0117] During the basic unit recognition process, the input language signal is compared and verified according to certain standards and measures, and finally the recognition result is obtained.

[0118] Specifically, in the language recognition process, the hidden Markov model is a probabilistic model, and the hidden Markov chain is used to simulate the double random process, and the statistical characteristics of the language signal will change.

[0119] Specifically, in the language recognition process, a language library is first constructed according to recognition requirements, and then hidden Markov models are respectively established for all words in the language library. The data in the hidden Markov model is modified through continuous training to obtain the best hidden Markov model.

[0120] Specifically, the training algorithm of the hidden Markov model is based on the steepest gradient descent local optimization algorithm Baum-Welch, setting the training sequence Q and model γ, and the hidden Markov model chain is w in state pt at time t i , at time t+1, state p t+1 When w j :

[0121] ξ t (i, j) = M(Q, p t =w i , p t+1 =w j |γ)

[0122] The forward and backward variables are inferred as:

[0123] ξ t (i, j) = [s t (i)s ij c j (Q t+1 )μ t+1 (j)] / M(Q|γ)

[0124] Specifically, the hidden Markov model chain at time t is w i Status Probability:

[0125]

[0126] The revaluation formula for the three parameters is:

[0127]

[0128] In the formula, s t (i) The forward probability when the state is i at time t, μ t+1 (j) is the backward probability when the state is j at time t+1. Given the model γ, the probability of observing the sequence Q is M(Q|γ), and the element of the state transition probability matrix A is s ij , the element of the observation probability matrix B is c j (Q t+1 ), state w i The expected number of transfers is w i The state is transferred to w j The expected number of states is

[0129] Specifically, the particle swarm optimization hidden Markov model algorithm is used:

[0130] Given the initialization conditions, determine the maximum speed, learning factors α1 and α2, particle swarm size β, inertia weight θ and the maximum number of iterations, and also determine the number of states, number of observations and observation sequence of the hidden Markov model;

[0131] Normalize the π, A and B matrices, and further update the velocity and displacement;

[0132] Update the inertia weight value, further update the individual and global optimal values, and obtain the fitness function through calculation;

[0133] Depending on whether a perturbation operator is added, if the termination condition is met, the fitness value and the optimal solution are output, otherwise the perturbation operator is added.

[0134] Specifically, the steps of intelligently identifying instruction and parameter errors using the hidden Markov model include:

[0135] First, extract error information from the command and parameter signals as feature extraction;

[0136] The characteristic parameters are optimized and used for training the hidden Markov model to obtain the HMM training models under different states, which are used as the test data for the input HMM model.

[0137] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A C#-based command-based Word batch editing method, characterized in that: include: S1: Worder, an instruction execution add-in, is started when the Word program is running, and is used to receive instructions in real time, translate them into program commands that can be directly executed by the Word program, and report the results through callback after asynchronous execution; S2: Intermediate service WorderAPI, Windows background automatically runs service programs, provides console command panel programs and various programming languages ​​to connect SDK services, provides real-time interactive services, manages multiple executors, aggregates execution results, and opens local APIs to connect users and other programs; S3: User-level access application, directly introduces the corresponding development language SDK, triggers interface calls through the SDK, and transmits interface specification instructions and parameters.

2. A C#-based command-based Word batch editing method according to claim 1, characterized in that: The user-level access application builds a simple visualization window locally, accesses the local open API, triggers instructions and passes parameters, and visualizes the results.

3. A C#-based command-based Word batch editing method according to claim 1, characterized in that: The user-level access application does not rely on other applications. It can directly and quickly learn the console command panel provided by the intermediate service. According to the prompt of the command panel, enter 1, 2 and 3 or a, b and c to quickly trigger the command, and then enter the command parameters according to the command parameter prompt. It also supports chained command arrangement. Multiple commands and parameters are arranged by command 0 to start simple multi-command arrangement, and then select the command input parameters one by one and press Enter. Multiple command operations are submitted by entering # and pressing Enter.

4. A C#-based command-based Word batch editing method according to claim 1, characterized in that: The development language SDK is based on language recognition of hidden Markov models: During speech recognition training, the speech signal is first preprocessed and feature processed to obtain the characteristic parameters of the language, and an acoustic model is created to identify the basic unit; During the basic unit recognition process, the input language signal is compared and verified according to certain standards and measures, and finally the recognition result is obtained.

5. A C#-based command-based Word batch editing method according to claim 4, characterized in that: In the language recognition process, the hidden Markov model is a probability model, and the hidden Markov chain is used to simulate the double random process, and the statistical characteristics of the language signal will change.

6. A C#-based command-based Word batch editing method according to claim 5, characterized in that: In the language recognition process, a language library is first constructed according to recognition requirements, and then hidden Markov models are respectively established for all words in the language library. The data in the hidden Markov model is modified through continuous training to obtain the best hidden Markov model.

7. A C#-based command-based Word batch editing method according to claim 6, characterized in that: The training algorithm of the hidden Markov model is based on the steepest gradient descent local optimization algorithm Baum-Welch. The training sequence q and the model γ are set. At time t, the hidden Markov model chain is in state p t When w i , at time t+1, state p t+1 When w j : ξ t (i,j)=M(Q,p t =w i ,p t+1 =w j |γ) The forward and backward variables are inferred: x t (i, j)=[s t (i)s ij c j (Q t+1 )m t+1 (j)] / M(Q|γ) 8. A C#-based command-based Word batch editing method according to claim 7, characterized in that: The hidden Markov model chain at time t is w i Status Probability: The revaluation formula for the three parameters is: In the formula, s t (i) The forward probability when the state is i at time t, μ t+1 (j) is the backward probability when the state is j at time t+1. Given the model γ, the probability of observing the sequence Q is M(Q|γ), and the element of the state transition probability matrix A is s ij , the element of the observation probability matrix B is c j (Q t+1 ), state W i The expected number of transfers is w i The state is transferred to w j The expected number of states is 9. A C#-based command-based Word batch editing method according to claim 8, characterized in that: The particle swarm optimization hidden Markov model algorithm is adopted: Given the initialization conditions, determine the maximum speed, learning factors α1 and α2, particle swarm size β, inertia weight θ and the maximum number of iterations, and also determine the number of states, number of observations and observation sequence of the hidden Markov model; Normalize the π, A and B matrices, and further update the velocity and displacement; Update the inertia weight value, further update the individual and global optimal values, and obtain the fitness function through calculation; Depending on whether a perturbation operator is added, if the termination condition is met, the fitness value and the optimal solution are output, otherwise the perturbation operator is added.

10. A C#-based command-based Word batch editing method according to claim 9, characterized in that: The steps of intelligently identifying instruction and parameter errors using the hidden Markov model include: First, extract error information from the command and parameter signals as feature extraction; The characteristic parameters are optimized and used for training the hidden Markov model to obtain the HMM training models under different states, which are used as the test data for the input HMM model.