A card sorting method based on a mapping relationship between a color sequence and a card storage position
Patent Information
- Application Number
- CN202610393832.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-27
- Filing Date
- 2026-03-27
- Publication Date
- 2026-11-03
AI Technical Summary
Existing mahjong machines cannot guarantee that the order of tiles delivered to the table is consistent in every public competition, resulting in unfair competition results and failing to fully showcase the skills of each player.
By using a card arrangement method based on the mapping relationship between the suit sequence and the card position, a random suit sequence of cards is generated and a mapping relationship with the card position is established. The card arrangement mechanism picks up and moves the cards to ensure that the position and order of the cards on each mahjong machine are consistent.
This ensured that the position and order of the tiles on multiple mahjong machines were consistent, guaranteeing the fairness and impartiality of the competition, reducing the influence of luck, and fully reflecting the skill of each player.
Smart Images

Figure CN123024296A_ABST
Abstract
Description
Technical Field
[0001] This application relates to a card arrangement method based on the mapping relationship between suit sequence and card position, belonging to the field of card arrangement machine technology. Background Technology
[0002] As living standards improve, people's demand for leisure and entertainment continues to increase. More and more people are choosing automatic card sorting machines instead of manual card sorting for entertainment. Taking mahjong machines as an example, many mahjong tiles are scattered or moved randomly inside the card sorting machine, making their sorting ununique. Every time the tiles are sent to the table, they are disordered and chaotic. In the current technology, there is no way to control the order of the tiles sent to the table each time.
[0003] Mahjong is a puzzle game with many public tournaments. Players compete in groups of four using one mahjong machine. The winners from each group then form another group of four to advance to the next round using the same machine. Due to the unpredictable nature of the mahjong machine, it's impossible to guarantee that every player will draw the same tiles. The quality of the player's hand also affects the outcome, making it difficult to fully showcase each player's skill level.
[0004] Therefore, a card-sorting machine or method is needed that can both ensure the non-cheating nature of mahjong and guarantee that each player receives the same hand, fully reflecting each player's skill level and reducing the fairness caused by luck. To ensure that each player receives the same hand, it is crucial to ensure that the card positions on each mahjong machine are the same. To this end, this invention proposes a card-sorting method based on the mapping relationship between suit sequence and card position, ensuring that the card positions on each mahjong machine are the same. Summary of the Invention
[0005] A brief overview of the invention is given below to provide a basic understanding of certain aspects of it. It should be understood that this overview is not an exhaustive summary of the invention. It is not intended to identify key or essential parts of the invention, nor is it intended to limit the scope of the invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to the more detailed description that follows.
[0006] In view of this, in order to solve the technical problem of the lack of a method for multiple card sorting machines to sort cards with the same position and order in the existing technology, the present invention provides a card sorting method, card sorting machine, electronic device and storage medium based on the mapping relationship between suit sequence and card position. The present invention can provide a card sorting method for public mahjong competitions that is cheat-free and ensures that multiple card sorting machines sort cards with the same position and order.
[0007] Firstly, a card arrangement method based on the mapping relationship between suit sequence and card position is provided, including: A sequence of card suits is randomly generated based on all card suits, and a card position number is generated based on the number of card suits. Establish a mapping relationship between the card suit sequence and the card positions, and distribute it to each participant. Each participant arranges the cards based on the card suit sequence. The card sorting mechanism picks up cards from inside the card sorting machine, matches the suit of the picked-up card with the same suit in the card suit sequence, obtains the storage position number corresponding to the same suit, and moves the card to the storage position. The card arrangement mechanism repeats the actions of picking up, matching, and moving cards until all cards are delivered to the card arrangement position.
[0008] In some implementations, the communication connections with the participants include TCP / IP protocol, UDP protocol, serial communication, and parallel communication.
[0009] It should be noted that the card arrangement position mentioned here refers to the location where the cards are stored in the card arrangement machine. This invention does not limit the specific location within the card arrangement machine where the cards are stored.
[0010] The storage position number mentioned in this invention refers to the number used to determine the location of the storage position.
[0011] The suit of the tiles mentioned in this invention refers to the suit on the front of the tiles, used to distinguish different styles of tiles. Taking mahjong tiles as an example, the suits of the tiles include Wan, Tong, Tiao, Honor tiles and Flower tiles. Honor tiles include East, South, West, North, Red Dragon, Green Dragon, and White Dragon. Flower tiles include Plum Blossom, Orchid, Bamboo, Chrysanthemum, Spring, Summer, Autumn, and Winter. Wan tiles include four of each from 1 to 9 Wan. Tong tiles include four of each from 1 to 9 Tong. Tiao tiles include four of each from 1 to 9 Tiao.
[0012] It should be understood that the Wanzi, Tongzi, and Tiaozi mentioned in this invention are merely illustrative examples. Tiles of the same suit may have different names in different regions, and this invention does not limit them.
[0013] The participant in this invention is a card arranging machine. One card arranging machine is one participant, and each card arranging machine is used by 3-4 players.
[0014] The random generation of card suit sequences based on all card suits described in this invention is implemented by a designated server or a server or control module within a card sorting machine. The specific server or control module can be a service port that performs functions such as card suit storage, random algorithm storage, data distribution, data reception, and calculation; it does not refer to a single device. It can be an electronic device such as a computer node, data center, or PLC that implements the method described in this invention.
[0015] The random algorithm described in this invention refers to an algorithm that can randomly generate a sequence of card suits based on pre-stored card suits. Random algorithms include random functions, lookup table methods, or backtracking methods.
[0016] It should be understood that the random function and table lookup method described in this invention are merely illustrative examples. Any random algorithm that can randomly generate card suit sequences is acceptable, and this invention does not impose any limitations.
[0017] The card suit sequence mentioned in this invention refers to a random sequence generated by a random function, where each sequence number corresponds to a card suit, and the random sequence is the suit sequence of all cards.
[0018] Specifically, the suit sequence of the mahjong tiles is either a suit image or a numerical code. The numerical code represents the suit and value of the mahjong tile. For example, the suit of the mahjong tile can be represented by 0 for bamboo, 1 for characters, and 2 for dots, with specific numbers used to represent the values. For 2 bamboo, the code (0, 2) can be used to represent it.
[0019] In some implementations, the sequence of card suits is consistent with the length of the card arrangement positions, with one suit corresponding to one card position. The order of suits is the same as the order of card positions, and the order of suits is the same as the order of card arrangement positions. For example, if the sequence of card suits is: 1 Wan, 2 Tiao, 3 Tong... 9 Tiao, 8 Wan, 5 Wan; then the first card position is 1 Wan, the second position is 2 Tiao, the third position is 3 Tong, and so on.
[0020] It should be understood that the suit order is the order in which the cards are arranged, but it does not limit the order in which the card arranging organization arranges the cards.
[0021] The card sorting mechanism described in this invention is a device capable of picking up cards from inside the card sorting machine and moving the cards to the sorting position.
[0022] In conjunction with the first aspect, in some implementations of the first aspect, the card suit sequence is randomly generated based on all card suits, and all card suits need to be stored separately in the servers of each participating party.
[0023] In some implementations, each card sorting machine is controlled by a server, and each server stores the card suits.
[0024] In conjunction with the first aspect, in some implementations of the first aspect, the card suit sequence is a card suit image sequence.
[0025] In some implementations, the card suit sequence is a suit image sequence, the suit image is the suit of the card, and all card suits form a card suit sequence.
[0026] In conjunction with the first aspect, in some implementations of the first aspect, the suit sequence of the mahjong tiles is a numerical encoding sequence, whereby the numerical encoding represents the suit and value of the mahjong tiles. For example, the suit of the tiles is represented by 1, 1, and 2, where 0 represents bamboo, 1 represents characters, and 2 represents dots, and then specific numbers are used to represent the values. For 2 bamboo, the encoding (0, 2) can be used to represent it.
[0027] In conjunction with the first aspect, in some implementations of the first aspect, randomly generating a sequence of card suits based on all card suits and distributing it to each participant includes: any participant performing the random generation of a sequence of card suits and distributing the generated sequence of card suits to the remaining participants.
[0028] In some implementations, a card sorting machine is designated as the designated server, which randomly generates a sequence of card suits based on all card suits and distributes it to each participant.
[0029] In some implementations, any participant acts as the designated server, which randomly generates a sequence of card suits based on all card suits and distributes it to each participant.
[0030] In conjunction with the first aspect, in some implementations of the first aspect, randomly generating a sequence of card suits based on all card suits and distributing it to each participant includes: any participant performing the random generation of a sequence of card suits and distributing the generated sequence of card suits to the remaining participants.
[0031] In some implementations, one of the card sorting machines is designated as the one that executes the random algorithm. The server or control module of the card sorting machine stores the card suits, and the server executes the random algorithm to generate a random card suit sequence based on the stored card suits.
[0032] In conjunction with the first aspect, in some implementations of the first aspect, generating a storage position number based on the number of card suits includes: generating a set of storage positions based on the number of card suits, with the number being 1-N.
[0033] In conjunction with the first aspect, in some implementations of the first aspect, generating storage position numbers based on the number of card suits includes: generating four groups of storage positions based on the number of card suits, with the first group of storage position numbers being X1-X1N, the second group of storage position numbers being X2-X2N, the third group of storage position numbers being X3-X3N, and the fourth group of storage position numbers being X4-X4N.
[0034] In conjunction with the first aspect, in some implementations of the first aspect, establishing the mapping relationship between the card suit sequence and the stored card positions includes: mapping the card suit sequence to the stored card positions based on a one-to-one mapping.
[0035] In conjunction with the first aspect, in some implementations of the first aspect, establishing the mapping relationship between the card suit sequence and the stored card position includes: random mapping between the card suit sequence and the stored card position.
[0036] In conjunction with the first aspect, some implementations of the first aspect include methods for randomly generating card suit sequences, such as the random function method, the table lookup method, and the backtracking method.
[0037] In conjunction with the first aspect, in some implementations of the first aspect, the card sorting mechanism is a robotic arm capable of picking up cards from inside the card sorting machine and moving the cards to the card storage position.
[0038] It should be understood that the robotic arm described in this invention is merely an illustrative example. Any robotic arm that can pick up cards from inside the card sorting machine and move them to the sorting position is acceptable. This invention does not limit the structure of the robotic arm.
[0039] In conjunction with the first aspect, in some implementations of the first aspect, the method for matching the card suit picked with the same card suit in the card suit sequence is: Obtain image data of the suits of the cards picked up by the card sorting agency; The extracted suit features are matched with the suit images in the suit sequence of the cards.
[0040] In conjunction with the first aspect, in some implementations of the first aspect, the method for matching the card suit picked with the same card suit in the card suit sequence is: Obtain image data of the suits of the cards picked up by the card sorting agency; Extract suit features from card suit image data; The extracted suit features are represented using digital codes, which represent the suit and value of the mahjong tiles; Match the numeric code with the numeric code in the suit sequence of the cards.
[0041] Secondly, an electronic device is proposed, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements a card arrangement method based on the mapping relationship between suit sequence and card position, as described in any of the possible implementations of the first aspect.
[0042] Thirdly, a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a card arrangement method based on a suit sequence and a card position mapping relationship, as described in any possible implementation of the first aspect.
[0043] Fourthly, a card sorting machine, the card sorting machine comprising, in conjunction with the first aspect, a card sorting method based on a suit sequence and a mapping relationship between stored card positions, according to any one of the possible implementations of the first aspect.
[0044] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the card sorting machine is a mahjong machine, a domino machine, or a tile-pulling machine.
[0045] The beneficial effects of this invention are as follows: This invention generates a random sequence of card suits based on all card suits, thus avoiding the possibility of cheating; each participant executes the same card suit sequence, ensuring that the order in which they arrange their cards is the same; the card arranging mechanism of this invention can pick up cards from inside the card arranging machine and move them to the arranging positions, ensuring that the cards are stored in the same positions; this invention solves the technical problem of the lack of a method in the prior art for arranging cards in the same position and order across multiple card arranging machines. This invention can achieve a card arranging method that is cheat-free and guarantees that the cards are in the same position across multiple card arranging machines, providing a foundation for absolute fairness in public mahjong tournaments and assisting each player in providing a fair tournament where they can showcase their individual skills. Attached Figure Description
[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a card arrangement method based on the mapping relationship between suit sequence and card position; Figure 2 This is a schematic diagram of the card-drawing mechanism. Figure 3 This is a structural diagram of an electronic device.
[0047] 1-Card body 1; 2-Card retrieving component; 3-Support arm; 4-First movable arm. Detailed Implementation
[0048] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0049] The embodiments of this application are hereby disclosed in detail with appropriate reference to the accompanying drawings. However, unnecessary detailed descriptions may be omitted. For example, detailed descriptions of well-known matters and repetitive descriptions of actually identical structures may be omitted. This is to avoid making the following description unnecessarily lengthy and to facilitate understanding by those skilled in the art. Furthermore, the accompanying drawings and the following description are provided to enable those skilled in the art to fully understand this application and are not intended to limit the subject matter of the claims. Example
[0050] Reference Figures 1-3 This describes the implementation method. Figure 1 A schematic flowchart of a card arrangement method based on the mapping relationship between suit sequence and card position according to an embodiment of the present invention is shown. The method includes the following steps: S1. Randomly generate a sequence of card suits based on all card suits, and generate a card position number based on the number of card suits; S2. Establish a mapping relationship between the card suit sequence and the card positions, and distribute it to each participant. Each participant arranges the cards based on the card suit sequence. S3. The card sorting mechanism picks up the card body from inside the card sorting machine, matches the card body suit with the card body suit sequence, obtains the card position number corresponding to the same card body suit, and moves the card body to the card position. S4. The card arrangement mechanism repeats the actions of picking up, matching, and moving cards until all cards are sent to the card arrangement position.
[0051] Taking a mahjong machine as an example, the implementation method of this embodiment is explained. The number and types of mahjong tiles vary depending on the region and the game. Therefore, some mahjong sets have 136 tiles, some have 108 tiles, and some have 144 tiles. The following example uses 108 mahjong tiles: 108 mahjong tiles of various suits are stored on any participating player's server. These 108 tiles represent three suits and their point values (1-9), with four tiles of each point value. A random algorithm is executed to generate a sequence of tile suits based on all suits. The tile suits are represented by tile suit images. The random algorithm includes: using the `backtrack` function to generate all possible mahjong tile suit sequences via a stacking method; using the `used` data to record whether each point value of each suit has been used; generating sequences one by one; when the length of a generated sequence reaches 108, adding it to a result list and outputting the result; and generating a set of storage positions based on the number of tiles of each suit, with a random tile suit sequence as follows: 1 for Wan; 1 for Tong; 1 for Tiao; 3 for Wan; 7 for Tiao; 3 for Tong; 3 for Tiao; 1 for Wan; 1 for Tong; 1 for Tiao; 2 for Wan; 2 for Tong; 2 for Tiao; 4 for Wan; 4 for Tong; 4 for Tiao. 70,000; 7 of 1 ...5 of 10,000; 5 of 10,000; 5 of 10,000; 6 of 10,000; 6 of 10,000; 3 of 10,000; 3 of 10,000; 9 of 10,000; 9 of 10,000; 8 of 10,000; 8 of 10,000; 5 of 10,000; 2 of 10,000; 5 of 10,000; 8 of 10,000; 8 of 10,000; 9 of 10,000; 9 of 10,000; 1 of 10,000; 2 of 10,000; 2 of 10,000; 3 of 10,000; 3 of 10,000; 4 of 10,000; 5 of 10,000; 5 of 10,000 5; 6; 6; 7; 7; 7; 8; 8; 8; 8; 9; 9; 9; 2; 2; 2; 4; 4; 4; 6; 6; 6; 6; 8; 8; 8; 8; 9; 9; 9; 1; 1; 1; 1; 2; 2; 3; 3; 4; 4; 4; 4; 5; 5; 5; 6; 6; 6; 6; 7; 7; 6.
[0052] The card slot numbers are generated based on the number of suits in the cards; Card slot 1; Card slot 2; Card slot 3; Card slot 4; Card slot 5; Card slot 6; Card slot 7; Card slot 8; Card slot 9; Card slot 10; Card slot 11; Card slot 12; Card slot 13; Card slot 14; Card slot 15; Card slot 16; Card slot 17; Card slot 18; Card slot 19; Card slot 20; Card slot 21; Card slot 22; Card slot 23; Card slot 24; Card slot 25; Card slot 26; Card slot 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50 - 1 of Bamboo; 51; 52; 53; 54 ; Storing tablets at position 55; Storing tablets at position 56; Storing tablets at position 57; Storing tablets at position 58; Storing tablets at position 59; Storing tablets at position 60; Storing tablets at position 61; Storing tablets at position 62; Storing tablets at position 63; Storing tablets at position 64; Storing tablets at position 65; Storing tablets at position 66; Storing tablets at position 67; Storing tablets at position 68; Storing tablets at position 69; Storing tablets at position 70; Storing tablets at position 71; Storing tablets at position 72; Storing tablets at position 73; Storing tablets at position 74; Storing tablets at position 75; Storing tablets at position 76; Storing tablets at position 77; Storing tablets at position 78; Storing tablets at position 79; Storing tablets at position 80; Storing tablets at position 81; Storing tablets at position 8 2; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; 103; 104; 105; 106; 107; 108.
[0053] Establish a mapping relationship between the suit sequence of cards and the storage positions. Based on a one-to-one mapping, map the suit sequence of cards to the storage positions. The mapping relationship between the suit sequence and the storage positions is as follows: That is, tile storage position 1-Character 1; tile storage position 2-Dot 1; tile storage position 3-Bamboo 1; tile storage position 4-Character 3; tile storage position 5-Bamboo 7; tile storage position 6-Dot 3; tile storage position 7-Bamboo 3; tile storage position 8-Character 1; tile storage position 9-Dot 1; tile storage position 10-Bamboo 1; tile storage position 11-Character 2; tile storage position 12-Dot 2; tile storage position 13-Bamboo 2; tile storage position 14-Character 4; tile storage position 15-Dot 4; tile storage position 16-Bamboo 4; tile storage position 17-Character 7; tile storage position 18-Dot 7; tile storage position 19-Bamboo 7; tile storage position 20-Bamboo 3; tile storage position 21-Character 7; tile storage position 22-Dot 7; tile storage position 23-Bamboo 7; tile storage position 24-Character 5; tile storage position 25-Dot 5; tile storage position 26-Bamboo 5; tile storage position 27-Character 6; tile storage position 28-Dot 6; tile storage position 29-Bamboo 6; tile storage position 30-Character 3; tile storage position 31-Dot 3; tile storage position 32-Bamboo 3; tile storage position 33-Character 9; tile storage position 34-Dot 9; tile storage position 35-Bamboo 9; tile storage position 36-Character 8; tile storage position 37-Dot 8; tile storage position 38-Bamboo 8; tile storage position 39-Character 5; tile storage position 40-Dot 2; tile storage position 41-Dot 5; tile storage position 42-Bamboo 5; tile storage position 43-Character 8; tile storage position 44-Dot 8; tile storage position 45-Bamboo 8; tile storage position 46-Character 9; tile storage position 47-Dot 9; tile storage position 48-Bamboo 9; tile storage position 49-Character 1; tile storage position 50-Dot 1; tile storage position 51-Bamboo 1; tile storage position 52-Character 2; tile storage position 53-Dot 2; tile storage position 54-Bamboo 2; tile storage position 55-Character 3; tile storage position 56-Dot 3; tile storage position 57-Bamboo 3; tile storage position 58-Character 4; tile storage position 59-Dot 4; tile storage position 60-Bamboo 4; tile storage position 61-Character 5; tile storage position 62-Dot 5; tile storage position 63-Bamboo 5; tile storage position 64-Character 6; tile storage position 65-Dot 6; tile storage position 66-Character 7; tile storage position 67-Dot 7; tile storage position 68-Bamboo 7; tile storage position 69-Character 8; tile storage position 70-Dot 8; tile storage position 71-Bamboo 8; tile storage position 72-Character 9; tile storage position 73-Dot 9; tile storage position 74-Bamboo 9; tile storage position 75-Character 2; tile storage position 76-Dot 2; tile storage position 77-Bamboo 2; tile storage position 78-Character 4; tile storage position 79-Dot 4; tile storage position 80-Bamboo 4; tile storage position 81-Character 6; tile storage position 82-Dot 6; tile storage position 83-Bamboo 6; tile storage position 84-Character 8; tile storage position 85-Dot 8; tile storage position 86-Bamboo 8; tile storage position 87-Character 9; tile storage position 88-Dot 9; tile storage position 89-Bamboo 9; tile storage position 90-Character 1; tile storage position 91-Dot 1; tile storage position 92-Bamboo 1; tile storage position 93-Character 2; tile storage position 94-Bamboo 2; tile storage position 95-Character 3; tile storage position 96-Dot 3; tile storage position 97-Character 4; tile storage position 98-Dot 4; tile storage position 99-Bamboo 4; tile storage position 100-Character 5; tile storage position 101-Dot 5; tile storage position 102-Bamboo 5; tile storage position 103-Character 6; tile storage position 104-Dot 6; tile storage position 105-Bamboo 6; tile storage position 106-Character 7; tile storage position 107-Dot 7; tile storage position 108-Bamboo 6.
[0054] In some implementations, a mapping relationship is established between the suit sequence of cards and the stored card positions, and a random mapping is performed between the suit sequence of cards and the stored card positions. The method of mapping card suit sequence to card position random can use either a random algorithm or a random permutation.
[0055] The following example uses random permutation: Let the suit sequence be: S = (Bamboo 1, Dots 2, Characters 3, ..., Bamboo 9), where the length of S is the total number of tiles; The arrangement of the ancestral tablets is as follows: P = (P(1), P(2), P(3), ..., P(X)), where the length of P is the total number of cards; The new sequence S′ can be represented as: S′=(S(P(1)),S(P(2)),S(P(3)),…,S(P(X))) By matching the new sequence one-to-one with the suit sequence, the mapping relationship between the suit sequence and the stored positions can be obtained.
[0056] Taking a randomly generated sequence of card positions as an example: 34, 76, 25, 98, 1, 45, 67, 69, 10, 23, 47, 58, 3, 72, 91, 12, 83, 50, 61, 73, 84, 95, 106, 17, 28, 39, 51, 62, 74, 85, 96, 107, 18, 29, 40, 52, 63, 75, 86, 97, 108, 20, 31, 42, 53, 64, 77, 88, 99, 100, 21, 32, 43, 54, 65, 78, 89, 101, 22, 33, 44, 55, 66, 79, 90, 102, 24,35, 46, 57, 68, 80, 91, 103, 26, 37, 48, 59, 70, 81, 92, 104, 27, 38, 49, 60,71, 82, 93, 105,2,4,5,6,7,8,9,11,13,14,15,16,19,30,36,56,94,87, 83,69.
[0057] The suit sequence and the stored position sequence are mapped one-to-one using a hash algorithm. The mapping relationship between the suit sequence and the stored position is as follows: Deposit cards: 34 - Wan 1, 76 - Tong 1, 25 - Tiao 1, 98 - Wan 3, 1 - Tiao 7, 45 - Tong 3, 67 - Tiao 3, 69 - Wan 1, 10 - Tong 1, 23 - Tiao 1, 47 - Wan 2, 58 - Tong 2, 3 - Tiao 2, 72 - Wan 4, 91 - Tong 4, 12 - Tiao 4, 83 - Wan 7, 50 - Tong 7, 61 - Tiao 7, 73 - Tiao 3, 84 - Wan 7, 95 - Tong 7, 106 - Tiao 7, 17 - Wan 5. Deposit cards: 28 - 5 of Bamboo, 39 - 5 of Sticks, 51 - 6 of Characters, 62 - 6 of Bamboo, 74 - 6 of Sticks, 85 - 3 of Characters, 96 - 3 of Bamboo, 107 - 3 of Sticks, 18 - 9 of Characters, 29 - 9 of Bamboo, 40 - 9 of Sticks, 52 - 8 of Characters, 63 - 8 of Bamboo, 75 - 8 of Sticks, 86 - 5 of Characters, 97 - 2 of Bamboo, 108 - 5 of Bamboo, 20 - 5 of Sticks, 31 - 8 of Characters, 42 - 8 of Bamboo, 53 - 8 of Sticks, 64 - 9 of Characters, 77 - 9 of Bamboo, 88 - 9 of Sticks. Deposit cards: 99-Wan 1, 100-Tong 1, 21-Tiao 1, 32-Wan 2, 43-Tong 2, 54-Tiao 2, 65-Wan 3, 78-Tong 3, 89-Tiao 3, 101-Wan 4, 22-Tong 4, 33-Tiao 4, 44-Wan 5, 55-Tong 5, 66-Tiao 5, 79-Wan 6, 90-Tong 6, 102-Wan 7, 24-Tong 7, 35-Tiao 7, 46-Wan 8, 57-Tong 8, 68-Tiao 8, 80-Wan 9. Deposit cards: 91 - 9 of Bamboo, 103 - 9 of Sticks, 26 - 2 of Characters, 37 - 2 of Bamboo, 48 - 2 of Sticks, 59 - 4 of Characters, 70 - 4 of Bamboo, 81 - 4 of Sticks, 92 - 6 of Characters, 104 - 6 of Bamboo, 27 - 6 of Sticks, 38 - 8 of Characters, 49 - 8 of Bamboo, 60 - 8 of Sticks, 71 - 9 of Characters, 82 - 9 of Bamboo, 93 - 9 of Sticks, 105 - 1 of Characters;The following hand is in sequence: 2 - Bamboo 1, 4 - Stick 1, 5 - Character 2, 6 - Stick 2, 7 - Character 3, 8 - Bamboo 3, 9 - Character 4, 11 - Bamboo 4, 13 - Stick 4, 14 - Character 5, 15 - Bamboo 5, 16 - Stick 5, 19 - Character 6, 30 - Bamboo 6, 36 - Stick, 56 - Character 7, 94 - Bamboo 7, 87 - Stick 6.
[0058] The card suit sequence that is mapped to the card storage position is sent to each card sorting machine. Each card sorting machine sorts the cards based on the card suit sequence and the card storage position mapping relationship. The card sorting mechanism on the card sorting machine picks up the cards inside the card sorting machine, matches the card suit of the picked card with the same card suit in the card suit sequence, and obtains the card storage position number corresponding to the same card suit. The card sorting mechanism then moves the card to the card storage position. Specifically, the method for obtaining the suit of the picked-up card is to install a recognition module inside the card sorting machine or on the card sorting mechanism. The recognition module obtains image data of the card sorting mechanism performing the card sorting action in real time. Each time the card sorting mechanism picks up a card, it can identify the suit of the card. If the picked-up card is face down, the card sorting mechanism performs a flipping action to turn the picked-up card face up.
[0059] Specifically, the method for matching the card suit picked up with the same card suit in the card suit sequence is as follows: obtain the card suit image data picked up by the card sorting mechanism; and match the extracted suit features with the suit images in the card suit sequence.
[0060] The method for implementing the card suit sequence as a card suit image sequence matching is based on normalized mutual matching; Specifically, the extracted suit features are slide-matched with the suit images in the suit sequence of the cards. The normalized correlation coefficient between the extracted suit features and each position in the suit image is calculated. The larger the coefficient, the higher the degree of matching. A matching degree threshold is set. If the coefficient is within the matching degree threshold, it is determined that the extracted suit features are the same as the suit images in the suit sequence of the cards. The card sorting mechanism moves the card to the sorting position corresponding to the suit image. Then, the card sorting mechanism picks up the next card and repeats the above steps until all cards have been moved to the sorting position.
[0061] In some embodiments, the method for matching the picked card suit with the same card suit in the card suit sequence is based on phase correlation matching; Specifically, the phase information from the Fourier transform is used to calculate the translation relationship between the picked card suit image and the suit images in the card suit sequence. By performing a Fourier transform on the two images, the phase correlation function is calculated, and the peak position of the phase correlation function is found to obtain the translation amount between the images. The smaller the translation amount, the smaller the difference in translation between the two images, and the higher the matching degree. A matching degree threshold is set. If the translation amount is within the matching degree threshold, it is determined that the picked card suit image is the same as the suit image in the card suit sequence. The card sorting mechanism moves the card to the sorting position. Then, the card sorting mechanism picks the next card and repeats the above steps until all cards have been moved to the sorting position.
[0062] It should be understood that the method for matching the suit of the picked-up card with the same suit in the suit sequence described in the embodiments of the present invention is an exemplary description. Any method that can determine whether the suit of the picked-up card is the same as the suit in the suit sequence is acceptable, and the present invention is not limited thereto.
[0063] Specifically, the actions of the card sorting mechanism are driven by a drive structure, which is controlled by the card sorting machine server or control module.
[0064] The drive structure can be an electric drive structure, a hydraulic drive structure, or a pneumatic drive structure. Specifically, the electric drive structure can be a motor, a servo motor, or a stepper motor.
[0065] Specifically, the recognition module is a visual sensor.
[0066] Specifically, methods for extracting suit features from card suit image data can be tailored to different suits, such as using color features, texture features, contour features, or convolutional neural networks. Visual sensors can directly extract features from the images they capture.
[0067] It should be understood that the card suit feature extraction based on the internal algorithm of the visual sensor described in this invention is only an illustrative example. Any method that can achieve feature extraction is acceptable, and this invention does not limit it.
[0068] Specifically, the card sorting mechanism is: Reference Figure 2 The card sorting mechanism includes a movable component, a card flipping component, and a card retrieval component 2. The driving mechanism is drivenly connected to the movable component. The movable component is rotatably mounted on the frame of the card retrieval device. The card flipping component is rotatably mounted on the movable component. The card retrieval component 2 is mounted on the card flipping component.
[0069] The card-removing component 2 is a clamp or an adsorption device.
[0070] When the card sorting mechanism performs the card picking action, the control module controls the drive mechanism to drive the movable part to move, and the card picking part 2 installed on the movable part moves accordingly. When the card picking part 2 moves downward, it grabs the card body 1. When the card sorting mechanism performs the card flipping action, the control module controls the drive mechanism to drive the card flipping component to flip up, down, left, and right according to the current posture of the card body 1 collected by the recognition mechanism. The card taking component 2 installed on the card flipping component flips left and right accordingly, thereby changing the posture of the card body 1 on the card taking component 2.
[0071] When the card sorting mechanism performs the card moving action, the control module controls the drive mechanism to drive the movable part to move, and the card picking part 2 installed on the movable part moves to the left accordingly, and the card body 1 picked up by the card picking part 2 is moved to the card sorting position.
[0072] The movable component includes a support arm 3 and a first movable arm 4; the support arm 3 is rotatably mounted on the frame of the card sorting mechanism, and the first movable arm 4 is rotatably mounted on the support arm 3; the card picking component 2 is mounted on the first movable arm 4.
[0073] One of the support arm 3 and the first movable arm 4 is vertically hinged, and the other of the support arm 3 and the first movable arm 4 is horizontally hinged.
[0074] Specifically, the support arm 3 is rotatably mounted on the frame of the card-retrieving device, including two installation configurations: one is that the support arm 3 is vertically hinged to the frame of the card-retrieving device, and the support arm 3 moves laterally; the other is that the support arm 3 is horizontally hinged to the frame of the card-retrieving device, and the support arm 3 moves vertically. The first movable arm 4 is rotatably mounted on the support arm 3, including two mounting configurations: one in which the first movable arm 4 is vertically hinged to the support arm 3 and the first movable arm 4 moves laterally; the other in which the first movable arm 4 is horizontally hinged to the support arm 3 and the first movable arm 4 moves vertically. When the support arm 3 is vertically hinged to the card-retrieving device frame and the first movable arm 4 is horizontally hinged to the support arm 3, when the card sorting mechanism performs the card-retrieving action, the control module controls the drive mechanism to drive the first movable arm 4 to move, and the card-retrieving component 2 installed on the first movable arm 4 moves accordingly. When the card-retrieving component 2 moves, it grabs the card body 1.
[0075] When the card sorting mechanism performs the card flipping action, the control module controls the drive mechanism to drive the card flipping component to flip up, down, left, and right according to the current posture of the card body 1 collected by the recognition mechanism. The card taking component 2 installed on the card flipping component flips left and right accordingly, thereby changing the posture of the card body 1 on the card taking component 2.
[0076] When the card sorting mechanism performs the card moving action, the control module controls the drive mechanism to drive the support arm 3 to move, and the first movable arm 4 installed on the support arm 3 and the card picking component 2 move accordingly, and the card body 1 grabbed by the card picking component 2 is moved to the card sorting position.
[0077] The support arm 3 is horizontally hinged to the frame of the card-taking device. When the first movable arm 4 is vertically hinged to the support arm 3, the card sorting mechanism performs the control process of taking and moving cards, which is the same as the above process and will not be described again.
[0078] In some embodiments, the card sorting mechanism includes several card sorting robots capable of picking up card bodies 1 from inside the card sorting machine and transporting the card bodies 1 to the card sorting position. The card sorting robots pick up the card bodies 1 and place the picked-up card bodies 1 at the card sorting position. It is understood that the card-flipping and card-delivering operations can be completed by the card sorting robots.
[0079] In detail, the card sorting robot is controlled by a control system, which typically includes a reader and a controller. Users can configure these settings according to their needs. The specific process of picking up and placing card 1 is not described in detail here. The card sorting robot can move vertically, horizontally, and longitudinally. Preferably, it can also rotate around its central axis with card 1 to flip it over. The card sorting robot can complete the stacking of cards inside the card sorting machine (the card sorting robot picks up one card 1 from inside the card sorting machine and places it on top of another card 1, then moves the stack of cards 1 together to the sorting position, repeating this process until the sorting is complete). The number of card-sorting robots can be the same as or more than twice the number of card-dispensing slots (or card-storage slots) of the card-sorting machine. Some of these robots pick up card bodies 1 and place them in the sorting area, while others pick up card bodies 1 at predetermined positions and place them in the sorting area. Understandably, the disordered card bodies 1 inside the card-sorting machine may be moved to their sorting positions in two or more stages. Since the position of the disordered card bodies 1 is unpredictable and they may need to be flipped, the time required may be longer. Therefore, it is preferable that more robots are used to place card bodies 1 in the sorting positions than to place them in the sorting area.
[0080] Some card sorting machines have multiple card sorting mechanisms and multiple sets of card sorting positions. The following example illustrates this implementation method using a card sorting machine with 4 card sorting mechanisms and 4 sets of card sorting positions: Taking a mahjong machine as an example, the implementation method of this embodiment is explained. The number and types of mahjong tiles vary depending on the region and the game. Therefore, some mahjong machines have 136 tiles, some have 108 tiles, and some have 144 tiles. The following example uses 108 mahjong tiles: four groups of storage positions are generated based on the number of suits in the tiles. The first group of storage positions is numbered X1-X1N, the second group is numbered X2-X2N, the third group is numbered X3-X3N, and the fourth group is numbered X4-X4N.
[0081] Each tile arrangement unit corresponds to a set of tile arrangement positions and a set of tile suit sequences. The length of each set of tile suit sequences is 27. That is, the first set of tile suit sequences is: Wan 1; Tong 1; Tiao 1; Wan 3; Tiao 7; Tong 3; Tiao 3; Wan 1; Tong 1; Tiao 1; Wan 2; Tong 2; Tiao 2; Wan 4; Tong 4; Tiao 4; Wan 7; Tong 7; Tiao 7; Tiao 3; Wan 7; Tong 7; Tiao 7; Wan 5; Tong 5; Tiao 5; Wan 6; The second set of tile suit sequences is: Tong 6; Tiao 6; Wan 3; Tong 3; Tiao 3; Wan 9; Tong 9; Tiao 9; Wan 8; Tong 8; Tiao 8; Wan 5; Tong 2; Tong 5; Tiao 5; Wan 8; Tong 8; Tiao 8; Wan 9; Tong 9; The sequence of the third set of tiles is: Wan 3; Tong 3; Tiao 3; Wan 4; Tong 4; Tiao 4; Wan 5; Tong 5; Tiao 5; Wan 6; Tong 6; Wan 7; Tong 7; Tiao 7; Wan 8; Tong 8; Tiao 8; Wan 9; Tong 9; Tiao 9; Wan 2; Tong 2; Tiao 2; Wan 4; Tong 4; Tiao 4; Wan 6; The sequence of the fourth set of tiles is: Tong 6; Tiao 6; Wan 8; Tong 8; Tiao 8; Wan 9; Tong 9; Tiao 9; Wan 1; Tong 1; Tiao 1; Wan 2; Tiao 2; Wan 3; Tong 3; Wan 4; Tong 4; Tiao 4; Wan 5; Tong 5; Tiao 5; Wan 6; Tong 6; Tiao 6; Wan 7; Tong 7; Tiao 6.
[0082] Taking the above-mentioned suit sequence and the mapping relationship between stored positions as an example: The first set of suit sequences and their corresponding card positions are mapped as follows: Card position 34 - Wan 1, Card position 76 - Tong 1, Card position 25 - Tiao 1, Card position 98 - Wan 3, Card position 1 - Tiao 7, Card position 45 - Tong 3, Card position 67 - Tiao 3, Card position 69 - Wan 1, Card position 10 - Tong 1, Card position 23 - Tiao 1, Card position 47 - Wan 2, Card position 58 - Tong 2, Card position 3 - Tiao 2, Card position 72 - Wan 4, Card position 91 - Tong 4, Card position 12 - Tiao 4, Card position 83 - Wan 7, Card position 50 - Tong 7, Card position 61 - Tiao 7, Card position 73 - Tiao 3, Card position 84 - Wan 7, Card position 95 - Tong 7, Card position 106 - Tiao 7. Deposit the following tiles: 17 - Wan 5, 28 - Tong 5, 39 - Tiao 5, 51 - Wan 6; The second set of suit sequences and their corresponding card positions are mapped as follows: Card position 62 - 6 of Bamboo, Card position 74 - 6 of Sticks, Card position 85 - 3 of Characters, Card position 96 - 3 of Bamboo, Card position 107 - 3 of Sticks, Card position 18 - 9 of Characters, Card position 29 - 9 of Bamboo, Card position 40 - 9 of Sticks, Card position 52 - 8 of Characters, Card position 63 - 8 of Bamboo, Card position 75 - 8 of Sticks, Card position 86 - 5 of Characters, Card position 97 - 2 of Bamboo, Card position 108 - 5 of Bamboo, Card position 20 - 5 of Sticks, Card position 31 - 8 of Characters, Card position 42 - 8 of Bamboo, Card position 53 - 8 of Sticks, Card position 64 - 9 of Characters, Card position 77 - 9 of Bamboo, Card position 88 - 9 of Sticks, Card position 99 - 1 of Characters, Card position 100 - 1 of Bamboo. Deposit 21 - 1 of Bamboo, deposit 32 - 2 of Characters, deposit 43 - 2 of Circles, deposit 54 - 2 of Bamboo; The third set of suit sequences and their corresponding card mappings are as follows: Card position 65 - Wan 3, Card position 78 - Tong 3, Card position 89 - Tiao 3, Card position 101 - Wan 4, Card position 22 - Tong 4, Card position 33 - Tiao 4, Card position 44 - Wan 5, Card position 55 - Tong 5, Card position 66 - Tiao 5, Card position 79 - Wan 6, Card position 90 - Tong 6, Card position 102 - Wan 7, Card position 24 - Tong 7, Card position 35 - Tiao 7, Card position 46 - Wan 8, Card position 57 - Tong 8, Card position 68 - Tiao 8, Card position 80 - Wan 9, Card position 91 - Tong 9, Card position 103 - Tiao 9, Card position 26 - Wan 2, Card position 37 - Tong 2, Card position 48 - Tiao 2. Deposit the following tiles: 59 - Wan 4, 70 - Tong 4, 81 - Tiao 4, 92 - Wan 6; The fourth set of suit sequences and their corresponding card mappings are as follows: Card position 104 - 6 of Bamboo, Card position 27 - 6 of Sticks, Card position 38 - 8 of Characters, Card position 49 - 8 of Bamboo, Card position 60 - 8 of Sticks, Card position 71 - 9 of Characters, Card position 82 - 9 of Bamboo, Card position 93 - 9 of Sticks, Card position 105 - 1 of Characters; Card position 2 - 1 of Bamboo, Card position 4 - 1 of Sticks, Card position 5 - 2 of Characters, Card position 6 - 2 of Sticks, Card position 7 - 3 of Characters, Card position 8 - 3 of Bamboo, Card position 9 - 4 of Characters, Card position 11 - 4 of Bamboo, Card position 13 - 4 of Sticks, Card position 14 - 5 of Characters, Card position 15 - 5 of Bamboo, Card position 16 - 5 of Sticks, Card position 19 - 6 of Characters, Card position 30 - 6 of Bamboo. The stored tiles are 36-bamboo, 56-wan 7, 94-tong 7, and 87-bamboo 6.
[0083] The grouped suit sequences and card storage mappings are sent to each card sorting machine. Each card sorting mechanism on the card sorting machine picks up the cards inside the machine based on the suit sequence of the corresponding group, matches the picked card suit with the same suit in the suit sequence, and obtains the card storage position number corresponding to the same suit. The card sorting mechanism then moves the card to the card storage position.
[0084] The specific judgment method has been explained above and will not be repeated here. Example
[0085] Unlike Example 1, the suit sequence of the cards is a numerical encoding sequence, where the numerical encoding represents the suit and value of the cards.
[0086] Taking a mahjong machine as an example, the implementation method of this embodiment is explained. The number and types of mahjong tiles vary depending on the region and the game. Therefore, some mahjong sets have 136 tiles, some have 108 tiles, and some have 144 tiles. The following example uses 108 mahjong tiles: 108 mahjong tiles of different suits are stored on any participating player's server. These 108 tiles represent three suits and their point values (1-9), with four tiles of each point value. The server executes a random algorithm to generate a sequence of tile suits based on all possible suits. The suits are represented by tile images. The random algorithm includes: using the `backtrack` function to generate all possible mahjong tile suit sequences via a stacking method; recording whether each point value of each suit has been used; generating sequences one by one; and adding a sequence to the result list when its length reaches 108. The result is then output. (The random tile suit sequence is: Wan 1; Tong 1; Tiao 1; Wan 3; Tiao 7; Tong 3; Tiao 3; Wan 1; Tong 1; Tiao 1; Wan 2; Tong 2; Tiao 2; Wan 4; Tong 4; Tiao 4; Wan 7; Tong 7; Tiao 7; Tiao 3; Wan 7; Tong 7; Tiao 7; Wan 5; Tong 5; Tiao 5; Wan 6; Tong...) 6; 6; 30,000; 3; 3; 3; 9; 9; 9; 9; 8; 8; 8; 8; 5; 2; 5; 5; 8; 8; 8; 8; 9; 9; 9; 1; 1; 1; 1; 2; 2; 2; 3; 3; 3; 4; 4; 4; 5; 5; 5; 5; 6; 6; 7; 7; 7; 8; 8; 8; 8; 9; 9; 9; 2; 2; 2 The sequence of card suits is numerically encoded, with 0 representing Bamboo, 1 representing Characters, and 2 representing Bamboo, and then a specific number is used to represent the value. For example, 2 Bamboo can be represented by the code (0, 2).The random card suit sequence is: (1,1); (2,1); (0,1); (1,3); (0,7); (2,3); (0,3); (1,1); (2,1); (0,1); (1,2); (2,2); (0,2); (1,4); (2,4); (0,4); (1,7); (2,7); (0,7); (0,3); (1,7); (2,7); (0,7); (1,5); (2,5); (0, 5); (1,6); (2,6); (0,6); (1,3); (2,3); (0,3); (1,9); (2,9); (0,9); (1,8); (2,8); (0,8); (1,5); (2,2); (2,5); (0,5); (1,8); (2,8); (0,8); (1,9); (2,9); (0,9); (1,1); (2,1); (0,1); (1,2); (2,2); (0,2);(1,3);(2,3);(0,3);(1,4);(2,4);(0,4);(1,5);(2,5);(0,5);(1,6);(2,6);(1,7);(2,7);(0,7);(1,8);(2,8);(0,8);(1,9);(2,9);(0,9);(1,2);(2,2);(0,2);(1,4);(2,4);(0,4);(1, 6);(2,6);(0,6);(1,8);(2,8);(0,8);(1,9);(2,9);(0,9);(1,1);(2,1);(0,1);(1,2);(0,0);(1,3);(2,3);(1,4);(2,4);(0,4);(1,5);(2,5);(0,5);(1,6);(2,6);(0,6);(1,7);(2,7);(0,6).
[0087] Specifically, matching the numerical codes of the picked cards with the numerical codes in the suit sequence can be done using an SQL query matching method.
[0088] Alternatively, Euclidean distance and cosine similarity can be used for matching. The Euclidean distance or cosine similarity between two sets of digital encoded vectors is calculated, a threshold is set, and if the result is within the threshold range, the two vectors are considered to match; otherwise, they are considered not to match. Specifically, the formulas for calculating Euclidean and cosine similarity are existing technologies and will not be elaborated upon in this embodiment.
[0089] It should be understood that the matching method described in the embodiments of the present invention is an exemplary illustration. Any method that can match the numerical code of the picked card with the numerical code in the suit sequence of the card and determine whether the suit of the picked card is the same as the suit in the suit sequence is acceptable. The present invention does not limit the method. Example
[0090] A card sorting machine, comprising the card sorting method described in Embodiment 1 based on the mapping relationship between suit sequence and card position.
[0091] Specifically, the card sorting machine is a mahjong machine, a domino machine, or a tile sorting machine. Example
[0092] An electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of the method described in Embodiment 1 or Embodiment 2. Example
[0093] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in Embodiment 1 or Embodiment 2.
[0094] Based on the same technical concept, embodiments of the present invention also provide an electronic device, such as... Figure 3 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.
[0095] Memory 403 is used to store computer programs; The processor 401 is used to implement the steps of the card-pushing method when executing the program stored in the memory 403.
[0096] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0097] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0098] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0099] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0100] The computer program product for the card-pushing method provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0101] The card-pushing device provided in this embodiment of the invention can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this embodiment of the invention are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiments can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0102] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0103] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0104] In addition, the functional units in the embodiments provided by the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0105] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device, such as a personal computer, server, or network device, to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0107] Unless otherwise specified, all steps in this application may be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), indicating that the method may include steps (a) and (b) performed sequentially, or it may include steps (b) and (a) performed sequentially. For example, the mention that the method may also include step (c) indicates that step (c) may be added to the method in any order. For example, the method may include steps (a), (b), and (c), or it may include steps (a), (c), and (b), or it may include steps (c), (a), and (b), etc.
[0108] In the description of this application, it should be noted that, unless otherwise stated, "a plurality of" means two or more; the terms "upper," "lower," "left," "right," "inner," "outer," etc., indicating orientation or positional relationships are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0109] The "range" disclosed in this application is defined by a lower limit and an upper limit. A given range is defined by selecting a lower limit and an upper limit, which define the boundaries of a particular range. Ranges defined in this way can include or exclude endpoints and can be arbitrarily combined; that is, any lower limit can be combined with any upper limit to form a range. For example, if ranges of 60-120 and 80-110 are listed for a specific parameter, it is expected that ranges of 60-110 and 80-120 are also included. Furthermore, if minimum range values of 1 and 2 are listed, and if maximum range values of 3, 4, and 5 are listed, then the following ranges are all expected: 1-3, 1-4, 1-5, 2-3, 2-4, and 2-5. In this application, unless otherwise stated, the numerical range "ab" represents a shortened representation of any combination of real numbers between a and b, where a and b are real numbers. For example, the numerical range "0-5" indicates that all real numbers between "0-5" have been listed in this article; "0-5" is simply a shortened representation of these numerical combinations. Furthermore, when a parameter is stated as an integer ≥2, it is equivalent to disclosing that the parameter is, for example, an integer such as 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, etc.
[0110] Unless otherwise specified, the terms "comprising" and "including" as used in this application are open-ended. For example, "comprising" and "including" may mean including or containing other components not listed.
[0111] Unless otherwise specified, all embodiments and optional embodiments of this application can be combined to form new technical solutions.
[0112] Unless otherwise specified, all technical features and optional technical features of this application may be combined to form new technical solutions.
[0113] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A card arrangement method based on the mapping relationship between suit sequence and card position, characterized in that, include: A sequence of card suits is randomly generated based on all card suits, and a card position number is generated based on the number of card suits. Establish a mapping relationship between the suit sequence of cards and the card positions, and distribute it to each participant, who then arranges the cards. The card sorting mechanism picks up cards from inside the card sorting machine, matches the suit of the picked-up card with the same suit in the card suit sequence, obtains the storage position number corresponding to the same suit, and moves the card to the storage position. The card arrangement mechanism repeats the actions of picking up, matching, and moving cards until all cards are delivered to the card arrangement position.
2. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 1, characterized in that, Randomly generating a sequence of card suits based on all card suits includes: randomly generating a sequence of card suits by any participant or a designated participant.
3. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 1, characterized in that, The card suit sequence is a sequence of card suit images.
4. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 1, characterized in that, The suit sequence of the cards is a numerical encoding sequence, whereby the numerical encoding represents the suit and value of the cards.
5. The centralized management method for card sorting machines based on a random algorithm according to claim 1, characterized in that, The storage position number generated based on the number of suits includes: a set of storage positions is generated based on the number of suits, with the number being 1-N.
6. The centralized management method for card sorting machines based on a random algorithm according to claim 1, characterized in that, The storage position numbers generated based on the number of suits in the cards include: four groups of storage positions are generated based on the number of suits in the cards. The first group of storage position numbers is X1-X1N, the second group of storage position numbers is X2-X2N, the third group of storage position numbers is X3-X3N, and the fourth group of storage position numbers is X4-X4N.
7. The centralized management method for card sorting machines based on a random algorithm according to claim 1, characterized in that, Establishing a mapping relationship between card suit sequences and stored card positions includes mapping card suit sequences to stored card positions based on a one-to-one mapping.
8. The centralized management method for card sorting machines based on a random algorithm according to claim 1, characterized in that, Establishing a mapping relationship between card suit sequences and stored card positions includes: random mapping between card suit sequences and stored card positions.
9. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 2, characterized in that, Methods for randomly generating card suit sequences include: random function method, table lookup method, and backtracking method.
10. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 1, characterized in that, The card sorting mechanism is a robotic arm that can pick up cards from inside the card sorting machine and move them to the card storage position.
11. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 3, characterized in that, The method for matching the suit of a card to the same suit in the suit sequence is as follows: Obtain image data of the suits of the cards picked up by the card sorting agency; The extracted suit features are matched with the suit images in the suit sequence of the cards.
12. The card arrangement method based on the mapping relationship between suit sequence and card position as described in claim 4, characterized in that, The method for matching the suit of a card to the same suit in the suit sequence is as follows: Obtain image data of the suits of the cards picked up by the card sorting agency; Extract suit features from card suit image data; The extracted suit features are represented using digital codes, which represent the suit and value of the mahjong tiles; Match the numeric code with the numeric code in the suit sequence of the cards.
13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the program stored in the memory to implement the card arrangement method based on the mapping relationship between the suit sequence and the card position as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the card arrangement method based on the mapping relationship between suit sequence and card position as described in any one of claims 1-12.
15. A card sorting machine, characterized in that, The card sorting machine includes a card sorting method based on the mapping relationship between suit sequence and card position as described in any one of claims 1-12.
16. A card sorting machine according to claim 15, characterized in that, The card sorting machine is a mahjong machine, a domino machine, or a tile sorting machine.
