CN107770844A - 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
CN107770844A
CN107770844A CN201710993315.4A CN201710993315A CN107770844A CN 107770844 A CN107770844 A CN 107770844A CN 201710993315 A CN201710993315 A CN 201710993315A CN 107770844 A CN107770844 A CN 107770844A
Authority
CN
China
Prior art keywords
decoding algorithm
algorithm
decoding
target code
valid data
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
CN201710993315.4A
Other languages
Chinese (zh)
Other versions
CN107770844B (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 CN201710993315.4A priority Critical patent/CN107770844B/en
Publication of CN107770844A publication Critical patent/CN107770844A/en
Application granted granted Critical
Publication of CN107770844B publication Critical patent/CN107770844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • H04L1/0046Code rate detection or code type detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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 valid data position of the target code is obtained according to the first decoding algorithm;Target decoder algorithm is determined according to the valid data, 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 obtaining the first decoding algorithm The valid data position of target code;
Target decoder algorithm is determined according to the valid data.
Second aspect, the embodiment of the present application additionally provide a kind of decoding algorithm determining device, including:
Judge module, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Valid data acquisition module, if judging that target code meets the first decoding algorithm and for the judge module Two decoding algorithms, then the valid data position of the target code is obtained according to the first decoding algorithm;
Determining module, for determining target decoder algorithm according to the valid data.
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;Then, if mesh Mark coding meets the first decoding algorithm and the second decoding algorithm, then the valid data of target code are obtained according to the first decoding algorithm Position;Finally, target decoder algorithm is determined according to valid data, 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 the first decoding algorithm Obtain the valid data position of target code.
First decoding algorithm can be UTF-8 decoding algorithms.
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.
Optionally, the flag bit in target code is searched according to the first decoding algorithm;Valid data are determined according to flag bit Position.
UTF-8 encryption algorithms are after character is converted into numeral, and every group of numeral represents a character.Between every group of numeral Between-line spacing is entered by identifier, and for identifying character sequence.Exemplary, " 110 " mark is added before set of number Symbol, " 10 " identifier is added before second group of numeral.Character in target code is identified, when recognizing " 110 ", It is determined that find flag bit corresponding to first character, read the first character behind " 110 ", until reading " 10 ", by the character between " 110 " and " 10 " as set of number.By that analogy, second group of numeral, the 3rd group of numeral are obtained To N groups numeral, each group numeral is grouped together, obtains the valid data position in target code.
Step 130, target decoder algorithm is determined according to valid data.
It is and the first decoding algorithm that can obtain decoded result corresponding to the first decoding algorithm according to valid data.According to First decoding algorithm is decoded to obtain the first decoded result to target code.If mess code is not present in the first decoded result, Then can determine that the first decoding algorithm is target algorithm.Or if the digit of the first decoded result meets wireless network name Length threshold, then the first decoding algorithm is defined as target decoder algorithm.
If WAP uses the second coding method, when terminal is decoded using the first decoding algorithm, Obtained number of significant digit may be zero, it is also possible to number of significant digit be present but parsed according to valid data position and the first decoding algorithm The character gone out is mess code, and the second coding method now is defined as into target decoder algorithm.
In practice, it has been found that position and quantity of the UTF-8 significance bit in target code are often fixed, therefore, Target decoder algorithm can be determined according to the digit of valid data position.
Specifically, if identifier corresponding to UTF-8 occurs on predeterminated position in target code, and there is effect character Quantity is predetermined number, then can determine that the first decoding algorithm is target decoder method algorithm.Identifier is " 100 ", " 10 " etc., is preset Quantity can be 20.Determine that target decoder algorithm can save decoding checking according to the digit to valid data position, further carry High decoding efficiency.
Further, will be according to target decoder algorithm and another decoding algorithm after target decoder algorithm is determined Obtain decoded result to be exported, target decoder algorithm is updated according to the feedback information that user inputs.
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;If target code meets the first decoding algorithm and the second decoding algorithm, calculated according to the first decoding Method obtains the valid data position of target code;Target decoder algorithm is determined according to valid data.Relative to being used in correlation technique Default algorithm or using fixed decoding algorithm, the application can meet the first decoding algorithm and the judging target code During two decoding algorithms, the valid data position in target code is obtained, and the valid data position for giving acquisition determines target Decoding algorithm, and then quick determination target decoder algorithm, 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.Default decoding process can be that the first decoding algorithm can also be the second decoding algorithm.
If step 250, meeting UTF-8 decoding algorithms and also complying with GBK decoding algorithms, mesh is obtained according to the first decoding algorithm Mark the valid data position of coding.
Step 260, target decoder algorithm is determined according to valid data.
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:
Judge module 310, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Valid data acquisition module 320, if judging that target code meets the first decoding and calculated for the judge module 310 Method and the second decoding algorithm, then the valid data position of the target code is obtained according to the first decoding algorithm;
Determining module 330, for determining target decoder algorithm according to the valid data.
Further, 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, judge module 310 is used for:Judge whether target code meets the first decoding algorithm based on span With the second decoding algorithm.
Further, 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, valid data acquisition module 320 is used for:
Flag bit in the target code is searched according to the first decoding algorithm;
Valid data position is determined according to the flag bit.
Further, determining module 330 is used for:
It is described that target decoder algorithm is determined according to the valid data position, including:
Target decoder algorithm is determined according to the digit of the valid data position.
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 determines whether that module 310 judges whether target code accords with Close the first decoding algorithm and the second decoding algorithm;If target code meets the first decoding algorithm and the second decoding algorithm, have Imitate the valid data position that data acquisition module 320 obtains the target code according to the first decoding algorithm;The basis of determining module 330 The valid data determine target decoder algorithm.Calculated relative to using default algorithm in correlation technique or using fixed decoding Method, the application can be when judging that target code meets the first decoding algorithm and the second decoding algorithm, in target code Valid data position is obtained, and the valid data position for giving acquisition determines target decoder algorithm, and then quick determination target solution Code algorithm, improves SSID decoding efficiencies.
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 obtaining the first decoding algorithm The valid data position of target code;
Target decoder algorithm is determined according to the valid data.
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 obtaining the first decoding algorithm The valid data position of target code;
Target decoder algorithm is determined according to the valid data.
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, the valid data position that the target code is obtained according to the first decoding algorithm, including:
Flag bit in the target code is searched according to the first decoding algorithm;
Valid data position is determined according to the flag bit.
Further, it is described that target decoder algorithm is determined according to the valid data position, including:
Target decoder algorithm is determined according to the digit of the valid data position.
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 obtaining the first decoding algorithm The valid data position of target code;
Target decoder algorithm is determined according to the valid data.
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, the valid data position that the target code is obtained according to the first decoding algorithm, including:
Flag bit in the target code is searched according to the first decoding algorithm;
Valid data position is determined according to the flag bit.
Further, it is described that target decoder algorithm is determined according to the valid data position, including:
Target decoder algorithm is determined according to the digit of the valid data position.
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 obtained according to the first decoding algorithm The valid data position of coding;
Target decoder algorithm is determined according to the valid data.
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 be obtained according to the first decoding algorithm The valid data position of the target code, including:
Flag bit in the target code is searched according to the first decoding algorithm;
Valid data position is determined according to the flag bit.
6. decoding algorithm according to claim 1 determines method, it is characterised in that described true according to the valid data position Set the goal decoding algorithm, including:
Target decoder algorithm is determined according to the digit of the valid data position.
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:
Judge module, for judging whether target code meets the first decoding algorithm and the second decoding algorithm;
Valid data acquisition module, if judging that target code meets the first decoding algorithm and the second solution for the judge module Code algorithm, then the valid data position of the target code is obtained according to the first decoding algorithm;
Determining module, for determining target decoder algorithm according to the valid data.
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.
CN201710993315.4A 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium Active CN107770844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710993315.4A CN107770844B (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
CN201710993315.4A CN107770844B (en) 2017-10-23 2017-10-23 Decoding algorithm determination method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107770844A true CN107770844A (en) 2018-03-06
CN107770844B CN107770844B (en) 2020-12-29

Family

ID=61268359

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN107770844B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266796A (en) * 2007-03-12 2008-09-17 华为技术有限公司 A quantified coding method and device
US20120254210A1 (en) * 2011-03-28 2012-10-04 Siva Kiran Dhulipala Systems and methods of utf-8 pattern matching
CN103517385A (en) * 2012-07-11 2014-01-15 Tcl集团股份有限公司 AP connecting method and system of Wi-Fi of Android
CN104661285A (en) * 2013-11-18 2015-05-27 联想(北京)有限公司 An information processing method, device and electronic apparatus
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
CN106060596A (en) * 2016-06-29 2016-10-26 江苏省公用信息有限公司 User grouping system and method of internet protocol television
CN106068028A (en) * 2016-07-04 2016-11-02 青岛海信宽带多媒体技术有限公司 Terminal processes method and the terminal of wireless network name mess code
CN106792622A (en) * 2016-12-27 2017-05-31 广东欧珀移动通信有限公司 The method and terminal device of AP are hidden in connection
CN107135548A (en) * 2016-02-26 2017-09-05 新华三技术有限公司 Renewal BSSID and connection network a kind of method and apparatus

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266796A (en) * 2007-03-12 2008-09-17 华为技术有限公司 A quantified coding method and device
US20120254210A1 (en) * 2011-03-28 2012-10-04 Siva Kiran Dhulipala Systems and methods of utf-8 pattern matching
CN103517385A (en) * 2012-07-11 2014-01-15 Tcl集团股份有限公司 AP connecting method and system of Wi-Fi of Android
CN104661285A (en) * 2013-11-18 2015-05-27 联想(北京)有限公司 An information processing method, device and electronic apparatus
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
CN107135548A (en) * 2016-02-26 2017-09-05 新华三技术有限公司 Renewal BSSID and connection network a kind of method and apparatus
CN106060596A (en) * 2016-06-29 2016-10-26 江苏省公用信息有限公司 User grouping system and method of internet protocol television
CN106068028A (en) * 2016-07-04 2016-11-02 青岛海信宽带多媒体技术有限公司 Terminal processes method and the terminal of wireless network name mess code
CN106792622A (en) * 2016-12-27 2017-05-31 广东欧珀移动通信有限公司 The method and terminal device of AP are hidden in connection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王玉,张永胜: "关于软件对字符编码方式误判的研究", 《软件工程师》 *

Also Published As

Publication number Publication date
CN107770844B (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN107463693A (en) A kind of data processing method, device, terminal and computer-readable recording medium
CN103475667A (en) Method, device and system for controlling access router
CN103634109A (en) Operation right authentication method and device
CN104796385A (en) Terminal binding method, device and system
CN110765502B (en) Information processing method and related product
CN104036160A (en) Web browsing method, device and browser
TW202025139A (en) Voice interaction method, device and system
KR20160015305A (en) Near field communication-based data transmission method and apparatus, and near field communication device
CN110235087A (en) A kind of method and terminal for realizing voice control
CN104754563A (en) Wireless hotspot access sharing method, mobile terminals and system
CN103687063B (en) A kind of method of interconnection network, device and terminal equipment
CN107516526A (en) A kind of audio source tracking localization method, device, equipment and computer-readable recording medium
US10034323B2 (en) Control method for BLE communication between host device and peripheral device
US20210219028A1 (en) Method and apparatus for selecting audio track from audio and video file
CN105306199A (en) Identity verification method, device and system
KR20160014357A (en) Electronic device and method for transceiving data
US20180357404A1 (en) Information processing method and apparatus, and electronic device
CN105354459B (en) Information processing method and device and electronic equipment
CN107708183A (en) Decoding algorithm determines method, apparatus, terminal and storage medium
KR20160001359A (en) Method for managing data and an electronic device thereof
CN107729302A (en) Decoding algorithm determines method, apparatus, terminal and storage medium
CN109168184B (en) Information interaction method based on neighbor awareness network NAN and related product
CN114978749B (en) Login authentication method and system, storage medium and electronic equipment
CN107770844A (en) Decoding algorithm determines method, apparatus, terminal and storage medium
CN109788126A (en) Verify code imput method and equipment

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: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,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