Segmentation method and device for input data of input box, electronic equipment and medium

By acquiring user behavior features from the input box and dynamically adjusting the weight values ​​using a neural network model, the problem of low input box segmentation accuracy was solved, achieving higher data segmentation accuracy and user experience.

CN121187484APending Publication Date: 2025-12-23WUHAN BIG PULP IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511184328.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing input box segmentation methods have low accuracy, especially when users input content of different lengths or paste content, which is prone to errors. Furthermore, the cursor position jumps abnormally when modifying input content, affecting the user experience.

Method used

By acquiring user behavior characteristics from the input box, such as keystroke interval and input source type, these characteristics are converted into feature vectors and input into a trained neural network model to obtain weight values ​​for template matching and behavior analysis. Data is then segmented using regular expressions, and the weight ratios are dynamically adjusted to balance format standardization and flexibility.

Benefits of technology

It improves the accuracy of data segmentation in the input box, balances the need for format standardization and input flexibility, reduces abnormal cursor position jumps, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121187484A_ABST
    Figure CN121187484A_ABST
Patent Text Reader

Abstract

The invention relates to a segmentation method and device for input data of an input box, electronic equipment and a medium, and belongs to the technical field of the Internet, the method comprises the steps that behavior characteristics input by a user in a target input box are acquired, and the behavior characteristics comprise a keystroke time interval and an input source type; converting the behavior features into feature vectors; the feature vector is put into a preset neural network model which is completely trained, a first weight value and a second weight value are obtained, the first weight value is used for representing a weight value matched with a template, and the second weight value is used for representing a weight value of behavior analysis; and segmenting the input data of the target input box based on the first weight value and the second weight value. According to the invention, the input data segmentation accuracy of the input box is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and medium for segmenting input data in an input box. Background Technology

[0002] As an important interface for human-computer interaction, the content segmentation and formatting technology of input boxes directly affects user experience and data accuracy.

[0003] Existing technologies rely on template matching, such as uniformly formatting phone numbers as "138-XXXX-XXXX". While simple to implement, this method has significant limitations. Formatting often fails when users need to input content of varying lengths (e.g., switching between 15-digit and 18-digit ID numbers) or paste content from other applications. Even more frustratingly, deleting separators when modifying already entered content causes the cursor to jump abnormally, severely disrupting the user's typing rhythm.

[0004] With technological advancements, dynamic segmentation schemes based on behavioral analysis have emerged. These methods attempt to more intelligently determine when to insert separators by analyzing user behavior characteristics such as keystroke intervals. For example, when rapid, continuous typing is detected, separators are automatically added at appropriate positions. However, in practical applications, this method often incorrectly segments deliberately continuous user input (such as SMS verification codes), causing new user inconveniences.

[0005] In summary, the existing technology lacks a method for segmenting input data in input boxes to improve the accuracy of input box segmentation. Summary of the Invention

[0006] In view of this, it is necessary to provide a method for segmenting input data in an input box to solve the problem of low accuracy in input box segmentation in the prior art.

[0007] To address the aforementioned problems, in a first aspect, the present invention provides a method for segmenting input data in an input box, comprising: Obtain the behavioral characteristics of user input in the target input box, including keystroke interval and input source type; The behavioral characteristics are transformed into feature vectors; The feature vector is input into a pre-trained neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a pre-defined regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the data input process based on keystroke time. The input data in the target input box is segmented based on the first weight value and the second weight value.

[0008] In one possible implementation, the input source types include: keyboard input and paste operation.

[0009] In one possible implementation, segmenting the input data of the target input box based on a first weight value and a second weight value includes: When the input data is a phone number, if the first weight value is greater than the first preset value, the phone number string is split into three characters, one separator, four characters, one separator, and four characters based on the first regular expression; if the second weight value is greater than the second preset value, the phone number string is split into three characters, one space, four characters, one space, and four characters based on the second regular expression. When the input data is an ID card number, if the first weight value is greater than the third preset value, the string of the ID card number is split into six characters, one space, eight characters, one space, and four characters based on the third regular expression. If the first weight value is not greater than the third preset value, the string of the ID card number is split into six characters, one space, and four spaces based on the fourth regular expression. "character, one space character, four " The character, a space character, and four characters.

[0010] In one possible implementation, the preset neural network model includes one or more of the following: LSTM neural network, RNN neural network, and DNN neural network.

[0011] In one possible implementation, the WebAssembly technology is integrated into Vue components based on Vue's Composition API, resulting in an integrated Vue. Manage memory objects based on the integrated Vue.

[0012] In one possible implementation, when the last keystroke time of the target input box is detected to be greater than zero, the first and second weight values ​​are updated based on Vue's watchEffect function.

[0013] In one possible implementation, the Kalman filter is initialized in the mounted hook of the Vue custom directive; Listen for keyboard press events in the target input box, and record the current cursor position when a delete operation is detected; Listen for input events in the target input box and use a Kalman filter to predict the target cursor position based on the current cursor position.

[0014] Secondly, the present invention also provides a segmentation device for input data in an input box, comprising: The input data acquisition module is used to acquire the behavioral characteristics of user input in the target input box, including keystroke time interval and input source type; A feature vector acquisition module is used to convert the behavioral features into feature vectors; The weight acquisition module is used to input the feature vector into a fully trained preset neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a preset regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the data input process based on keystroke time. The data segmentation module is used to segment the input data of the target input box based on the first weight value and the second weight value.

[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the segmentation method for input data in an input box as described in any of the above implementations.

[0016] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the segmentation method for input data in an input box as described in any of the above implementations.

[0017] The beneficial effects of this invention are as follows: This invention provides a method for segmenting input data in an input box. It obtains the behavioral features of user input in the target input box, including keystroke time intervals and input source type. These behavioral features are converted into feature vectors, which are then fed into a pre-trained neural network model. The model is trained using historical data from the user input box to obtain a first weight value and a second weight value. The first weight value represents the weight for template matching, and the second weight value represents the weight for behavioral analysis. Template matching is used to match the input data in the input box according to a pre-defined regular expression, or according to a fixed template. Behavioral analysis refers to the behavior of automatically inserting separators during the input process based on keystroke time. The target input box input data is segmented based on the first and second weight values, balancing the requirements for input data format standardization and input flexibility. This invention obtains a first weight value for template matching and a second weight value for behavioral analysis through a fully trained neural network model, thereby balancing the requirements for input data format standardization and input flexibility, and thus improving the accuracy of input data segmentation. Attached Figure Description

[0018] Figure 1 A flowchart illustrating an embodiment of a method for segmenting input data in an input box provided by the present invention; Figure 2 A schematic flowchart of an embodiment of a segmentation device for input data in an input box provided by the present invention; Figure 3 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] 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 a part of the embodiments of the present invention, and not all of them. 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.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] Before demonstrating the embodiments, the following terms will be explained.

[0024] Input boxes are one of the most common types of text boxes, typically used to receive text information from users. In design, input boxes can have input formatting, length limits, character types, etc., to ensure the accuracy and standardization of input. Input boxes are widely used in various systems and websites, such as login interfaces, search boxes, and comment boxes.

[0025] Vue is a JavaScript framework for building user interfaces. It is built on standard HTML, CSS, and JavaScript, and provides a declarative, component-based programming model for efficient user interface development.

[0026] This invention provides a method, apparatus, electronic device, and medium for segmenting input data in an input box, which will be described below.

[0027] Figure 1 A schematic flowchart of an embodiment of the method for segmenting input data in an input box provided by the present invention is shown below. Figure 1 As shown, the methods for segmenting input data in an input box include: S101. Obtain the behavioral characteristics of user input in the target input box, including keystroke time interval and input source type; S102. Convert the behavioral features into feature vectors; S103. Input the feature vector into a fully trained preset neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a preset regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the process of inputting data according to the keystroke time. S104. Segment the input data of the target input box based on the first weight value and the second weight value.

[0028] Compared with existing technologies, this embodiment provides a method for segmenting input data in an input box. The method acquires behavioral features of user input in the target input box, including keystroke time intervals and input source type. These behavioral features are converted into feature vectors, which are then fed into a pre-trained neural network model. The model is trained using historical data from the user input box to obtain a first weight value and a second weight value. The first weight value represents the weight for template matching, and the second weight value represents the weight for behavioral analysis. Template matching is used to match the input data in the input box according to a pre-defined regular expression, or according to a fixed template. Behavioral analysis refers to the behavior of automatically inserting separators during the input process based on keystroke time. The target input box input data is segmented based on the first and second weight values, balancing the requirements for input data format standardization and input flexibility. This invention obtains a first weight value for template matching and a second weight value for behavioral analysis through a fully trained neural network model, thereby balancing the requirements for input data format standardization and input flexibility, and improving the accuracy of input data segmentation.

[0029] In some embodiments of the present invention, the input source types include: keyboard input and paste operation.

[0030] In one possible implementation, when the last keystroke time of the target input box is detected to be greater than zero, the first and second weight values ​​are updated based on Vue's watchEffect function.

[0031] In a specific embodiment of the present invention, reactive variables are used to track input behavior features (keystroke interval, input source, etc.), a TensorFlow.js pre-trained model is integrated for weight prediction, and automatic weight updates are implemented based on Vue's watchEffect. The code corresponding to steps S101 to S103 is as follows: / / useDynamicFormatter.ts import { ref, watchEffect} from 'vue' import as tf from '@tensorflow / tfjs' export function useDynamicFormatter() { const inputFeatures = ref({ lastKeyTime: 0, inputSpeed: 0, sourceType: 'keyboard' as 'keyboard' | 'paste' }) const weights = ref({ template: 0.5, behavior: 0.5}) const model = await tf.loadLayersModel('model.json') const updateWeights = () =>{ const inputTensor = tf.tensor([[ inputFeatures.value.inputSpeed, inputFeatures.value.sourceType === 'paste' ? 1 : 0 ]]) const prediction = model.predict(inputTensor) weights.value = { template: prediction.dataSync()[0], behavior: prediction.dataSync()[1] } } watchEffect(() =>{ if (inputFeatures.value.lastKeyTime>0) { updateWeights() }}) return { inputFeatures, weights} } In some embodiments of the present invention, segmenting the input data of the target input box based on a first weight value and a second weight value includes: When the input data is a phone number, if the first weight value is greater than the first preset value, the phone number string is split into three characters, one delimiter, four characters, one delimiter, and four characters based on the first regular expression, that is, the phone number string is split into the form "XXX-XXXX-XXXX" based on the first regular expression; if the second weight value is greater than the second preset value, the phone number string is split into three characters, one space, four characters, one space, and four characters based on the second regular expression, that is, the phone number string is split into the form "XXX XXXX XXXX" based on the second regular expression. When the input data is an ID card number, if the first weight value is greater than the third preset value, the string of the ID card number is split into six characters, one space, eight characters, one space, and four characters based on the third regular expression, that is, the string of the ID card number is split into the form "XXXXXXXXXXXXXX XXXX". If the first weight value is not greater than the third preset value, the string of the ID card number is split into six characters, one space, and four spaces based on the fourth regular expression. "character, one space character, four " The string consisting of a single character, a space, and four characters, based on the fourth regular expression, splits the ID number string into "XXXXXX". The format is "XXXX".

[0032] In some embodiments of the present invention, the preset neural network model includes one or more of the following: LSTM neural network, RNN neural network, and DNN neural network.

[0033] In a specific embodiment of the present invention, the Kalman filter is initialized in the mounted hook of the Vue custom directive; Listen for keyboard press events in the target input box, and record the current cursor position when a delete operation is detected; Listen for input events in the target input box and use a Kalman filter to predict the target cursor position based on the current cursor position.

[0034] In a specific embodiment of this invention, the cursor trajectory is predicted based on the Kalman filtering algorithm, sub-pixel-level compensation is achieved through a Vue custom directive, and nextTick is used to ensure execution after DOM updates. Code implementation: / / useCursorCompensation.ts import { Directive, nextTick} from 'vue' import { KalmanFilter} from '. / kalman' export const vCursor: Directive = { mounted(el) { const kalman = new KalmanFilter() let lastPos = 0 el.addEventListener('keydown', (e: KeyboardEvent) =>{ if (['Backspace', 'Delete'].includes(e.key)) { lastPos = el.selectionStart || 0 } }) el.addEventListener('input', () =>{ const predictedPos = kalman.predict(lastPos) nextTick(() =>{ el.setSelectionRange( Math.round(predictedPos 10) / 10, Math.round(predictedPos 10) / 10 ) }) }) } } Multi-dimensional scene perception framework / / useSceneDetector.ts import { reactive, provide, inject} from 'vue' export interface FormatPattern { regex: RegExp template: string } export function useSceneDetector() { const formats = reactive <Record<string, FormatPattern> >({ CN_PHONE: { regex: / ^(\d{3})(\d{4})(\d{4}) / , template: ' '}, US_PHONE: { regex: / ^(\d{3})(\d{3})(\d{4}) / , template: '( 1) 2- 3'} }) const detectFormat = (value: string) =>{ const digits = value.replace( / \D / g, '') return Object.entries(formats).find(([_, { regex}]) => regex.test(digits))?.[0] } provide('formats', formats) return { detectFormat} } This embodiment constructs a multi-dimensional scene perception framework, which supports intelligent recognition and dynamic adaptation of formats from 50+ countries and regions, and achieves millisecond-level format matching through nano-fingerprint technology.

[0035] In some embodiments of the present invention, WebAssembly technology is integrated into Vue components based on Vue's Composition API to obtain an integrated Vue; Manage memory objects based on the integrated Vue.

[0036] In a specific embodiment of this invention, the WebAssembly module is encapsulated using Vue's composable API, and shallowRef is used to avoid the overhead of deep reactivity, thereby accelerating key algorithms. Code implementation: / / useWasmOptimizer.ts import { shallowRef, onMounted} from 'vue' export function useWasmOptimizer() { const wasmModule = shallowRef <any>(null) onMounted(async () =>{ const { instance} = await WebAssembly.instantiateStreaming( fetch('formatter.wasm') ) wasmModule.value = instance.exports }) const optimizedFormat = (value: string) =>{ return wasmModule.value?.format_text(value) || value } return { optimizedFormat} } Finally, the integration code is as follows: <script setup lang="ts">import { useDynamicFormatter,useSceneDetector,useWasmOptimizer} from'. / composables'import { vCursor} from '. / directives'const { inputFeatures, weights} = useDynamicFormatter()const { detectFormat} = useSceneDetector()const { optimizedFormat} = useWasmOptimizer()const inputValue = ref('')const formatAmount = (raw: string, weights: { behavior: number}) =>{const number = parseFloat(raw.replace( / [^\d.] / g, ''));if (weights.behavior<0.3) { / / 用户输入缓慢时启用return number.toLocaleString('en-US');} else {return raw;}};const handleInput = (e: Event) =>{const target = e.target as HTMLInputElement / / 更新特征inputFeatures.value = {lastKeyTime: performance.now(),inputSpeed: calculateSpeed(target.value),sourceType: e.inputType?.includes('paste') ? 'paste' : 'keyboard'} / / 格式化处理if ( / ^\d\.?\d / .test(rawValue)) {inputValue.value = formatAmount(rawValue, weights.value.behavior)} else {inputValue.value = weights.value.template>0.6? optimizedFormat(rawValue) : rawValue}}< / script> <template> <input v-model="inputValue" v-cursor @input="handleInput" / > < / template> In summary, this embodiment determines the weight coefficients through dynamic input from the input box, analyzes input features (such as keystroke intervals and input sources) in real time based on the LSTM neural network, and automatically adjusts the weight ratio of template matching and behavior analysis to achieve high-precision segmentation.

[0037] To better implement the method for segmenting input data in an input box according to an embodiment of the present invention, based on the method for segmenting input data in an input box, correspondingly, as follows: Figure 2 As shown, this embodiment of the invention also provides a segmentation device for input data in an input box. The segmentation device 200 for input data in an input box includes: The input data acquisition module 201 is used to acquire the behavioral characteristics of user input in the target input box, including keystroke time interval and input source type; Feature vector acquisition module 202 is used to convert the behavioral features into feature vectors; The weight acquisition module 203 is used to input the feature vector into a fully trained preset neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data input into the input box according to a preset regular expression, or to match the data input into the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators during the input of data in the input box according to the keystroke time. The input data segmentation module 204 is used to segment the input data of the target input box based on the first weight value and the second weight value.

[0038] The segmentation device 200 for input box input data provided in the above embodiments can realize the technical solution described in the above embodiment of the segmentation method for input box input data. The specific implementation principle of each module or unit can be found in the corresponding content in the above embodiment of the segmentation method for input box input data, which will not be repeated here.

[0039] like Figure 3 As shown, the present invention also provides an electronic device 300. The electronic device 300 includes a processor 301, a memory 302, and a display 303. Figure 3 Only some components of the electronic device 300 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0040] In some embodiments, processor 301 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 302 or process data, such as a segmentation method for input data in an input box in this invention.

[0041] In some embodiments, processor 301 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 301 may be local or remote. In some embodiments, processor 301 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, or any combination thereof.

[0042] In some embodiments, memory 302 may be an internal storage unit of electronic device 300, such as a hard disk or memory of electronic device 300. In other embodiments, memory 302 may also be an external storage device of electronic device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 300.

[0043] Furthermore, the memory 302 may include both internal storage units of the electronic device 300 and external storage devices. The memory 302 is used to store application software and various types of data installed on the electronic device 300.

[0044] In some embodiments, display 303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 303 is used to display information from electronic device 300 and to display a visual user interface. Components 301-303 of electronic device 300 communicate with each other via a system bus.

[0045] In one embodiment, when the processor 301 executes a segmentation program for input data from an input box in the memory 302, the following steps can be implemented: Obtain the behavioral characteristics of user input in the target input box, including keystroke interval and input source type; The behavioral characteristics are transformed into feature vectors; The feature vector is input into a pre-trained neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a pre-defined regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the data input process based on keystroke time. The input data in the target input box is segmented based on the first weight value and the second weight value.

[0046] It should be understood that when the processor 301 executes a segmented program for inputting data into an input box in the memory 302, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0047] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 300 mentioned. Electronic device 300 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 300 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0048] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0049] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.< / any>

Claims

1. A method for segmenting input data in an input box, characterized in that, include: Obtain the behavioral characteristics of user input in the target input box, including keystroke interval and input source type; The behavioral characteristics are transformed into feature vectors; The feature vector is input into a pre-trained neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a pre-defined regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the data input process based on keystroke time. The input data in the target input box is segmented based on the first weight value and the second weight value.

2. The method for segmenting input data in an input box according to claim 1, characterized in that, The types of input sources include: keyboard input and paste operation.

3. The method for segmenting input data in an input box according to claim 1, characterized in that, The segmentation of the target input box input data based on the first weight value and the second weight value includes: When the input data is a phone number, if the first weight value is greater than the first preset value, the phone number string is split into three characters, one separator, four characters, one separator, and four characters based on the first regular expression; if the second weight value is greater than the second preset value, the phone number string is split into three characters, one space, four characters, one space, and four characters based on the second regular expression. When the input data is an ID card number, if the first weight value is greater than the third preset value, the string of the ID card number is split into six characters, one space, eight characters, one space, and four characters based on the third regular expression. If the first weight value is not greater than the third preset value, the string of the ID card number is split into six characters, one space, and four characters based on the fourth regular expression. "Character, one space, four " The character, a space character, and four characters.

4. The method for segmenting input data in an input box according to claim 1, characterized in that, The preset neural network model includes one or more of the following: LSTM neural network, RNN neural network, and DNN neural network.

5. The method for segmenting input data in an input box according to claim 1, characterized in that, Also includes: The Composition API based on Vue integrates WebAssembly technology into Vue components, resulting in an integrated Vue; Manage memory objects based on the integrated Vue.

6. The method for segmenting input data in an input box according to claim 1, characterized in that, Also includes: When the last keystroke time of the target input box is detected to be greater than zero, the first and second weight values ​​are updated based on Vue's watchEffect function.

7. The method for segmenting input data in an input box according to claim 1, characterized in that, Also includes: Initialize the Kalman filter in the mounted hook of the Vue custom directive; Listen for keyboard press events in the target input box, and record the current cursor position when a delete operation is detected; Listen for input events in the target input box and use a Kalman filter to predict the target cursor position based on the current cursor position.

8. A segmentation device for input data in an input box, characterized in that, include: The input data acquisition module is used to acquire the behavioral characteristics of user input in the target input box, including keystroke time interval and input source type; A feature vector acquisition module is used to convert the behavioral features into feature vectors; The weight acquisition module is used to input the feature vector into a fully trained preset neural network model to obtain a first weight value and a second weight value. The first weight value is used to characterize the weight value based on template matching, and the second weight value is used to characterize the weight value based on behavior analysis. The template matching is used to match the data entered in the input box according to a preset regular expression, or to match the data entered in the input box according to a fixed template. The behavior analysis is the behavior of automatically inserting separators in the input box during the data input process based on keystroke time. The data segmentation module is used to segment the input data of the target input box based on the first weight value and the second weight value.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the segmentation method for input data in an input box as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the segmentation method for input data in an input box as described in any one of claims 1 to 7.