CN111221424B - Method, apparatus, electronic device, and computer-readable medium for generating information - Google Patents

Method, apparatus, electronic device, and computer-readable medium for generating information Download PDF

Info

Publication number
CN111221424B
CN111221424B CN202010003276.0A CN202010003276A CN111221424B CN 111221424 B CN111221424 B CN 111221424B CN 202010003276 A CN202010003276 A CN 202010003276A CN 111221424 B CN111221424 B CN 111221424B
Authority
CN
China
Prior art keywords
input information
error correction
information
input
determining
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
CN202010003276.0A
Other languages
Chinese (zh)
Other versions
CN111221424A (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010003276.0A priority Critical patent/CN111221424B/en
Publication of CN111221424A publication Critical patent/CN111221424A/en
Application granted granted Critical
Publication of CN111221424B publication Critical patent/CN111221424B/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/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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Embodiments of the present disclosure disclose methods, apparatuses, electronic devices and computer-readable media for generating information. One embodiment of the method comprises: acquiring first input information and second input information in sequence; analyzing the first input information and the second input information to determine whether the first input information needs error correction; in response to determining that error correction is required, error correction information is generated based on the first input information and the second input information. The embodiment realizes the generation of correct information, thereby avoiding excessive disturbance to users.

Description

Method, apparatus, electronic device, and computer-readable medium for generating information
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a computer-readable medium for generating information.
Background
The instant chat tool is a product in the internet era and has become a representative which can represent the most scientific and technological progress and bring convenience to people. The current instant chat tools are based on text input. One feature of text entry is that it is prone to entry errors, and conventional error correction methods can cause false recalls and excessive user annoyance.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
It is an object of some embodiments of the present disclosure to propose an improved method, apparatus, electronic device and computer readable medium for generating information to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method for generating information, the method comprising: sequentially acquiring first input information and second input information; analyzing the first input information and the second input information to determine whether the first input information needs error correction; in response to determining that error correction is required, error correction information is generated based on the first input information and the second input information.
In a second aspect, some embodiments of the present disclosure provide an apparatus for generating information, the apparatus comprising: an acquisition unit configured to sequentially acquire first input information and second input information; a determining unit configured to analyze the first input information and the second input information and determine whether the first input information needs error correction; and a generating unit configured to generate error correction information based on the first input information and the second input information in response to determining that error correction is required.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: whether the first input information needs error correction or not can be determined by analyzing the acquired first input information and the acquired second input information. This may reduce the probability of false recalls of information. Then, error correction information is generated based on the first input information and the second input information. The correct information generation is realized, and further, the excessive disturbance of the user can be avoided.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic illustration of one application scenario of a method for generating information, in accordance with some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a method for generating information according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a method for generating information according to the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of an apparatus for generating information according to the present disclosure;
FIG. 5 is a schematic block diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a method for generating information in accordance with some embodiments of the present disclosure.
In an application scenario as in fig. 1, the execution subject may be a server (e.g., server 101 shown in fig. 1). First, the server 101 may sequentially acquire the first input information 102 and the second input information 103 through a wired connection manner or a wireless connection manner. For example, the first input information 102 may be "morning number". The second input information 103 may be "good". Then, the server 10 may analyze the first input information 102 and the second input information 103 to determine whether the first input information 102 needs error correction. For example, in the above example, the first input information 102 specifies that error correction is required, and the error correction information 105 is generated based on the first input information 102 and the second input information 103. For example, the above-described error correction information 105 may be "good morning".
The execution main body may be hardware or software. When the execution main body is hardware, the execution main body can be implemented as a distributed cluster consisting of a plurality of servers or terminal devices, and can also be implemented as a single server or a single terminal device. When the execution body is embodied as software, it may be implemented as a plurality of software or software modules for providing distributed services, for example, or as a single software or software module. But also a thread or process. And is not particularly limited herein.
It should be understood that the number of servers in fig. 1 is merely illustrative. There may be any number of servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a method for generating information in accordance with the present disclosure is shown. The method for generating information comprises the following steps:
step 201, acquiring the first input information and the second input information in sequence.
In some embodiments, an execution subject of the method for generating information (e.g., the server 101 shown in fig. 1) may sequentially acquire the first input information and the second input information by a wired connection manner or a wireless connection manner. The first input information and the second input information may be locally stored information or information downloaded from a network. For example, the first input information and the second input information may be two pieces of information transmitted by the same user continuously, or two pieces of information transmitted by two users communicating with each other continuously. For example, the first input information and the second input information may be two consecutive pieces of information sent by the user a, which may be "morning number" and "good". Or user a may send user b "will go to a meeting in the afternoon today", and user b replies "do a meeting? ".
It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
Step 202, analyzing the first input information and the second input information to determine whether the first input information needs error correction.
In some embodiments, the executing entity may analyze the first input information and the second input information obtained in step 201 to determine whether the first input information needs error correction. As an example, first, the execution main body may perform word segmentation processing on the first input information to obtain at least one word. Then, the second input information is input into a Pointer network (Pointer Networks), and the obtained at least one word is sequentially input into the Pointer network according to the sequence of appearance in the first input information, so that at least one probability value can be obtained. Then, the executing entity may compare the obtained at least one probability value with a preset threshold value respectively. And finally, when the probability value reaches the preset threshold value, determining that the first input information needs to be corrected. The preset threshold may be preset.
In some optional implementations of some embodiments, it is determined that error correction is required for the first input information in response to the second input information including predefined characters. The predefined characters may be predetermined chinese or english symbols, such as "", "- >", etc. As an example, the second input information described above may be "meeting- > meeting".
In some optional implementation manners of some embodiments, the second input information is subjected to regular matching according to a predefined regular expression, and whether the second input information is consistent with the predefined regular expression is determined; in response to determining that the first input information matches, it is determined that error correction is required. As an example, the predefined regular expression may be preset. Regular expressions are a logical formula for operating on character strings (including common characters (e.g., letters between a and z) and special characters (called meta characters)), and a "regular character string" is formed by using specific characters defined in advance and a combination of the specific characters, and is used for expressing a filtering logic for the character string. A regular expression is a text pattern that describes one or more strings of characters to be matched when searching for text.
Step 203, in response to determining that error correction is required, generating error correction information according to the first input information and the second input information.
In some embodiments, in response to determining that error correction is required, the execution body may generate error correction information based on the first input information and the second input information. As an example, when the first input information is "morning number", the second input information is "good", and the error correction information may be "morning good". When the first input information is "today's afternoon meeting", and the second input information is "meeting- > meeting", the execution main body may replace "meeting" in the first input information with "meeting" in the second input information, so that the obtained error correction information may be "today's afternoon meeting".
In some optional implementations of some embodiments, the method further comprises: an input terminal for transmitting the error correction information to the first input information; for example, the above error correction information may be "good morning". The input terminal can be an electronic device such as a mobile phone and a computer. Detecting a user confirmation operation for the error correction information displayed on the input terminal; as an example, the execution body may control the error correction information to be displayed on the input terminal in a form of a prompt box. The user confirmation operation may be a click operation for a control for triggering confirmation information on the prompt box. And sending the error correction information to a receiving terminal of the first input information in response to the detection of the user confirmation operation. The receiving terminal can be an electronic device such as a mobile phone and a computer.
According to the method for generating information disclosed by some embodiments of the present disclosure, by determining whether the second input information includes predefined characters or performing regular matching on the second input information according to a predefined regular expression, whether the first input information needs error correction can be determined more accurately, so that the accuracy of determining whether the first input information needs error correction is improved.
With continued reference to fig. 3, a flow 300 of further embodiments of methods for generating information according to the present disclosure is shown. The method for generating information comprises the following steps:
step 301, sequentially acquiring first input information and second input information.
In some embodiments, the specific implementation of step 301 and the technical effect brought by the implementation may refer to step 201 in those embodiments corresponding to fig. 2, and are not described herein again.
Step 302, inputting the first input information and the second input information into a machine learning model to obtain an error correction value.
In some embodiments, an executing entity (e.g., the server 101 in fig. 1) of the method for presenting information may input the first input information and the second input information into a machine learning model, resulting in an error correction value, wherein the machine learning model is trained by a training sample set.
As an example, the machine learning model may be derived by performing the following training steps based on a set of training samples. Performing the following training steps based on the set of training samples: respectively inputting the sample information pairs of at least one training sample in the training sample set into an initial machine learning model to obtain error correction values corresponding to each sample information pair in the at least one training sample; comparing each sample information pair in the at least one training sample with a corresponding sample error correction value; determining the prediction accuracy of the initial machine learning model according to the comparison result; determining whether the prediction accuracy is greater than a preset accuracy threshold; in response to determining that the accuracy is greater than the preset accuracy threshold, taking the initial machine learning model as a trained machine learning model; and adjusting parameters of the initial machine learning model in response to the determination that the accuracy is not greater than the preset accuracy threshold, forming a training sample set by using unused training samples, using the adjusted initial machine learning model as the initial machine learning model, and executing the training step again.
It will be appreciated that after the above training, the machine learning model can be used to characterize the correspondence between the sample information pairs and the error correction values. The above-mentioned machine learning model may be a convolutional neural network model.
In some optional implementations of some embodiments, the training sample set includes a sample information pair and an error correction value of the sample information pair, and the machine learning model is trained with the sample information pair as an input and the error correction value of the sample information pair as an expected output.
Step 303, determining whether the first input information needs error correction based on the comparison result between the error correction value and a preset threshold.
In some embodiments, the executing entity may compare the error correction value obtained in step 302 with a preset threshold, and determine whether the first input information needs error correction according to the comparison result. The preset threshold may be preset. And when the error correction value reaches a preset threshold value, determining that the first input information needs error correction.
Step 304, in response to determining that error correction is required, generating error correction information based on the first input information and the second input information.
In some embodiments, the specific implementation of step 304 and the technical effect brought by the implementation may refer to step 203 in those embodiments corresponding to fig. 2, which are not described herein again.
As can be seen from the above example, the error correction value is obtained by inputting the acquired first input information and second input information to a machine learning model trained in advance. Then, based on the comparison result of the error correction value and the preset threshold, it is determined whether the first input information needs error correction. The speed of determining whether the first input information needs error correction can be increased.
With further reference to fig. 4, as an implementation of the above-described method for the above-described figures, the present disclosure provides some embodiments of an apparatus for generating information, which correspond to those of the method embodiments described above for fig. 2, and which may be applied in particular in various electronic devices.
As shown in fig. 4, an apparatus 400 for generating information of some embodiments includes: an acquisition unit 401, a determination unit 402, and a generation unit 403. Wherein, the obtaining unit 401 is configured to obtain the first input information and the second input information in sequence; a determining unit 402 configured to analyze the first input information and the second input information and determine whether the first input information needs error correction; a generating unit 403 configured to generate error correction information from the first input information and the second input information in response to determining that error correction is required.
In some embodiments, the determining unit 402 in the apparatus 400 for generating information comprises: a deriving subunit configured to input the first input information and the second input information into a machine learning model, and derive an error correction value, wherein the machine learning model is trained by a training sample set; and a determining subunit configured to determine whether the first input information needs error correction based on a comparison result of the error correction value and a preset threshold.
In some embodiments, the training sample set in the deriving subunit in the determining unit 402 in the apparatus for generating information 400 includes a pair of sample information and error correction values of the pair of sample information, and the machine learning model is trained with the pair of sample information as input and the error correction values of the pair of sample information as desired output.
In some embodiments, the determining unit 402 of the apparatus for generating information 400 is further configured to: and determining that the first input information requires error correction in response to the second input information comprising predefined characters.
In some embodiments, the determining unit 402 of the apparatus for generating information 400 is further configured to: performing regular matching on the second input information according to a predefined regular expression to determine whether the second input information is consistent with the predefined regular expression; in response to determining that the first input information matches, it is determined that error correction is required.
In some embodiments, the means for generating information 400 is further configured to: an input terminal for transmitting the error correction information to the first input information; detecting a user confirmation operation for the error correction information displayed on the input terminal; and sending the error correction information to a receiving terminal of the first input information in response to the detection of the user confirmation operation.
The apparatus for generating information disclosed in some embodiments of the present disclosure may determine whether the first input information needs error correction more accurately by determining whether the second input information includes predefined characters or by performing regular matching on the second input information according to a predefined regular expression.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., the server of fig. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The terminal device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; a storage device 508 including, for example, a memory card; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: sequentially acquiring first input information and second input information; analyzing the first input information and the second input information to determine whether the first input information needs error correction; in response to determining that error correction is required, error correction information is generated based on the first input information and the second input information.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a determination unit, and a generation unit. Here, the names of the units do not constitute a limitation of the units themselves in some cases, and for example, the acquisition unit may also be described as a "unit that sequentially acquires the first input information and the second input information".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In accordance with one or more embodiments of the present disclosure, there is provided a method for generating information, including: sequentially acquiring first input information and second input information; analyzing the first input information and the second input information to determine whether the first input information needs error correction; in response to determining that error correction is required, error correction information is generated based on the first input information and the second input information.
According to one or more embodiments of the present disclosure, the analyzing the first input information and the second input information to determine whether the first input information needs error correction includes: inputting the first input information and the second input information into a machine learning model to obtain an error correction value, wherein the machine learning model is trained through a training sample set; determining whether the first input information needs error correction based on a comparison result of the error correction value and a preset threshold value
According to one or more embodiments of the present disclosure, the training sample set includes a pair of sample information and an error correction value of the pair of sample information, and the machine learning model is trained with the pair of sample information as an input and the error correction value of the pair of sample information as a desired output.
According to one or more embodiments of the present disclosure, the analyzing the first input information and the second input information to determine whether the first input information needs error correction includes: and determining that the first input information requires error correction in response to the second input information comprising predefined characters.
According to one or more embodiments of the present disclosure, the analyzing the first input information and the second input information to determine whether the first input information needs error correction includes: performing regular matching on the second input information according to a predefined regular expression to determine whether the second input information is consistent with the predefined regular expression; in response to determining that the first input information matches, it is determined that error correction is required.
According to one or more embodiments of the present disclosure, the method further includes: an input terminal for transmitting the error correction information to the first input information; detecting a user confirmation operation for the error correction information displayed on the input terminal; and sending the error correction information to a receiving terminal of the first input information in response to the detection of the user confirmation operation.
In accordance with one or more embodiments of the present disclosure, there is provided an apparatus for generating information, including: an acquisition unit configured to sequentially acquire first input information and second input information; a determining unit configured to analyze the first input information and the second input information and determine whether the first input information needs error correction; and a generating unit configured to generate error correction information based on the first input information and the second input information in response to determining that error correction is required.
According to one or more embodiments of the present disclosure, the determining unit includes: a deriving subunit configured to input the first input information and the second input information into a machine learning model, and derive an error correction value, wherein the machine learning model is trained by a training sample set; and a determining subunit configured to determine whether the first input information needs error correction based on a comparison result of the error correction value and a preset threshold.
According to one or more embodiments of the present disclosure, the training sample set in the obtaining subunit in the determining unit includes a sample information pair and an error correction value of the sample information pair, and the machine learning model is trained with the sample information pair as an input and the error correction value of the sample information pair as an expected output.
According to one or more embodiments of the present disclosure, the determining unit is further configured to: and determining that the first input information requires error correction in response to the second input information comprising predefined characters.
According to one or more embodiments of the present disclosure, the determining unit is further configured to: performing regular matching on the second input information according to a predefined regular expression to determine whether the second input information is consistent with the predefined regular expression; in response to determining that the first input information matches, it is determined that error correction is required.
In accordance with one or more embodiments of the present disclosure, the means for generating information is further configured to: an input terminal for transmitting the error correction information to the first input information; detecting a user confirmation operation for the error correction information displayed on the input terminal; and sending the error correction information to a receiving terminal of the first input information in response to the detection of the user confirmation operation.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as described in any of the embodiments above.
According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any of the embodiments above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (9)

1. A method for generating information, comprising:
sequentially acquiring first input information and second input information;
analyzing the first input information and the second input information to determine whether the first input information needs error correction;
in response to determining that error correction is required, generating error correction information according to the first input information and the second input information;
the analyzing the first input information and the second input information to determine whether the first input information needs error correction includes: performing word segmentation processing on the first input information to obtain at least one word; inputting the at least one word and the second input information into a pointer network to obtain at least one probability value; and comparing the at least one probability value with a preset threshold value, and determining that the first input information needs to be corrected when the probability value reaches the preset threshold value, wherein the at least one word is sequentially input into the pointer network according to the sequence of the at least one word appearing in the first input information.
2. The method of claim 1, wherein the analyzing the first and second input information to determine whether the first input information requires error correction comprises:
inputting the first input information and the second input information into a machine learning model to obtain an error correction value, wherein the machine learning model is trained through a training sample set;
and determining whether the first input information needs error correction or not based on the comparison result of the error correction value and a preset threshold value.
3. The method of claim 2, wherein the training sample set comprises a sample information pair and an error correction value for the sample information pair, and wherein the machine learning model is trained with the sample information pair as an input and the error correction value for the sample information pair as an expected output.
4. The method of claim 1, wherein the analyzing the first and second input information to determine whether the first input information requires error correction comprises:
in response to the second input information comprising predefined characters, determining that the first input information requires error correction.
5. The method of claim 1, wherein the analyzing the first and second input information to determine whether the first input information requires error correction comprises:
performing regular matching on the second input information according to a predefined regular expression to determine whether the second input information is consistent with the predefined regular expression;
in response to determining that the first input information requires error correction.
6. The method according to one of claims 1-5, wherein the method further comprises:
sending the error correction information to an input terminal of the first input information;
detecting a user confirmation operation for the error correction information displayed on the input terminal;
and responding to the detection of the user confirmation operation, and sending the error correction information to a receiving terminal of the first input information.
7. An apparatus for generating information, comprising:
an acquisition unit configured to sequentially acquire first input information and second input information;
a determination unit configured to analyze the first input information and the second input information, and determine whether the first input information requires error correction;
a generating unit configured to generate error correction information from the first input information and the second input information in response to determining that error correction is required;
the determining unit is further configured to perform word segmentation processing on the first input information to obtain at least one word; inputting the at least one word and the second input information into a pointer network to obtain at least one probability value; and comparing the at least one probability value with a preset threshold value, and determining that the first input information needs to be corrected when the probability value reaches the preset threshold value, wherein the at least one word is sequentially input into the pointer network according to the sequence of the at least one word appearing in the first input information.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
9. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-6.
CN202010003276.0A 2020-01-02 2020-01-02 Method, apparatus, electronic device, and computer-readable medium for generating information Active CN111221424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010003276.0A CN111221424B (en) 2020-01-02 2020-01-02 Method, apparatus, electronic device, and computer-readable medium for generating information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010003276.0A CN111221424B (en) 2020-01-02 2020-01-02 Method, apparatus, electronic device, and computer-readable medium for generating information

Publications (2)

Publication Number Publication Date
CN111221424A CN111221424A (en) 2020-06-02
CN111221424B true CN111221424B (en) 2021-04-27

Family

ID=70830999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010003276.0A Active CN111221424B (en) 2020-01-02 2020-01-02 Method, apparatus, electronic device, and computer-readable medium for generating information

Country Status (1)

Country Link
CN (1) CN111221424B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113676394B (en) * 2021-08-19 2023-04-07 维沃移动通信(杭州)有限公司 Information processing method and information processing apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550173A (en) * 2016-02-06 2016-05-04 北京京东尚科信息技术有限公司 Text correction method and device
CN106921561A (en) * 2017-03-01 2017-07-04 维沃移动通信有限公司 A kind of information processing method and device
CN110427625A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Sentence complementing method, device, medium and dialog process system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019200657A (en) * 2018-05-17 2019-11-21 東芝メモリ株式会社 Arithmetic device and method for controlling arithmetic device
US20190354839A1 (en) * 2018-05-18 2019-11-21 Google Llc Systems and Methods for Slate Optimization with Recurrent Neural Networks
US10770066B2 (en) * 2018-05-31 2020-09-08 Robert Bosch Gmbh Slot filling in spoken language understanding with joint pointer and attention

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550173A (en) * 2016-02-06 2016-05-04 北京京东尚科信息技术有限公司 Text correction method and device
CN106921561A (en) * 2017-03-01 2017-07-04 维沃移动通信有限公司 A kind of information processing method and device
CN110427625A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Sentence complementing method, device, medium and dialog process system

Also Published As

Publication number Publication date
CN111221424A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN110969012B (en) Text error correction method and device, storage medium and electronic equipment
CN111597825B (en) Voice translation method and device, readable medium and electronic equipment
CN112650841A (en) Information processing method and device and electronic equipment
CN112200173B (en) Multi-network model training method, image labeling method and face image recognition method
CN112883966B (en) Image character recognition method, device, medium and electronic equipment
WO2021088790A1 (en) Display style adjustment method and apparatus for target device
CN113760674A (en) Information generation method and device, electronic equipment and computer readable medium
CN113204977A (en) Information translation method, device, equipment and storage medium
CN112270200A (en) Text information translation method and device, electronic equipment and storage medium
CN111209432A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN112257459B (en) Language translation model training method, translation method, device and electronic equipment
CN112309384A (en) Voice recognition method, device, electronic equipment and medium
CN111221424B (en) Method, apparatus, electronic device, and computer-readable medium for generating information
CN113468344A (en) Entity relationship extraction method and device, electronic equipment and computer readable medium
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN111339790B (en) Text translation method, device, equipment and computer readable storage medium
CN113488050B (en) Voice wakeup method and device, storage medium and electronic equipment
CN113807056A (en) Method, device and equipment for correcting error of document name sequence number
CN114429629A (en) Image processing method and device, readable storage medium and electronic equipment
CN113191257A (en) Order of strokes detection method and device and electronic equipment
CN112669816A (en) Model training method, speech recognition method, device, medium and equipment
CN113778846A (en) Method and apparatus for generating test data
CN112070034A (en) Image recognition method and device, electronic equipment and computer readable medium
CN111737572A (en) Search statement generation method and device and electronic equipment
CN111399725B (en) Method, apparatus, electronic device, and medium for presenting information

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
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder