CN108287811B - Character checking method and device - Google Patents

Character checking method and device Download PDF

Info

Publication number
CN108287811B
CN108287811B CN201710018668.2A CN201710018668A CN108287811B CN 108287811 B CN108287811 B CN 108287811B CN 201710018668 A CN201710018668 A CN 201710018668A CN 108287811 B CN108287811 B CN 108287811B
Authority
CN
China
Prior art keywords
character
legal
page
request
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710018668.2A
Other languages
Chinese (zh)
Other versions
CN108287811A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710018668.2A priority Critical patent/CN108287811B/en
Publication of CN108287811A publication Critical patent/CN108287811A/en
Application granted granted Critical
Publication of CN108287811B publication Critical patent/CN108287811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F40/129Handling non-Latin characters, e.g. kana-to-kanji conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/02Reservations, e.g. for tickets, services or events

Abstract

The application relates to the technical field of internet, in particular to a character checking method and device, which are used for solving the problem of low verification accuracy in the existing checking of uncommon words. The embodiment of the application provides a character checking method, which comprises the following steps: when a user selects to enter a lower menu page, a client initiates a first request to a server, wherein the first request is used for requesting to acquire page information of the lower menu page and a first legal character set identifier supported by a service provider selected by the user; receiving a first legal character set identifier supported by a service provider and page information of a lower page returned by a server; displaying a lower order page based on the page information, and receiving characters to be checked input by a user on the lower order page; and determining the legality of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier.

Description

Character checking method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a character verification method and apparatus.
Background
When a client subscribes an air ticket for a user, the user is required to input information such as a name, an identification card number and the like. Some users may have uncommon words in their names, and some airlines stipulate that if the name of the user contains a uncommon word, the name needs to be represented by pinyin from the first uncommon word, for example, as shown in fig. 1, in the name of the user, "wang Ji Min", the name of the user needs to be input as "wang ZHEMIN".
If the user does not know that the name of the user contains the uncommon word, the name containing the uncommon word is filled in the client, and the client needs to automatically convert the name of the user. Generally, the client locally stores a rarely used word table, and after receiving a name input by a user, the rarely used word in the rarely used word table is traversed to verify whether the name contains the rarely used word.
The rarely-used word is frequently missed by adopting the mode that the rarely-used word list is preset by the client, so that the verification result is inaccurate. The reason is that the requirement of the navigation department can be changed, all the uncommon words required by the navigation department are difficult to be covered by the rarely-used word list maintained by the client, on the other hand, legal character sets used by different navigation departments are different, for example, a Chinese character set of GB2312 is used by some navigation departments, a Chinese character set of GBK is used by some navigation departments, and definitions of the rarely-used words by different navigation departments are different, so that verification results can possibly occur when the rarely-used word list maintained by the client is uniformly used for verification of the rarely-used words, and the condition that the rarely-used words are not in line with the requirement of the navigation department occurs.
Disclosure of Invention
The embodiment of the application provides a character checking method and device, which are used for solving the problem of low verification accuracy in the existing rarely-used character checking.
The embodiment of the application provides a character checking method, which comprises the following steps:
the client initiates a first request to the server when the user selects to enter a next single page; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
receiving a first legal character set identifier supported by the service provider and page information of the ordering page returned by the server;
displaying a lower order page based on the page information, and receiving characters to be checked input by a user on the lower order page;
and determining the legality of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier.
Optionally, the client determines the character encoding range corresponding to the first legal character set identifier according to the following steps:
and determining the character coding range corresponding to the first legal character set identifier according to the pre-stored mapping relation between different legal character set identifiers and the character coding range.
Optionally, determining the validity of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first valid character set identifier includes:
converting the character to be checked into character codes by adopting a preset coding function;
judging whether the converted character code is in the character code range;
and if the converted character code is not in the character code range, determining that the character to be verified is illegal.
Optionally, the method further comprises:
after determining that the character to be verified is illegal, sending a second request to the server, wherein the second request is used for requesting to convert the character to be verified into a legal character;
receiving legal characters returned by the server;
and displaying the legal characters in the ordering page so as to initiate an ordering request according to the user instruction.
Optionally, the ordering page is a ticket ordering page; the character to be checked is a Chinese character, and the legal character is pinyin.
The embodiment of the present application further provides a character verification method, including:
the method comprises the steps that a server receives a first request sent by a client; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
determining a first legal character set identifier supported by the service provider and page information of the ordered page based on the first request;
and sending the first legal character set identification and the page information of the ordering page to the client so that the client can generate the ordering page based on the page information and verify the validity of the character to be checked input by the user on the ordering page according to the first legal character set identification.
Optionally, the determining, by the server, a first legal character set identifier supported by the service provider includes:
sending a legal character set query request to the service provider;
and receiving a first legal character set identifier fed back by the service provider.
Optionally, after sending the first legal character set identifier and the page information of the order page to the client, the method further includes:
receiving a second request sent by the client, wherein the second request is used for requesting to convert the characters to be verified into legal characters;
converting the characters to be verified into legal characters according to a pre-stored character conversion library;
and returning the legal characters to the client so that the client can initiate a ordering request based on the legal characters.
The embodiment of the present application further provides a client for character verification, including:
the sending module is used for initiating a first request to the server when the user selects to enter a next single page; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
a receiving module, configured to receive a first legal character set identifier supported by the service provider and page information of the ordered page returned by the server;
the processing module is used for displaying a menu page based on the page information and receiving characters to be checked input by a user on the menu page; and determining the legality of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier.
An embodiment of the present application further provides a server for character verification, including:
the receiving module is used for receiving a first request sent by a client; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
the processing module is used for determining a first legal character set identifier supported by the service provider and page information of the ordering page based on the first request;
and the sending module is used for sending the first legal character set identifier and the page information of the ordering page to the client so that the client can generate the ordering page based on the page information and verify the legality of the character to be verified input by the user on the ordering page according to the first legal character set identifier.
By adopting the embodiment of the application, the client does not need to preset a rarely-used word bank locally, and can dynamically request the server to acquire the legal character set identification supported by the service provider selected by the user when entering the next single page, then determine the character coding range corresponding to the legal character set identification, and confirm the legality of the character to be checked according to whether the character code of the character to be checked input by the user is positioned in the character coding range. In addition, the legality of the character to be verified is confirmed by comparing whether the character code of the character to be verified is located in the legal character code range, the calculation mode is simple and quick, a large number of rarely used characters do not need to be stored, and the storage space is saved.
Drawings
FIG. 1 is a schematic diagram of checking uncommon words;
FIG. 2 is a flowchart of a character checking method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a character checking method according to a second embodiment of the present application;
fig. 4 is a diagram of a client structure for character verification according to an embodiment of the present application;
fig. 5 is a diagram of a server structure for character verification according to an embodiment of the present application.
Detailed Description
The method and the device are applied to the scene that the legality of the character input by the user needs to be checked, especially in the scene of booking the air ticket, the rarely-used character of the name of the user needs to be checked, if the rarely-used character is checked out to be contained in the name of the user, the rarely-used character in the name at least needs to be converted into the pinyin, and generally, the Chinese characters starting from the rarely-used character in the name are all converted into the pinyin.
The embodiments of the present application will be described in further detail with reference to the drawings attached hereto.
Example one
As shown in fig. 2, a flowchart of a character checking method provided in an embodiment of the present application includes the following steps:
s201: the client initiates a first request to the server when the user selects to enter a next single page; the first request is used for requesting to acquire page information of a lower page and a first legal character set identifier supported by a service provider selected by a user.
In particular implementations, the client initiating the first request may refer to being initiated after the user selects relevant service information (including service provider information). For example, when a user uses a client to book an air ticket, the user inputs an origin, a destination and a departure time, and then clicks on a search, the server returns some simple flight information including airline information, a flight number, a departure time and an arrival time for the client, after the user selects a flight and clicks on a detail page of the flight, the user can select other information of the reserved air ticket, such as an agent and a slot, and then enters an ordering page, and the client initiates the first request, where the first request can carry the flight information selected by the user.
S202: and the server determines a first legal character set identifier corresponding to the service provider and page information of the ordered page based on the first request.
Here, the server may send a legal character set query request to the service provider after receiving the first request from the client, and receive a first legal character set identifier fed back by the service provider.
For example, if the order-placing page is a ticket order-placing page, the service provider is an airline company, and the first legal character set identifier is a chinese character code character set GB2312 or GBK or other chinese character code character sets returned by the airline company.
Here, the page information for generating the order page includes page information (which may be requested from the service provider while requesting the legal character set) that the server inquires from the service provider after receiving the first request, and may also include information that the server has determined before receiving the first request from the client.
For example, when a user starts to search for flights, the server determines (requests from) some simple flight information, such as the airline information, the flight number, the departure and arrival time, the airport information for departure and landing, the price information, etc., selects other booking information, such as an agent and a slot, after the user selects a flight and enters a detailed page of the flight, and then clicks to enter a next page, at this time, the client initiates a first request for acquiring page information of the next page and a legal character set identifier supported by the airline selected by the user, and then the server initiates a query request to the airline system selected by the user to query the legal character set identifier of the airline and other more detailed ticket information, such as insurance, other package information, etc., and then sends the page information of the next page and the legal character set identifier supported by the airline selected by the user to the client. Here, the time when the server acquires the valid character set identifier from the airline is not specifically limited in the embodiment of the present application, and the server may acquire the valid character set identifier of the airline selected by the user before the user selects a flight and enters the next page without clicking the page after receiving the first request, for example, when the user selects a flight and enters the detailed page of the flight.
S203: and the server sends the determined first legal character set identification and the page information of the ordering page to the client.
S204: and the client generates and displays a lower order page based on the page information, and receives the characters to be checked input by the user on the lower order page.
Here, the client generates a placing page according to the page information returned by the server, wherein there may be indication information indicating that the user inputs a name and an identification number. Under the air ticket booking scene, the character to be checked refers to the name of the user, namely the Chinese character to be checked. In addition, the order page may include a sub-page, for example, the main page of the order page may include an instruction button for adding/modifying a multiplier, after the user clicks the instruction button, a sub-page for filling out user identity information appears, and the user may fill in information such as a name, an identity card number, and the like in the sub-page.
S205: and the client determines the legality of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier.
Here, if the name is legal, the subsequent ordering process may be entered according to the user instruction, and if the name is illegal, the client needs to call the server interface to convert the character to be verified into a legal character, see the subsequent step S206.
In specific implementation, the client may determine the character encoding range corresponding to the first legal character set identifier according to a mapping relationship between different prestored legal character set identifiers and the character encoding range.
As shown in the table one below, the two legal character set identifications and the corresponding character encoding ranges commonly used by the airline company at present are provided.
Figure BDA0001206676610000071
Watch 1
That is, in the ticket booking scenario, the encoding range of the kanji character corresponding to the legal character set identifier GB2312 is B0a1-F7FE, and the encoding range of the kanji character corresponding to the legal character set identifier GBK includes, in addition to the encoding range of the kanji character corresponding to GB2312, B0a1-F7 FE: 8140-A0FE, AA40-FEA0, and A996.
When the legality of the character to be checked is determined, firstly, a preset coding function is adopted to convert the character to be checked into a character code; judging whether the character code is in the character code range or not according to the converted character code; and if the character code is not in the character code range, determining that the character to be verified is illegal.
For example, the encoding function here may use a URLEncode, for example, the name input by the user is king-jo-sensitive, that is, the kanji character to be verified is king, jo, or sensitive, and when the word "jo" is verified, the URLEncode is converted into the character code 86B4, in practical implementation, the code initially converted by the URLEncode is% 86% B4, and the code removed therefrom is the required character code 86B4(16 systems). In addition, the character encoding range corresponding to the determined first legal character set identifier GB2312 is B0A1-F7 FE. The comparison is performed byte by byte, that is, whether the comparison 86 is greater than or equal to B0 and less than or equal to F0, whether B4 is greater than or equal to a1 and less than or equal to FE, that is, whether B0< ═ F0 and a1< ═ B4< ═ FE hold, respectively, and the comparison finds that the word "Ji" is a obscure word because 86< B0, it is determined that the word is a obscure word.
Here, in the scenario of reservation of a ticket, generally, if it is verified that a word in the user name is a uncommon word, all words in the user name starting from the word are considered as illegal characters.
S206: and after determining that the character to be verified is illegal, the client sends a second request to the server for requesting to convert the character to be verified into a legal character.
In the specific implementation, after checking that at least one character to be checked in the name input by the user is illegal, the client sends a character conversion request to the server, wherein the character conversion request carries the illegal character determined by the client. For example, in the above example, the client sends the "Ji-sensitive" to the server, which converts it to the legitimate pinyin "ZHEMIN".
S207: and the server converts the characters to be checked into legal characters according to a pre-stored character conversion library.
In the scene of the preset air ticket, the characters to be checked are converted into legal characters, namely, the server converts illegal Chinese characters into pinyin according to a pre-stored Chinese dictionary.
S208: the server returns the legal characters to the client.
Here, the server returns to the client the pinyin "ZHEMIN" corresponding to the "ji-min".
S209: the client displays the legal characters in a ordering page so as to initiate an ordering request according to the user instruction.
Here, the client may first indicate the verified valid character to the user for confirmation or modification by the user, and after confirmation by the user, display the valid character in the ordering page. For example, the client converts the Wang Ji allergy into the Wang ZHEMIN by calling the server interface, then displays the Wang ZHEMIN to the user, reminds the user to confirm or modify, and displays the Wang ZHEMIN in a placing page after the user confirms. The user may then initiate a order request on the order page.
By adopting the embodiment of the application, the client can dynamically request the server to acquire the legal character set identification supported by the service provider selected by the user when entering the lower single page, then determine the character coding range corresponding to the legal character set identification, and confirm the legality of the character to be verified according to whether the character code of the character to be verified input by the user is positioned in the character coding range. In addition, the legality of the character to be verified is confirmed by comparing whether the character code of the character to be verified is located in the legal character code range, and the calculation mode is simple and quick.
Example two
In the following, an air ticket booking scenario is taken as an example to list an implementation process embodying the idea of the present application.
As shown in fig. 3, a flowchart of a character checking method provided in the second embodiment of the present application includes the following steps:
s301: when a user selects to enter a lower page, a client sends a first request to a server, wherein the first request is used for requesting to acquire page information of the lower page and a first legal character set identifier supported by a service provider selected by the user.
For example, the user opens the client, enters a search page, selects origin beijing, destination hangzhou, and departure time 12 months and 19 days on the search page, then clicks on the search, the server returns some simple flight information including airline information, flight number, departure time, arrival time, etc. to the client, after the user selects a flight and clicks on a detail page for entering the flight, the user can select other booking information such as an agent and a cabin space, and then the user selects to enter a placing page, and the client initiates a first request.
S302: and the server inquires legal Chinese character set identification and air ticket detail information from the airline department system corresponding to the airline company selected by the user.
S303: and the server generates response information based on a query result returned by the airline department system, wherein the response information comprises the legal Chinese character set identification of the airline company and page information used for generating a lower page.
For example, if the user selects the chinese oriental aviation MU5458, the service system of the chinese oriental aviation returns the supported legal kanji character set identifier GB2312 and other flight ticket detail information, such as insurance and other package information, based on the query request of the server.
S304: the server returns response information to the client.
Here, the server returns a legal kanji character set identification GB2312 to the client, and ticket detail information of the order page, which contains information indicating that the user inputs a name, an identification number, and the like.
S305: and the client generates and displays a ordering page based on the page information, and receives the name and the identity card number input by the user on the ordering page.
S306: and the client determines the character coding range corresponding to the legal Chinese character set identifier returned by the server according to the mapping relation between the different prestored legal Chinese character set identifiers and the character coding range.
S307: starting from the first Chinese character in the user name, the client converts the Chinese character into a character code by using a URLENCode, judges whether the character code is located in the determined legal character code range, and if so, continuously checks the next Chinese character until all Chinese characters are determined to be legal (namely not uncommon characters) or until one Chinese character is determined to be illegal (uncommon characters). If it is determined that there are illegal characters in the user' S name, the process proceeds to S308.
Here, if it is confirmed that one of the characters in the name is illegal, it is considered that none of the characters following the one character is illegal. For example, when the user name is 'lucky in king', when the client verifies the 'lucky' word, the client converts the 'lucky' word into a character code 86B4 by using URLENCON, compares the character code with the character code range B0A1-F7FE corresponding to GB2312, and confirms that the 'lucky' word is an illegal Chinese character if 86B4 does not belong to the code range.
S308: the client sends a second request to the server, wherein the second request carries illegal kanji characters.
Along with the above example, the client sends Ji Min to the server, and the server converts the Ji Min into Chinese pinyin 'ZHEMIN' according to the prestored Chinese dictionary.
S309: the server converts the illegal Chinese characters into legal pinyin according to the pre-stored Chinese dictionary.
S310: the server returns the legal pinyin to the client.
S311: the client displays the converted legal name in a ordering page so as to initiate an ordering request according to the user instruction.
By adopting the embodiment of the application, the client does not need to preset a rarely-used word bank locally, when the user selects to enter the next single page, the client can dynamically request the server to acquire the legal character set identifier supported by the service provider selected by the user, then the character coding range corresponding to the legal character set identifier is determined, and the legality of the character to be checked is confirmed according to whether the character code of the character to be checked input by the user is positioned in the character coding range. In addition, the legality of the character to be verified is confirmed by comparing whether the character code of the character to be verified is located in the legal character code range, the calculation mode is simple and quick, a large number of rarely used characters do not need to be stored, and the storage space is saved.
Based on the same inventive concept, the embodiment of the present application further provides a device for character verification corresponding to the method for character verification, and because the principle of the device for solving the problem is similar to the method for character verification in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 4, a client structure diagram for character verification provided in the embodiment of the present application includes:
a sending module 41, configured to initiate a first request to a server when a user selects to enter a next single page; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
a receiving module 42, configured to receive a first legal character set identifier supported by the service provider and page information of the ordered page returned by the server;
and the processing module 43 is configured to display a lower page based on the page information, and after receiving a character to be checked input by a user on the lower page, determine validity of the character to be checked according to the character code of the character to be checked and the character code range corresponding to the first valid character set identifier.
Optionally, the processing module 43 is specifically configured to determine the character encoding range corresponding to the first legal character set identifier according to the following steps:
and determining the character coding range corresponding to the first legal character set identifier according to the pre-stored mapping relation between different legal character set identifiers and the character coding range.
Optionally, the processing module 43 is specifically configured to:
converting the character to be checked into character codes by adopting a preset coding function; judging whether the converted character code is in the character code range; and if the converted character code is not in the character code range, determining that the character to be verified is illegal.
Optionally, the sending module 41 is further configured to:
after the processing module 43 determines that the character to be verified is illegal, sending a second request to the server, where the second request is used to request that the character to be verified is converted into a legal character;
the receiving module 42 is further configured to:
receiving legal characters returned by the server;
the processing module 43 is further configured to:
and displaying the legal characters in the ordering page so as to initiate an ordering request according to the user instruction.
As shown in fig. 5, a server structure diagram for character verification provided in the embodiment of the present application includes:
a receiving module 51, configured to receive a first request sent by a client; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
a processing module 52, configured to determine, based on the first request, a first legal character set identifier supported by the service provider and page information of the ordered page;
a sending module 53, configured to send the first legal character set identifier and the page information of the ordering page to the client, so that the client generates an ordering page based on the page information, and verifies, according to the first legal character set identifier, the validity of the character to be checked, which is input by the user on the ordering page.
Optionally, the processing module 52 is specifically configured to:
instructing the sending module 53 to send a legal character set query request to the service provider; the first legal character set identifier fed back by the service provider is received through the receiving module 51.
Optionally, the receiving module 51 is further configured to:
receiving a second request sent by the client, wherein the second request is used for requesting to convert the characters to be verified into legal characters;
the processing module 52 is further configured to:
converting the character to be verified into a legal character according to a preset conversion rule;
the sending module 53 is further configured to:
and returning the legal characters to the client so that the client can initiate a ordering request based on the legal characters.
By adopting the device, the client does not need to preset a rarely used word bank locally, and can dynamically request the server to acquire the legal character set identification supported by the service provider selected by the user when the user selects to enter the next single page, then determine the character coding range corresponding to the legal character set identification, and confirm the legality of the character to be checked according to whether the character code of the character to be checked input by the user is positioned in the character coding range. In addition, the legality of the character to be verified is confirmed by comparing whether the character code of the character to be verified is located in the legal character code range, the calculation mode is simple and quick, a large number of rarely used characters do not need to be stored, and the storage space is saved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (13)

1. A method for verifying characters, the method comprising:
the client initiates a first request to the server when the user selects to enter a next single page; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
receiving a first legal character set identifier supported by the service provider and page information of the ordering page returned by the server;
displaying a lower order page based on the page information, and receiving characters to be checked input by a user on the lower order page;
determining the legality of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier;
determining the validity of the character to be verified according to the character code of the character to be verified and the character code range corresponding to the first legal character set identifier, wherein the determining the validity of the character to be verified comprises:
converting the character to be checked into character codes by adopting a preset coding function;
judging whether the converted character code is in the character code range;
and if the converted character code is not in the character code range, determining that the character to be verified is illegal.
2. The method of claim 1, wherein the client determines the character encoding range corresponding to the first legal character set identifier according to the following steps:
and determining the character coding range corresponding to the first legal character set identifier according to the pre-stored mapping relation between different legal character set identifiers and the character coding range.
3. The method of claim 1, wherein the method further comprises:
after determining that the character to be verified is illegal, sending a second request to the server, wherein the second request is used for requesting to convert the character to be verified into a legal character;
receiving legal characters returned by the server;
and displaying the legal characters in the ordering page so as to initiate an ordering request according to the user instruction.
4. The method of claim 3, wherein the ordering page is a ticket ordering page; the character to be checked is a Chinese character, and the legal character is pinyin.
5. A method for verifying characters, the method comprising:
the method comprises the steps that a server receives a first request sent by a client; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
determining a first legal character set identifier supported by the service provider and page information of the ordered page based on the first request;
and sending the first legal character set identification and the page information of the ordering page to the client so that the client can generate the ordering page based on the page information and verify the validity of the character to be checked input by the user on the ordering page according to the first legal character set identification.
6. The method of claim 5, wherein the server determining a first legal character set identification supported by the service provider comprises:
sending a legal character set query request to the service provider;
and receiving a first legal character set identifier fed back by the service provider.
7. The method of claim 5, wherein after sending the first valid character set identification and the page information of the ordered page to the client, further comprising:
receiving a second request sent by the client, wherein the second request is used for requesting to convert the characters to be verified into legal characters;
converting the characters to be verified into legal characters according to a pre-stored character conversion library;
and returning the legal characters to the client so that the client can initiate a ordering request based on the legal characters.
8. A client for character verification, the client comprising:
the sending module is used for initiating a first request to the server when the user selects to enter a next single page; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
a receiving module, configured to receive a first legal character set identifier supported by the service provider and page information of the ordered page returned by the server;
the processing module is used for displaying a lower order page based on the page information, and determining the legality of the character to be checked according to the character code of the character to be checked and the character code range corresponding to the first legal character set identifier after receiving the character to be checked input by the user on the lower order page;
wherein the processing module is specifically configured to:
converting the character to be checked into character codes by adopting a preset coding function; judging whether the converted character code is in the character code range; and if the converted character code is not in the character code range, determining that the character to be verified is illegal.
9. The client of claim 8, wherein the processing module is specifically configured to determine the character encoding range corresponding to the first valid character set identifier according to the following steps:
and determining the character coding range corresponding to the first legal character set identifier according to the pre-stored mapping relation between different legal character set identifiers and the character coding range.
10. The client of claim 8, wherein the sending module is further to:
after the processing module determines that the character to be verified is illegal, sending a second request to the server, wherein the second request is used for requesting to convert the character to be verified into a legal character;
the receiving module is further configured to:
receiving legal characters returned by the server;
the processing module is further configured to:
and displaying the legal characters in the ordering page so as to initiate an ordering request according to the user instruction.
11. A server for character verification, the server comprising:
the receiving module is used for receiving a first request sent by a client; the first request is used for requesting to obtain page information of a lower page and a first legal character set identifier supported by a service provider selected by a user;
the processing module is used for determining a first legal character set identifier supported by the service provider and page information of the ordering page based on the first request;
and the sending module is used for sending the first legal character set identifier and the page information of the ordering page to the client so that the client can generate the ordering page based on the page information and verify the legality of the character to be verified input by the user on the ordering page according to the first legal character set identifier.
12. The server according to claim 11, wherein the processing module is specifically configured to determine the first legal character set identification according to the following steps:
and indicating the sending module to send a legal character set query request to the service provider, and receiving a first legal character set identifier fed back by the service provider through the receiving module.
13. The server of claim 11, wherein the receiving module is further to:
receiving a second request sent by the client, wherein the second request is used for requesting to convert the characters to be verified into legal characters;
the processing module is further configured to:
converting the characters to be verified into legal characters according to a pre-stored character conversion library;
the sending module is further configured to:
and returning the legal characters to the client so that the client can initiate a ordering request based on the legal characters.
CN201710018668.2A 2017-01-10 2017-01-10 Character checking method and device Active CN108287811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710018668.2A CN108287811B (en) 2017-01-10 2017-01-10 Character checking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710018668.2A CN108287811B (en) 2017-01-10 2017-01-10 Character checking method and device

Publications (2)

Publication Number Publication Date
CN108287811A CN108287811A (en) 2018-07-17
CN108287811B true CN108287811B (en) 2021-08-17

Family

ID=62831312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710018668.2A Active CN108287811B (en) 2017-01-10 2017-01-10 Character checking method and device

Country Status (1)

Country Link
CN (1) CN108287811B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710518A (en) * 2018-12-13 2019-05-03 中国联合网络通信集团有限公司 Script checking method and device
CN111046631A (en) * 2019-10-16 2020-04-21 平安科技(深圳)有限公司 Name storage method and device based on character conversion and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1289096A (en) * 1999-09-17 2001-03-28 日本电气株式会社 Data conversion system
CN101594317A (en) * 2008-05-29 2009-12-02 国际商业机器公司 Text sending method and text dispensing device and system
CN103399843A (en) * 2013-08-20 2013-11-20 烽火通信科技股份有限公司 Method for Linux VFAT (virtual file allocation table) file system module to support GB18030 character set
CN105589885A (en) * 2014-10-24 2016-05-18 阿里巴巴集团控股有限公司 Method and system for checking data consistency

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10296653B2 (en) * 2010-09-07 2019-05-21 F5 Networks, Inc. Systems and methods for accelerating web page loading

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1289096A (en) * 1999-09-17 2001-03-28 日本电气株式会社 Data conversion system
CN101594317A (en) * 2008-05-29 2009-12-02 国际商业机器公司 Text sending method and text dispensing device and system
CN103399843A (en) * 2013-08-20 2013-11-20 烽火通信科技股份有限公司 Method for Linux VFAT (virtual file allocation table) file system module to support GB18030 character set
CN105589885A (en) * 2014-10-24 2016-05-18 阿里巴巴集团控股有限公司 Method and system for checking data consistency

Also Published As

Publication number Publication date
CN108287811A (en) 2018-07-17

Similar Documents

Publication Publication Date Title
CN108958711B (en) Method and device for realizing interface platform
JP5973655B2 (en) Auto-complete content
CN109508805B (en) Method and system for providing flight change information, storage medium and electronic equipment
CN106204190B (en) Information processing method, terminal and server
CN110290218B (en) File annotation method and system, and computer readable medium
CN112199405B (en) Method and device for searching international air ticket change price
CN108287811B (en) Character checking method and device
EP3232335A1 (en) Method and device for providing authentication information on web page
CN114265969A (en) Ticket information processing method and device combining RPA and AI, electronic equipment and storage medium
CN111034157B (en) System and method for dynamic delivery of content
CN114358696A (en) Time prompting method and device, electronic equipment and computer readable storage medium
CN114386896A (en) Information sending method, page display device, electronic equipment and medium
CN109087089B (en) Payment method, payment device and terminal equipment
CN105512208B (en) Information publishing method, device and system
CN109213782B (en) Search interface configuration and display method and device and communication equipment
CN113761565A (en) Data desensitization method and apparatus
CN111045725A (en) Control method, device and storage medium of code management system
CN111538555A (en) Interface processing method, device, equipment and computer readable storage medium
CN108363707B (en) Method and device for generating webpage
WO2012037726A1 (en) Generating search query suggestions
CN104866552A (en) Address processing method and apparatus
CN114265876A (en) Blacklist passenger checking interception method, related device and computer storage medium
CN113051477A (en) Content recommendation method and device, electronic equipment and medium
US9471684B2 (en) Provision of embedded code for content provider web sites and applications
CN112598810A (en) Exhibition entrance processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant