WO2019127833A1 - 一种系统语言切换方法、可读存储介质、终端设备及装置 - Google Patents

一种系统语言切换方法、可读存储介质、终端设备及装置 Download PDF

Info

Publication number
WO2019127833A1
WO2019127833A1 PCT/CN2018/074867 CN2018074867W WO2019127833A1 WO 2019127833 A1 WO2019127833 A1 WO 2019127833A1 CN 2018074867 W CN2018074867 W CN 2018074867W WO 2019127833 A1 WO2019127833 A1 WO 2019127833A1
Authority
WO
WIPO (PCT)
Prior art keywords
language
image
priority
text information
target
Prior art date
Application number
PCT/CN2018/074867
Other languages
English (en)
French (fr)
Inventor
蔡锦升
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Priority to SG11201902498RA priority Critical patent/SG11201902498RA/en
Priority to US16/328,200 priority patent/US11341329B2/en
Priority to JP2018553236A priority patent/JP6718978B2/ja
Publication of WO2019127833A1 publication Critical patent/WO2019127833A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/263Language identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5846Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using extracted text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/16Image preprocessing
    • G06V30/162Quantising the image signal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • G06V30/244Division of the character sequences into groups prior to recognition; Selection of dictionaries using graphical properties, e.g. alphabet type or font
    • G06V30/2445Alphabet recognition, e.g. Latin, Kanji or Katakana
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the present application belongs to the field of computer technology, and in particular, to a system language switching method, a computer readable storage medium, a terminal device and a device.
  • the system language is generally set in various intelligent terminals.
  • the operation path is very deep. Users often need to perform multiple operations to complete the system language setting process. The operation is cumbersome. For example, some terminals must be set and advanced. After the multi-layer selection of language, input method, language, etc., the system language setting can be made in the language selection box. Moreover, for a user who does not understand the current system language, it is more difficult to complete these operations because they do not understand the meanings of the various options in these operations. For example, if a user who does not understand English wants to switch the English system to the Chinese system, Faced with various options on the terminal, you may not know how to get started, and the user experience is extremely poor.
  • the embodiment of the present application provides a system language switching method, a computer readable storage medium, a terminal device, and a device, to solve the problem that the system language switching operation is cumbersome and the user experience is poor.
  • a first aspect of the embodiments of the present application provides a system language switching method, which may include:
  • a second aspect of embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
  • a third aspect of an embodiment of the present application provides a system language switching terminal device including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing The computer readable instructions implement the following steps:
  • a fourth aspect of the embodiments of the present application provides a system language switching apparatus, which may include:
  • An image obtaining module configured to acquire a preset image used to set a system language of the target terminal
  • a text information extraction module configured to extract text information in the image
  • a target language determining module configured to determine a target language corresponding to the text information
  • a system language switching module configured to switch a system language of the target terminal to the target language.
  • the embodiment of the present application has the following beneficial effects: the embodiment of the present application first obtains a preset image for setting a system language of a target terminal, and then extracts text information in the image and determines the text. The target language corresponding to the information, and finally switching the system language of the target terminal to the target language.
  • the user only needs to prepare an image for setting the system language of the target terminal in advance. For example, a piece of paper with Chinese written in it, the system can obtain the text information on the image through image acquisition, text information extraction and the like. And determine that the text message is Chinese, and finally switch the system language of the target terminal to Chinese.
  • the entire process is extremely easy to operate, greatly improving the user experience.
  • FIG. 1 is a flowchart of an embodiment of a system language switching method according to an embodiment of the present application
  • step S102 of a system language switching method in an application scenario according to an embodiment of the present application is a schematic flowchart of step S102 of a system language switching method in an application scenario according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of step S103 of a system language switching method in an application scenario according to an embodiment of the present application;
  • FIG. 4 is a schematic flowchart of a priority setting process of a language in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of personalizing the default priority in the embodiment of the present application.
  • FIG. 6 is a structural diagram of an embodiment of a system language switching apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of an embodiment of a system language switching terminal device according to an embodiment of the present application.
  • an embodiment of a system language switching method in an embodiment of the present application may include:
  • Step S101 Acquire a preset image for setting a system language of the target terminal.
  • the image contains text information of the target language. For example, if the user wants to switch the system language to Chinese, that is, the target language is Chinese, the user can write "Chinese” on a piece of paper, or write other The Chinese information is then photographed using the camera function of the target terminal to obtain an image containing the text information.
  • Step S102 Extract text information in the image.
  • step S102 may include the following specific process:
  • step S1021. the image is subjected to gradation processing to obtain a grayscale image of the image.
  • the original state of the image is generally in the form of RGB, where R represents a red component, G represents a green component, and B represents a blue component, and grayscale converts an image represented in RGB form into a grayscale representation.
  • the image also known as the grayscale image.
  • Grey represents the converted gray value.
  • Step S1022 Perform equalization processing on the grayscale image to obtain an equalized grayscale image of the image.
  • the gray value of the image is such that the number of pixels in a certain gray range is approximately the same. Thereby a better binarization effect can be achieved.
  • the equalization process first calculates a distribution probability of each gray value in a grayscale image, and then calculates a cumulative distribution probability of each grayscale value according to the distribution probability, and based on the cumulative distribution probability, Mapping each gray value according to a preset mapping rule to obtain each mapped gray value, wherein each mapped gray value is proportional to the corresponding cumulative distribution probability, and finally, each of the mapped The gray value is rounded to obtain the respective gray values after rounding.
  • a simple example is as follows: If there are four kinds of gray values in the grayscale image, which are 50, 75, 103, and 128, respectively, and the distribution probabilities of the respective grayscale values are 0.2, 0.3, 0.1, and 0.4, respectively, it can be calculated.
  • four kinds of gray values after mapping can be obtained, which are 51, 127.5, 153, and 255, respectively, and are rounded up to 51, 128, 153, and 255.
  • Step S1023 Perform binarization processing on the equalized grayscale image to obtain a binary image of the image.
  • the binarization of the image is to set the gray value of the pixel on the image to 0 or 255, that is, to present the entire image with a distinct black and white visual effect.
  • An image includes the target object, background, and noise.
  • the most common method is to set a global threshold T, and use T to divide the image data into two parts: A pixel group larger than T and a pixel group smaller than T.
  • the pixel value of the pixel group larger than T is set to white (or black), and the pixel value of the pixel group smaller than T is set to black (or white).
  • the scheme preferably uses an adaptive threshold binarization algorithm to binarize the image, divide the image into smaller blocks, calculate the histogram of each block separately, and calculate the threshold for each block according to the peak value of each histogram. .
  • the threshold of each pixel is obtained by interpolation based on the threshold of the adjacent block.
  • Step S1024 performing denoising processing on the binary image to obtain a denoising image of the image.
  • each connected domain in the binary image is determined, wherein the connected domain is a set consisting of pixels that are connected to each other and have the same gray value.
  • the connected domain is a set consisting of pixels that are connected to each other and have the same gray value.
  • eight neighborhoods are used, that is, around each pixel.
  • Eight adjacent pixels are used as pixels in communication therewith.
  • the number of pixels in each connected domain is calculated, and the connected domain whose number of pixels is less than the preset threshold is determined as the connected domain to be adjusted.
  • the threshold may be set according to actual conditions. For example, the value may be set to 10 Or other values;
  • the black and white pixel is reversed for each pixel in the connected domain, that is, the original white pixel is changed to a black pixel, and the original black pixel is changed to a white pixel to obtain the denoised image.
  • Step S1025 Extract text information in the denoised image.
  • the denoising image has effectively eliminated the interference caused by various factors such as light brightness, shadow, and noise on the paper during the photographing process, and can directly directly in the denoised image.
  • Step S103 determining a target language corresponding to the text information.
  • step S103 may include the following specific process:
  • Step S1031 Select the language with the highest priority from the preset language library as the current matching language.
  • the priority may be determined according to actual conditions, for example, may be determined according to the number of people used in various languages, the range of regions used, and the like.
  • Step S1032 calculating a matching degree between the text information and the current matching language.
  • the identification template of the current matching language may be established in advance.
  • a set of 26 English letters may be used as an identification template, and characters in the text information are respectively compared with the recognition template. If the character is found in the identification template, the character is successfully matched. If the character is not found in the recognition template, the character matching fails. Finally, the number of successfully matched characters is divided by the total number of characters, and the degree of matching between the text information and the current matching language can be obtained.
  • Step S1033 Determine whether the matching degree between the text information and the current matching language is greater than a preset threshold.
  • the threshold of the matching degree may be set to 70%, 80%, or 90% according to the actual situation, and the like, which is not specifically limited in this embodiment.
  • step S1034 is performed, if the matching degree between the text information and the current matching language is greater than the threshold, then Step S1035 is performed.
  • Step S1034 Select, from the language library, a language with the highest priority that has not been matched as the new current matching language.
  • step S1034 After step S1034 is performed, the process returns to step S1032 and subsequent steps.
  • Step S1035 Determine the current matching language as a target language.
  • Chinese may be determined as the target language.
  • Step S104 Switch the system language of the target terminal to the target language.
  • the setting process of the priority of the language in the language library may specifically include:
  • Step S401 Send a system language query instruction to the sampling terminal.
  • the sampling terminal is a preset terminal that is used as a statistical sample in the case of a statistical system language setting.
  • the number of sampling terminals should be greater than a certain threshold, such as 10000, 20000, etc., the specific value can be set according to the actual situation.
  • Step S402 Receive a feedback result of the sampling terminal to the system language query instruction.
  • the current system language setting of the sampling terminal is carried in the feedback result. For example, if the current system language of the sampling terminal A is Chinese, the feedback result is Chinese, and if the current system language of the sampling terminal B is English, Then the feedback is in English.
  • Step S403 Calculate, according to the feedback result, the number of times the various languages in the language library are set to be system languages.
  • Step S404 determining priorities of the various languages according to the number of times the various languages are set to the system language.
  • the priority of the language is positively related to the number of times the language is set to the system language. In statistical results, the more times a language is set to the system language, the higher its priority. For example, according to the statistical data, if the number of terminals in which the A language is set to the system language is 10000, the number of terminals in which the B language is set to the system language is 5000, and the number of terminals in which the C language is set to the system language is 1000, then it can be determined
  • the priority order is A language, B language, and C language from high to low.
  • the general default priority order is completed by the process shown in FIG. 4.
  • the default priority can be personalized according to the target terminal.
  • the specific adjustment process is as shown in FIG. 5:
  • Step S501 Determine whether a SIM card is installed in the target terminal.
  • SIM Subscriber Identity Module
  • smart card user identification card
  • the SIM card must be installed on the mobile phone before the call can be made normally.
  • the SIM card stores the digital mobile phone through a computer chip. Customer information.
  • the terminal system is activated, and the system automatically detects whether the SIM card is installed in the terminal.
  • the SIM_STATE_ABSENT attribute item of the TelephonyManager class can be used to determine whether the SIM card is installed in the terminal.
  • step S502 is performed. If the SIM card is installed in the target terminal, step S503 and subsequent steps are performed.
  • Step S502 Acquire location information of the target terminal, and then adjust a priority of a language corresponding to the location information to a highest priority.
  • the location information of the target terminal may be acquired by GPS, and then the country corresponding to the location information is determined, and the priority of the language of the country is adjusted to the highest priority. For example, if the obtained location information is located in China, the priority of Chinese is adjusted to the highest priority.
  • Step S503 Obtain an address book and short message information from the SIM card.
  • the address information in the SIM card can be obtained by the getContentResolver() function and the "content://icc/adn” parameter or the "content://sim/adn” parameter.
  • Phone number, comment information, etc. read the SIM card by the getContentResolver() function and the "content://sms/” parameter, the "content://sms/inbox” parameter, and the "content://sms/sent” parameter.
  • the SMS message corresponding to the contact.
  • Step S504 Determine whether the address book and the short message information are empty.
  • step S505 is performed, and if the address book and the short message information are not empty, step S506 is performed.
  • Step S505 Acquire a home location of the SIM card, and then adjust a priority of a language corresponding to the attribution to a highest priority.
  • IMSI International Mobile Subscriber Identification Number
  • IMSI includes MCC (Mobile Country Code, the mobile country number, the MCC is composed of 3 digits, and is used to uniquely identify the country to which the SIM card belongs. For example, when the MCC is 460, the country to which the SIM card belongs is China.
  • MCC Mobile Country Code, the mobile country number, the MCC is composed of 3 digits, and is used to uniquely identify the country to which the SIM card belongs. For example, when the MCC is 460, the country to which the SIM card belongs is China.
  • Step S506 adjusting the priority of the language used in the address book and the short message information to the highest priority.
  • the system recognizes the coded content of the text content "Zhang San”, and the language corresponding to the code is Chinese, and the language type of the contact is determined to be Chinese.
  • the text content is read as "Don't” in the contact's short message. Forget to lock the door when you leave", the system recognizes that the language corresponding to the encoded information is English, and determines that the language type of the contact is English.
  • the terminal passes the query after the phone number is obtained.
  • the query interface of the third-party attribution query server set up by the server or the operator is queried to obtain the attribution information of the number of the number, that is, the language type can be set according to the attribution information.
  • the telephone number read by the terminal is +1-7654321111
  • the international code for querying the number from the server is 1, and the attribution is US, and the language type of the contact is considered to be English.
  • the embodiment of the present application first obtains a preset image for setting a system language of a target terminal, and then extracts text information in the image and determines a target language corresponding to the text information, and finally the target The system language of the terminal is switched to the target language.
  • the user only needs to prepare an image for setting the system language of the target terminal in advance. For example, a piece of paper with Chinese written in it, the system can obtain the text information on the image through image acquisition, text information extraction and the like. And determine that the text message is Chinese, and finally switch the system language of the target terminal to Chinese.
  • the entire process is extremely easy to operate, greatly improving the user experience.
  • FIG. 6 is a structural diagram of an embodiment of a system language switching apparatus according to an embodiment of the present application.
  • a system language switching device may include:
  • An image obtaining module 601, configured to acquire a preset image for setting a system language of the target terminal
  • a text information extraction module 602 configured to extract text information in the image
  • a target language determining module 603, configured to determine a target language corresponding to the text information
  • the system language switching module 604 is configured to switch the system language of the target terminal to the target language.
  • target language determining module may include:
  • the current matching language selection unit is configured to select the language with the highest priority from the preset language library as the current matching language
  • a matching degree calculation unit configured to calculate a matching degree between the text information and the current matching language
  • a current matching language replacing unit configured to: if the matching degree between the text information and the current matching language is less than or equal to a preset threshold, select, from the language library, a language with the highest priority that has not been matched. As the new current matching language;
  • a target language determining unit configured to determine the current matching language as the target language if a degree of matching between the text information and the current matching language is greater than the threshold.
  • system language switching device may further include:
  • a query instruction sending module configured to send a system language query instruction to the sampling terminal, where the sampling terminal is a preset terminal that is used as a statistical sample in a statistical system language setting situation;
  • a feedback result receiving module configured to receive a feedback result of the sampling terminal to the system language query instruction
  • a number statistics module configured to separately count, according to the feedback result, the number of times the various languages in the language library are set to be system languages
  • the priority determining module is configured to determine the priority of the various languages according to the number of times the various languages are set to the system language, and the priority of the language is positively correlated with the number of times the language is set to the system language.
  • system language switching device may further include:
  • a first adjustment module configured to acquire location information of the target terminal if the SIM card is not installed in the target terminal, and then adjust a priority of a language corresponding to the location information to a highest priority
  • An information obtaining module configured to obtain an address book and short message information from the SIM card if a SIM card is installed in the target terminal;
  • a second adjustment module configured to adjust a priority of a language used in the address book and the short message information to a highest priority if the address book and the short message information are not empty;
  • the third adjustment module is configured to acquire a home location of the SIM card if the address book and the short message information are empty, and then adjust a priority of a language corresponding to the attribution to a highest priority.
  • the text information extraction module may include:
  • a grayscale processing unit configured to perform grayscale processing on the image to obtain a grayscale image of the image
  • An equalization processing unit configured to perform equalization processing on the grayscale image to obtain an equalized grayscale image of the image
  • a binarization processing unit configured to perform binarization processing on the equalization grayscale image to obtain a binary image of the image
  • a denoising processing unit configured to perform denoising processing on the binary image to obtain a denoising image of the image
  • the text information extracting unit is configured to extract text information in the denoised image.
  • FIG. 7 is a schematic block diagram of a system language switching terminal device provided by an embodiment of the present application. For convenience of description, only parts related to the embodiment of the present application are shown.
  • the system language switching terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, or a cloud server.
  • the system language switching terminal device 7 can include a processor 70, a memory 71, and computer readable instructions 72 stored in the memory 71 and executable on the processor 70, such as performing the system language switching method described above.
  • the processor 70 executes the computer readable instructions 72 to implement the steps in the various system language switching method embodiments described above, such as steps S101 through S104 shown in FIG.
  • the processor 70 when executing the computer readable instructions 72, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 601 through 604 shown in FIG.
  • the computer readable instructions 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70, To complete this application.
  • the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 72 in the system language switching terminal device 7. .
  • the processor 70 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), ASICs (Application) Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 71 may be an internal storage unit of the system language switching terminal device 7, such as a hard disk or a memory of the system language switching terminal device 7.
  • the memory 71 may also be an external storage device of the system language switching terminal device 7, for example, a plug-in hard disk equipped with the system language switching terminal device 7, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card (Flash Card) and so on.
  • the memory 71 may also include both an internal storage unit of the system language switching terminal device 7 and an external storage device.
  • the memory 71 is used to store the computer readable instructions and other instructions and data required by the system language switching terminal device 7.
  • the memory 71 can also be used to temporarily store data that has been output or is about to be output.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of computer readable instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), and a random access memory (RAM, Random Access).
  • a variety of media that can store computer readable instructions such as a Memory, a disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)
  • Character Discrimination (AREA)
  • Telephone Function (AREA)
  • Document Processing Apparatus (AREA)

Abstract

本申请属于计算机技术领域,尤其涉及一种系统语言切换方法、计算机可读存储介质、终端设备及装置。所述方法首先获取用于设置目标终端的系统语言的预设图像,然后提取所述图像中的文字信息并且确定与所述文字信息对应的目标语言,最后将所述目标终端的系统语言切换为所述目标语言。通过本申请,用户仅需要预先准备一个用于设置目标终端的系统语言的图像,例如,一张写有中文的纸张,系统即可通过图像获取、文字信息提取等过程得到图像上面的文字信息,并确定出该文字信息为中文,最终将目标终端的系统语言切换为中文。整个过程操作极为简便,大大提升了用户的使用体验。

Description

一种系统语言切换方法、可读存储介质、终端设备及装置
本申请要求于2017年12月26日提交中国专利局、申请号为CN 201711434263.3、发明名称为“一种系统语言切换方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于计算机技术领域,尤其涉及一种系统语言切换方法、计算机可读存储介质、终端设备及装置。
背景技术
目前各种智能终端中设置系统语言一般是在设置界面,操作路径很深,用户往往需要多次操作才能完成系统语言的设置过程,操作较为繁琐,例如,某些终端要先后经过设置、高级设置、语言和输入法、语言等多层选择后,才能在语言选择框中进行系统语言的设置。而且,对于一个不懂当前系统语言的用户,由于看不懂这些操作过程中各个选项代表的含义,更加难以完成这些操作,例如,对于一个不懂英文的用户想把英文系统切换成中文系统,面对终端上的各种选项,可能完全不知道如何入手,用户体验极差。
技术问题
有鉴于此,本申请实施例提供了一种系统语言切换方法、计算机可读存储介质、终端设备及装置,以解决系统语言切换操作繁琐且用户体验差的问题。
技术解决方案
本申请实施例的第一方面提供了一种系统语言切换方法,可以包括:
获取用于设置目标终端的系统语言的预设图像;
提取所述图像中的文字信息;
确定与所述文字信息对应的目标语言;
将所述目标终端的系统语言切换为所述目标语言。
本申请实施例的第二方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
获取用于设置目标终端的系统语言的预设图像;
提取所述图像中的文字信息;
确定与所述文字信息对应的目标语言;
将所述目标终端的系统语言切换为所述目标语言。
本申请实施例的第三方面提供了一种系统语言切换终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取用于设置目标终端的系统语言的预设图像;
提取所述图像中的文字信息;
确定与所述文字信息对应的目标语言;
将所述目标终端的系统语言切换为所述目标语言。
本申请实施例的第四方面提供了一种系统语言切换装置,可以包括:
图像获取模块,用于获取用于设置目标终端的系统语言的预设图像;
文字信息提取模块,用于提取所述图像中的文字信息;
目标语言确定模块,用于确定与所述文字信息对应的目标语言;
系统语言切换模块,用于将所述目标终端的系统语言切换为所述目标语言。
有益效果
本申请实施例与现有技术相比存在的有益效果是:本申请实施例首先获取用于设置目标终端的系统语言的预设图像,然后提取所述图像中的文字信息并且确定与所述文字信息对应的目标语言,最后将所述目标终端的系统语言切换为所述目标语言。通过本申请,用户仅需要预先准备一个用于设置目标终端的系统语言的图像,例如,一张写有中文的纸张,系统即可通过图像获取、文字信息提取等过程得到图像上面的文字信息,并确定出该文字信息为中文,最终将目标终端的系统语言切换为中文。整个过程操作极为简便,大大提升了用户的使用体验。
附图说明
图1为本申请实施例中一种系统语言切换方法的一个实施例流程图;
图2为本申请实施例中一种系统语言切换方法的步骤S102在一个应用场景下的示意流程图;
图3为本申请实施例中一种系统语言切换方法的步骤S103在一个应用场景下的示意流程图;
图4为本申请实施例中语言的优先级设置过程的示意流程图;
图5为本申请实施例中对默认优先级进行个性化调整的示意流程图;
图6为本申请实施例中一种系统语言切换装置的一个实施例结构图;
图7为本申请实施例中一种系统语言切换终端设备的一个实施例示意框图。
本发明的实施方式
请参阅图1,本申请实施例中一种系统语言切换方法的一个实施例可以包括:
步骤S101、获取用于设置目标终端的系统语言的预设图像。
所述图像中包含有目标语言的文字信息,例如,若用户想要将系统语言切换为中文,即目标语言为中文,那么用户可以在一张纸上写上“中文”字样,或者写上其它的中文信息,然后使用目标终端的摄像功能进行拍摄,得到包含所述文字信息的图像。
步骤S102、提取所述图像中的文字信息。
优选地,如图2所示,步骤S102可以包括以下具体过程:
步骤S1021、对所述图像进行灰度化处理,得到所述图像的灰度图。
所述图像的原始状态一般是RGB形式的,其中,R代表红色分量,G代表绿色分量,B代表蓝色分量,灰度化即是将用RGB形式表示的图像转化为使用灰度值形式表示的图像,也即灰度图。
具体地,两者之间可以通过以下公式进行转化:
Gray=R*0.3+G*0.59+B*0.11
其中,Grey代表转化后的灰度值。
步骤S1022、对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图。
对灰度图的灰度分布进行均衡化处理,把灰度分布从比较集中的某个灰度区间变成在全部灰度范围内的均匀分布,也就是对图像进行非线性拉伸,重新分配图像灰度值,使一定灰度范围内的像素数量大致相同。从而可以达到更好的二值化效果。
具体地,所述均衡化过程首先统计各个灰度取值在灰度图中的分布概率,然后根据所述分布概率计算各个灰度值的累积分布概率,并以所述累积分布概率为依据,按照预设的映射规则对各个灰度值进行映射,得到映射后的各个灰度值,其中,映射后的各个灰度值与对应的所述累积分布概率成正比,最后,对映射后的各个灰度值进行取整操作,得到取整后的各个灰度值。
简单举例如下:若灰度图中共有4种灰度取值,分别为50、75、103和128,且各个灰度取值的分布概率分别为0.2、0.3、0.1和0.4,则可计算出各个灰度取值的累计分布概率分别为0.2、0.5、0.6和1,设置映射规则为:m i=(m max-m min)*p i,其中,i为当前灰度取值的编号,p i为与之对应的累积分布概率,m i为映射后的灰度值,m max为最大灰度值,在本例中为255,m min为最小灰度值,在本例中为0,根据以上映射关系,可以得到映射后的4种灰度值,分别为51、127.5、153和255,取整后为51、128、153和255。
步骤S1023、对所述均衡灰度图进行二值化处理,得到所述图像的二值图像。
图像的二值化,就是将图像上的像素点的灰度值设置为0或255,也就是将整个图像呈现出明显的只有黑和白的视觉效果。一幅图像包括目标物体、背景还有噪声,要想从多值的数字图像中直接提取出目标物体,最常用的方法就是设定一个全局的阈值T,用T将图像的数据分成两部分:大于T的像素群和小于T的像素群。将大于T的像素群的像素值设定为白色(或者黑色),小于T的像素群的像素值设定为黑色(或者白色)。
本方案优选使用自适应阈值二值化算法对图像进行二值化处理,将图像分成较小的块,分别计算每块的直方图,根据每个直方图的峰值,为每个块计算其阈值。每个像素点的阈值根据相邻的块的阈值进行插值获得。
步骤S1024、对所述二值图像进行去噪处理,得到所述图像的去噪图像。
首先,确定出二值图像中的各个连通域,其中连通域为由彼此连通且灰度值相同的像素构成的集合,在本方案中,采用的是八邻域,即把每个像素周围的8个邻接像素都作为与之联通的像素。然后,计算各个连通域的像素个数,并将像素个数小于预设阈值的连通域确定为待调整连通域,其中,阈值可以根据实际情况进行设置,例如,可以将其取值设置为10或者其它取值;
对连通域中的各个像素进行黑白像素对调,即将原来的白色像素变更为黑色像素,将原来的黑色像素变更为白色像素,得到所述去噪图像。
步骤S1025、提取所述去噪图像中的文字信息。
经过以上的处理过程,所述去噪图像中已有效消除了拍照过程中由于光线亮度、阴影、以及纸张上的杂点等各种因素所产生的干扰,可以直接将所述去噪图像中的图形提取处理,作为待进一步识别的文字信息。
步骤S103、确定与所述文字信息对应的目标语言。
优选地,如图3所示,步骤S103可以包括以下具体过程:
步骤S1031、从预设的语言库中选取优先级最高的语言作为当前匹配语言。
所述优先级可以根据实际情况确定,例如,可以根据各种语言使用的人口数目、使用的区域范围等等进行确定。
步骤S1032、计算所述文字信息与所述当前匹配语言之间的匹配度。
在本实施例中,可以预先建立所述当前匹配语言的识别模板,以英文为例,可以将包含26个英文字母的集合作为识别模板,将所述文字信息中的字符分别与识别模板进行比对,若在该识别模板中找到了该字符,则说明该字符匹配成功,若在该识别模板中未找到该字符,则说明该字符匹配失败。最后将匹配成功的字符个数除以字符的总个数,则可以得到所述文字信息与所述当前匹配语言之间的匹配度。
步骤S1033、判断所述文字信息与所述当前匹配语言之间的匹配度是否大于预设的阈值。
匹配度的阈值可以根据实际情况设置为70%、80%或者90%等等,本实施例对此不作具体限定。
若所述文字信息与所述当前匹配语言之间的匹配度小于或等于所述阈值,则执行步骤S1034,若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则执行步骤S1035。
步骤S1034、从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言。
例如,可以通过设置标准符来表征一种语言是否已进行过匹配,若一种语言的标识符取值为0,则表示该语言未进行过匹配,若该语言的标识符取值为1,则表示该语言已进行过匹配,所述标识符的初始取值为0,当该语言进行过匹配后,则将该语言的的标识符置为1,也即标识该语言已进行过匹配。
执行完步骤S1034后,返回执行步骤S1032及其后续步骤。
步骤S1035、将所述当前匹配语言确定为目标语言。
例如,若当前匹配语言为中文,且其与所述文字信息之间的匹配度大于了匹配度阈值,此时则可将中文确定为目标语言。
步骤S104、将所述目标终端的系统语言切换为所述目标语言。
优选地,如图4所示,所述语言库中的语言的优先级的设置过程具体可以包括:
步骤S401、向抽样终端发送系统语言查询指令。
所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端。为了保证最终统计结果的准确性,抽样终端的数目应当要大于一定的阈值,例如10000、20000等等,具体取值可根据实际情况设置。
步骤S402、接收所述抽样终端对所述系统语言查询指令的反馈结果。
在所述反馈结果中携带了所述抽样终端当前的系统语言设置情况,例如,若抽样终端A当前的系统语言为中文,则其反馈结果为中文,若抽样终端B当前的系统语言为英文,则其反馈结果为英文。
步骤S403、根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数。
步骤S404、根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级。
语言的优先级与语言被设置为系统语言的次数正相关,即在统计结果中,某个语言被设置为系统语言的次数越多,则其优先级也越高。例如,根据统计数据,若将A语言设置为系统语言的终端数为10000,将B语言设置为系统语言的终端数为5000,将C语言设置为系统语言的终端数为1000,那么则可确定优先级顺序从高到底依次为A语言、B语言、C语言。
通过图4所示的过程完成了通用的默认优先级顺序,为了进一步提高识别的效率,还可以根据目标终端的情况对默认优先级进行个性化的调整,具体的调整过程如图5所示:
步骤S501、判断所述目标终端中是否安装有SIM卡。
SIM(Subscriber Identity Module,客户识别模块)卡,也称为智能卡、用户身份识别卡,一般来说,手机上必须安装SIM卡之后才能正常进行通话,该SIM卡通过一个计算机芯片存储有数字移动电话的客户信息。当终端在首次开机时,终端系统激活,系统自动检测终端中是否安装有SIM卡,例如,在Android系统中,可以通过TelephonyManager类的SIM_STATE_ABSENT属性项来判断终端中是否安装有SIM卡。
若所述目标终端中未安装SIM卡,则执行步骤S502,若所述目标终端中安装有SIM卡,则执行步骤S503及其后续步骤。
步骤S502、获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级。
可以通过GPS获取所述目标终端的位置信息,然后确定与该位置信息对应的国家,将该国家的语言的优先级调整为最高优先级。例如,若获取的所述位置信息位于中国,则将中文的优先级调整为最高优先级。
步骤S503、从所述SIM卡中获取通讯录和短信信息。
例如,在安卓系统中,可以通过getContentResolver()函数和“content://icc/adn”参数或者“content://sim/adn”参数来获取SIM卡中通讯录信息,例如联系人的姓名、电话号码、备注信息等,通过getContentResolver()函数和“content://sms/”参数、“content://sms/inbox”参数、“content://sms/sent”参数来读取SIM卡中联系人对应的短信信息。
步骤S504、判断所述通讯录和短信信息是否为空。
若所述通讯录和短信信息为空,则执行步骤S505,若所述通讯录和短信信息不为空,则执行步骤S506。
步骤S505、获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
具体地,可以读取SIM卡中的预设字段指示的IMSI(International Mobile Subscriber Identification Number,国际移动用户识别码)。其中,IMSI中包括MCC(Mobile Country Code,移动国家号码),该MCC由3位数字组成,且用于唯一地识别SIM卡所属的国家,比如:MCC为460时代表SIM卡所属的国家为中国。
步骤S506、将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级。
例如,在联系人的记录信息中查询到姓名为“张三”,系统通过识别文本内容“张三”的编码信息,得到该编码对应的语言为中文,则判断该联系人的语言类型为中文。又如,在联系人的短信息中读取到文本内容为“Don't forget to lock the door when you leave”,系统识别出该编码信息对应的语言为英语,则判断该联系人的语言类型为英语。根据电话号码获取语言类型时,终端在查询到电话号码之后,通过向服务器或者运营商架设的第三方归属地查询服务器的查询接口查询获取该号码的号码归属地信息,即可以根据该归属地信息设置语言类型。例如,终端读取的电话号码为+1-7654321111,从服务器中查询到该号码的国际代码为1,归属地为美国,即可认为该联系人的语言类型为英语。
综上所述,本申请实施例首先获取用于设置目标终端的系统语言的预设图像,然后提取所述图像中的文字信息并且确定与所述文字信息对应的目标语言,最后将所述目标终端的系统语言切换为所述目标语言。通过本申请,用户仅需要预先准备一个用于设置目标终端的系统语言的图像,例如,一张写有中文的纸张,系统即可通过图像获取、文字信息提取等过程得到图像上面的文字信息,并确定出该文字信息为中文,最终将目标终端的系统语言切换为中文。整个过程操作极为简便,大大提升了用户的使用体验。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
对应于上文实施例所述的一种系统语言切换方法,图6示出了本申请实施例提供的一种系统语言切换装置的一个实施例结构图。
本实施例中,一种系统语言切换装置可以包括:
图像获取模块601,用于获取用于设置目标终端的系统语言的预设图像;
文字信息提取模块602,用于提取所述图像中的文字信息;
目标语言确定模块603,用于确定与所述文字信息对应的目标语言;
系统语言切换模块604,用于将所述目标终端的系统语言切换为所述目标语言。
进一步地,所述目标语言确定模块可以包括:
当前匹配语言选取单元,用于从预设的语言库中选取优先级最高的语言作为当前匹配语言;
匹配度计算单元,用于计算所述文字信息与所述当前匹配语言之间的匹配度;
当前匹配语言更换单元,用于若所述文字信息与所述当前匹配语言之间的匹配度小于或等于预设的阈值,则从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言;
目标语言确定单元,用于若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则将所述当前匹配语言确定为目标语言。
进一步地,所述系统语言切换装置还可以包括:
查询指令发送模块,用于向抽样终端发送系统语言查询指令,所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端;
反馈结果接收模块,用于接收所述抽样终端对所述系统语言查询指令的反馈结果;
次数统计模块,用于根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数;
优先级确定模块,用于根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级,且语言的优先级与语言被设置为系统语言的次数正相关。
进一步地,所述系统语言切换装置还可以包括:
第一调整模块,用于若所述目标终端中未安装SIM卡,则获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级;
信息获取模块,用于若所述目标终端中安装有SIM卡,则从所述SIM卡中获取通讯录和短信信息;
第二调整模块,用于若所述通讯录和短信信息不为空,则将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级;
第三调整模块,用于若所述通讯录和短信信息为空,则获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
进一步地,所述文字信息提取模块可以包括:
灰度化处理单元,用于对所述图像进行灰度化处理,得到所述图像的灰度图;
均衡化处理单元,用于对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图;
二值化处理单元,用于对所述均衡灰度图进行二值化处理,得到所述图像的二值图像;
去噪处理单元,用于对所述二值图像进行去噪处理,得到所述图像的去噪图像;
文字信息提取单元,用于提取所述去噪图像中的文字信息。
图7示出了本申请实施例提供的一种系统语言切换终端设备的示意框图,为了便于说明,仅示出了与本申请实施例相关的部分。
在本实施例中,所述系统语言切换终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该系统语言切换终端设备7可包括:处理器70、存储器71以及存储在所述存储器71中并可在所述处理器70上运行的计算机可读指令72,例如执行上述的系统语言切换方法的计算机可读指令。所述处理器70执行所述计算机可读指令72时实现上述各个系统语言切换方法实施例中的步骤,例如图1所示的步骤S101至S104。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块601至604的功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令72在所述系统语言切换终端设备7中的执行过程。
所述处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述系统语言切换终端设备7的内部存储单元,例如系统语言切换终端设备7的硬盘或内存。所述存储器71也可以是所述系统语言切换终端设备7的外部存储设备,例如所述系统语言切换终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述系统语言切换终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机可读指令以及所述系统语言切换终端设备7所需的其它指令和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干计算机可读指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储计算机可读指令的介质。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种系统语言切换方法,其特征在于,包括:
    获取用于设置目标终端的系统语言的预设图像;
    提取所述图像中的文字信息;
    确定与所述文字信息对应的目标语言;
    将所述目标终端的系统语言切换为所述目标语言。
  2. 根据权利要求1所述的系统语言切换方法,其特征在于,所述确定与所述文字信息对应的目标语言包括:
    从预设的语言库中选取优先级最高的语言作为当前匹配语言;
    计算所述文字信息与所述当前匹配语言之间的匹配度;
    若所述文字信息与所述当前匹配语言之间的匹配度小于或等于预设的阈值,则从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言,然后返回执行所述计算所述文字信息与所述当前匹配语言之间的匹配度的步骤;
    若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则将所述当前匹配语言确定为目标语言。
  3. 根据权利要求2所述的系统语言切换方法,其特征在于,所述语言库中的语言的优先级的设置过程包括:
    向抽样终端发送系统语言查询指令,所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端;
    接收所述抽样终端对所述系统语言查询指令的反馈结果;
    根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数;
    根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级,且语言的优先级与语言被设置为系统语言的次数正相关。
  4. 根据权利要求3所述的系统语言切换方法,其特征在于,在根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级之后,还包括:
    若所述目标终端中未安装SIM卡,则获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级;
    若所述目标终端中安装有SIM卡,则从所述SIM卡中获取通讯录和短信信息;
    若所述通讯录和短信信息不为空,则将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级;
    若所述通讯录和短信信息为空,则获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
  5. 根据权利要求1至4中任一项所述的系统语言切换方法,其特征在于,所述提取所述图像中的文字信息包括:
    对所述图像进行灰度化处理,得到所述图像的灰度图;
    对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图;
    对所述均衡灰度图进行二值化处理,得到所述图像的二值图像;
    对所述二值图像进行去噪处理,得到所述图像的去噪图像;
    提取所述去噪图像中的文字信息。
  6. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    获取用于设置目标终端的系统语言的预设图像;
    提取所述图像中的文字信息;
    确定与所述文字信息对应的目标语言;
    将所述目标终端的系统语言切换为所述目标语言。
  7. 根据权利要求6所述的计算机可读存储介质,其特征在于,所述确定与所述文字信息对应的目标语言包括:
    从预设的语言库中选取优先级最高的语言作为当前匹配语言;
    计算所述文字信息与所述当前匹配语言之间的匹配度;
    若所述文字信息与所述当前匹配语言之间的匹配度小于或等于预设的阈值,则从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言,然后返回执行所述计算所述文字信息与所述当前匹配语言之间的匹配度的步骤;
    若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则将所述当前匹配语言确定为目标语言。
  8. 根据权利要求7所述的计算机可读存储介质,其特征在于,所述语言库中的语言的优先级的设置过程包括:
    向抽样终端发送系统语言查询指令,所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端;
    接收所述抽样终端对所述系统语言查询指令的反馈结果;
    根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数;
    根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级,且语言的优先级与语言被设置为系统语言的次数正相关。
  9. 根据权利要求8所述的计算机可读存储介质,其特征在于,在根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级之后,还包括:
    若所述目标终端中未安装SIM卡,则获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级;
    若所述目标终端中安装有SIM卡,则从所述SIM卡中获取通讯录和短信信息;
    若所述通讯录和短信信息不为空,则将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级;
    若所述通讯录和短信信息为空,则获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
  10. 根据权利要求6至9中任一项所述的计算机可读存储介质,其特征在于,所述提取所述图像中的文字信息包括:
    对所述图像进行灰度化处理,得到所述图像的灰度图;
    对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图;
    对所述均衡灰度图进行二值化处理,得到所述图像的二值图像;
    对所述二值图像进行去噪处理,得到所述图像的去噪图像;
    提取所述去噪图像中的文字信息。
  11. 一种系统语言切换终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取用于设置目标终端的系统语言的预设图像;
    提取所述图像中的文字信息;
    确定与所述文字信息对应的目标语言;
    将所述目标终端的系统语言切换为所述目标语言。
  12. 根据权利要求11所述的系统语言切换终端设备,其特征在于,所述确定与所述文字信息对应的目标语言包括:
    从预设的语言库中选取优先级最高的语言作为当前匹配语言;
    计算所述文字信息与所述当前匹配语言之间的匹配度;
    若所述文字信息与所述当前匹配语言之间的匹配度小于或等于预设的阈值,则从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言,然后返回执行所述计算所述文字信息与所述当前匹配语言之间的匹配度的步骤;
    若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则将所述当前匹配语言确定为目标语言。
  13. 根据权利要求12所述的系统语言切换终端设备,其特征在于,所述语言库中的语言的优先级的设置过程包括:
    向抽样终端发送系统语言查询指令,所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端;
    接收所述抽样终端对所述系统语言查询指令的反馈结果;
    根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数;
    根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级,且语言的优先级与语言被设置为系统语言的次数正相关。
  14. 根据权利要求13所述的系统语言切换终端设备,其特征在于,在根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级之后,还包括:
    若所述目标终端中未安装SIM卡,则获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级;
    若所述目标终端中安装有SIM卡,则从所述SIM卡中获取通讯录和短信信息;
    若所述通讯录和短信信息不为空,则将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级;
    若所述通讯录和短信信息为空,则获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
  15. 根据权利要求11至14中任一项所述的系统语言切换终端设备,其特征在于,所述提取所述图像中的文字信息包括:
    对所述图像进行灰度化处理,得到所述图像的灰度图;
    对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图;
    对所述均衡灰度图进行二值化处理,得到所述图像的二值图像;
    对所述二值图像进行去噪处理,得到所述图像的去噪图像;
    提取所述去噪图像中的文字信息。
  16. 一种系统语言切换装置,其特征在于,包括:
    图像获取模块,用于获取用于设置目标终端的系统语言的预设图像;
    文字信息提取模块,用于提取所述图像中的文字信息;
    目标语言确定模块,用于确定与所述文字信息对应的目标语言;
    系统语言切换模块,用于将所述目标终端的系统语言切换为所述目标语言。
  17. 根据权利要求16所述的系统语言切换装置,其特征在于,所述目标语言确定模块可以包括:
    当前匹配语言选取单元,用于从预设的语言库中选取优先级最高的语言作为当前匹配语言;
    匹配度计算单元,用于计算所述文字信息与所述当前匹配语言之间的匹配度;
    当前匹配语言更换单元,用于若所述文字信息与所述当前匹配语言之间的匹配度小于或等于预设的阈值,则从所述语言库中选取未进行过匹配的优先级最高的语言作为新的当前匹配语言;
    目标语言确定单元,用于若所述文字信息与所述当前匹配语言之间的匹配度大于所述阈值,则将所述当前匹配语言确定为目标语言。
  18. 根据权利要求17所述的系统语言切换装置,其特征在于,还包括:
    查询指令发送模块,用于向抽样终端发送系统语言查询指令,所述抽样终端为预设的在统计系统语言设置情况时作为统计样本的终端;
    反馈结果接收模块,用于接收所述抽样终端对所述系统语言查询指令的反馈结果;
    次数统计模块,用于根据所述反馈结果分别统计所述语言库中的各种语言被设置为系统语言的次数;
    优先级确定模块,用于根据所述各种语言被设置为系统语言的次数确定所述各种语言的优先级,且语言的优先级与语言被设置为系统语言的次数正相关。
  19. 根据权利要求18所述的系统语言切换装置,其特征在于,还包括:
    第一调整模块,用于若所述目标终端中未安装SIM卡,则获取所述目标终端的位置信息,然后将与所述位置信息对应的语言的优先级调整为最高优先级;
    信息获取模块,用于若所述目标终端中安装有SIM卡,则从所述SIM卡中获取通讯录和短信信息;
    第二调整模块,用于若所述通讯录和短信信息不为空,则将所述通讯录和短信信息中使用的语言的优先级调整为最高优先级;
    第三调整模块,用于若所述通讯录和短信信息为空,则获取所述SIM卡的归属地,然后将与所述归属地对应的语言的优先级调整为最高优先级。
  20. 根据权利要求16至19中任一项所述的系统语言切换装置,其特征在于,所述文字信息提取模块可以包括:
    灰度化处理单元,用于对所述图像进行灰度化处理,得到所述图像的灰度图;
    均衡化处理单元,用于对所述灰度图进行均衡化处理,得到所述图像的均衡灰度图;
    二值化处理单元,用于对所述均衡灰度图进行二值化处理,得到所述图像的二值图像;
    去噪处理单元,用于对所述二值图像进行去噪处理,得到所述图像的去噪图像;
    文字信息提取单元,用于提取所述去噪图像中的文字信息。
PCT/CN2018/074867 2017-12-26 2018-01-31 一种系统语言切换方法、可读存储介质、终端设备及装置 WO2019127833A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
SG11201902498RA SG11201902498RA (en) 2017-12-26 2018-01-31 System language switching method, readable storage medium, terminal device, and apparatus
US16/328,200 US11341329B2 (en) 2017-12-26 2018-01-31 System language switching method, readable storage medium, terminal device, and apparatus
JP2018553236A JP6718978B2 (ja) 2017-12-26 2018-01-31 システム言語切替方法およびシステム言語切替端末機器

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711434263.3A CN108255555B (zh) 2017-12-26 2017-12-26 一种系统语言切换方法及终端设备
CN201711434263.3 2017-12-26

Publications (1)

Publication Number Publication Date
WO2019127833A1 true WO2019127833A1 (zh) 2019-07-04

Family

ID=62724103

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/074867 WO2019127833A1 (zh) 2017-12-26 2018-01-31 一种系统语言切换方法、可读存储介质、终端设备及装置

Country Status (5)

Country Link
US (1) US11341329B2 (zh)
JP (1) JP6718978B2 (zh)
CN (1) CN108255555B (zh)
SG (1) SG11201902498RA (zh)
WO (1) WO2019127833A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324797B (zh) * 2018-08-22 2023-03-31 平安普惠企业管理有限公司 一种桌面图标生成方法、计算机可读存储介质及终端设备
CN109240785B (zh) * 2018-08-31 2021-01-22 维沃移动通信有限公司 一种设置语言的方法、终端及存储介质
CN109542569B (zh) * 2018-11-26 2022-07-15 Oppo(重庆)智能科技有限公司 设置显示语言的方法、装置、终端及存储介质
CN109656671A (zh) * 2018-12-27 2019-04-19 贵州省广播电视信息网络股份有限公司 一种用于tv客户端自动切换语言的方法
CN111722892A (zh) * 2019-03-19 2020-09-29 奇酷互联网络科技(深圳)有限公司 系统语言切换的方法、电子设备及存储装置
CN112445901A (zh) * 2019-09-03 2021-03-05 上海智臻智能网络科技股份有限公司 一种设置智能设备的语言的方法和装置
CN111158813B (zh) * 2019-12-18 2023-04-07 深圳赛安特技术服务有限公司 一种语言配置方法、装置、计算机可读存储介质及服务器
CN111143001A (zh) * 2019-12-23 2020-05-12 Tcl海外电子(惠州)有限公司 终端的语言检测方法、用户设备、存储介质及装置
CN111399728B (zh) * 2020-03-04 2023-05-26 维沃移动通信有限公司 设置方法、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511857A (zh) * 2015-11-27 2016-04-20 小米科技有限责任公司 系统语言设置方法及装置
CN105868758A (zh) * 2015-01-21 2016-08-17 阿里巴巴集团控股有限公司 图像中文本区域检测方法、装置及电子设备
CN105979403A (zh) * 2016-05-10 2016-09-28 天脉聚源(北京)传媒科技有限公司 一种自动选择视频资源的标识版本的方法及装置
CN107426456A (zh) * 2016-04-28 2017-12-01 京瓷办公信息系统株式会社 图像处理装置及图像处理系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013239203A (ja) * 2013-08-05 2013-11-28 Toshiba Corp 電子機器、方法、及びプログラム
JP2015069365A (ja) * 2013-09-27 2015-04-13 シャープ株式会社 情報処理装置、および制御プログラム
JP2015122650A (ja) * 2013-12-24 2015-07-02 キヤノンマーケティングジャパン株式会社 画像形成装置、画像形成装置の制御方法、およびプログラム。
CN104660813B (zh) * 2015-02-10 2017-05-10 广东欧珀移动通信有限公司 设置系统语言的方法、装置及移动终端
CN107391122B (zh) * 2017-07-01 2020-03-27 珠海格力电器股份有限公司 设置终端系统语言的方法、装置和终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868758A (zh) * 2015-01-21 2016-08-17 阿里巴巴集团控股有限公司 图像中文本区域检测方法、装置及电子设备
CN105511857A (zh) * 2015-11-27 2016-04-20 小米科技有限责任公司 系统语言设置方法及装置
CN107426456A (zh) * 2016-04-28 2017-12-01 京瓷办公信息系统株式会社 图像处理装置及图像处理系统
CN105979403A (zh) * 2016-05-10 2016-09-28 天脉聚源(北京)传媒科技有限公司 一种自动选择视频资源的标识版本的方法及装置

Also Published As

Publication number Publication date
CN108255555A (zh) 2018-07-06
JP6718978B2 (ja) 2020-07-08
SG11201902498RA (en) 2019-08-27
US20210326529A1 (en) 2021-10-21
JP2020509436A (ja) 2020-03-26
CN108255555B (zh) 2019-08-13
US11341329B2 (en) 2022-05-24

Similar Documents

Publication Publication Date Title
US11341329B2 (en) System language switching method, readable storage medium, terminal device, and apparatus
Zhou et al. Faster-RCNN based robust coverless information hiding system in cloud environment
US11151176B2 (en) Method and apparatus for processing text information
CN105046186A (zh) 一种二维码的识别方法及装置
WO2021175040A1 (zh) 视频处理方法及相关装置
US11714921B2 (en) Image processing method with ash code on local feature vectors, image processing device and storage medium
CN108366052B (zh) 验证短信的处理方法及系统
CN106557549A (zh) 识别目标对象的方法和装置
CN111028186B (zh) 一种图像增强方法和装置
CN108304839A (zh) 一种图像数据处理方法以及装置
US20210312215A1 (en) Method for book recognition and book reading device
US8265383B2 (en) Method and communication terminal for searching phone book for desired contacts
CN113283351B (zh) 一种使用cnn优化相似度矩阵的视频抄袭检测方法
CN118196799A (zh) 圆形印章文字识别方法、装置、电子设备及存储介质
CN113157956B (zh) 图片搜索方法、系统、移动终端及存储介质
CN112288045B (zh) 一种印章真伪判别方法
CN111049735B (zh) 群组头像显示方法、装置、设备及存储介质
CN112528610B (zh) 一种数据标注方法、装置、电子设备及存储介质
CN111695381A (zh) 一种文本特征提取方法、装置、电子设备及可读存储介质
CN110912801A (zh) 一种检测电子红包的方法、系统及终端设备
CN109933969B (zh) 验证码识别方法、装置、电子设备及可读存储介质
CN110619362B (zh) 一种基于感知与像差的视频内容比对方法及装置
CN114303352B (zh) 推送内容的处理方法、装置、电子设备以及存储介质
CN110879733A (zh) 电子红包的检测方法、装置、终端及计算机可读存储介质
CN113689327B (zh) 头发曲直处理方法、系统、终端设备及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018553236

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18894100

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18894100

Country of ref document: EP

Kind code of ref document: A1