{'fraction_non_alphanumeric': 0.0311705324805425, 'fraction_numerical': 0.010248901903367497, 'mean_word_length': 4.466512215669756, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structural analysis of traditional Chinese blocked-keyhole padlocks

. The use of locks has a history of thousands of years. Barbed-spring padlocks are the typical locks used in ancient China and can be divided into three main types, namely open-keyhole, hidden-keyhole, and blocked-keyhole padlocks. Since the mechanical structures of padlocks differ in terms of the opening process, they are reconﬁgurable mechanisms. With the combinations and changes of springs, keys, and keyholes, the padlocks have a variety of different unlocking methods which provide higher security. This work uses variable chains to analyze the structures of the blocked-keyhole padlocks. The representations of joints and chains are presented ﬁrst. The structures and characteristics of representative barbed-spring padlocks are introduced. Six examples are provided to demonstrate the opening processes of blocked-keyhole padlocks. The result shows that it is a useful tool to realize the structural difference in the padlocks during operation.


Introduction
Human beings have been using locks for thousands of years. The lock was developed as a mechanical device derived from people's pursuit of a sense of security, and is widely used to safeguard people's security and privacy. In ancient China, there were many locking inventions with various derivatives, mainly including fixed locks and padlocks. Fixed locks were wooden locks, mainly used to lock doors. Padlocks were the most expressive, and usually had long straight shackles to pass through the two rings affixed to doors or boxes to prevent them from being opened. Since they were convenient to use and easy to carry, padlocks were the most common type of locks in ancient China.
With the locksmith's mastery of design and manufacturing technology, many different types of puzzle padlocks, which needed to be unlocked using specific steps and methods, were gradually used and widely developed. Even with the correct key, puzzle padlocks were still difficult to open, which often made those who had to unlock them feel annoyed and worried that they would be unable to unlock them. In addition to greatly improving the protection function and security, puzzle padlocks with special unlocking methods became a game device for the literati and nobles to play with and exchange ideas, as well as a kind of educational toy to show off and display at that time.
In ancient China, puzzle padlocks displayed the richness of the craftsmanship of ancient craftspeople and could reflect the living needs of society at that time. Therefore, puzzle padlocks are the treasures of folk culture. While there were very few records of locks in ancient Chinese books, in modern times, a few scholars and research institutions began to study locks. Liger (1875) analyzed many unearthed ancient locks and sorted the various forms of barbed-spring locks. Pitt-Rivers (1883) collected a large number of ancient locks from China and the West, and analyzed and discussed their forms, exchanges, and evolution. Hommel (1937) introduced several kinds of ancient Chinese wooden locks and contrasted them with those used in rural areas of Europe. Needham (1965) concisely discussed the development of locks in China and the West, considered their mutual influences, described the mechanism structures of some representative locks, lamented the lack of records of the development of locks in China, and mentioned that it would be unforgivable to neglect the achievements of locksmiths throughout history. Wagner (1996) sorted out relevant archeological documents and found that the earliest unearthed complete barbed-spring lock came from the relics of the Mausoleum of the First Qin Emperor, which could be traced back to the third century BC. Yan (1998aYan ( , 2015 began to collect and study ancient Chinese locks in 1990, and has systematically introduced the development and characteristics of such locks, including the historical developments, etymology, types, and appearance of ancient locks, the carved patterns and materials of ancient locks, and the configurations, keys, keyholes, and unlocking methods. Yan and Huang (2004) put forward a set of lock design methods with the most expressive padlocks from ancient China as the theme. Zhou et al. (2014) took their respective collections of ancient locks as examples, introduced the historical evolution of barbed-spring locks, and analyzed the characteristics of the locks. Shi et al. (2017) analyzed the structure of the available traditional maze locks and discovered that the operation of inserting the key head into the keyhole can be considered as matching two members with one joint. Hsiao (2017Hsiao ( , 2018 collected and discussed the types of open-keyhole and hidden-keyhole puzzle padlocks in ancient China, and systematically analyzed the mechanical structures. Hsiao et al. (2019) presented the historical development of traditional locks and analyzed the structures of the typical Shanxi locks. Shi et al. (2020) collected and sorted out ancient Chinese wooden locks, discussed the characteristics and structure of wooden locks, and put forward 10 types of ancient wooden locks. Zhang and Hsiao (2020) put forward the manufacturing methods of Chinese traditional locks based on the findings of field research, and classified the traditional locks from the Yuekou area. Rasmussen et al. (2021) conducted field research to introduce the historical developments of traditional Chinese locks, the stories of Chinese locksmiths, types of locks, and places of making locks, which are important reference materials for studying locks in China.
Based on the form of the keyhole, Chinese traditional padlocks can be divided into three types: open-keyhole, hiddenkeyhole, and blocked-keyhole padlocks. However, the research on blocked-keyhole padlocks is still quite lacking. This paper focuses on the structural analysis of blockedkeyhole padlocks. First, the characteristics and basic types of open-keyhole and hidden-keyhole padlocks are introduced. Then, the variable chains are used to demonstrate the structural changes when they are unlocked. Six blocked-keyhole padlocks are provided as examples to show the process.

Representations of structures
From the viewpoint of mechanical structure, locks are made up of members and joints in a specific way, and have the functions of unlocking and locking by the ingenious design of size. In order to clearly show the connection between members and joints, and the structural changes in the unlocking process, analysis can be conducted with chains (Yan, 1992(Yan, , 1998b. When expressed by chains, members can be divided into single members, binary members, ternary members, and quaternary members according to the number of joints, while joints can be expressed as circles, as shown in Fig. 1 (Kuo, 2008;Yan and Kuo, 2006). Furthermore, in order to identify the types of joints, a symbol can be added into the circle. For example, the symbol P + x describes that the relative motion between two members is translation along the direction of the positive x axis. The symbol R − y describes that the relative motion between two members is rotation about the direction of the negative y axis. If the subscripts + and − do not affect the unlocking process, it can be ignored. The positive x axis can be defined as the direction in which the bolt moves out. And the positive y axis is defined as the vertical upward direction of the case (Hsiao, 2017). Figure 2a shows an ordinary barbed-spring padlock, which consists of four members, the case (1), the bolt (2), four springs of the same length (3), and the key (4). The case has a keyhole for the key to be inserted and guides the bolt to move. The bolt is composed of three parts, the shackle, stem, and end piece, which have no motion relative to each other and can be regarded as the same member. The upper part of the end piece is connected with the shackle, and the lower part is the stem. Since the four springs are of identical size, they can be regarded as the same member. One end of the four springs is riveted to the stem, and the springs rotate around the stem in the direction of the y axis, which can be regarded as a spring joint and is expressed by the symbol SR y , while the other end is against the inner wall inside the case; thus, the bolt cannot move out of the case to achieve the fastening function. The key head is devised according to the shape and position of the keyhole and the size of the spring, and usually has a protruding key pin that presses the spring.
When being locked, the spring on the stem is opened due to the elastic force, and is jammed on the inner wall. When being unlocked, since the key cannot be directly inserted into the keyhole in the direction of the positive x axis, it is necessary to insert the key pin upward and rotate the key in the direction of the negative z axis into the keyhole, which can be expressed by the symbol R−z, and then move in the direction of the positive x axis, which can be expressed by the symbol P + x, as shown in Fig. 2b1. At this moment, the case (1), bolt (2), and spring (3) have no motion relative to each other and can be regarded as the same member. It means that the case, bolt, and spring are temporarily immovable and described as 1(2, 3). Therefore, the process of inserting the key into the keyhole can be regarded as two members and one joint,   Fig. 2c1. Then, by moving the key, the key pin simultaneously presses four springs ( Fig. 2b2), where the key is connected to the case and the spring by prismatic joints (P +x ). The spring is connected to the bolt and the case by the spring joint (SR y ) and prismatic joint (P z ), respectively. The bolt is in direct contact with the case and is fixed; it can be regarded as having a direct contact joint, as expressed by the symbol DC. The corresponding variable chain is shown in Fig. 2c2. When all springs are no longer against the inner wall of the case (Fig. 2b3), the bolt can be moved out of the case in the direction of the positive x axis (Fig. 2b4), and the lock is unlocked. Meanwhile, as the key, bolt, and spring have no motion relative to each other, they can be regarded as the same member and described as 4(2, 3), which is connected with the case (1) by a prismatic joint. The variable chain is shown in Fig. 2c3.

Types and characteristics of barbed-spring padlocks
There were various barbed-spring padlocks with puzzles in ancient China, which all featured ingenuity and creativity, and fully demonstrated the extraordinary craftsmanship of the craftspeople. The open-keyhole padlock is a commonly used type where the keyhole can be seen directly on the case. However, it is still not easily unlocked with the correct key. According to different design methods, open-keyhole padlocks can be divided into three subtypes: the padlock with an extra obstacle, the multi-section padlock, and the padlock without direct insertion of the key. The padlock with an extra obstacle is based on the basic structure of an ordinary lock, and the difficulty of unlocking is generally improved by adding a movable plate or button as an obstacle. Even with the correct key, the lock cannot be unlocked before removing the obstacle. The springs were generally designed to be as long as each other, and after the key was inserted, the key head pressed all the springs, which allowed the bolt to be moved out of the case to complete the unlocking, as shown in Fig. 2a. However, for multi-section padlocks, the springs were usually varied length, which made the process of pressing the springs more complicated and improved the security of the locks. Regarding a padlock in which the key is not directly inserted, it takes more patience to insert the key head into the keyhole. Usually, the key can be inserted only by contacting a specific part of the key head with a specific position and moving in a specific way. With such a design, even if the correct key is held in hand and the position of the keyhole is seen, it is still difficult to insert the key into the keyhole. As shown in Fig. 3, the key must move along the positive x axis and the negative z axis, and rotate in the negative y axis before being inserted into the keyhole. Then, the key is moved along the positive x axis, the spring is pressed, and unlocking is completed. The hidden-keyhole padlock ingeniously hides the keyhole with different designs, such as movable plates, turntables, and springs. In the unlocking process, the position of the keyhole must be determined first, so that the key can be inserted. For such special designs, how to identify the position of the keyhole is a challenge. Meanwhile, even if the key can be inserted into the keyhole, it is necessary to know how to move or rotate it before the lock can be unlocked. In addition, adding decorative buttons or ornaments to the case can enhance the value of the padlock; such features also provide the first clue for unlocking, which was familiar in ancient Chinese padlocks, and many different types were designed accordingly. In line with the movement mode of the members in the first step of unlocking, hidden-keyhole padlocks can be mainly divided into padlocks with a movable plate, padlocks with a pushing button, padlocks with a poking hole, and padlocks with a rotatable ornament. Figure 4 shows a padlock with a pushing button that is provided as an example to present the characteristics of the hidden-keyhole padlock. The pushing button is on the end face and is connected with spring 1. There are four springs with different lengths. This padlock adds different puzzle modes to improve the difficulty of unlocking and consists of 11 members: the case (1), the bolt (2), the bottom plate (3), the end plate (4), the button with spring 1 (5), spring 2 (6), spring 3 (7), spring 4 (8), key 1 (9), key 2 (10), and key 3 (11). Since spring 1 is against the inner wall inside the case, the bolt cannot move out of the case to perform the fastening function. Furthermore, the end plate is passed through by the shackle and cannot be rotated, so the keyholes are cleverly hidden. When being unlocked, the first step is to push the button on the end face up to separate connected spring 1 from the inner wall and slide part of the bolt. Then, insert key 1 into keyhole a on the top side of the case, and press spring 2 to separate it from the inner wall to slide part of the bolt again. The shackle has been slid a bit and does not pass through the end plate. Then, rotate the end plate and move the bottom plate to reveal the other two keyholes. Finally, insert key 2 and key 3 in sequence into keyhole b and keyhole c, respectively, and press spring 3 and spring 4 to complete the unlocking.

Blocked-keyhole padlocks
In addition to the two types of open-keyhole and hiddenkeyhole padlocks, another type of lock in ancient China was called the blocked-keyhole padlock, which has a visible keyhole, but the keyhole is blocked by the internal member of the lock, meaning the key could not be inserted normally. When being unlocked, the key can be inserted only after the member blocking the keyhole is removed. According to the characteristics of unlocking, such locks can be divided into padlocks with poking holes and padlocks with pressing shackles, which are described as follows. Figure 5a shows an iron padlock of about 18 cm in length, which is large and heavy, and was commonly used for storehouses or courtyard doors. There is a small keyhole a on the top side of the case, five thick iron pieces pressed together with curled ends on one end of the bolt, and the length of the stem at the other end exceeds the keyhole on the case to block keyhole b. The members include the case (1), the bolt (2), the long spring (3), the short spring (4), key 1 (5), and key 2 (6). When being unlocked, step 1 is to align the tip of key 1 with keyhole a and insert it along the negative y axis, as shown in Fig. 5b1. In this step, the bolt and the short spring have no relative motion and can be considered as the same member. Key 1 is connected with the case, and the long spring by the prismatic joint (P −y ) and the direct contact joint (DC), respectively. The long spring is connected with the case and the bolt by the prismatic joint (P y ) and the spring joint (SP z ), respectively. The bolt is connected with the case by the direct contact joint (DC). Figure 5c1 shows the corresponding variable chain that consists of four members and five joints. When the long spring leaves the inner wall of the case, step 2 removes part of the bolt in the direction of the positive x axis until the short spring contacts the inner wall and stops the bolt from moving, as shown in Fig. 5b2. In this step, the bolt, the long spring, and the short spring have the same relative motion and are connected with the case by a prismatic joint (P +x ). Figure 5c2 shows the corresponding variable chain that consists of two members and one joint. Due to the removal of part of the bolt, keyhole b, which is blocked by the stem, will be unblocked. In step 3, key 2 is inserted into keyhole b, as shown in Fig. 5b3. In this step, the case, the bolt, the long spring, and the short spring are temporarily immovable and can be considered as the same member. Key 2 is connected with the case by a revolute joint (R −z ) and a prismatic joint (P +x ). Figure 5c3 shows the corresponding variable chain. Then, key 2 presses the short spring, as shown in Fig. 5b4. In this step, the bolt and the long spring have no relative motion and can be considered as the same member. Key 2 is connected with the case and the short spring by the prismatic joints (P +x ). The short spring is connected with the case, and the bolt by the prismatic joint (P z ) and the spring joint (SP y ), respectively. The bolt is connected with the case by the direct contact joint (DC). Figure 5c4 shows the corresponding variable chain. Finally, with the movement of key 2, push the bolt, the long spring, and the short spring out of the case to complete the unlocking, as shown in Fig. 5b5. Key 2, the bolt, the long spring, and the short spring have the same relative motion and can be considered as the same member. It is connected with the case by a prismatic joint (P +x ). The corresponding variable chain is shown in Fig. 5c5. Figure 6a shows a copper padlock with delicate artisanship and elegant shape; a poking hole a and its shackle are affixed on the case. While this padlock also uses an extended stem to  block keyhole b at the end side of the case, the difference is that keyhole a is located at the bottom, and the long spring, the stem, and the short spring are respectively designed with a small hole in the same position, and there are five members: the case (1), the bolt (2), the long spring (3), the short spring (4), and the key (5). When being unlocked, step 1 is to insert the key into keyhole a to press the long spring to remove part of the bolt, as shown in Fig. 6b1. However, even with the removal of part of the bolt, keyhole b is not unblocked, meaning it is still blocked by the stem; thus, the key cannot be inserted, as shown in Fig. 6b2. Step 3 is to insert the key into keyhole a again; the key passes through the holes on the long spring, the stem, and the short spring, as shown in Fig. 6b3. Then, the key pin presses the short spring to leave the inner wall, as shown in Fig. 6b4. Finally, the key is pulled out and the entire bolt is removed to complete the unlocking. Figure 6c shows the expression of its variable chains. While the mechanical structure of this lock is not particularly complicated, the unlocking method is quite ingenious and interesting. As ordinary people would not think to use the same key, inserted into the same keyhole twice in succession to unlock it, this is a good lock with a simple but effective design. Figure 7a shows another copper padlock with a poking hole, which also has an exquisite appearance, and people will easily believe that its mechanism is the same as that shown in Fig. 6. However, while they look similar in appearance, they have different internal structures. There are six members to this padlock: the case (1), the bolt (2), the long spring (3), the short spring (4), key 1 (5), and key 2 (6). There is a hole in the same position of the long spring and the stem and the length of the stem is shortened. When being unlocked, insert key 1 into keyhole a, so that key 1 can pass through the small holes of the stem and the long spring. The corresponding variable chain is shown in Fig. 7b1. Then, pull key 1 down to press the long spring (Fig. 7b2) to remove part of the bolt (Fig. 7b3), and remove key 1 (Fig. 7b4). As keyhole b is no longer blocked by the stem after removing part of the bolt, key 2 can be inserted into keyhole b (Fig. 7b5) to press the short spring (Fig. 7b6), which removes the entire bolt ( Fig. 7b7) to complete the unlocking. Figure 8a shows an iron padlock with a disk-shaped case. The most special feature of this lock is that the bolt and the shackle are two separate members. The bolt has three long, middle, and short stems, and corresponding long, middle, and short springs. The keyhole is blocked by the middle stem. The members include the case (1), the bolt (2), the shackle (3), the long spring (4), the middle spring (5), the short spring (6), and the key (7) (Hsiao et al., 2019). When locked, the short spring is against the inner wall of the case, thus affixing the bolt. The whole lock has no other unlocking clue except that the shackle can be moved. When being unlocked, the shackle must be rotated in the direction of the positive z axis to press the short spring in step 1. The shackle is connected to the case and the short spring by the revo-  lute joint (R +z ) and direct contact joint (DC), respectively, while the short spring is connected to the case and the bolt by the prismatic joint (P y ) and the spring joint (SR z ), respectively.

Padlocks with pressing shackle
Step 2 is to remove part of the bolt along the positive x axis until the middle spring touches the inner wall to stop the movement of the bolt.
Step 3 is to rotate the shackle in the direction of the negative z axis to press the middle spring.
Step 4 is to remove part of the bolt along the positive x axis until the long spring touches the inner wall, at which time the keyhole is unblocked.
Step 5 is to insert the key into the keyhole. Then, move the key along the positive x axis to press the long spring to remove the entire bolt. Finally, the shackle is removed to complete the unlocking. Figure 8b and c show the corresponding simulation and the variable chains, respectively.
The above-mentioned padlock with a pressing shackle has three stems and three springs of different lengths, and the structure and unlocking process is relatively complex. Figure 9a shows a simplified design of two stems and two springs, and the unlocking process is similar, except that the step of pressing the spring with the shackle is reduced once. Figure 9b shows the unlocking process by variable chains. Figure 10a shows a more simplified design, which has two springs, but no key or keyhole. The left and right springs are directly pressed by the shackle to remove the bolt, and then remove the shackle to complete the unlocking. Figure 10b shows the unlocking process with variable chains. These types of locks, meaning those that can be unlocked without a key, are also called keyless locks.

Conclusions
According to the differences in types of keyholes, traditional Chinese padlocks can be divided into three types: open- keyhole, hidden-keyhole, and blocked-keyhole padlocks. As the mechanical structure changes during the unlocking process, they are within the range of reconfiguration mechanisms. Among them, blocked-keyhole padlocks mainly extend the length of the stem (bolt) to block the keyhole, meaning the key cannot be directly inserted. According to the results of the study, they can be divided into two subtypes: padlocks with a poking hole and padlocks with a pressing shackle. The numbers of members of padlocks with a poking hole are generally less than six and there are many variations. For the padlocks with a pressing shackle, it is a clever and interesting way to unblock the keyhole. And, the numbers of members are changed based on the numbers of springs. This paper presents the typical traditional Chinese padlocks and uses the variable chains to analyze the structures of the blocked-keyhole padlocks in the unlocking process. Six padlocks are provided as examples. Since the variable chains can show the structural changes step by step during operation, it is an effective tool to analyze changeable mechanical structures. By observing the variable chains, the topological variation of blocked-keyhole padlocks can be presented directly. This work is the first to study the structures and the types of traditional Chinese blocked-keyhole padlocks systematically. It provides a widespread interpretation of the characteristics of the barbed-spring padlocks for readers to realize the design principles and hopefully inspire the development of more secure mechanical locks.
Code and data availability. All software code and data included in this study are available upon request to the corresponding author.
Author contributions. The authors' contributions are as follows: YZ was the lead author and provided the material of the traditional locks. HTW directed the analysis of the model represented in the paper. JLL structured the paper. CFH provided reviews of the paper. KHH made contributions to presentation approaches for the mechanisms.
Competing interests. The contact author has declared that none of the authors has any competing interests.
Disclaimer. Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.