CN113448464B - Information processing method, information processing device, computer equipment and storage medium - Google Patents

Information processing method, information processing device, computer equipment and storage medium Download PDF

Info

Publication number
CN113448464B
CN113448464B CN202110719712.9A CN202110719712A CN113448464B CN 113448464 B CN113448464 B CN 113448464B CN 202110719712 A CN202110719712 A CN 202110719712A CN 113448464 B CN113448464 B CN 113448464B
Authority
CN
China
Prior art keywords
input
input information
information
character
limiting condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110719712.9A
Other languages
Chinese (zh)
Other versions
CN113448464A (en
Inventor
李展鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan United Imaging Healthcare Co Ltd
Original Assignee
Wuhan United Imaging Healthcare Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan United Imaging Healthcare Co Ltd filed Critical Wuhan United Imaging Healthcare Co Ltd
Priority to CN202110719712.9A priority Critical patent/CN113448464B/en
Publication of CN113448464A publication Critical patent/CN113448464A/en
Application granted granted Critical
Publication of CN113448464B publication Critical patent/CN113448464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to an information processing device method, an information processing device, a computer device and a storage medium. The method comprises the following steps: the computer equipment acquires first input information input based on the input box under the condition that the input box is in a focusing state, judges whether the first input information meets a preset input limiting condition or not, and executes corresponding processing operation according to the first input information if the first input information does not meet the input limiting condition. In the scheme, the computer equipment can detect the first input information input by the user when detecting that the input box is in a focusing state, and execute corresponding processing operation on the first input information which does not accord with the input limiting condition, so that the first input information accords with the input limiting condition, the user does not need to repeatedly modify the first input information for many times, the interaction with the user is optimized, and the input operation based on the input box is more intelligent.

Description

Information processing method, information processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus, a computer device, and a storage medium.
Background
The user can interact information based on the front-end interface, for example, the information is input through the input box, so as to realize corresponding functions. In the existing information input method, the input content of an input box is limited to a certain extent, after the information input by a user is completed, whether the content of the information meets the limitation condition is determined according to the input information of the user, and then the input information of the user is displayed under the condition that the input information meets the limitation condition.
However, in the conventional information input method, when the input information of the user does not meet the limiting condition, the operation amount of the user is increased, and the human-computer interaction is not intelligent enough.
Disclosure of Invention
In view of the above, it is necessary to provide an information processing method, an apparatus, a computer device, and a storage medium for performing optimization processing according to user input information in order to solve the above-described technical problems.
In a first aspect, an information processing method is provided, and the method includes:
acquiring first input information input based on the input frame under the condition that the input frame is in a focusing state;
judging whether the first input information meets a preset input limiting condition or not;
and if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information.
In one optional embodiment, the input limiting condition includes that the input information does not contain invalid characters; judging whether the first input information meets a preset input limiting condition or not, wherein the judging step comprises the following steps:
carrying out effective character detection on each character in real time, and determining a first effective character in the first input information;
judging whether the input information before the first valid character comprises invalid characters or not;
if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information, wherein the processing operation comprises the following steps:
the invalid character is deleted.
In one optional embodiment, the method further comprises:
determining a first position of a cursor in an input frame according to the first input information;
after the corresponding processing operation is executed according to the first input information, the method further comprises the following steps:
and updating the cursor to a second position in the input box according to the character length of the effective character after the first input information processing operation.
In one of the alternative embodiments, the input defining condition includes a target length of the input information; judging whether the first input information meets a preset input limiting condition or not, wherein the judging step comprises the following steps of:
acquiring the length of first input information;
judging whether the length of the first input information is greater than the target length or not according to the target length;
if the first input information does not meet the input limiting condition, executing corresponding processing operation according to the first input information, wherein the processing operation comprises the following steps:
and outputting the reminding information.
In one optional embodiment, the method further comprises:
acquiring second input information under the condition that the state of the input frame is in an out-of-focus state;
judging whether the second input information meets the input limiting condition or not;
and if the second input information does not meet the input limiting condition, executing corresponding processing operation according to the second input information.
In one optional embodiment, the input limiting condition includes that the input information does not contain invalid characters; judging whether the second input information meets the input limiting condition or not, wherein the judgment comprises the following steps:
performing valid character detection on each character, and determining whether invalid characters are included in the second input information;
if the second input information does not meet the input limiting condition, executing corresponding processing operation according to the second input information, wherein the processing operation comprises the following steps:
the invalid character is deleted.
In one optional embodiment, the method further comprises:
determining a third position of the cursor in the input frame according to the second input information;
after the corresponding processing operation is executed according to the second input information, the method further comprises the following steps:
and updating the cursor to a fourth position in the input box according to the character length of the effective character after the second input information processing operation.
In a second aspect, an information processing apparatus includes:
the acquisition module is used for acquiring first input information input based on the input frame under the condition that the input frame is in a focusing state;
the judging module is used for judging whether the first input information meets a preset input limiting condition or not;
and the execution module is used for executing corresponding processing operation according to the first input information if the first input information does not accord with the input limiting condition.
In a third aspect, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the information processing method according to any one of the first aspect when executing the computer program.
In a fourth aspect, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the information processing method of any one of the above-described first aspects.
According to the information processing method, the information processing device, the computer equipment and the storage medium, under the condition that the input box is in the focusing state, the computer equipment acquires the first input information input based on the input box, judges whether the first input information meets the preset input limiting condition or not, and executes the corresponding processing operation according to the first input information if the first input information does not meet the input limiting condition. In the scheme, the computer equipment can detect the first input information input by the user when detecting that the input box is in a focusing state, and execute corresponding processing operation on the first input information which does not accord with the input limiting condition, so that the first input information accords with the input limiting condition, the user does not need to repeatedly modify the first input information for many times, the interaction with the user is optimized, and the input operation based on the input box is more intelligent.
Drawings
FIG. 1 is a diagram of an application environment of an information processing method in one embodiment;
FIG. 2 is a flow chart illustrating a method of processing information in one embodiment;
FIG. 3 is a flow diagram that illustrates a method for processing information in one embodiment;
FIG. 4 is a flow diagram that illustrates a method for processing information in one embodiment;
FIG. 5 is a flow chart illustrating a method of processing information in one embodiment;
FIG. 6 is a flow chart illustrating a method of processing information in one embodiment;
FIG. 7 is a flow diagram that illustrates a method for processing information in one embodiment;
FIG. 8 is a flowchart illustrating a method of processing information according to an embodiment;
FIG. 9 is a flowchart illustrating a method of processing information according to an embodiment;
FIG. 10 is a block diagram showing the configuration of an information processing apparatus according to an embodiment;
fig. 11 is a block diagram showing the configuration of an information processing apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The information processing method provided by the application can be applied to the application environment shown in fig. 1. In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 1. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an information processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in the information processing method provided in the embodiments of fig. 2 to fig. 9 of the present application, the execution main body is a computer device, and may also be an information processing apparatus, and the information processing apparatus may be a part or all of the computer device by software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a computer device as an example.
In one embodiment, as shown in fig. 2, an information processing method is provided and implemented based on a Taro framework, wherein an API of the Taro framework supports a WeChat applet and partially supports H5 and read Native, and has strong compatibility. The Taro native input box has unique parameters and an API, the parameters and the API functions are fully utilized as much as possible, and then some methods or other methods are customized to further realize the desired interaction. Except for value, placeholder, length and the like which are commonly used by input, the method mainly carries out flexible operation on the mutual cooperation of focusing, defocusing, cursor position control, input content and deletion content of an input frame, and has stronger flexibility, independence, functionality and attitude.
The embodiment relates to a process that computer equipment acquires first input information input based on an input frame under the condition that the input frame is in a focusing state, judges whether the first input information meets a preset input limiting condition, and executes corresponding processing operation according to the first input information if the first input information does not meet the input limiting condition, and the process comprises the following steps:
s201, when the input frame is in a focusing state, first input information input based on the input frame is acquired.
The first input information refers to input content in the input box acquired when the input box is in a focus state.
In this embodiment, optionally, the computer device may further initialize the state of the input box, for example, setting the state parameter of the input box to be isFocus, and determining the state of the input box to be in focus/out of focus based on the isFocus; defining an input information method onSetText, and monitoring input information events generated in an input box based on the onSetText method. For example, the computer device may listen for an input information event generated in the input box based on the onSetText method, change the state isFocus of the input box to focus when the input information event is listened for, and simultaneously acquire input content (first input information) in the input box corresponding to the input information event and save the input content to a specified storage space state.
S202, judging whether the first input information meets a preset input limiting condition.
The input limiting conditions comprise that invalid characters are not included in the input information, the character length of the input information accords with a preset length, the type of each character in the input information accords with a preset character type, and the like.
In this embodiment, the computer device determines whether the acquired first input information meets a preset input limiting condition, for example, the computer device may acquire a character length of the first input information, and compare the character length with a preset character; the computer equipment determines whether invalid characters are included in the first input information according to all characters in the first input information; the computer device determines, according to each character in the first input information, whether a character type of each character in the first input information conforms to a preset character type, and the like, which is not limited in this embodiment.
And S203, if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information.
In this embodiment, the computer device may directly perform optimization processing on the first input information and may also output the reminding information to alert the user that the current first input information does not meet the input limit condition when it is determined that the first input information does not meet the input limit condition. For example, when the computer device determines that the character length of the first input information is greater than a preset character, the computer device may output a prompt message to prompt the user that the input information length exceeds a legal length; when the computer device determines that the first input information includes the invalid character, the invalid character may be deleted to optimize the first input information, which is not limited in this embodiment.
In this embodiment, before determining that the input box is in the focused state, the computer device may further determine whether the input box already has input content, and if the input box does not have input content, do not respond; if the input content exists and the computer equipment determines that the input content meets the input limiting condition of the input box, no response is made; if the input content exists but the input content does not accord with the input limiting condition of the input box, corresponding processing operation is executed on the existing input content. After the operation, the first input information newly input in the input box in the current focusing state is obtained, which is not limited in this embodiment.
In the information processing method, the computer equipment acquires first input information input based on the input frame under the condition that the input frame is in a focusing state, judges whether the first input information meets a preset input limiting condition, and executes corresponding processing operation according to the first input information if the first input information does not meet the input limiting condition. In the scheme, the computer equipment can detect the first input information input by the user when detecting that the input box is in a focusing state, and execute corresponding processing operation on the first input information which does not accord with the input limiting condition, so that the first input information accords with the input limiting condition, the user does not need to repeatedly modify the first input information for many times, the interaction with the user is optimized, and the input operation based on the input box is more intelligent.
The computer device may determine whether the first input information meets the limited input condition according to different input limited conditions, and in one embodiment, as shown in fig. 3, the input limited conditions include that the input information does not contain invalid characters; judging whether the first input information meets a preset input limiting condition or not, wherein the judging step comprises the following steps:
s301, effective character detection is carried out on each character in real time, and the first effective character in the first input information is determined.
Wherein, the valid character refers to a non-space, that is, the invalid character may be a space; or a character that conforms to a predetermined character type.
In this embodiment, after monitoring an input information event generated in the input box, the computer device obtains the first input information in the input box in real time, and during the obtaining, the computer device may monitor whether each character in the first input information is an invalid character in real time, and determine a first valid character in the first input information. For example, if the first character obtained by the computer device is a space and the second character is 1, where the character of the numeric type is a valid character, then the computer device determines that the second character in the first input information is the first valid character. Or the first character acquired by the computer device is 1, wherein the character of the numeric type is a valid character, and then the computer device determines that the first character in the first input information is the first valid character.
S302, judging whether the input information before the first valid character comprises invalid characters.
In this embodiment, after determining the first valid character, the computer device detects whether an invalid character is included before the valid character, which is described by taking the example in 301 above, and after determining that the first character acquired by the computer device is a space and the second character is 1, and determining that the second character in the first input information is the first valid character, it is determined that the input information before the first valid character includes the first character as a space, and at this time, it is determined that the first valid character includes an invalid character before.
And S303, if the input information before the first valid character comprises invalid characters, deleting the invalid characters.
In this embodiment, in a case where it is determined that the first valid character includes a null character, the computer device may directly perform a deletion process on the null character, for example, the input information is "1", where the input information includes 4 null character spaces and 1 valid character "1", and after it is determined that "1" is the first valid character, the computer device determines that the characters before "1" include a null character, where the computer device may directly delete the null character before "1", that is, delete 4 spaces before "1", and at this time, the input information is "1", which is not limited in this embodiment.
In this embodiment, the computer device detects the first valid character of the first input information, deletes the invalid character before the first valid character, and automatically optimizes the input content before the first valid character of the first input information, thereby optimizing user interaction.
Furthermore, the computer device may also update the position of the cursor in the input box after performing the information processing on the first input information. In one embodiment, as shown in fig. 4, the method further comprises:
s401, according to the first input information, determining a first position of a cursor in an input frame.
In this embodiment, the computer device obtains the first input information in real time when the input box is in a focused state, and at the same time, the computer device may also update the position of the cursor in real time, for example, after obtaining the first character in the input box, the position of the cursor is updated to the first character, at this time, the first position of the current cursor is determined, for example, the input information is "1", at this time, 4 invalid character spaces and 1 valid character "1" are included, the position of the cursor may be determined according to the positions of all characters in the input information, for example, the first position of the cursor may be a position before/after the character "1", that is, a position before/after a 5 th character in the input box.
S402, updating the cursor to a second position in the input box according to the character length of the effective character after the first input information processing operation.
In this embodiment, after the computer device deletes the invalid character before the first valid character in the first input information, the length of the character in the input box changes, and at this time, the computer device may update the cursor position to be after the last valid character in the first input information according to the length of the valid character; or, the computer device may update the cursor position to be before the last valid character in the first input information, for example, after the computer device determines that "1" is the first valid character, the computer device determines that the characters before "1" include invalid characters, at this time, the computer device may directly delete the invalid characters before "1", that is, delete 4 spaces before "1", at this time, the input information is "1", and accordingly, the computer device may update the cursor position, and the second position may be a position before/after the valid character "1", but here, the position before/after the valid character "1" refers to a position before/after the 1 st character in the input box, which is not limited in this embodiment.
In this embodiment, after the computer device performs information processing on the first input information, the position of the cursor is updated, so that the user interaction experience is optimized.
The input limiting condition may also be a target length of the input information, and the determination method provided in this embodiment may be performed before the step in the embodiment in fig. 3, or after the step in the embodiment in fig. 3, or performed in parallel with the step in the embodiment in fig. 3, and in one embodiment, as shown in fig. 5, the input limiting condition includes the target length of the input information; judging whether the first input information meets a preset input limiting condition or not, wherein the judging step comprises the following steps:
s501, acquiring the length of the first input information.
In this embodiment, the computer device obtains the character length of the first input information in the input box in real time.
S502, judging whether the length of the first input information is larger than the target length or not according to the target length.
In this embodiment, the computer device determines, according to the character length of the acquired first input information, whether the character length is greater than a target length of the current input box.
And S503, if the length of the first input information is larger than the target length, outputting reminding information.
In this embodiment, when the computer device determines that the character length of the first input information is greater than the target length, it determines that the current first input information does not meet the input limiting condition, and at this time, the computer device outputs a reminding message for reminding the user that the input information length exceeds the legal length. Or, the computer device may directly and forcibly determine the input box to be in the out-of-focus state under the condition that it is determined that the character length of the first input information is greater than the target length, so that the user cannot input any information any more, which is not limited in this embodiment.
In the embodiment, the computer device determines whether the first input information meets the input limiting condition from the dimension of the character length of the first input information, and further ensures the validity and the legality of the first input information.
In addition, the state of the input box also includes a failure state, and the computer device still performs information processing on the content in the input box in the out-of-focus state, and in one embodiment, as shown in fig. 6, the method further includes:
s601, acquiring second input information when the state of the input frame is in the out-of-focus state.
In this embodiment, optionally, the computer device defines a leaving input box method setcurser, monitors a leaving input box event based on the setcurser method, modifies the isFocus state to be out of focus when the leaving input box event is monitored, and acquires all input contents in the input box as the second input information.
Optionally, the computer device may further define an empty input information method ondiletext, monitor an event of clicking an empty button on the display interface based on the ondiletext method, modify the isFocus state to be out of focus when the event of clicking the empty button is monitored, and simultaneously clear the input content in the input box.
S602, judging whether the second input information meets the input limiting condition.
In this embodiment, the computer device determines, according to a preset input limiting condition, whether the obtained second input information meets the limiting condition, and exemplarily, the computer device determines, according to each character in the second input information, whether the second input information includes an invalid character; the computer device determines whether the character type of each character in the second input information conforms to a preset character type or not according to each character in the first input information, and the like.
And S603, if the second input information does not accord with the input limiting condition, executing corresponding processing operation according to the second input information.
In this embodiment, the computer device may directly perform optimization processing on the second input information and may also output the reminding information to alert the user that the current second input information does not meet the input limiting condition when it is determined that the second input information does not meet the input limiting condition. For example, when the computer device determines that the first input information includes an invalid character, the invalid character may be deleted to optimize the first input information, which is not limited in this embodiment.
In this embodiment, the computer device may detect the second input information input by the user when detecting that the input frame is in the out-of-focus state, and perform corresponding processing operation on the second input information that does not meet the input restriction condition, so as to make the second input information meet the input restriction, and the user does not need to repeatedly modify the second input information for multiple times, thereby optimizing interaction with the user, and making the input operation based on the input frame more intelligent.
Optionally, the computer device determines the second input information according to an input limiting condition, and in one embodiment, as shown in fig. 7, the input limiting condition includes that the input information does not include invalid characters; judging whether the second input information meets the input limiting condition or not, wherein the judgment comprises the following steps:
s701, performing valid character detection on each character, and determining whether invalid characters are included in the second input information.
In this embodiment, after determining that the input box is in the out-of-focus state, the computer device acquires the second input information, and detects whether the second input information includes an invalid character, where the invalid character may be a space or a character that does not conform to a preset character type. Optionally, after determining that the input box is in the out-of-focus state, the computer device stops the real-time detection of the input content in the input box after detecting the last valid character in the input box.
S702, if the second input information comprises invalid characters, deleting the invalid characters.
In this embodiment, in a case where the computer device determines that the second input information includes invalid characters, for example, 1 space is included in the second input information and 1 illegal character which does not conform to the preset character type, the computer device may directly delete the space and the illegal character, for example, the input information is "1", and at this time, 4 spaces of the invalid characters, 1 valid character "1", and 3 spaces of the invalid characters are included therein, and after determining that "1" is a valid character, the computer device determines that the second input information includes 7 invalid characters, 4 positions before the valid character "1", and 3 positions after the valid character "1", respectively, and at this time, the computer device may directly delete the invalid characters at 4 positions before the valid character "1" and 3 positions after the valid character "1", that is, delete 7 spaces in the second input information, and at this time, the input information is "1".
This embodiment is not limited to this.
In this embodiment, the computer device deletes all invalidities in the second input information, optimizes the content of the second input information, optimizes user interaction, and improves the validity of the second input content.
Similarly, after the computer device performs information processing on the second input information, optionally, the computer device may update the cursor position according to the valid character in the second input information, and in one embodiment, as shown in fig. 8, the method further includes:
and S801, determining a third position of the cursor in the input frame according to the second input information.
In this embodiment, the computer device acquires the second input information while the input frame is out of focus, and at the same time, the computer device determines the current position of the cursor, i.e., the position of the cursor in the input frame before processing the second input information. For example, the input information is "1", in this case, 4 invalid character spaces, 1 valid character "1", and 3 invalid character spaces are included, the cursor position may be determined according to the positions of all characters in the input information, for example, the third position of the cursor may be a position before/after the last space character in the second input information of the characters, that is, a position before/after the 8 th character in the input box.
And S802, updating the cursor to a fourth position in the input box according to the character length of the effective character after the second input information processing operation.
In this embodiment, after the computer device deletes the invalid character in the second input information, the length of the character in the input box changes, at this time, the computer device may update the cursor position to a fourth position according to the length of the character of the valid character in the current input box, where the fourth position may be after the last valid character in the second input information; alternatively, the fourth position may be before the last valid character in the second input information, for example, the input information is "1", in which case 4 invalid character spaces, 1 valid character "1", and 3 invalid character spaces are included, and after the computer device deletes 7 spaces in the second input information, the computer device may update the cursor position accordingly, and the fourth position may be a position before/after the valid character "1", but here, the position before/after the valid character "1" refers to a position before/after the 1 st character in the input box, which is not limited in this embodiment.
In this embodiment, after the computer device performs information processing on the second input information, the position of the cursor in the input box is updated, so that the interaction experience of the user is optimized.
To better explain the above method, as shown in fig. 9, the present embodiment provides an information processing method, which specifically includes:
s101, under the condition that the input box is in a focusing state, acquiring first input information input based on the input box;
s102, determining a first position of a cursor in an input frame according to first input information;
s103, acquiring the length of the first input information;
s104, judging whether the length of the first input information is greater than the target length or not according to the target length;
s105, if the length of the first input information is larger than the target length, outputting reminding information;
s106, judging whether input information before the first valid character comprises an invalid character;
s107, if the input information before the first valid character comprises invalid characters, deleting the invalid characters;
s108, updating the cursor to a second position in the input frame according to the character length of the effective character after the first input information processing operation;
s109, acquiring second input information under the condition that the state of the input frame is in the out-of-focus state;
s110, determining a third position of the cursor in the input frame according to the second input information;
s111, performing effective character detection on each character, and determining whether the second input information comprises an ineffective character;
s112, if the second input information comprises invalid characters, deleting the invalid characters;
and S113, updating the cursor to a fourth position in the input frame according to the character length of the effective character after the operation is carried out on the second input information.
In this embodiment, be applied to the applet, the frame is Taro, and the use object is native subassembly Input under the Taro frame, has avoided using native subassembly to receive the problem of the restriction in third party's storehouse, can make things convenient for later stage development and maintenance by flexible control. It should be noted that the present disclosure is also applicable to other frameworks, and in the specific implementation process, the API call mode is adapted and modified according to different frameworks.
In this embodiment, the computer device may detect the first input information input by the user when detecting that the input frame is in a focused state, and perform corresponding processing operation on the first input information that does not meet the input definition condition, so as to enable the first input information to meet the input definition or output the reminding information without repeatedly modifying the first input information for multiple times by the user; the second input information can be detected in the out-of-focus state of the input box, invalid characters in the second input information are deleted, automatic optimization processing of the second input information is achieved, interaction with a user is optimized, and input operation based on the input box is enabled to be more intelligent.
The information processing method provided by the above embodiment has similar implementation principles and technical effects to those of the above embodiment, and is not described herein again.
It should be understood that although the various steps in the flow diagrams of fig. 2-9 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-9 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 10, there is provided an information processing apparatus including:
the acquisition module 01 is used for acquiring first input information input based on the input frame under the condition that the input frame is in a focusing state;
the judging module 02 is used for judging whether the first input information meets a preset input limiting condition or not;
the execution module 03 is configured to execute a corresponding processing operation according to the first input information if the first input information does not meet the input limiting condition.
In one optional embodiment, the input limiting condition includes that the input information does not contain invalid characters; the judging module 02 is used for detecting effective characters of each character in real time and determining a first effective character in the first input information; judging whether the input information before the first valid character comprises invalid characters or not; the execution module 03 is configured to delete an invalid character if the input information before the first valid character includes the invalid character.
In an alternative embodiment, as shown in fig. 11, the information processing apparatus further includes a positioning module 04 configured to determine a first position of a cursor in the input box according to the first input information; and updating the cursor to a second position in the input box according to the character length of the effective character after the first input information processing operation.
In one of the alternative embodiments, the input defining condition includes a target length of the input information; the judging module 02 is used for acquiring the length of the first input information; judging whether the length of the first input information is greater than the target length or not according to the target length; the executing module 03 is configured to output the reminding information if the length of the first input information is greater than the target length.
In one optional embodiment, the obtaining module 01 is further configured to obtain second input information when the state of the input box is an out-of-focus state; the judging module 02 is further configured to judge whether the second input information meets the input limiting condition; the executing module 03 is further configured to execute a corresponding processing operation according to the second input information if the second input information does not meet the input limiting condition.
In one optional embodiment, the input limiting condition includes that the input information does not contain invalid characters; the judging module 02 is further configured to perform valid character detection on each character, and determine whether the second input information includes an invalid character; the executing module 03 is further configured to delete the invalid character if the second input information includes the invalid character.
In an optional embodiment, the positioning module 04 is further configured to determine a third position of the cursor in the input box according to the second input information; after executing the corresponding processing operation according to the second input information, the method further comprises the following steps: and updating the cursor to a fourth position in the input box according to the character length of the effective character after the second input information processing operation.
For specific limitations of the information processing apparatus, reference may be made to the above limitations of the information processing method, which are not described herein again. Each module in the information processing apparatus described above may be entirely or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
acquiring first input information input based on the input frame under the condition that the input frame is in a focusing state;
judging whether the first input information meets a preset input limiting condition or not;
and if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring first input information input based on the input frame under the condition that the input frame is in a focusing state;
judging whether the first input information meets a preset input limiting condition or not;
and if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. An information processing method, characterized in that the method comprises:
under the condition that an input frame is in a focusing state, acquiring first input information input based on the input frame, wherein whether the input frame is in the focusing state is determined according to an input frame state parameter, and the input frame state parameter is in the focusing state when the input frame is monitored to generate an input information event;
judging whether the first input information meets a preset input limiting condition or not;
if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information;
the method further comprises the following steps:
under the condition that the state of the input box is in an out-of-focus state, acquiring second input information, wherein the second input information is all input contents in the input box;
judging whether the second input information meets the input limiting condition or not;
and if the second input information does not accord with the input limiting condition, executing corresponding processing operation according to the second input information.
2. The method according to claim 1, wherein the input defining condition includes that no invalid character is included in the input information; the judging whether the first input information meets a preset input limiting condition includes:
carrying out effective character detection on each character in real time, and determining a first effective character in the first input information;
judging whether the input information before the first effective character comprises an ineffective character or not;
if the first input information does not meet the input limiting condition, executing corresponding processing operation according to the first input information, wherein the processing operation comprises the following steps:
and deleting the invalid character.
3. The method of claim 2, further comprising:
determining a first position of a cursor in the input box according to the first input information;
after the corresponding processing operation is executed according to the first input information, the method further comprises the following steps:
and updating the cursor to a second position in the input box according to the character length of the effective character after the first input information is processed and operated.
4. The method of claim 1, wherein the input qualifier includes a target length of input information; the judging whether the first input information meets a preset input limiting condition includes:
acquiring the length of the first input information;
judging whether the length of the first input information is greater than the target length or not according to the target length;
if the first input information does not accord with the input limiting condition, executing corresponding processing operation according to the first input information, wherein the processing operation comprises the following steps:
and outputting the reminding information.
5. The method according to claim 1, wherein the input defining condition includes that no invalid character is included in the input information; the judging whether the second input information meets the input limiting condition comprises the following steps:
performing valid character detection on each character, and determining whether invalid characters are included in the second input information;
if the second input information does not meet the input limiting condition, executing corresponding processing operation according to the second input information, wherein the processing operation comprises the following steps:
and deleting the invalid character.
6. The method of claim 1 or 5, further comprising:
determining a third position of the cursor in the input box according to the second input information;
after the corresponding processing operation is executed according to the second input information, the method further includes:
and updating the cursor to a fourth position in the input box according to the character length of the effective character after the second input information processing operation.
7. An information processing apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring first input information input based on an input frame under the condition that the input frame is in a focusing state, whether the input frame is in the focusing state is determined according to input frame state parameters, and the input frame state parameters are in the focusing state when the input frame is monitored to generate an input information event;
the judging module is used for judging whether the first input information meets a preset input limiting condition or not;
the execution module is used for executing corresponding processing operation according to the first input information if the first input information does not accord with the input limiting condition;
the obtaining module is further configured to obtain second input information when the state of the input box is an out-of-focus state, where the second input information is all input contents in the input box;
the judging module is further configured to judge whether the second input information meets the input limiting condition;
the execution module is further configured to execute a corresponding processing operation according to the second input information if the second input information does not meet the input limiting condition.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202110719712.9A 2021-06-28 2021-06-28 Information processing method, information processing device, computer equipment and storage medium Active CN113448464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110719712.9A CN113448464B (en) 2021-06-28 2021-06-28 Information processing method, information processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110719712.9A CN113448464B (en) 2021-06-28 2021-06-28 Information processing method, information processing device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113448464A CN113448464A (en) 2021-09-28
CN113448464B true CN113448464B (en) 2023-04-07

Family

ID=77813483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110719712.9A Active CN113448464B (en) 2021-06-28 2021-06-28 Information processing method, information processing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113448464B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229884A1 (en) * 2011-09-07 2014-08-14 Nec Casio Mobile Communications, Ltd. Terminal device, information input method, and program
CN105824487B (en) * 2015-01-08 2019-09-06 阿里巴巴集团控股有限公司 The display methods and device of prompt information
CN106997290A (en) * 2016-01-25 2017-08-01 滴滴(中国)科技有限公司 Input the display methods and device of prompt message
CN111221603A (en) * 2019-10-30 2020-06-02 深圳前海微众银行股份有限公司 Information input method and device based on input box
CN112732100A (en) * 2021-01-21 2021-04-30 维沃移动通信有限公司 Information processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN113448464A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
KR101366882B1 (en) Automatic contact information entry via location sensing
CN107066188B (en) A kind of method and terminal sending screenshot picture
CN110515871B (en) Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium
CN110990032B (en) Application program installation method and electronic equipment
JP2013065207A (en) Portable communication system, portable communication terminal and server
CN113467862A (en) Desktop shortcut generation method and device, mobile terminal and storage medium
CN113448464B (en) Information processing method, information processing device, computer equipment and storage medium
CN114064168A (en) Interface optimization method and medical equipment
CN107563188B (en) Application security evaluation method and device and computer storage medium
CN108737655A (en) Image processing method and relevant apparatus
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN114265530A (en) Button construction and response method, device and terminal based on iOS system
CN112312021B (en) Shooting parameter adjusting method and device
US20210103942A1 (en) Aggregation system and control method of the same
CN112333081A (en) Message processing method and electronic equipment
CN113220648A (en) Audio function detection method and device
CN113535143A (en) Stack information processing method and device, electronic equipment and storage medium
US20200125431A1 (en) Method for invoking component, and terminal
CN114692252A (en) Floor slab generation method and device based on BIM and storage medium
US11650796B2 (en) Method for assisting a utilizer in creating a software application and computer program having an implementation of the method and also programming interface usable for such method
CN111416766B (en) Information issuing method and electronic equipment
CN113656520B (en) Spatial analysis method, spatial analysis device, computer equipment and storage medium
CN113315871B (en) Mobile terminal and operating method thereof
CN114615377B (en) Application program control method, device and equipment
CN115268469B (en) Wall-following angle calibration method and device for robot, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant