Payment method and device, electronic equipment and storage medium
By splitting and grouping the text content of payment items, generating vector sets and comparing their priorities, the problem that text sorting in the prior art cannot effectively deal with complex texts, and achieving more efficient text sorting and better payment experience.
Patent Information
- Application Number
- CN202411492523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-11
AI Technical Summary
The text sorting method of existing payment channels is simple and cannot effectively process complex texts containing numbers, letters and Chinese, resulting in poor customer payment experience.
A payment method is proposed. By receiving the payment request from the client, the text content is split into text fragments, and the characters are grouped according to the target text type of the fragment to generate a vector set. Then, the vector set is compared to determine its relative priority, and then the arrangement order of text fragments is determined, the sorted target text is generated and sent to the client.
It improves the accuracy and effectiveness of text sorting, improves the customer's payment experience, and enables users to find and complete payment items faster.
Smart Images

Figure CN119415692A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a payment method, device, electronic device and storage medium. Background Art
[0002] At present, the text sorting provided to customers by various payment channels is relatively simple, generally according to the default numerical and alphabetical sorting method, and Chinese is sorted in the order of the first letter of the pinyin. When customers use complex texts with numbers, letters, and Chinese content, the default sorting method cannot meet the customer's requirements, and the customer's payment experience is poor. Summary of the invention
[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0004] The first embodiment of the present disclosure provides a payment method, including:
[0005] Receive a payment request from a client, and determine the text content of the corresponding payment item according to the payment request;
[0006] Splitting the text content to obtain at least one text segment, and determining a target text type included in the text segment;
[0007] Grouping characters in the text segment based on the target text type to obtain at least one character group, and acquiring a vector set corresponding to the text segment based on the character group included in the text segment;
[0008] Comparing the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determining the arrangement order of the at least one text segment according to the relative priorities between the vector sets;
[0009] The text fragments are sorted based on the arrangement order of the text fragments, and the sorted target text is generated. The target text is sent to the client and displayed to complete the payment of the corresponding payment item.
[0010] The second aspect of the present disclosure provides a payment device, including:
[0011] The task acquisition module is used to receive the payment request from the client and determine the text content of the corresponding payment item according to the payment request;
[0012] A text segmentation module, used to segment the text content to obtain at least one text segment and determine the target text type included in the text segment;
[0013] A vector acquisition module, configured to group characters in the text segment based on the target text type to obtain at least one character group, and acquire a vector set corresponding to the text segment based on the character group included in the text segment;
[0014] A sequence acquisition module, used for comparing the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determining the arrangement order of the at least one text segment according to the relative priorities between the vector sets;
[0015] The feedback module sorts the text fragments based on the arrangement order of the text fragments, generates sorted target texts, sends the target texts to the client and displays them, so as to complete the payment of the corresponding payment items.
[0016] The third aspect of the present disclosure provides an electronic device, including:
[0017] at least one processor; and
[0018] a memory communicatively connected to at least one processor; wherein,
[0019] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the payment method provided in the embodiment of the first aspect of the present disclosure.
[0020] The fourth aspect embodiment of the present disclosure proposes a computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to enable a computer to execute the payment method provided in the first aspect embodiment of the present disclosure.
[0021] The fifth aspect embodiment of the present disclosure proposes a computer program product, including a computer program, which implements the payment method provided in the first aspect embodiment of the present disclosure when executed by a processor.
[0022] The present application can obtain the text content of the payment item, divide the text content into text fragments, and further divide the text fragments into at least one character group according to the target text type included in the text fragments, and determine the vector set of the text fragments according to the character group, use the vector set as the feature representation of the text fragment, obtain the relative priority between the vector sets, and further determine the arrangement order of the text fragments according to the vector priority between the vector sets, so as to sort the text fragments according to the arrangement order to obtain the target text, with higher sorting accuracy and better effect, and feed back the target text to the client for display, so as to improve the customer's payment experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1is a flow chart of a payment method provided by an embodiment of the present disclosure;
[0024] Figure 2 is a flowchart of a method for dividing a text segment into at least one character group provided by an embodiment of the present disclosure;
[0025] Figure 3 is a flow chart of a method for obtaining a relative priority provided by an embodiment of the present disclosure;
[0026] Figure 4 is a flow chart of another payment method provided by an embodiment of the present disclosure;
[0027] Figure 5 is a structural block diagram of a payment device provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0031] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations.
[0032] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0033] The payment method, device, electronic device and storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0034] Figure 1 is a flow chart of a payment method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the method comprises the following steps:
[0035] S101, receiving a payment request from a client, and determining text content of a corresponding payment item according to the payment request.
[0036] In some implementations, the payment request is an instruction issued by the customer on the client to make a payment, and the payment request includes corresponding payment items; optionally, the client can be an application in a device such as a user's mobile phone or laptop computer.
[0037] In some implementations, the payment item requested for payment can be determined based on the information carried in the payment request, and the corresponding text content can be determined based on the payment item; optionally, the text content of the payment item can be defined in advance by an administrator, that is, the administrator configures and defines the customer's payment items, and inputs the text content for initialization of each payment item, so that the corresponding text content can be extracted based on the payment item.
[0038] S102, splitting the text content to obtain at least one text segment, and determining the target text type included in the text segment.
[0039] Optionally, the text content corresponding to the payment item may include one or more separators for splitting different text fragments in the text content. For example, the text content is "First Grade|First Grade Class 1|First Grade Class 2|Second Grade|Second Grade Class 1|Second Grade Class 2|Third Grade|Third Grade Class 1|Grade 3 Class 2|Specialty Class|Teaching Center|Teaching Center 1|Teaching Center 2|Room 101|Room 102|Room 201|Room 30|", and the separator "|" is used to distinguish different text fragments. Therefore, the text content can be split based on the separators in the text content to obtain corresponding text fragments.
[0040] To illustrate by way of example, for the text content “First Grade|Class 1, First Grade|Class 2, First Grade|Second Grade|Class 1, Second Grade|Class 2, Second Grade|Third Grade|Class 1, Third Grade|Class 2, Third Grade|Specialty Class|Teaching Center|Teaching Center 1|Teaching Center 2|Room 101|Room 102|Room 201|Room 30|”, the text segments after being split are “First Grade,” “Class 1, First Grade,” “Class 2, First Grade,” “Second Grade,” “Class 1, Second Grade,” “Class 2, Second Grade,” “Third Grade,” “Class 1, Third Grade,” “Class 2, Third Grade,” “Specialty Class,” “Teaching Center,” “Teaching Center 1,” “Teaching Center 2,” “Room 101,” “Room 102,” “Room 201,” and “Room 30.”
[0041] Furthermore, the target text type in the text fragment is identified. The target text type refers to the text type corresponding to the characters in the text fragment. The text type can be Chinese, English, Arabic numerals, Chinese numerals and other characters. For example, "grade" is Chinese, "one" is a Chinese numeral, "1" is an Arabic numeral, and "Teaching" is English. Therefore, the text type corresponding to the characters in the text fragment can be identified, and the target text type included in the text fragment can be determined. For example, the text fragment "first grade" includes target text types of Chinese numerals and Chinese. Optionally, a pre-trained neural network can be used to identify and classify the character types in the text fragment to improve the classification effect and accuracy.
[0042] S103, grouping characters in the text segment based on the target text type to obtain at least one character group, and acquiring a vector set corresponding to the text segment based on the character group included in the text segment.
[0043] Optionally, characters of the same target text type may be grouped together, for example, Chinese characters may be grouped together and English characters may be grouped together, thereby obtaining one or more character groups. Optionally, to avoid confusion in sorting, the order of characters in the text segment may be considered, and characters of adjacent order and the same text type may be grouped together into the same character group, thereby obtaining at least one character group corresponding to the text segment.
[0044] As an example, for the text segment "Grade 1, Class 1", characters with the same sequential vector and text type are divided into the same character group, resulting in four character groups of "one", "grade", "1" and "class".
[0045] Further, vectors corresponding to each character group can be obtained, so as to obtain a vector set corresponding to the text segment. In some implementations, the text type of each character group and the character content of the character group can be used to form the vector corresponding to the character group. For example, the vector corresponding to the character group "一" is [Chinese numeral, 一], the vector corresponding to the character group "年级" is [Chinese, 年级], the vector corresponding to the character group "1" is [Arabic numeral, 1], and the vector corresponding to the character group "班" is [Chinese, 班]. Therefore, it can be determined that the vector set corresponding to the text segment "一年级1班" is {[Chinese numeral, 一], [Chinese, 年级], [Arabic numeral, 1], [Chinese, 班]}. By analogy, according to the character groups included in each text segment, the vector set corresponding to the text segment is determined.
[0046] S104. Compare the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determine the arrangement order of at least one text segment according to the relative priorities between the vector sets.
[0047] Optionally, the vectors in the vector set corresponding to the text segment can be compared individually, and the relative priorities between the vector sets can be determined according to the priorities of the vectors. For example, for the text segments "一年级" and "二年级", the corresponding vector sets are {[Chinese numeral, 一], [Chinese, 年级]} and {[Chinese numeral, 二], [Chinese, 年级]}, respectively. When comparing the vector sets, the vectors in the vector sets can be compared individually. For example, [Chinese numeral, 一] and [Chinese numeral, 二] are compared individually, and the sorting rule in the preset sorting rule is queried. For example, the sorting rule is that Chinese numerals are arranged in ascending order according to the numerical size. Then, Chinese numeral 一 is arranged before Chinese numeral 二, that is, when [Chinese numeral, 一] and [Chinese numeral, 二] are compared individually, the priority of [Chinese numeral, 一] is higher than that of [Chinese numeral, 二]. Thus, it is determined that the priority of the vector set {[Chinese numeral, 一], [Chinese, 年级]} is higher than that of the vector set {[Chinese numeral, 二], [Chinese, 年级]}, that is, when the priority levels of the previous vectors have been distinguished, the subsequent vectors do not participate in the priority comparison.
[0048] Optionally, the preset sorting rules may include priority levels between text types, such as English>Chinese>Chinese numbers>Arabic numbers>other characters; the preset sorting rules may also include priority levels within text types. For example, when the text type is English, the sorting rules are sorted in the order of letters AZ, and when the text type is Chinese numbers or Arabic numbers, the numbers are sorted from small to large. According to the preset sorting rules, the priorities corresponding to different text types or characters can be directly determined, thereby comparing the vector priorities of different text fragments according to the text type or character, and then determining the relative priority of the vector set according to the vector priority.
[0049] As an example, for the text segments "Grade 2, Class 1" and "Grade 2, Class 2", the corresponding vector sets are {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]} and {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]}, respectively. According to the vectors at corresponding positions in the vector sets, a separate comparison is performed. The first two vectors in the two vector sets are [Chinese numerals, two] and [Chinese, grade], that is, the first two vectors are the same, and the vectors at the third position are [Arabic numerals, 1] and [Arabic numerals, 2], respectively. According to the preset sorting rule, Arabic numeral 1 is sorted before Arabic numeral 2, so the priority of [Arabic numeral, 1] is greater than that of [Arabic numeral, 2]. Therefore, it is judged that the vector set {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]} has a higher priority than the vector set {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]}.
[0050] Furthermore, according to the relative priorities between the vector sets, the arrangement order of the text fragments is obtained. For example, when it is determined that {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]} has a higher priority than the vector set {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]}, it is determined that the arrangement order of the text fragment "Grade 2 Class 1" corresponding to the vector set is before "Grade 2 Class 2". According to the relative priorities between all the vector sets, the sorting relationship between the text fragments corresponding to the vector sets is obtained, and the arrangement order of the text fragments is determined according to the sorting relationship.
[0051] For example, assuming that all the text segments are "Class 1, Grade 1", "Class 2, Grade 1", "Class 1, Grade 2" and "Class 2, Grade 2", according to the relative priority, "Class 1, Grade 2" is ranked before "Class 2, Grade 2", "Class 2, Grade 1" is ranked before "Class 1, Grade 2", and "Class 2, Grade 1" is ranked after "Class 1, Grade 1". Then, according to the sorting relationship, the arrangement order of the text segments can be determined as Class 1, Grade 1 > Class 2, Grade 1 > Class 1, Grade 2 > Class 2, Grade 2.
[0052] S105, sorting the text segments based on the arrangement order of the text segments, generating sorted target texts, sending the target texts to the client and displaying them, so as to complete the payment of the corresponding payment items.
[0053] After determining the arrangement order of the text fragments, the original text fragments are sorted according to the arrangement order of the text fragments to obtain the sorted target text, which is sent to the client and displayed. The customer can make corresponding payments based on the client's display content. The target text displayed by the client is sorted in a regular manner, so that the customer can find the corresponding project text according to the rules more quickly, thereby completing the payment of the corresponding payment item, improving payment efficiency and user payment experience.
[0054] In this embodiment, when it is determined that the customer needs to pay, the text content of the payment item is obtained and split to obtain text fragments for sorting, the target text type in the text fragment is obtained, and the characters in the text fragment are grouped according to the target text type to obtain one or more character groups, and the characters in the text fragment are divided more finely to improve the accuracy of sorting the text fragment, and the corresponding vector set is determined according to the character group in the text fragment, and the features of the text fragment represented by the vector set are compared to obtain the relative priority between the vector sets, and the arrangement order of the text fragment is determined according to the relative priority. The obtained arrangement order is more accurate and detailed, which improves the sorting effect of the text fragment, and the text fragment is re-sorted according to the arrangement order to obtain the target text, and the target text is fed back to the client and displayed, so that the user can pay according to the target text with better sorting effect, thereby improving the user's payment experience.
[0055] Based on the above embodiments, Figure 2 is a flowchart of a method for dividing a text segment into at least one character group provided by an embodiment of the present disclosure, such as Figure 2 As shown, the method comprises the following steps:
[0056] S201, generating an initial character group corresponding to each character in the text segment.
[0057] Optionally, the initial character group may include the character itself and the text type corresponding to the character. For example, for the text segment "一年级" (first grade), the initial character group corresponding to each character may be [text type, 一], [text type, 年], and [text type, 级].
[0058] S202. Obtain the text type of each character in the text segment, and determine whether the text types between two adjacent characters in the text segment are the same, to obtain the comparison result of the text types between two adjacent characters.
[0059] Optionally, in this embodiment, the text type includes at least one of Chinese, Chinese numerals, Arabic numerals, English, and other characters. In other embodiments, the text type can be distinguished according to actual situations. It can be understood that after obtaining the text type of each character in the text segment, the initial character group corresponding to the character can be updated. For example, the initial character group corresponding to each character in the text segment "一年级" is updated to [Chinese numerals, 一], [Chinese, 年], and [Chinese, 级].
[0060] In this embodiment, the comparison result is used to indicate whether the text types between two adjacent characters are the same. For example, for the characters "年" and "级", their corresponding text types are both Chinese, so the comparison result indicates that the text types of the adjacent characters "年" and "级" are the same.
[0061] S203. Merge the initial character groups according to the comparison result to obtain at least one character group of the text segment.
[0062] In some implementations, in response to the comparison result indicating that the text types between two adjacent characters are the same, merge the initial character groups corresponding to the two adjacent characters, that is, when the text types of two adjacent characters are of the same type, merge the initial character groups corresponding to the two adjacent characters. For example, if it is determined that the text types of the adjacent characters "年" and "级" are the same, then merge their corresponding initial character groups to obtain the character group [Chinese, 年级].
[0063] In some implementations, in response to the comparison result indicating that the text types between two adjacent characters are different, the initial character groups corresponding to the two adjacent characters remain unchanged; that is, when the text types of two adjacent characters are not of the same type, the initial character group remains unchanged. For example, the text types between the adjacent characters "一" and "年" are different, so the initial character group of the character "一" remains unchanged, and the text types of "年" and the adjacent character "级" are the same, so the initial character groups of the characters "年" and "级" are merged, so that the character groups corresponding to the text segment "一年级" are [Chinese numerals, 一] and [Chinese, 年级].
[0064] As an example, for the text fragments Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Specialty Class, Teaching Center, Teaching Center 1, Teaching Center 2, Room 101, Room 102, Room 201, and Room 30 in this embodiment, character groups are divided according to the text type corresponding to each character in the text fragment, and adjacent characters with the same text type are divided into the same character group to obtain the character groups included in the text type, as shown in Table 1 below, which shows the character groups corresponding to each text fragment.
[0065] Table 1
[0066] Text snippets Character Group First Grade {[Chinese number, one], [Chinese, grade]} Grade 1 Class 1 {[Chinese numeral, one], [Chinese, grade], [Arabic numeral, 1], [Chinese, class]} Grade 1, Class 2 {[Chinese numerals, one], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]} Second Grade {[Chinese number, two], [Chinese, grade]} Grade 2 Class 1 {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]} Grade 2 Class 2 {[Chinese numerals, two], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]} Grade 3 {[Chinese number, three], [Chinese, grade]} Grade 3 Class 1 {[Chinese numerals, three], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]} Grade 3 Class 2 {[Chinese numerals, three], [Chinese, grade], [Arabic numerals, 2], [Chinese, class]} Specialty Class {[Chinese, Specialty Class]} TeachingCenter {[English, TeachingCenter]} TeachingCenter1 {[English, TeachingCenter], [Arabic numerals, 1]} TeachingCenter2 {[English, TeachingCenter], [Arabic numerals, 2]} Room 101 {[Arabic numerals, 101], [Chinese, room]} Room 102 {[Arabic numerals, 102], [Chinese, room]} Room 201 {[Arabic numerals, 201], [Chinese, room]} Room 30 {[Arabic numerals, 30], [Chinese, room]}
[0067] In the present embodiment, an initial character group corresponding to each character in a text fragment is generated, and the initial character groups with the same text type between two adjacent characters are merged according to the text type of the characters, thereby obtaining at least one character group for each text fragment, and each character group includes a plurality of characters of the same text type in order. Each character group is used as a comparison basis, thereby improving the accuracy of sorting the text fragments, and further subdividing the text types, thereby avoiding the problem that the existing sorting method cannot distinguish Chinese numbers, and improving the sorting accuracy.
[0068] Based on the above embodiments, Figure 3 is a flowchart of a method for obtaining a relative priority provided by an embodiment of the present disclosure, such as Figure 3 As shown, the method comprises the following steps:
[0069] S301, obtaining a preset target sorting rule.
[0070] In this embodiment, the target sorting rules may include inter-type sorting rules, intra-type sorting rules, and character group sorting rules.
[0071] Optionally, the inter-type sorting rule refers to the sorting order between text types, the intra-type sorting rule refers to the sorting rules corresponding to different text types, and the character group sorting rule is the sorting rule for the entire character when the inter-type rules and the intra-type rules cannot be directly obtained.
[0072] Optionally, the order of text types from high to low is: English, Chinese, Chinese numerals, Arabic numerals, other characters, that is, English>Chinese>Chinese numerals>Arabic numerals>other characters; it can be understood that if the user requires reverse sorting, the sorting principle of text types is [other characters]>[Arabic numerals]>[Chinese numerals]>[Chinese]>[English].
[0073] Optionally, for English type, sort in the order of AZ, az from high to low, with uppercase letters taking precedence over lowercase letters.
[0074] Optionally, for Chinese type, the first letter of the pinyin of the first character is sorted, and the order of the first letter sorting follows the sorting order of the English type.
[0075] Optionally, for Chinese number types, they are sorted according to the meaning of the Arabic numbers corresponding to the Chinese numbers, for example, twenty-one takes precedence over ninety-nine.
[0076] Optionally, for Arabic numeral types, sort in numerical order from 0-9 from high to low.
[0077] Optionally, for other character types, they are sorted according to the American Standard Code for Information Interchange (ASCII) order.
[0078] Optionally, for vector sets of the same length, the vectors in the vector set are sorted according to inter-type rules and / or intra-type rules; for vector sets of different lengths, sorting is preferentially performed according to inter-type rules and / or intra-type rules. If the short vector set is a subset of the long vector set, the corresponding short text segment is arranged before the long text segment, for example, the order of text segment AB is before the order of text segment ABC.
[0079] In some implementations, a rule change instruction from the client can also be received; based on the rule change instruction, an intention sorting rule is determined, and the intention sorting rule includes at least text type classification and priority between text types; based on the intention sorting rule, the target sorting rule is updated; that is, the customer can enter the intention sorting rule, such as the Chinese type has the highest priority, the English type has the lowest priority, etc., and based on the rule change instruction initiated by the customer on the client, the intention sorting rule corresponding to the customer is determined, and the target sorting rule is updated according to the intention sorting rule to ensure that text can be sorted according to the customer's intention sorting rule, thereby improving the user experience.
[0080] S302: For any first vector set and any second vector set in all vector sets, extract a first text type and a second text type at the same position in the first vector set and the second vector set.
[0081] For example, assuming that the first vector set is the vector set of the text segment "first grade" and the second vector set is the vector set of "special class", the first vector set is {[Chinese numbers, one], [Chinese, grade]}, and the second vector set is {[Chinese, special class]}. The vectors at the same position in the first vector set and the second vector set are extracted, and the corresponding first text type and second text type are determined according to the vectors. For example, the first text type corresponding to the first position in the first vector set and the second vector set is Chinese numbers, and the second text type is Chinese.
[0082] S303: Search the priority levels of the first text type and the second text type in the target sorting rule, and determine the relative priority between the first vector set and the second vector set according to the priority levels at the same position.
[0083] In some implementations, the priority of the first text type and the second text type in the target sorting rule can be queried starting from the first position in the vector set; that is, starting from the vector at the first position in the vector set, the first text type of the first position vector in the first vector set and the second text type of the first position vector in the second vector set are determined, and the priority of the first text type and the second text type in the target sorting rule are queried.
[0084] In response to the priority of the first text type being greater than the priority of the second text type, it is determined that the priority of the first vector set is greater than the priority of the second vector set; for example, the first text type is English and the second text type is Chinese numbers, and according to the target sorting rule, it is determined that the first text type is sorted before the second text type, so it is directly judged that the priority of the first vector set is greater than the second vector set.
[0085] In response to the priority of the first text type being lower than the priority of the second text type, it is determined that the priority of the first vector set is lower than that of the second vector set; for example, the first text type is Chinese and the second text type is English, and according to the target sorting rule, it is determined that the first text type is sorted after the second text type, so it is directly judged that the priority of the first vector set is lower than that of the second vector set.
[0086] In response to the priority of the first text type being equal to the priority of the second text type, the priority of the characters corresponding to the first text type and the second text type is queried from the target sorting rule to determine the relative priority of the first vector set and the second vector set; that is, when the first text type is the same as the second text type, the priority between the first vector set and the second vector set cannot be distinguished according to the text type, and the characters at the same position in the first vector set and the second vector set are further compared, and the priority of the characters corresponding to the first text type and the second text type is queried to determine the relative priority of the first vector set and the second vector set.
[0087] Optionally, in response to the priority of the characters corresponding to the first text type being greater than the priority of the characters corresponding to the second text type, it is determined that the priority of the first vector set is greater than that of the second vector set; for example, the first text type and the second text type are both Arabic numerals, the characters corresponding to the first text type are "100", and the characters corresponding to the second text type are "101", and the sorting rules for Arabic numerals in the query target sorting rules show that the character "100" is ranked before the character "101", so it is determined that the priority of the characters corresponding to the first text type is greater than the priority of the characters corresponding to the second text type, and it is determined that the priority of the first vector set is greater than the second vector set.
[0088] In response to the fact that the priority of the characters corresponding to the first text type is lower than the priority of the characters corresponding to the second text type, it is determined that the priority of the first vector set is lower than that of the second vector set; for example, the characters corresponding to the first text type are "102", and the characters corresponding to the second text type are "101". By querying the sorting rules for Arabic numerals in the target sorting rules, it can be seen that the character "101" is ranked before the character "102". Therefore, it is determined that the priority of the characters corresponding to the first text type is lower than the priority of the characters corresponding to the second text type, and it is determined that the priority of the first vector set is lower than that of the second vector set.
[0089] In response to the priority of the characters corresponding to the first text type being equal to the priority of the characters corresponding to the second text type, the priority of the first text type and the second text type at the next position in the target sorting rule is queried to determine the relative priority of the first vector set and the second vector set; that is, when the priority of the characters corresponding to the first text type is the same as the priority of the characters corresponding to the second text type and the priority of the first vector set and the second vector set cannot be directly distinguished, the first text type and the second text type at the next position are obtained for comparison, for example, the first vector set is "{[Chinese numerals, one], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]}", and the second vector set is "{[Chinese numerals, one], [Chinese, grade], [Arabic numerals, 1], [Chinese, class]}". =Arabic numeral, 2], [Chinese, class]}", start comparing from the first position [Chinese numeral, one] and [Chinese numeral, one], the first text type and the second text type are the same, and the corresponding character of the first text type is the same as the corresponding character of the second text type, so compare the second position [Chinese, grade] and [Chinese, grade], the first text type and the second text type at the second position are the same, and the corresponding character of the first text type is the same as the corresponding character of the second text type, so compare the third position [Arabic numeral, 1] and [Arabic numeral, 2], according to the comparison of the corresponding character of the first text type and the corresponding character of the second text type, determine that the character "1" is arranged before the character "2", so determine that the priority of the first vector set is greater than the priority of the second vector set.
[0090] In some implementations, in response to the first vector set and the second vector set having different lengths and the same priority levels of characters at corresponding positions in the first vector set and the second vector set, it is determined that the priority of the shorter vector set is greater than that of the longer vector set; illustratively, for the text segment "first grade" and the text segment "first grade, class 1", the first vector set is "{[Chinese numbers, one], [Chinese, grade]}", and the second vector set is "{[Chinese numbers, one], [Chinese, grade], [Arabic numbers, 1], [Chinese, class]}", the first vector set and the second vector set have different lengths, and all vectors in the first vector set have the same corresponding positions in the second set, that is, the first vector set is part of the second vector set, and it is determined that the priority of the shorter vector set is greater than that of the longer vector set, that is, the priority of the first vector set is greater than that of the second vector set.
[0091] In this embodiment, the priority between different text types, the priority between different characters in the same text type, and the priority between vector sets of different lengths are determined by preset target sorting rules. The priority is determined by querying the target sorting rules first based on the text type. When the text types are the same, the priority of the corresponding characters is queried to judge the relative priority between any two vector sets. When the lengths of two vector sets cannot distinguish the priority based on the text type and the character, the relative priority between the vector sets is determined by the length, and the priority of the vector sets is distinguished in more detail and accurately. The sorting accuracy of more refined text types is higher, so that the arrangement order of subsequent text fragments is judged according to the relative priority between the vector sets, and when the customer intends to make a sorting request, the target sorting rules can be updated according to the user's intended sorting rules, so that the sorting means are more in line with the user's intention and the user experience is improved.
[0092] Figure 4 is a flow chart of another payment method provided by an embodiment of the present disclosure, such as Figure 4 As shown, the method comprises the following steps:
[0093] S401, receiving a payment request from a client, and determining text content of a corresponding payment item according to the payment request.
[0094] In the embodiments of the present disclosure, the implementation method of step S401 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0095] S402: Split the text content to obtain at least one text segment, and determine the target text type included in the text segment.
[0096] In the embodiments of the present disclosure, the implementation method of step S402 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0097] S403, generating an initial character group corresponding to each character in the text segment.
[0098] In the embodiments of the present disclosure, the implementation method of step S403 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0099] S404, obtaining the text type of each character in the text segment, and determining whether the text types of two adjacent characters in the text segment are the same, to obtain a comparison result of the text types of the two adjacent characters.
[0100] Optionally, the characters in the text fragment can be identified one by one to determine the text type corresponding to each character; that is, the text type of each character in the text fragment can be classified, for example, by identifying and judging through a pre-trained neural network to determine the text type corresponding to each character. In this embodiment, the text type includes at least one of Chinese, Chinese numerals, Arabic numerals, English and other characters.
[0101] According to the text types of all characters in the text segment, the target text type included in the text segment is determined. For example, if the text types of all characters in the text segment are Chinese and Chinese numbers respectively, the target text type included in the text segment is Chinese and Chinese numbers.
[0102] In the embodiments of the present disclosure, the implementation method of step S404 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0103] S405: Merge the initial character groups according to the comparison result to obtain at least one character group of the text segment.
[0104] In the embodiments of the present disclosure, the implementation method of step S405 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0105] S406: Obtain a vector set corresponding to the text segment based on the character group included in the text segment.
[0106] In the embodiments of the present disclosure, the implementation method of step S406 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0107] S407, obtaining a preset target sorting rule.
[0108] In the embodiments of the present disclosure, the implementation method of step S407 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0109] S408 : For any first vector set and any second vector set in all vector sets, extract the first text type and the second text type at the same position in the first vector set and the second vector set.
[0110] In the embodiments of the present disclosure, the implementation method of step S408 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0111] S409: Search the priority levels of the first text type and the second text type in the target sorting rule, and determine the relative priority between the first vector set and the second vector set according to the priority levels at the same position.
[0112] In the embodiments of the present disclosure, the implementation method of step S409 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0113] S410: Determine an arrangement order of at least one text segment according to relative priorities between vector sets.
[0114] In some implementations, the at least one text segment may be bubble sorted according to the relative priorities between the vector sets to determine the arrangement order of the at least one text segment.
[0115] In some implementations, in this embodiment, bubble sort is performed in order from large to small. In each round of sorting, a vector set with a smaller priority is selected through relative priority comparison of two vector sets, and the vector set with a smaller priority is compared with the next vector set. Then, the vector set with a smaller value is selected to participate in the next comparison, until the comparison is completed to determine the smallest vector set in this round, and the text fragment corresponding to the smallest vector set compared according to the relative priority is placed at the last place, and then a second round of sorting is performed. The last vector set in the second round of sorting does not participate in the comparison, and the text fragment corresponding to the smallest vector set determined in the second round of sorting is placed at the second to last place, and so on. The final arrangement order is obtained through multiple rounds of relative priority comparison.
[0116] For example, assume that the initial states of all text segments are: Room 101, Room 102, Room 201, Room 30, Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Specialty Class, TeachingCenter, TeachingCenter1, TeachingCenter2.
[0117] The first round of sorting: Through the relative priorities of the vector sets corresponding to two adjacent text fragments, it is determined that the text fragment corresponding to the vector set with the smallest priority among all text fragments is "Room 201". Therefore, the order of the text fragments after the first round of sorting is: Room 101, Room 102, Room 30, Grade 1, Class 1, Grade 1, Class 2, Grade 1, Grade 2, Grade 2, Grade 2, Grade 2, Grade 3, Class 1, Grade 3, Class 2, Grade 3, Specialty Class, Teaching Center, Teaching Center 1, Teaching Center 2, Room 201.
[0118] Second round of sorting: Compare the text fragments other than "Room 201", and through the relative priority of the vector sets corresponding to the text fragments, determine that the text fragment corresponding to the vector set with the smallest priority in the second round of sorting is "Room 102". Therefore, the text fragments after the second round of sorting are: Room 101, Room 30, Grade 1, Class 1, Grade 1, Class 2, Grade 1, Grade 2, Grade 2, Grade 2, Grade 2, Grade 3, Class 1, Grade 3, Class 2, Grade 3, Specialty Class, Teaching Center, Teaching Center 1, Teaching Center 2, Room 102, Room 201.
[0119] Furthermore, the text segments after the third round of sorting are: Room 30, Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Specialty Class, Teaching Center, Teaching Center 1, Teaching Center 2, Room 101, Room 102, and Room 201.
[0120] The text segments after the fourth round of sorting are: Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Specialty Class, Teaching Center, Teaching Center 1, Teaching Center 2, Room 30, Room 101, Room 102, and Room 201.
[0121] By analogy, the text fragments after the thirteenth round of sorting are: specialty class, Teaching Center, Teaching Center 1, Teaching Center 2, Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Room 30, Room 101, Room 102, Room 201.
[0122] The text fragments after the fourteenth round of sorting are: TeachingCenter, TeachingCenter1, TeachingCenter2, specialty class, Grade 1, Grade 1 Class 1, Grade 1 Class 2, Grade 2, Grade 2, Grade 2 Class 1, Grade 2 Class 2, Grade 3, Grade 3 Class 1, Grade 3 Class 2, Room 30, Room 101, Room 102, Room 201.
[0123] Further sorting was performed for the fifteenth, sixteenth and seventeenth rounds to obtain the final sorting results. The text fragments after the last round of sorting were: TeachingCenter, TeachingCenter1, TeachingCenter2, specialty class, first grade, first grade class 1, first grade class 2, second grade, second grade class 1, second grade class 2, third grade, third grade class 1, third grade class 2, Room 30, Room 101, Room 102, and Room 201.
[0124] In the embodiments of the present disclosure, the implementation method of step S410 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0125] S411, sorting the text fragments based on the arrangement order of the text fragments, generating sorted target texts, sending the target texts to the client and displaying them to complete the payment of the corresponding payment items.
[0126] In the embodiments of the present disclosure, the implementation method of step S411 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.
[0127] In this embodiment, when it is determined that the customer needs to pay, the text content of the payment item is obtained and split into text fragments for sorting, the target text type in the text fragment is obtained, and the initial character group corresponding to each character in the text fragment is generated. According to the text type of the character, the initial character group of the same text type between two adjacent characters is merged to obtain at least one character group for each text fragment. Each character group is used as a comparison basis to improve the accuracy of sorting the text fragments, and a better sorting effect is achieved with more subdivided text types to improve the user experience. The priority between different text types, the priority between different characters in the same text type, and the priority between vector sets of different lengths are determined by presetting target sorting rules. Level, compare the features of text fragments represented by vector sets to obtain the relative priority between vector sets, distinguish the priorities of vector sets in more detail and accuracy, sort with higher accuracy through more refined text types, make more detailed divisions of characters in text fragments, and change the sorting rules according to user intentions, which provides a better user experience. Further, bubble sort is performed according to the relative priority of the vector set to determine the arrangement order of the text fragments. The obtained arrangement order is more accurate, which improves the sorting effect of the text fragments. The text fragments are reordered according to the arrangement order to obtain the target text, which is fed back to the client and displayed, so that users can pay according to the target text with better sorting effect, thereby improving the user's payment experience.
[0128] Figure 5 A structural block diagram of a payment device provided in an embodiment of the present disclosure, such as Figure 5 As shown, the payment device 500 of the embodiment of the present disclosure includes:
[0129] The task acquisition module 501 is used to receive a payment request from a client and determine the text content of the corresponding payment item according to the payment request;
[0130] A text segmentation module 502 is used to segment the text content to obtain at least one text segment and determine the target text type included in the text segment;
[0131] A vector acquisition module 503 is used to group characters in the text segment based on the target text type to obtain at least one character group, and to obtain a vector set corresponding to the text segment based on the character group included in the text segment;
[0132] The order acquisition module 504 is used to compare the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determine the arrangement order of at least one text segment according to the relative priorities between the vector sets;
[0133] The feedback module 505 sorts the text segments based on the arrangement order of the text segments, generates sorted target texts, sends the target texts to the client and displays them, so as to complete the payment of the corresponding payment items.
[0134] In some implementations, the vector acquisition module 503 includes:
[0135] Generate an initial character group corresponding to each character in the text segment;
[0136] Obtaining the text type of each character in the text segment, and determining whether the text types of two adjacent characters in the text segment are the same, and obtaining a comparison result of the text types of the two adjacent characters;
[0137] The initial character groups are merged according to the comparison result to obtain at least one character group of the text segment.
[0138] In some implementations, the vector acquisition module 503 includes:
[0139] In response to the comparison result indicating that the text types between two adjacent characters are the same, merging the initial character groups corresponding to the two adjacent characters;
[0140] In response to the comparison result indicating that the text types between two adjacent characters are different, the initial character group corresponding to the two adjacent characters remains unchanged.
[0141] In some implementations, the text splitting module 502 includes:
[0142] Recognize the characters in the text segment one by one, and determine the text type corresponding to each character, where the text type includes at least one of Chinese characters, Chinese numerals, Arabic numerals, English characters, and other characters;
[0143] According to the text types of all characters in the text segment, a target text type included in the text segment is determined.
[0144] In some implementations, the sequential acquisition module 504 includes:
[0145] According to the relative priorities between the vector sets, at least one text segment is bubble sorted to determine the arrangement order of the at least one text segment.
[0146] In some implementations, the sequential acquisition module 504 includes:
[0147] Get the preset target sorting rules;
[0148] For any first vector set and any second vector set in all vector sets, extracting the first text type and the second text type at the same position in the first vector set and the second vector set;
[0149] The priority levels of the first text type and the second text type are queried in the target sorting rule, and the relative priority between the first vector set and the second vector set is determined according to the priority levels at the same position.
[0150] In some implementations, the sequential acquisition module 504 includes:
[0151] Starting from the first position in the vector set, query the priority of the first text type and the second text type in the target sorting rule;
[0152] In response to the priority level of the first text type being greater than the priority level of the second text type, determining that the priority level of the first vector set is greater than the priority level of the second vector set;
[0153] In response to the priority level of the first text type being lower than the priority level of the second text type, determining that the priority level of the first vector set is lower than the priority level of the second vector set;
[0154] In response to the priority of the first text type being equal to the priority of the second text type, the priority of characters corresponding to the first text type and the second text type is queried from the target sorting rule to determine the relative priority of the first vector set and the second vector set.
[0155] In some implementations, the sequential acquisition module 504 includes:
[0156] In response to the priority level of the characters corresponding to the first text type being greater than the priority level of the characters corresponding to the second text type, determining that the priority level of the first vector set is greater than the priority level of the second vector set;
[0157] In response to the priority level of the characters corresponding to the first text type being lower than the priority level of the characters corresponding to the second text type, determining that the priority level of the first vector set is lower than the priority level of the second vector set;
[0158] In response to the priority of the character corresponding to the first text type being equal to the priority of the character corresponding to the second text type, the priority of the first text type and the second text type at the next position in the target sorting rule is queried to determine the relative priority of the first vector set and the second vector set.
[0159] In some implementations, the apparatus 500 further includes:
[0160] In response to the first vector set and the second vector set having different lengths and the characters at corresponding positions in the first vector set and the second vector set having the same priority, it is determined that the priority of the shorter vector set is greater than that of the longer vector set.
[0161] In some implementations, the apparatus 500 further includes:
[0162] Receive rule change instructions from the client;
[0163] Determine an intention sorting rule according to the rule change instruction, the intention sorting rule at least including text type classification and priority between text types;
[0164] Based on the intention sorting rules, the target sorting rules are updated.
[0165] In this embodiment, when it is determined that the customer needs to pay, the text content of the payment item is obtained and split into text contents to obtain text segments for sorting, the target text type in the text segment is obtained, and the initial character group corresponding to each character in the text segment is generated. According to the text type of the character, the initial character groups of the same text type between two adjacent characters are merged to obtain at least one character group for each text segment. Each character group is used as a comparison basis to improve the accuracy of sorting the text segments. The priority between different text types, the priority between different characters in the same text type, and the priority between vector sets of different lengths are determined by presetting the target sorting rule. The vector set representation is used as the vector set representation. The features of the text fragments are compared to obtain the relative priority between the vector sets, and the priorities of the vector sets are distinguished in more detail and accuracy. The sorting accuracy is higher through more detailed text types, and the characters in the text fragments are more finely divided. The sorting rules can also be changed according to the user's intention, which provides a better user experience. The arrangement order of the text fragments is further determined according to the relative priority of the vector set. The obtained arrangement order is more accurate, which improves the sorting effect of the text fragments. The text fragments are reordered according to the arrangement order to obtain the target text, and the target text is fed back to the client and displayed, so that the user can pay according to the target text with better sorting effect, thereby improving the user's payment experience.
[0166] Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 As shown, the electronic device 600 includes:
[0167] The memory 610 and the processor 620, a bus 630 connecting different components (including the memory 610 and the processor 620), the memory 610 stores a computer program, and when the processor 620 executes the program, xx described in the embodiment of the present disclosure is implemented.
[0168] Bus 630 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0169] The electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 600, including volatile and non-volatile media, removable and non-removable media.
[0170] The memory 610 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 650. The electronic device 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 660 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 630 via one or more data medium interfaces. Memory 610 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0171] A program / utility 680 having a set (at least one) of program modules 670 may be stored, for example, in the memory 610, such program modules 670 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 670 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0172] The electronic device 600 may also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 692. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 693. Figure 6 As shown, the network adapter 693 communicates with other modules of the electronic device 600 via the bus 630. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0173] The processor 620 executes various functional applications and data processing by running the programs stored in the memory 610 .
[0174] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the payment method of the embodiment of the present disclosure, and will not be repeated here.
[0175] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.
[0176] When the instructions in the computer-readable storage medium are executed by the processor of the service server, the service server can execute the payment method as described above. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0177] In order to implement the above embodiments, the present disclosure further provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the payment method as described above is implemented.
[0178] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims. It should be understood that the present disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A payment method, characterized in that: include: Receive a payment request from a client, and determine the text content of the corresponding payment item according to the payment request; Splitting the text content to obtain at least one text segment, and determining a target text type included in the text segment; Grouping characters in the text segment based on the target text type to obtain at least one character group, and acquiring a vector set corresponding to the text segment based on the character group included in the text segment; Comparing the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determining the arrangement order of the at least one text segment according to the relative priorities between the vector sets; The text fragments are sorted based on the arrangement order of the text fragments, and the sorted target text is generated. The target text is sent to the client and displayed to complete the payment of the corresponding payment item.
2. The method according to claim 1, characterized in that The grouping of characters in the text segment based on the target text type to obtain at least one character group includes: Generate an initial character group corresponding to each character in the text segment; Obtaining the text type of each character in the text segment, and determining whether the text types of two adjacent characters in the text segment are the same, to obtain a comparison result of the text types of the two adjacent characters; The initial character groups are merged according to the comparison result to obtain at least one character group of the text segment.
3. The method according to claim 2, characterized in that The merging of the initial character groups according to the comparison result to obtain at least one character group of the text segment includes: In response to the comparison result indicating that the text types between two adjacent characters are the same, merging the initial character groups corresponding to the two adjacent characters; In response to the comparison result indicating that the text types between two adjacent characters are different, the initial character group corresponding to the two adjacent characters remains unchanged.
4. The method according to any one of claims 1 to 3, characterized in that The determining of the target text type included in the text segment includes: Recognize the characters in the text segment one by one, and determine the text type corresponding to each character, wherein the text type includes at least one of Chinese characters, Chinese numerals, Arabic numerals, English characters, and other characters; According to the text types of all characters in the text segment, a target text type included in the text segment is determined.
5. The method according to claim 1, characterized in that: The step of determining the arrangement order of the at least one text segment according to the relative priorities between the vector sets includes: According to the relative priorities between the vector sets, the at least one text segment is bubble sorted to determine an arrangement order of the at least one text segment.
6. The method according to claim 1 or 5, characterized in that: The process of obtaining the relative priority between the vector sets includes: Get the preset target sorting rules; For any first vector set and any second vector set in all vector sets, extracting a first text type and a second text type at the same position in the first vector set and the second vector set; The priority levels of the first text type and the second text type are queried in the target sorting rule, and the relative priority between the first vector set and the second vector set is determined according to the priority levels at the same position.
7. The method according to claim 6, characterized in that The method for obtaining the relative priority between the vector sets includes: Starting from the first position in the vector set, querying the priority of the first text type and the second text type in the target sorting rule; In response to the priority level of the first text type being greater than the priority level of the second text type, determining that the priority level of the first vector set is greater than the priority level of the second vector set; In response to the priority level of the first text type being lower than the priority level of the second text type, determining that the priority level of the first vector set is lower than the priority level of the second vector set; In response to the priority of the first text type being equal to the priority of the second text type, the priority of characters corresponding to the first text type and the second text type are queried from the target sorting rule to determine the relative priority of the first vector set and the second vector set.
8. The method according to claim 7, characterized in that The querying the priority levels of the characters corresponding to the first text type and the second text type from the target sorting rule to determine the relative priority of the first vector set and the second vector set includes: In response to the priority level of the characters corresponding to the first text type being greater than the priority level of the characters corresponding to the second text type, determining that the priority level of the first vector set is greater than the priority level of the second vector set; In response to the priority level of the characters corresponding to the first text type being lower than the priority level of the characters corresponding to the second text type, determining that the priority level of the first vector set is lower than that of the second vector set; In response to the priority level of the characters corresponding to the first text type being equal to the priority level of the characters corresponding to the second text type, the priority levels of the first text type and the second text type at the next position in the target sorting rule are queried to determine the relative priorities of the first vector set and the second vector set.
9. The method according to claim 8, characterized in that The method further comprises: In response to the first vector set and the second vector set having different lengths and the characters at corresponding positions in the first vector set and the second vector set having the same priority, it is determined that the priority of the shorter vector set is greater than that of the longer vector set.
10. The method according to claim 6, characterized in that The method further comprises: Receive rule change instructions from the client; Determining an intention sorting rule according to the rule change instruction, wherein the intention sorting rule at least includes text type classification and priority between text types; Based on the intention sorting rule, the target sorting rule is updated.
11. A payment device, characterized in that: include: The task acquisition module is used to receive the payment request from the client and determine the text content of the corresponding payment item according to the payment request; A text segmentation module, used to segment the text content to obtain at least one text segment and determine the target text type included in the text segment; A vector acquisition module, configured to group characters in the text segment based on the target text type to obtain at least one character group, and acquire a vector set corresponding to the text segment based on the character group included in the text segment; A sequence acquisition module, used for comparing the vector sets corresponding to the text segments to determine the relative priorities between the vector sets, and determining the arrangement order of the at least one text segment according to the relative priorities between the vector sets; The feedback module sorts the text fragments based on the arrangement order of the text fragments, generates sorted target texts, sends the target texts to the client and displays them, so as to complete the payment of the corresponding payment items.
12. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.
14. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when being executed by a processor.