Abstract:
This application relates to the field of communications technologies, and provides a human-computer interaction method and an electronic device, to help accurately recognize a user intention, meet a user requirement, and improve user experience. The method specifically includes: In a human-computer dialog interaction process, when a server performs slot extraction on user discourse, if there is a slot corresponding to which information fails to be extracted and the slot is an optional key slot, the server asks the user a question, to determine whether the information corresponding to the slot is necessary. If the information is necessary, the server further extracts the information corresponding to the slot. If the information is unnecessary, the server does not extract the information corresponding to the slot.
Abstract:
The present application discloses a pulse encoding method for use by a voice encoder. An initial number of coding bits is determined according to number of pulses in an input signal. An index value is calculated according to information of the pulses in the input signal. The index value is compared with an adjustment threshold value. If the index value is smaller than the adjustment threshold value, the index value is encoded using a reduced number of encoding bits. If the index value is not smaller than the adjustment threshold value, the index value plus an offset value is encoded using the initial number of encoding bits. The reduced number of encoding bits is smaller than the initial number of encoding bits, and the offset value is greater than or equal to the adjustment threshold value.
Abstract:
Embodiments provide a data query method and apparatus. The method includes receiving a query request, where the query request includes a query condition, and the query condition relates to N different databases. The method also includes calculating a query cost of each cross-database join processing manner of M cross-database join processing manners, where the query cost of each cross-database join processing manner is a cost for performing, using each cross-database join processing manner, in the N different databases, data query corresponding to the query condition, and M is an integer greater than or equal to 2. The method also includes determining, in the M cross-database join processing manners, a cross-database join processing manner for current use according to the query cost of each cross-database join processing manner, and performing, using the cross-database join processing manner for current use, in the N different databases, data query corresponding to the query condition.
Abstract:
The present invention discloses a method and a device for pulse encoding, and a method and a device for pulse decoding. The method for pulse encoding includes: calculating an index value of an input pulse; selecting an adjustment threshold value according to the number of pulses, and comparing the index value of the pulse with the adjustment threshold value; if the index value is smaller than the adjustment threshold value, adopting the first number of encoding bits to encode the index value, if the index value is not smaller than the adjustment threshold value, adopting the second number of encoding bits to encode the index value plus an offset value, where the first number is smaller than the second number, the first number and the second number are both positive integers, and the offset value is greater than or equal to the adjustment threshold value.
Abstract:
A synchronous audio playback method, apparatus and system are provided. The method includes calculating a first playback delay generated when an audio file is played; acquiring a second playback delay; calculating a delay offset; calculating a data adjustment amount; adding to-be-adjusted data to or deleting to-be-adjusted data from a current to-be-played part of the audio file according to a value of the delay offset, to obtain a replacement part corresponding to the current to-be-played part, where a data amount of the to-be-adjusted data is the data adjustment amount; and playing the replacement part. With the technical solutions of the present invention, playback duration of a current to-be-played part can be adjusted in a manner of adding or deleting data, so that a controlling device and a controlled device generate sounds simultaneously when playing a to-be-played clip in a very simple implementation process.
Abstract:
The present invention discloses a method and a device for pulse encoding, and a method and a device for pulse decoding. The method for pulse encoding includes: calculating an index value of an input pulse; selecting an adjustment threshold value according to the number of pulses, and comparing the index value of the pulse with the adjustment threshold value; if the index value is smaller than the adjustment threshold value, adopting the first number of encoding bits to encode the index value, if the index value is not smaller than the adjustment threshold value, adopting the second number of encoding bits to encode the index value plus an offset value, where the first number is smaller than the second number, the first number and the second number are both positive integers, and the offset value is greater than or equal to the adjustment threshold value.
Abstract:
A semantic parsing method includes extracting, by a first server, a first entity of a first slot from a first user sentence, modifying the first entity to a second entity of a second slot when the first entity is a pronoun, sending a first server request to a second server, and obtaining a first service result from the second server in response to the first service request. The first service request includes indication information of a first intention and the first entity, the second server is an application server that provides a first skill, and the first service result is based on the first intention and the first entity. The first server returns the first service result to a device to output by the device.
Abstract:
This application provides an image aesthetic processing method and an electronic device. A method for generating an image aesthetic scoring model includes: constructing a first neural network based on a preset convolutional structure set; obtaining an image classification neural network, where the image classification neural network is used to classify image scenarios; obtaining a second neural network based on the first neural network and the image classification neural network, where the second neural network is a neural network containing scenario information; and determining an image aesthetic scoring model based on the second neural network, where output information of the image aesthetic scoring model includes image scenario classification information. In this method, scenario information is integrated into a backbone neural network, so that a resulting image aesthetic scoring model is interpretable. In addition, scoring accuracy of the image aesthetic scoring model can be improved by using the preset convolutional structure set.
Abstract:
An audio file playing method and an apparatus are disclosed and are used to: when an audio file is played, expand a quantity of audio channel signals in the audio file and improve a playing effect of the audio file. The method is as follows: after the audio file is obtained, determining, whether the audio file includes an audio channel signal that can be played by the mobile device; if the audio file includes the audio channel signal that can be played by the mobile device, directly playing the audio channel signal. Therefore, when multiple mobile devices are used to play a same audio file, the mobile devices can avoid performing a same operation, thereby increasing a quantity of audio channels of the audio file, expanding a sound field of the audio file, and improving a playing effect of the audio file.
Abstract:
Embodiments of the present invention provide a column-oriented database processing method, where a column-oriented database includes a marker column and more than one data column, the data column is used to store specific data in a column store manner, a value of a marker bit of each row in the marker column is used to indicate validity of data that is located in a same row as the marker bit, and the method includes: receiving a query request sent by an application program, where the query request contains a query condition; querying the more than one data column according to the marker column and the query condition to obtain a query result that meets both the query condition and a requirement that a marker bit of the query result in the marker column is valid; and sending the query result to the application program.