CN107729302A - Decoding algorithm determines method, apparatus, terminal and storage medium - Google Patents

Decoding algorithm determines method, apparatus, terminal and storage medium Download PDF

Info

Publication number
CN107729302A
CN107729302A CN201710994399.3A CN201710994399A CN107729302A CN 107729302 A CN107729302 A CN 107729302A CN 201710994399 A CN201710994399 A CN 201710994399A CN 107729302 A CN107729302 A CN 107729302A
Authority
CN
China
Prior art keywords
decoding algorithm
decoding
algorithm
target code
chinese characters
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.)
Granted
Application number
CN201710994399.3A
Other languages
Chinese (zh)
Other versions
CN107729302B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710994399.3A priority Critical patent/CN107729302B/en
Publication of CN107729302A publication Critical patent/CN107729302A/en
Application granted granted Critical
Publication of CN107729302B publication Critical patent/CN107729302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present application discloses a kind of decoding algorithm and determines method, apparatus, terminal and storage medium, and this method includes:Judge whether target code meets the first decoding algorithm and the second decoding algorithm;If target code meets the first decoding algorithm and the second decoding algorithm, the target code is decoded according to default decoding algorithm, the default decoding algorithm is first decoding algorithm or second decoding algorithm;Judge to whether there is non-Chinese characters in common use in decoded result;Target decoder algorithm is determined according to judged result.The application can improve target code decoding accuracy.

Description

Decoding algorithm determines method, apparatus, terminal and storage medium
Technical field
The invention relates to route decoding technique, more particularly to a kind of decoding algorithm determine method, apparatus, terminal and Storage medium.
Background technology
With the development of radio network technique, the increasing using terminal of user is connected to wireless network.In connection nothing During gauze network, user selects an objective network according to the network name of wireless network first, and it is close then to input correct network Code signs in objective network.
The network name of objective network is also known as service set (Service Set Identifier, SSID).Android The SSID coded systems that system is supported include Unicode codings and GBK codings.But Android system terminal is in display wireless network During network title, often there is the phenomenon of SSID decoding errors, SSID decoding efficiency is low.It can be seen that SSID decoding processes need to be changed Enter.
The content of the invention
The embodiment of the present application provides a kind of decoding algorithm and determines method, apparatus, terminal and storage medium, can improve SSID Decode accuracy.
In a first aspect, the embodiment of the present application, which provides a kind of decoding algorithm, determines method, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm;
If target code meets the first decoding algorithm and the second decoding algorithm, according to default decoding algorithm to the mesh Mark coding is decoded, and the default decoding algorithm is first decoding algorithm or second decoding algorithm;
Judge to whether there is non-Chinese characters in common use in decoded result;
Target decoder algorithm is determined according to judged result.
Second aspect, the embodiment of the present application additionally provide a kind of decoding algorithm determining device, including:
First judge module, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Decoder module, if judging that target code meets the first decoding algorithm and the second solution for first judge module Code algorithm, then decode according to default decoding algorithm to the target code, and the default decoding algorithm is the described first solution Code algorithm or second decoding algorithm;
Second judge module, it whether there is non-Chinese characters in common use in the decoded result for judging the decoder module;
Decoding algorithm determining module, for determining target decoder algorithm according to the judged result of second judge module.
The third aspect, the embodiment of the present application additionally provide a kind of terminal, and the terminal includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processing Device realizes that the decoding algorithm as shown in first aspect determines method.
Fourth aspect, the embodiment of the present application additionally provide a kind of computer-readable recording medium, are stored thereon with computer Program, realize that the decoding algorithm as shown in first aspect determines method when the program is executed by processor.
The application first determines whether target code meets the first decoding algorithm and the second decoding algorithm;Secondly, if mesh Mark coding meets the first decoding algorithm and the second decoding algorithm, then the target code is solved according to default decoding algorithm Code, the default decoding algorithm is first decoding algorithm or second decoding algorithm;Again, judge be in decoded result It is no non-Chinese characters in common use to be present;Finally, target decoder algorithm is determined according to judged result, it is possible to increase target code (SSID) decodes Accuracy.
Brief description of the drawings
Fig. 1 is the flow chart that a decoding algorithm in the embodiment of the present application determines method;
Fig. 2 is the bullet frame schematic diagram in the embodiment of the present application;
Fig. 3 is the flow chart that another decoding algorithm in the embodiment of the present application determines method;
Fig. 4 is the structural representation of a decoding algorithm determining device in the embodiment of the present application;
Fig. 5 is the structural representation of a terminal in the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the application, rather than the restriction to the application.It also should be noted that in order to just The part related to the application rather than entire infrastructure are illustrate only in description, accompanying drawing.
With the development of wireless network, terminal can get neighbouring wireless network, and connected and arranged by wireless network The traveling of table, the title (such as SSID) of wireless network around is shown to user.User selects some wireless network to be connect Enter, and then realize and accessed by the internet based on WLAN (such as wifi).The characters such as man are as wireless network The part of title, need to be encoded in transmitting terminal (such as radio access node), and solved in receiving terminal (such as mobile phone) Code.But due to having much for the coded system of man, receiving terminal can not know transmitting terminal using which kind of coding staff Formula, therefore occur that the receiving terminal decoding process used and compiling method mode that transmitting terminal uses are inconsistent, cause decoding error Situation.Now, the wireless network name that receiving terminal is shown is the title of mess code or display mistake, causes user can not the degree of accuracy Find objective network.
The application first judges the form of target code, looked for before being decoded to target code (SSID after coding) To decoding algorithm corresponding to target code.Especially when target code had not only met Unicode codings but also met GBK codings, sentence It whether there is non-commonly used word in disconnected decoded result, final decoding process determined according to judged result.Realize accurately to target Coding is decoded, and improves SSID decoding efficiency.The technical scheme provided below in conjunction with the accompanying drawings the application is retouched in detail State.
Fig. 1 is the flow chart that a kind of decoding algorithm that the embodiment of the present application provides determines method, and the present embodiment is applicable to The situation that terminal-pair service set (Service Set Identifier, abbreviation SSID) is identified, this method can be by The terminal of objective network is connected to perform, the terminal can be mobile terminal, tablet personal computer, wearable device, notebook electricity Brain etc., this method specifically comprises the following steps:
Step 110, judge whether target code meets the first decoding algorithm and the second decoding algorithm.
Wireless access points (WirelessAccessPoint, abbreviation AP) are by the title of itself with service set Traveling is broadcasted.When terminal is entered in the range of AP, the SSID of AP broadcast can detect.In order to guarantee data security, AP exists Before sending SSID, SSID can be encoded.The rule of coding can according to coding method corresponding to the first decoding algorithm, It can be coding method corresponding to the second decoding algorithm.Optionally, coding method corresponding to the first decoding algorithm is Unicode (Unicode) decoding algorithm, coding method corresponding to the second decoding algorithm are Chinese Internal Code Specification (Chinese Internal Code Specification, GBK) decoding algorithm.Wherein, in Unicode code characters transmitting procedure, use UTF-8 coding transmissions, for the sake of convenient, the character of Unicode codings is also known as UTF-8 code characters, Unicode decoding algorithms Also known as UTF-8 decoding algorithms.UTF-8 (8-bit Unicode Transformation Format) is that one kind is directed to Unicode variable length character coding, also known as Unicode.AP can be based on any one mode pair in Unicode or GBK SSID is encoded.In the specification that GBK is encoded and UTF-8 is encoded there is the character repeated in itself, if having used mistake during decoding By mistake decoding process mistake then occurs, cause wifi hotspot title show mess code the problem of.
Terminal listen to AP broadcast coding SSID after, the SSID of coding form is judged first, Determine whether to meet the first decoding algorithm, do not meet the second decoding algorithm.Or, if meet the second decoding algorithm, do not meet First decoding algorithm.Or judge whether to meet the first decoding algorithm and the second decoding algorithm simultaneously.Or judge whether i.e. Do not meet the first decoding algorithm and do not meet the second decoding algorithm again.
In one implementation, it can judge whether target code meets the first decoding algorithm and based on byte quantity Two decoding algorithms.
Because GBK is encoded by the way of two byte representations, one character, therefore after target code is got, Judge whether target code is even bit.If even bit, then it can primarily determine that and meet UTF-8 or GBK.If odd number Position, then can determine that and only meet UTF-8.
In addition, UTF-8 is usually 2-4 positions to the character quantity of target code, if the character quantity of target code is more than 4 Position, then can determine that it is applied to GBK.
In another implementation, can be judged based on span target code whether meet the first decoding algorithm and Second decoding algorithm.
UTF-8 span covers Chinese and English character, and GBK only covers whole Chinese texts.Therefore GBK span whether can be exceeded according to target code, determine that target code meets and whether meet UTF-8.
In another implementation, the list of physical addresses stored is also based on, judges whether target code accords with Close the first decoding algorithm and the second decoding algorithm.
If the communication connection that AP is successfully established with terminal, i.e. terminal have used correct SSID and have input correctly close Code, then record the facility information of the AP and the decoding algorithm corresponding relation of use, obtain list of physical addresses in the terminal.Should Facility information includes physical address, and obtained corresponding relation can be entered by the mode of key-value pair (physical address, decoding algorithm) Row storage.When terminal and the AP are again coupled to, AP physical address can be first searched from the list of physical addresses of preservation, according to The physical address determines decoding algorithm.
Specifically, first, obtain target physical address corresponding to target code.Then, whether target physical address is judged It is present in first list and second list simultaneously, or is not present in first list and second list;First list is used to remember The physical address of the first decoding algorithm matching is recorded, second list is used for the physical address for recording the matching of the second decoding algorithm.
If step 120, target code meet the first decoding algorithm and the second decoding algorithm, according to default decoding algorithm Target code is decoded.
Wherein, it is the first decoding algorithm or the second decoding algorithm to preset decoding algorithm.
If determine that target code meets the first decoding algorithm and the second decoding algorithm simultaneously, is present in step 110 Decoding algorithm using mistake causes the possibility for decoding mess code or incorrect man.
Now, one in the first decoding algorithm and the second decoding algorithm is defined as default decoding algorithm, will wherein Another be defined as other decoding algorithms.
Step 130, judge to whether there is non-Chinese characters in common use in decoded result.
After being decoded according to default decoding algorithm, decoded result is obtained.Word segmentation processing is carried out to decoded result, obtained Form the individual character or phrase of decoded result.Determine whether above-mentioned individual character or phrase are commonly used word according to Chinese characters in common use database, such as It is then non-Chinese characters in common use that fruit, which is not,.
Further, a mess code database can also be established, mess code identifier is stored with mess code database.If solution The individual character in mess code database in code result be present, then can determine that mess code occur.
Obtaining the mode of Chinese characters in common use can be:Obtain the service set SSID that multiple radio access nodes use;Root The service set used according to the multiple radio access node determines Chinese characters in common use;Determined according to the Chinese characters in common use non-conventional Chinese character.
Service and the mark SSID that multiple radio access node AP are used can be obtained by server, then server will The SSID of statistics, which is sent to terminal, has terminal to determine that Chinese characters in common use database or by server can also locally determine the conventional Chinese Then numerical data base will determine that Chinese characters in common use database is sent to terminal.Determining the mode of Chinese characters in common use database can be, obtain The frequency for taking each individual character or word to occur, frequency is more than the individual character of predeterminated frequency or word is defined as commonly used word.It is wherein pre- If frequency can be 40 percent.Commonly used word is added in conventional numerical data base.Every preset time to Chinese characters in common use number It is updated according to storehouse, preset time can be 1 week or 1 month.Optionally, server can locally preserve Chinese characters in common use data SSID is sent to server and analyzed after SSID is detected by storehouse, terminal, and server returns to the commonly used word letter of the SSID Breath, the information can be without commonly used word in SSID, or all commonly used words or non-commonly used word etc. be present.
Step 140, target decoder algorithm is determined according to judged result.
Optionally, if it is judged that non-Chinese characters in common use are not present, then illustrate all Chinese characters in common use in decoded result, then will Default decoding algorithm is defined as target decoder algorithm.
Optionally, if there is non-Chinese characters in common use, then the target code is decoded using other decoding algorithms, and Output result.
Wherein, other decoding algorithms be in the first decoding algorithm and the second decoding algorithm in addition to the default decoding algorithm Decoding algorithm.
In one implementation, whole Chinese characters are non-Chinese characters in common use in decoded result.Now by other decoding algorithms It is defined as target decoder algorithm.
In another implementation, it is divided into Chinese characters in common use in the middle part of decoded result, is partly non-Chinese characters in common use.Now, make Target code is decoded with other decoding algorithms, and exports decoded result, mesh is determined according to the feedback information that user inputs Mark decoding algorithm.
Optionally, when exporting decoded result, identifier is added first for wireless network name corresponding to target code.So Afterwards, when user clicks on identifier, output plays frame, plays the feedback information that frame is used to show decoded result and receive user's input.
Wherein, identifier can be newly-increased prompting icon in list item corresponding to target code in wireless network list, should Network name in the icon representation list item is to be confirmed.Bullet frame, including the SSID obtained according to default decoding algorithm, and for The correct button and wrong button of family input feedback information.If user clicks on correct button, triggering confirms instruction.If with Wrong button is clicked at family, then instruction is changed in triggering.
Further, as shown in Fig. 2 SSID that default decoding algorithm obtains can be exported in frame is played and using other solutions The SSID that code algorithm obtains.Decoding algorithm corresponding to the SSID that user is clicked on is defined as target decoder algorithm.As shown in Fig. 2 The SSID obtained using default decoding algorithm is network D, and the SSID obtained using other decoding algorithms is network D-1.User's point Hit wherein any one when, triggering confirm instruction.Decoding algorithm is defined as used by terminal will confirm that the SSID that instruction is pointed to Target decoder algorithm.
User can be determined correct when requiring connect to the wireless network of some AP offers by AP supplier SSID.Such as the WiFi titles in its family of inquiry householder, or the WiFi titles of inquiry waiter retail shop.If wireless network arranges The SSID that user finds is not present in table, then user can click on the identifier in wireless network list, and then trigger and play frame, and defeated Enter feedback command.
Because user knows its SSID found, thus the feedback message inputted according to user can determine that it is currently used pre- If whether decoding algorithm is correct.If incorrect use other decoding processes instead, and will use what other decoding processes obtained Decoded result is exported, then obtains the feedback information of user's input, and determines target decoder algorithm according to feedback information.
Optionally, if user's input validation instructs, default decoding algorithm is defined as target decoder algorithm.If with Instruction is changed in family input, then other decoding algorithms is defined as into target decoder algorithm, other decoding algorithms are the first decoding algorithm With the decoding algorithm in the second decoding algorithm in addition to default decoding algorithm.
In another implementation, if non-Chinese characters in common use in decoded result be present, other decoding algorithms pair are used Target code is decoded.If non-Chinese characters in common use are not present in the decoded result obtained using other decoding algorithms, by it His decoding algorithm is defined as target decoder algorithm.
The decoding algorithm that the embodiment of the present application provides determines method, first determines whether target code meets the first decoding calculation Method and the second decoding algorithm;Secondly, if target code meets the first decoding algorithm and the second decoding algorithm, according to default solution Code algorithm decodes to the target code;Again, judge to whether there is non-Chinese characters in common use in decoded result;Finally, according to Judged result determines target decoder algorithm.Relative to using default algorithm in correlation technique or using fixed decoding algorithm, The application can when judging that target code meets the first decoding algorithm and the second decoding algorithm, in decoded result very It is identified with Chinese character, if recognizing non-Chinese characters in common use, is decoded using other decoding algorithms, and then is realized and identifying When going out decoded result and apparent error (such as mess code) occur, decoding process is changed automatically, and then accurately SSID is solved Code, improve SSID decoding efficiencies.
Above-described embodiment is specifically described below by one embodiment, the scene is that user is obtained using mobile phone Wifi lists, as shown in figure 3, including:
Step 210, mobile phone around searching after AP, judge coding corresponding to AP SSID whether UTF-8 decoding algorithms With GBK decoding algorithms.
Specifically, judge whether to meet the requirement of UTF-8 bytes number and whether meet GBK coding span requirements.
If step 220, meeting UTF-8 decoding algorithms, GBK decoding algorithms are not met, then judge that current SSID belongs to UTF-8 is encoded, and the physical address of the AP is added in UTF-8 the encoding lists.
In the present embodiment, UTF-8 and AP relation list can be established, wherein preserving the physics for the AP for meeting UTF-8 Address.
If step 230, not meeting UTF-8 decoding algorithms, meet GBK decoding algorithms, then judge that current SSID belongs to UTF-8 is encoded, and the MAC of AP address is added in the list of GBK codings.
In the present embodiment, GBK and AP relation list can be established, wherein preserving the physical address for the AP for meeting GBK.
If step 240, do not meet UTF-8 decoding algorithms and do not meet GBK decoding algorithms yet, according to default decoding process Decoded.
If step 250, meeting UTF-8 decoding algorithms and also complying with GBK decoding algorithms, solved according to default decoding process After code, judge to whether there is non-Chinese characters in common use in decoded result.
If all Chinese characters in common use in step 260, decoded result, default decoding algorithm is defined as target decoder and calculated Method.If other decoding algorithms are defined as target decoder algorithm by all non-Chinese characters in common use.
Step 270, if there is non-Chinese characters in common use, then decoded using other decoding algorithms.
If all Chinese characters in common use in step 280, the decoded result obtained using other decoding algorithms, other are solved Code, which is calculated, is defined as target decoder algorithm.
If, will be default there is also non-Chinese characters in common use in step 290, the decoded result obtained using other decoding algorithms Two decoded results that decoding algorithm and other decoding algorithms obtain are exported, and mesh is determined according to the feedback information that user inputs Mark decoding algorithm.
Fig. 4 is a kind of structural representation for decoding algorithm determining device that the embodiment of the present application provides, and the device is used for real The above-mentioned method of existing above-described embodiment, the device are located in mobile terminal, including:
First judge module 310, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Decoder module 320, if for first judge module 310 judge target code meet the first decoding algorithm and Second decoding algorithm, then the target code is decoded according to default decoding algorithm, the default decoding algorithm is described First decoding algorithm or second decoding algorithm;
Second judge module 330, it whether there is the non-conventional Chinese in the decoded result for judging the decoder module 320 Word;
Decoding algorithm determining module 340, for determining target decoder according to the judged result of second judge module 330 Algorithm.
Further, the first judge module 310 is used for:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on byte quantity.
Further, the first judge module 310 is used for:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on span.
Further, the first judge module 310 is used for:
Obtain target physical address corresponding to target code;
Judge the target physical address whether and meanwhile be present in first list and second list, or be not present in institute State first list and the second list;The first list is used for the physical address for recording the matching of the first decoding algorithm, described Second list is used for the physical address for recording the matching of the second decoding algorithm.
Further, described second judges that single module is used for:
If there is non-Chinese characters in common use, then the target code is decoded using other decoding algorithms, and export knot Fruit, other described decoding algorithms are the decoding in addition to the default decoding algorithm in the first decoding algorithm and the second decoding algorithm Algorithm.
Further, described second judges that single module is used for:
Obtain the service set that multiple radio access nodes use;
Chinese characters in common use are determined according to the service set that the multiple radio access node uses;
Non- Chinese characters in common use are determined according to the Chinese characters in common use.
Further, the first decoding algorithm is Unicode decoding algorithm, and the second decoding algorithm is Chinese Internal Code Specification Decoding algorithm.
The decoding algorithm determining device that the embodiment of the present application provides, first the first judge module 310 judge that target code is It is no to meet the first decoding algorithm and the second decoding algorithm;Secondly, if target code meets the first decoding algorithm and the second decoding Algorithm, then decoder module 320 target code is decoded according to default decoding algorithm;Again, the second judge module 330 Judge to whether there is non-Chinese characters in common use in decoded result;Finally, decoding algorithm determining module 340 determines target according to judged result Decoding algorithm.Relative to default algorithm or the decoding algorithm using fixation is used in correlation technique, the application can judge When going out target code and meeting the first decoding algorithm and the second decoding algorithm, the non-Chinese characters in common use in decoded result are identified, If recognizing non-Chinese characters in common use, decoded using other decoding algorithms, and then realize and identifying decoded result appearance During apparent error (such as mess code), decoding process is changed automatically, and then accurately SSID is decoded, and improves SSID decodings Efficiency.
Said apparatus can perform the method that the foregoing all embodiments of the application are provided, and it is corresponding to possess the execution above method Functional module and beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the foregoing all implementations of the application The method that example is provided.
Fig. 5 is a kind of structural representation for terminal that the embodiment of the present application provides.As shown in figure 5, the terminal can include: Housing (not shown), first memory 401, the first central processing unit (Central Processing Unit, CPU) 402 (also known as first processor, hereinafter referred to as CPU), it is stored on first memory 401 and can be run on first processor 402 Computer program, circuit board (not shown) and power circuit (not shown).Foregoing circuit plate is placed in above-mentioned housing The interior volume surrounded;Above-mentioned CPU402 and above-mentioned first memory 401 are arranged on foregoing circuit plate;Above-mentioned power circuit, For each circuit or the device power supply for above-mentioned terminal;Above-mentioned first memory 401, for storing executable program code; Above-mentioned CPU402 is run and above-mentioned executable journey by reading the executable program code stored in above-mentioned first memory 401 Program corresponding to sequence code, for performing:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm;
If target code meets the first decoding algorithm and the second decoding algorithm, according to default decoding algorithm to the mesh Mark coding is decoded, and the default decoding algorithm is first decoding algorithm or second decoding algorithm;
Judge to whether there is non-Chinese characters in common use in decoded result;
Target decoder algorithm is determined according to judged result.
Above-mentioned terminal also includes:Peripheral Interface 403, RF (Radio Frequency, radio frequency) circuit 405, voicefrequency circuit 406th, loudspeaker 411, power management chip 408, input/output (I/O) subsystem 409, touch-screen 412, other input/controls Equipment 410 and outside port 404, these parts are communicated by one or more communication bus or signal wire 407.
In addition, terminal also includes camera and RGB light sensor.RGB light sensor is located at beside camera, can be with It is disposed adjacent with camera.Camera can be that front camera can also be rear camera.RGB light sensor can be with It is first-class such as disposed in the narrow side of terminal side with camera configured separate, example.
It should be understood that graphic terminal 400 is only an example of terminal, and terminal 400 can have than figure Shown in more or less parts, two or more parts can be combined, or can have different portions Part configures.Various parts shown in figure can be including one or more signal transactings and/or application specific integrated circuit Hardware, software or hardware and software combination in realize.
The terminal provided below with regard to the present embodiment is described in detail, and the terminal is by taking smart mobile phone as an example.
First memory 401, above-mentioned first memory 401 can be accessed by CPU402, Peripheral Interface 403 etc., and above-mentioned One memory 401 can include high random access first memory, can also include non-volatile first memories, such as one Individual or multiple disk first memory parts, flush memory device or other volatile solid-state first memory parts.
The input of equipment and output peripheral hardware can be connected to CPU402 and the by Peripheral Interface 403, above-mentioned Peripheral Interface 403 One memory 401.
I/O subsystems 409, above-mentioned I/O subsystems 409 can be by the input/output peripherals in equipment, such as touch-screen 412 With other input/control devicess 410, Peripheral Interface 403 is connected to.I/O subsystems 409 can include the He of display controller 4091 For controlling one or more input controllers 4092 of other input/control devicess 410.Wherein, one or more input controls Device 4092 processed receives electric signal from other input/control devicess 410 or sends electric signal to other input/control devicess 410, Other input/control devicess 410 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole, click on roller.What deserves to be explained is input controller 4092 can with it is following any one be connected:Keyboard, infrared port, The instruction equipment of USB interface and such as mouse.
Wherein, according to touch-screen operation principle and transmission information medium classification, touch-screen 412 can be resistance-type, Capacitor induction type, infrared-type or surface acoustic wave type.Classify according to mounting means, touch-screen 412 can be:It is external hanging type, built-in Formula or monoblock type.Classify according to technical principle, touch-screen 412 can be:Vector pressure sensing technology touch-screen, resistive technologies are touched Touch screen, capacitance technology touch-screen, infrared technology touch-screen or surface acoustic wave technique touch-screen.
Touch-screen 412, above-mentioned touch-screen 412 are the input interface and output interface between user terminal and user, can It can include figure, text, icon, video etc. to user, visual output depending on output display.Optionally, touch-screen 412 is by user The electric signal (electric signal of such as contact surface) triggered on touch screen curtain, is sent to first processor 402.
Display controller 4091 in I/O subsystems 409 receives electric signal from touch-screen 412 or sent out to touch-screen 412 Electric signals.Touch-screen 412 detects the contact on touch-screen, and the contact detected is converted to and shown by display controller 4091 The interaction of user interface object on touch-screen 412, that is, realize man-machine interaction, the user interface being shown on touch-screen 412 Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is equipment can also include light Mouse, light mouse is not show the touch sensitive surface visually exported, or the extension of the touch sensitive surface formed by touch-screen.
RF circuits 405, it is mainly used in establishing the communication of intelligent sound box and wireless network (i.e. network side), realizes intelligent sound box Data receiver and transmission with wireless network.Such as transmitting-receiving short message, Email etc..
Voicefrequency circuit 406, it is mainly used in receiving voice data from Peripheral Interface 403, the voice data is converted into telecommunications Number, and the electric signal is sent to loudspeaker 411.
Loudspeaker 411, for the voice signal for receiving intelligent sound box from wireless network by RF circuits 405, it is reduced to Sound simultaneously plays the sound to user.
Power management chip 408, the hardware for being connected by CPU402, I/O subsystem and Peripheral Interface are powered And power management.
In the present embodiment, central first processor 402 is used for:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm;
If target code meets the first decoding algorithm and the second decoding algorithm, according to default decoding algorithm to the mesh Mark coding is decoded, and the default decoding algorithm is first decoding algorithm or second decoding algorithm;
Judge to whether there is non-Chinese characters in common use in decoded result;
Target decoder algorithm is determined according to judged result.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on byte quantity.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on span.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Obtain target physical address corresponding to target code;
Judge the target physical address whether and meanwhile be present in first list and second list, or be not present in institute State first list and the second list;The first list is used for the physical address for recording the matching of the first decoding algorithm, described Second list is used for the physical address for recording the matching of the second decoding algorithm.
Further, it is described that target decoder algorithm is determined according to judged result, including:
If there is non-Chinese characters in common use, then the target code is decoded using other decoding algorithms, and export knot Fruit, other described decoding algorithms are the decoding in addition to the default decoding algorithm in the first decoding algorithm and the second decoding algorithm Algorithm.
Further, before it whether there is non-Chinese characters in common use in judging decoded result, in addition to:
Obtain the service set that multiple radio access nodes use;
Chinese characters in common use are determined according to the service set that the multiple radio access node uses;
Non- Chinese characters in common use are determined according to the Chinese characters in common use.
Further, first decoding algorithm is Unicode decoding algorithm, and second decoding algorithm is Hanzi internal code Extension specification decoding algorithm.
The embodiment of the present application additionally provides a kind of computer-readable recording medium, is stored thereon with computer program, the journey Sequence can realize following steps when being executed by processor:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm;
If target code meets the first decoding algorithm and the second decoding algorithm, according to default decoding algorithm to the mesh Mark coding is decoded, and the default decoding algorithm is first decoding algorithm or second decoding algorithm;
Judge to whether there is non-Chinese characters in common use in decoded result;
Target decoder algorithm is determined according to judged result.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on byte quantity.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on span.
Further, it is described to judge whether target code meets the first decoding algorithm and the second decoding algorithm, including:
Obtain target physical address corresponding to target code;
Judge the target physical address whether and meanwhile be present in first list and second list, or be not present in institute State first list and the second list;The first list is used for the physical address for recording the matching of the first decoding algorithm, described Second list is used for the physical address for recording the matching of the second decoding algorithm.
Further, it is described that target decoder algorithm is determined according to judged result, including:
If there is non-Chinese characters in common use, then the target code is decoded using other decoding algorithms, and export knot Fruit, other described decoding algorithms are the decoding in addition to the default decoding algorithm in the first decoding algorithm and the second decoding algorithm Algorithm.
Further, before it whether there is non-Chinese characters in common use in judging decoded result, in addition to:
Obtain the service set that multiple radio access nodes use;
Chinese characters in common use are determined according to the service set that the multiple radio access node uses;
Non- Chinese characters in common use are determined according to the Chinese characters in common use.
Further, first decoding algorithm is Unicode decoding algorithm, and second decoding algorithm is Hanzi internal code Extension specification decoding algorithm.
The computer-readable storage medium of the embodiment of the present application, any of one or more computer-readable media can be used Combination.Computer-readable medium can be computer-readable signal media or computer-readable recording medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any combination above.The more specifically example (non exhaustive list) of computer-readable recording medium includes:Tool There are the electrical connections of one or more wires, portable computer diskette, hard disk, random access memory (RAM), read-only storage (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any includes or the tangible medium of storage program, the program can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for By instruction execution system, device either device use or program in connection.
The program code included on computer-readable medium can be transmitted with any appropriate medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
Can with one or more programming languages or its combination come write for perform the application operation computer Program code, programming language include object oriented program language-such as Java, Smalltalk, C++, also wrapped Include conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground is performed, partly performed on the user computer on the user computer, the software kit independent as one performs, partly existed Subscriber computer upper part is performed or performed completely on remote computer or server on the remote computer.It is being related to In the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or wide area Net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISP To pass through Internet connection).
Pay attention to, above are only preferred embodiment and the institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, The protection domain readjusted and substituted without departing from the application.Therefore, although being carried out by above example to the application It is described in further detail, but the application is not limited only to above example, in the case where not departing from the application design, also Other more equivalent embodiments can be included, and scope of the present application is determined by scope of the appended claims.

Claims (10)

1. a kind of decoding algorithm determines method, it is characterised in that including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm;
If target code meets the first decoding algorithm and the second decoding algorithm, the target is compiled according to default decoding algorithm Code is decoded, and the default decoding algorithm is first decoding algorithm or second decoding algorithm;
Judge to whether there is non-Chinese characters in common use in decoded result;
Target decoder algorithm is determined according to judged result.
2. decoding algorithm according to claim 1 determines method, it is characterised in that described to judge whether target code meets First decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on byte quantity.
3. decoding algorithm according to claim 1 determines method, it is characterised in that described to judge whether target code meets First decoding algorithm and the second decoding algorithm, including:
Judge whether target code meets the first decoding algorithm and the second decoding algorithm based on span.
4. decoding algorithm according to claim 1 determines method, it is characterised in that described to judge whether target code meets First decoding algorithm and the second decoding algorithm, including:
Obtain target physical address corresponding to target code;
Judge the target physical address whether and meanwhile be present in first list and second list, or be not present in described One list and the second list;Physical address of the first list for recording the matching of the first decoding algorithm, described second List is used for the physical address for recording the matching of the second decoding algorithm.
5. decoding algorithm according to claim 1 determines method, it is characterised in that described to determine target according to judged result Decoding algorithm, including:
If there is non-Chinese characters in common use, then the target code is decoded using other decoding algorithms, and output result, institute Other decoding algorithms are stated as the decoding algorithm in the first decoding algorithm and the second decoding algorithm in addition to the default decoding algorithm.
6. decoding algorithm according to claim 1 determines method, it is characterised in that whether there is in decoded result is judged Before non-Chinese characters in common use, in addition to:
Obtain the service set that multiple radio access nodes use;
Chinese characters in common use are determined according to the service set that the multiple radio access node uses;
Non- Chinese characters in common use are determined according to the Chinese characters in common use.
7. the decoding algorithm according to any one of claim 1-6 determines method, it is characterised in that first decoding is calculated Method is Unicode decoding algorithm, and second decoding algorithm is Chinese Internal Code Specification decoding algorithm.
A kind of 8. decoding algorithm determining device, it is characterised in that including:
First judge module, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Decoder module, if judging that target code meets the first decoding algorithm and the second decoding is calculated for first judge module Method, then the target code is decoded according to default decoding algorithm, the default decoding algorithm is that the described first decoding is calculated Method or second decoding algorithm;
Second judge module, it whether there is non-Chinese characters in common use in the decoded result for judging the decoder module;
Decoding algorithm determining module, for determining target decoder algorithm according to the judged result of second judge module.
9. a kind of terminal, it is characterised in that the terminal includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors are real Now the decoding algorithm as described in any in claim 1-7 determines method.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor Realize that the decoding algorithm as described in any in claim 1-7 determines method during execution.
CN201710994399.3A 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium Active CN107729302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710994399.3A CN107729302B (en) 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710994399.3A CN107729302B (en) 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107729302A true CN107729302A (en) 2018-02-23
CN107729302B CN107729302B (en) 2021-10-15

Family

ID=61212397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710994399.3A Active CN107729302B (en) 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107729302B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289935A (en) * 2019-06-18 2019-09-27 上海联影医疗科技有限公司 A kind of coding/decoding method, device, terminal and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6204782B1 (en) * 1998-09-25 2001-03-20 Apple Computer, Inc. Unicode conversion into multiple encodings
CN103207877A (en) * 2012-01-17 2013-07-17 阿里巴巴集团控股有限公司 Decoding method and device
US20130201980A1 (en) * 2012-02-06 2013-08-08 Qualcomm Incorporated Systems and methods for enabling stations to connect to wireless hotspots using non-unicode service set identification information
CN103517385A (en) * 2012-07-11 2014-01-15 Tcl集团股份有限公司 AP connecting method and system of Wi-Fi of Android
CN104424165A (en) * 2013-09-06 2015-03-18 北大方正集团有限公司 Messy code detection method and system for text documents
CN104754701A (en) * 2015-03-09 2015-07-01 广东欧珀移动通信有限公司 Signal processing method and mobile terminal
CN104994128A (en) * 2015-05-15 2015-10-21 北京网康科技有限公司 Data coding type identifying and transcoding method and device
CN105430712A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Service set identifier coding method, coding device, decoding method and decoding device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6204782B1 (en) * 1998-09-25 2001-03-20 Apple Computer, Inc. Unicode conversion into multiple encodings
CN103207877A (en) * 2012-01-17 2013-07-17 阿里巴巴集团控股有限公司 Decoding method and device
US20130201980A1 (en) * 2012-02-06 2013-08-08 Qualcomm Incorporated Systems and methods for enabling stations to connect to wireless hotspots using non-unicode service set identification information
CN103517385A (en) * 2012-07-11 2014-01-15 Tcl集团股份有限公司 AP connecting method and system of Wi-Fi of Android
CN104424165A (en) * 2013-09-06 2015-03-18 北大方正集团有限公司 Messy code detection method and system for text documents
CN104754701A (en) * 2015-03-09 2015-07-01 广东欧珀移动通信有限公司 Signal processing method and mobile terminal
CN104994128A (en) * 2015-05-15 2015-10-21 北京网康科技有限公司 Data coding type identifying and transcoding method and device
CN105430712A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Service set identifier coding method, coding device, decoding method and decoding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
亓莱滨: "Unicode内码转换与汉字乱码", 《电脑知识与技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289935A (en) * 2019-06-18 2019-09-27 上海联影医疗科技有限公司 A kind of coding/decoding method, device, terminal and storage medium
CN110289935B (en) * 2019-06-18 2022-02-22 上海联影医疗科技股份有限公司 Decoding method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN107729302B (en) 2021-10-15

Similar Documents

Publication Publication Date Title
KR20160001965A (en) Providing Method For Voice Command and Electronic Device supporting the same
US20150278164A1 (en) Method and apparatus for constructing documents
CN105426103B (en) Message editing method and apparatus in a kind of mobile device
CN107801096A (en) Control method, device, terminal device and the storage medium of video playback
KR20140120192A (en) Method for processing data and an electronic device thereof
TW202025139A (en) Voice interaction method, device and system
CN110235087A (en) A kind of method and terminal for realizing voice control
CN109271768A (en) Release news management method, device, storage medium and terminal
CN103687063B (en) A kind of method of interconnection network, device and terminal equipment
CN104978045B (en) A kind of Chinese character input method and device
EP3783906A1 (en) Method and device for selecting audio track from audio and video files
CN107172258A (en) A kind of method, device, terminal and storage medium for preserving associated person information
CN110765502A (en) Information processing method and related product
CN109240641B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN106911956A (en) A kind of audio data play method, device and mobile terminal
CN107402625A (en) Touch screen scanning method, device, terminal and computer-readable recording medium
CN107708183A (en) Decoding algorithm determines method, apparatus, terminal and storage medium
CN107508979A (en) volume adjusting method, device, terminal and storage medium
CN107729302A (en) Decoding algorithm determines method, apparatus, terminal and storage medium
CN108960213A (en) Method for tracking target, device, storage medium and terminal
CN108427549A (en) Sound processing method, device, storage medium and the terminal of notification message
CN107766550A (en) comment information processing method, device, terminal device and storage medium
CN107493339A (en) Information-pushing method, device, terminal and computer-readable recording medium
CN108427671B (en) Information conversion method and apparatus, storage medium, and electronic apparatus
CN107770844A (en) Decoding algorithm determines method, apparatus, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant