Game state control method, device, equipment and storage medium
By acquiring and analyzing the video stream in the game area, and automatically detecting the existence and status of the game identifier, the problem of game state switching relies on manual operation in the prior art is solved, and efficient and intelligent game state control is achieved.
Patent Information
- Application Number
- CN202180001754.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-06-14
- Filing Date
- 2021-06-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-06-28
AI Technical Summary
In the prior art, game state switching relies on manual operation, is inefficient, and it is difficult to realize intelligent game analysis and alarms.
By obtaining the video stream in the game area, detecting whether there is a game identifier in the placement area, and determining the status of the game identifier based on the video stream, automatically switching the game to the logo operation state.
Automatic detection and switching of game states is realized, labor costs are reduced, and the efficiency of game state switching is improved, which is conducive to ensuring the normal progress of intelligent game analysis.
Smart Images

Figure CN113329797B_ABST
Abstract
Description
[0001] Relevant publicly available cross-references
[0002] This invention is the national phase application of PCT application No. PCT / IB2021 / 055740 filed on June 28, 2021, which claims priority to Singapore Patent No. 10202106354X filed on June 14, 2021, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This invention relates to the field of computer vision technology, and in particular to a game state control method, apparatus, device, and storage medium. Background Technology
[0004] A complete game can often be divided into multiple different states. During gameplay, it's necessary to switch between these states based on the game's progress to monitor the game's progress for any anomalies, such as whether players are adhering to the rules. In intelligent game analytics scenarios, timely state switching is crucial for the real-time nature of game analysis results and the reliability of alerts and other actions based on those results. Summary of the Invention
[0005] This invention provides a game state control method, apparatus, device, and storage medium to address the deficiencies in related technologies.
[0006] According to a first aspect of the present invention, a game state control method is provided, comprising: in response to the game being in a preset item operation state, acquiring a video stream of a game area, the game area including a placement area for game markers; detecting the video stream to determine whether a game marker exists in the placement area; if a game marker exists in the placement area, determining the state of the game marker based on the video stream; and if the state of the game marker is a preset stable state, switching the game to a marker operation state.
[0007] In one embodiment, detecting the video stream to determine whether a game marker exists in the placement area includes: detecting a game marker in at least one frame of the video stream to obtain the confidence level of the game marker in the placement area; and determining that the game marker exists in the placement area if the confidence level of the game marker in the placement area is greater than a preset confidence threshold.
[0008] In one embodiment, determining the state of the game marker based on the video stream includes: acquiring detection results of game marker detection on multiple consecutive frames of images in the video stream, the detection results including the position of the game marker in each frame of the multiple consecutive frames; and determining the state of the game marker as a preset stable state when there is at least one first target image in the multiple consecutive frames; wherein, the first position of the game marker in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, each second position represents the position of the game marker in n preceding frames of the first target image, and each third position represents the position of the game marker in n subsequent frames of the first target image; n is a positive integer.
[0009] In one embodiment, the placement area includes at least two sub-placement areas; the step of detecting the video stream to determine whether a game icon exists in the placement area includes: detecting each sub-placement area of the placement area based on the video stream, and determining whether a game icon exists in each sub-placement area; if the game icon exists in any of the sub-placement areas, determining that the game icon exists in the placement area.
[0010] In one embodiment, determining the state of the game icon based on the video stream includes: detecting the object to be manipulated by the game icon based on the video stream; and determining the state of the game icon based on the detection result of the object to be manipulated.
[0011] In one embodiment, detecting the target of the game icon based on the video stream includes: determining that an image frame in the video stream in which the game icon is detected in the placement area is a second target image; and detecting the target of the icon in the preceding frame of the second target image.
[0012] In one embodiment, detecting the operation object of the marker in the preceding frame of the second target image includes: detecting the operation object of the placement area in the preceding frame of the second target image; and determining that the operation object of the game marker is detected in response to detecting the presence of the operation object in the placement area in the preceding frame of the second target image.
[0013] In one embodiment, determining the state of the game marker based on the detection result of the operation object includes: in response to detecting the presence of an operation object in the placement area in a preceding frame of the second target image, and not detecting an operation object in the second target image, determining the state of the game marker to be a preset stable state; or, in response to detecting the presence of an operation object in the placement area in a preceding frame of the second target image, and the distance between the operation object and the game marker in the second target image being greater than a second preset distance threshold, determining the state of the game marker to be a preset stable state.
[0014] In one embodiment, determining the state of the game identifier based on the detection result of the operation object includes: when an operation object is detected to exist for the game identifier, determining that the state of the game identifier is a preset stable state.
[0015] In one embodiment, determining the state of the game identifier based on the video stream further includes: in response to the absence of an operation object detected by the video stream for the game identifier, determining that the state of the game identifier is not a preset stable state.
[0016] In one embodiment, the prop operated in the prop operation state includes game coins; the game identifier includes playing cards.
[0017] According to a second aspect of the present invention, a game state control device is provided, comprising: an acquisition module, configured to acquire a video stream of a game area, the game area including a placement area for game markers, in response to the game being in a preset item operation state; a detection module, configured to detect the video stream and determine whether a game marker exists in the placement area; a state module, configured to determine the state of the game marker based on the video stream when the game marker exists in the placement area; and a switching module, configured to switch the game to a marker operation state when the state of the game marker is a preset stable state.
[0018] In one embodiment, the detection module is specifically configured to: perform game icon detection on at least one frame of the video stream to obtain the confidence level of the game icon in the placement area; and determine that the game icon exists in the placement area if the confidence level of the game icon in the placement area is greater than a preset confidence threshold.
[0019] In one embodiment, the state module is specifically used to: obtain the detection result of game icon detection for a series of consecutive frames in the video stream, the detection result including the position of the game icon in each frame of the series of consecutive frames; and determine that the state of the game icon is a preset stable state when there is at least one first target image in the series of consecutive frames; wherein, the first position of the game icon in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, each second position represents the position of the game icon in n preceding frames of the first target image, and each third position represents the position of the game icon in n subsequent frames of the first target image; n is a positive integer.
[0020] In one embodiment, the state module is specifically used to: detect the operation object of the game icon based on the video stream; and determine the state of the game icon based on the detection result of the operation object.
[0021] In one embodiment, when the state module is used to detect the operation object of the game icon based on the video stream, it is specifically used to: determine that the image frame in the video stream in which the game icon is detected in the placement area is the second target image; and detect the operation object of the icon in the preceding frame of the second target image.
[0022] In one embodiment, when the state module determines the state of the game marker based on the detection result of the operation object, it is specifically configured to: determine the state of the game marker as a preset stable state in response to the detection of an operation object in the placement area in a preceding frame of the second target image, and the absence of an operation object in the second target image; or, determine the state of the game marker as a preset stable state in response to the detection of an operation object in the placement area in a preceding frame of the second target image, and the distance between the operation object and the game marker in the second target image being greater than a second preset distance threshold.
[0023] In one embodiment, the state module is specifically used to: determine the state of the game icon as a preset stable state when an operation object of the game icon is detected.
[0024] According to a third aspect of the present invention, an electronic device is provided, the device including a memory and a processor, the memory being used to store computer instructions executable on the processor, and the processor being used to implement the method described in the first aspect when executing the computer instructions.
[0025] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0026] As can be seen from the above embodiments, when the game is in a preset item operation state, the video stream of the game area can be acquired and detected to determine whether there are game markers in the placement area of the game markers included in the game area. If game markers are present in the placement area, the state of the game markers is determined based on the video stream. Finally, if the state of the game markers is a preset stable state, the game is switched to the marker operation state. This game state control method, based on the video stream of the game area, can automatically detect whether the game area has game markers and the state of the game markers, and automatically switch the game to the marker operation state. This reduces labor costs, improves the efficiency of game state switching, and helps ensure the normal operation of intelligent game analysis.
[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0029] Figure 1 This is a flowchart illustrating a game state control method according to an embodiment of the present invention;
[0030] Figure 2 This is a schematic diagram of a desktop area shown in one embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of a desktop area shown in another embodiment of the present invention;
[0032] Figure 4 This is a schematic diagram of the structure of the game state control device shown in an embodiment of the present invention;
[0033] Figure 5 This is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention. Detailed Implementation
[0034] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0035] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0036] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0037] A complete game can often be divided into several different states, which need to be switched according to the game's progress. For example, a tabletop card game can usually be divided into states such as item operation state and marker operation state. Specifically, in the item operation state, the players can place items such as game coins in the item area. The type and quantity of items, as well as the sub-areas of the item area, can indicate the level of participation of the players. After all the players have completed their item operations, the dealer, who is responsible for dealing the cards, can deal the cards.
[0038] Currently, switching game states either requires specific actions from staff or the operation of designated buttons. Taking a tabletop card game as an example, if all players have completed their actions on items and the game needs to switch from item-operation to marker-operation state, the dealer, as one of the players, can perform a specific action that is recognized by the detection device, thus triggering the switch. Alternatively, the dealer can operate a physical or virtual button on the client to trigger the switch. Clearly, this method of game state control relies on manual operation, wastes manpower, and is inefficient.
[0039] Based on this, in a first aspect, at least one embodiment of the present invention provides a game state control method, please refer to the appendix. Figure 1 It illustrates the process of the method, including steps S101 to S103.
[0040] This method can be executed by electronic devices such as terminal devices or servers. Terminal devices can be user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistant (PDA) handheld devices, computing devices, in-vehicle devices, wearable devices, etc. This method can be implemented by a processor calling computer-readable instructions stored in memory. Alternatively, the method can be executed by a server, which can be a local server, a cloud server, etc.
[0041] In step S101, in response to the game being in a preset item operation state, a video stream of the game area is acquired, the game area including the placement area of game icons.
[0042] In this context, the item operation state refers to the state prior to the marker operation state. In the item operation state, game participants can place items within one or more sub-items of the item area, signifying their participation in the game. Information such as the quantity of items further indicates the level of participation. Once a game participant completes their item operation, the item operation state ends, and the game switches to the marker operation state. For example, in a tabletop card game, the table area is used for gameplay. A specific area of the tabletop can be defined as the item area, which can be divided into multiple sub-items, each labeled with a different level of participation. Items can be game coins, and game coins come in different denominations. Therefore, the denomination, quantity, and location (i.e., the sub-items) of the game coins placed by a game participant within the item area can represent different levels of participation. Game participants can place game coins according to their preference.
[0043] The game area is the area where players and other game participants (such as the game administrators) engage in the game, including the aforementioned item manipulation area and the game marker placement area. The game marker placement area is where game markers are placed, such as the dealing area in a tabletop card game. Using the tabletop card game example again, the game marker placement area is a separate, distinct section of the tabletop area from the item area. See the appendix for details. Figure 2 The desktop area shown is divided into two sections: area A is the area for placing game icons, and area B is the area for items.
[0044] The video stream of the game area includes video streams synchronously captured from multiple perspectives within the game area; the multiple perspectives include at least one side view and at least one top view; wherein the side view includes at least one left-side view and / or at least one right-side view. In one possible implementation, the video stream of the game area can be acquired using a pre-set video capture device. For example, a video capture device can be installed above the game area of a tabletop card game to acquire the video stream of the game area. It is understood that the methods for acquiring the video stream of the game area can include various implementations, and the above example is not a limitation on the acquisition method.
[0045] In step S102, the video stream is detected to determine whether there are game markers in the placement area.
[0046] The game identifiers include items used to determine the game outcome during the game. For example, playing cards used in a tabletop card game can serve as game identifiers in this embodiment. During a tabletop card game, the dealer, as the person being operated, needs to distribute the game identifiers, the "playing cards," to the designated area in the game area.
[0047] After acquiring the video stream of the game area, the video stream of the game area is detected to determine whether game markers exist in the placement area. The specific implementation can include various methods, and this embodiment is not limited to any one. In one possible implementation, a recognition network that can be pre-trained based on a learnable machine learning model or neural network model to identify game markers in the video stream can be used to detect game markers in the game area.
[0048] In some optional embodiments, detecting the video stream of the game area to determine whether a game marker exists in the placement area includes: detecting game markers in at least one frame of the video stream to obtain the confidence level of the game marker in the placement area; and determining that the game marker exists in the placement area if the confidence level of the game marker in the placement area is greater than a preset confidence threshold. Taking a tabletop card game as an example, first determine the confidence level of the cards in the placement area of the game area (i.e., the probability that the identified object is a card), then compare the confidence level of the cards with a confidence threshold. If it is greater than the confidence threshold, then determine that the identified object is a card, i.e., a card exists in the placement area. The confidence level represents the degree of credibility of the existence of a game marker and can be output by a trained neural network.
[0049] By comparing the confidence level of game markers with a confidence threshold to determine their presence, the detection accuracy of game markers can be improved in two ways: avoiding the detection of other items as game markers and avoiding missing game markers altogether. Furthermore, the confidence threshold can be preset and adjusted empirically to achieve a high level of accuracy in game marker detection.
[0050] In step S103, if a game icon exists in the placement area, the state of the game icon is determined based on the video stream.
[0051] The number of game markers within the game area is not limited. The presence of one game marker or multiple game markers simultaneously can be considered as the presence of game markers within the placement area, triggering the determination of the game marker's state. It is important to note that the game state control method provided in this embodiment aims to accurately switch game states. Theoretically, the game should switch to the marker operation state the instant a game marker appears within the game area. Therefore, the instant a game marker appears can be locked by improving the detection accuracy of the video stream, and the state of the game marker can be detected in a timely manner. Taking a tabletop card game as an example, when cards are present in the game area, the state of the cards is detected.
[0052] The state of game markers can be determined from multiple aspects, such as positional stability and the state of the manipulated object.
[0053] Regarding positional stability, it can be determined whether the position of the game marker is stable. If it is stable, it is suitable to switch the game to the marker operation state, meaning the game marker's state is a preset stable state. If it is unstable, it is not suitable to switch the game to the marker operation state, meaning the game marker's state is not a preset stable state. Taking a tabletop card game as an example, when the card's position in the placement area is stable, the card's state can be determined to be stable; conversely, when the card's position in the placement area is unstable, the card's state can be determined to be unstable.
[0054] Regarding the state of the manipulated object, the manipulated object of the game icon can be detected based on the video stream. If the manipulated object of the game icon is detected (within the game area), the game can be switched to the icon manipulation state, that is, the game icon is placed in the corresponding placement area by the manipulated object, and the state of the game icon can be determined to be a preset stable state. If the manipulated object of the game icon is not detected (within the game area), it is not suitable to switch the game to the icon manipulation state, that is, the state of the game icon is not a preset stable state.
[0055] Taking a tabletop card game as an example, when the dealer's hand is detected, the cards are determined to be in a preset stable state; when the dealer's hand is not detected, the cards are determined to be in a non-preset stable state. Detecting an operator indicates that the game icon is being manipulated by that operator according to the game rules. For example, detecting the dealer's hand indicates that the cards were dealt to the dealing area by the dealer. Therefore, the state of the game icon conforms to the game rules, eliminating the possibility of accidental operation or cheating. Thus, the state of the game icon determined in this way is relatively accurate and conforms to the game rules.
[0056] Based on the states determined in each of the above aspects, the state of the game icon can be determined. For example, the state of the game icon can be determined to be a preset stable state when the state determined in any one aspect is a preset stable state. As another example, the state of the game icon can be determined to be a preset stable state when the state determined in each aspect is a preset stable state.
[0057] In step S104, if the state of the game marker is a preset stable state, the game is switched to marker operation state.
[0058] Switching the game to the marker operation state when the game marker is in a preset stable state can reduce the chance of accidental switching when the game marker is unstable, and further improve the accuracy of game state control.
[0059] As can be seen from the above embodiments, when the game is in a preset item operation state, the video stream of the game area can be acquired and detected to determine whether there are game markers in the placement area of the game markers included in the game area. If game markers are present in the placement area, the state of the game markers is determined based on the video stream. Finally, if the state of the game markers is a preset stable state, the game is switched to the marker operation state. This game state control method, based on the video stream of the game area, can automatically detect whether the game area has game markers and the state of the game markers, and automatically switch the game to the marker operation state. This reduces labor costs, improves the efficiency of game state switching, and helps ensure the normal operation of game analysis or game supervision.
[0060] In some embodiments of the present invention, the placement area includes at least two sub-placement areas. These at least two sub-placement areas can correspond to multiple prop sub-areas. That is, a game player places a prop in a certain prop sub-area, and after placing game markers in different sub-placement areas, the game result is determined by combining the prop sub-area where the prop was placed and the game markers in different sub-placement areas. Taking a tabletop card game as an example, the cards in different sub-placement areas can determine the win or loss of the player corresponding to that sub-placement area, and thus the win or loss of the prop sub-area corresponding to that sub-placement area. See the appendix for details. Figure 3 The desktop area shown is divided into two parts: area A is the placement area, which includes sub-placement areas A1 and A2; and area B is the prop area, which includes sub-placement areas B1 and B2.
[0061] Based on the above-mentioned game area format, the video stream can be detected in the following manner to determine whether a game icon exists in the placement area: First, each sub-placement area of the placement area is detected based on the video stream to determine whether a game icon exists in each sub-placement area; Next, if the game icon exists in any of the sub-placement areas, it is determined that the game icon exists in the placement area.
[0062] The player can place game markers in various sub-placement areas according to the game rules. Therefore, if a game marker is present in any sub-placement area, it can be determined that a game marker is present in the placement area. Taking a tabletop card game as an example, the placement area includes two sub-placement areas. The dealer, acting as the player, deals cards to the two sub-placement areas alternately: first, one card is dealt to the first sub-placement area, then one card to the second sub-placement area, then one card to the first sub-placement area, and so on, until both sub-placement areas contain the number of cards required by the game rules. Therefore, when the first card appears in the first sub-placement area, it can be determined that a card is present in the placement area.
[0063] In this embodiment, for the common situation where the placement area has multiple sub-placement areas, each sub-placement area is detected separately to determine whether a game icon exists in each sub-placement area. When a game icon is present in any sub-placement area, it is determined that a game icon exists in the placement area. This increases the accuracy and timeliness of game icon detection and improves the accuracy of game state switching.
[0064] In some embodiments of the present invention, the positional stability of the state of a game marker can be determined as follows: First, the detection results of game marker detection on a series of consecutive frames in the video stream are obtained, the detection results including the position of the game marker in each frame of the series of consecutive frames; if there is at least one first target image in the series of consecutive frames, the state of the game marker is determined to be a preset stable state; wherein, the first position of the game marker in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, each second position represents the position of the game marker in n preceding frames of the first target image, and each third position represents the position of the game marker in n subsequent frames of the first target image; n is a positive integer.
[0065] The value of n and the first preset distance threshold can be pre-set. It's understood that a larger n results in more accurate detection, but also higher energy consumption and lower efficiency; conversely, a smaller n results in worse detection, but lower energy consumption and higher efficiency. Therefore, a balance can be found between accuracy, energy consumption, and efficiency to determine the value of n. By observing the positional changes of the game marker in different frame images, the positional stability of the game marker in each frame image can be determined, that is, the positional stability of the game marker in the placement area within the corresponding time period of each frame image. Only when the game marker is in a stable position within the placement area is it determined to be in a preset stable state, which greatly increases the accuracy of game marker detection.
[0066] In some embodiments of the present invention, the state of a game icon can be determined in the following manner: first, the object to be operated on by the game icon is detected based on the video stream; next, the state of the game icon is determined based on the detection result of the object to be operated on.
[0067] In this context, the operator is the person responsible for manipulating the game markers within the game, acting as the game's manager or controller to govern its progress. Therefore, the presence of game markers in the game area is contingent upon the operator's presence there. Taking a tabletop card game as an example, the dealer, acting as the operator, can retrieve cards from the dealer and distribute them to the designated area within the game area.
[0068] In one example, when detecting the target of the game icon based on the video stream, it can be first determined that the image frame in the video stream in which the game icon is detected in the placement area is the second target image; then the target of the icon is detected in the preceding frame of the second target image.
[0069] The number of preceding frames can be preset, for example, to 5 frames. If an object is detected in any of the preceding frames, it can be confirmed that an object has been detected. The operation sequence of the object on the game marker is: retrieve the game marker from its storage area, place it in the placement area of the game area, and then leave the placement area. Therefore, detecting the object in the preceding frames of the second target image is highly targeted in terms of timing, reducing the detection load, improving detection efficiency, and increasing the reliability of the game marker being in a preset stable state, thereby improving the accuracy of game state switching.
[0070] Furthermore, when detecting the operation object of the marker in the preceding frame of the second target image, the operation object of the placement area can also be detected in the preceding frame of the second target image; and in response to detecting the presence of an operation object in the placement area in the preceding frame of the second target image, it is determined that an operation object of the game marker has been detected. If an operation object is detected in the placement area in any frame of the preceding frame, it can be determined that an operation object is detected in the placement area of the preceding frame. Detecting operation objects in the placement area is highly targeted in terms of location, which can reduce the detection load, improve detection efficiency, and increase the reliability of the game marker being in a preset stable state, thereby improving the accuracy of game state switching.
[0071] In the above example, when detecting objects in a video stream, a recognition network can be pre-trained based on a learnable machine learning model or neural network model to identify objects in the video stream. When it is necessary to detect objects, the trained recognition network can be used to detect them in the video stream. When detecting images in the video stream (e.g., frames preceding the first target image), the trained recognition network can be used to detect each frame.
[0072] In addition, when identifying the object of operation, the system can identify the hand of the object. Based on the identification of the hand, it can further identify the direction of the hand. Only when the direction of the hand is the operation direction of the object can it be determined that an object of operation has appeared. The operation direction of the object of operation can be directly preset according to the positional relationship between the object of operation and the operation area, or it can be learned autonomously by the model during the training process.
[0073] Based on the various methods of detecting the operation object described above, the state of the game icon can be determined according to the detection result of the operation object in the following manner: in response to the detection of the operation object in the preceding frame of the second target image, and the absence of the operation object in the second target image, the state of the game icon is determined to be a preset stable state; or, in response to the detection of the operation object in the preceding frame of the second target image, and the distance between the operation object and the game icon in the second target image being greater than a second preset distance threshold, the state of the game icon is determined to be a preset stable state.
[0074] In this case, if an operation object is detected in the placement area in the preceding frame, and no operation object is detected in the second target image, or the distance between the operation object and the game marker in the second target image is greater than the second preset distance threshold, it can indicate that the operation object left after placing the game marker in the placement area. Using this method indicates that the game marker is in a stable state, which is in line with the game rules and the operation habits of the operation object. Therefore, the determined result is relatively accurate.
[0075] In this embodiment, the presence of an operation object in the placement area is determined by detecting the video stream. If an operation object is present in the placement area, the game marker is determined to be in a preset stable state. Based on detecting the presence of a game marker in the placement area, the detection of an operation object within the placement area is added. This ensures that the game marker was placed in the placement area by an operation object, thus guaranteeing the reliability of the stability judgment of the game marker, further improving the accuracy of game switching, and preventing cheating behaviors during gameplay.
[0076] According to a second aspect of the present invention, a game state control device is provided, please refer to the appendix. Figure 4The diagram shows the structure of the device, which includes: an acquisition module 401, used to acquire a video stream of a game area, including a placement area for game markers, in response to the game being in a preset item operation state; a detection module 402, used to detect the video stream and determine whether a game marker exists in the placement area; a status module 403, used to determine the status of the game marker based on the video stream when the game marker exists in the placement area; and a switching module 404, used to switch the game to a marker operation state when the status of the game marker is a preset stable state.
[0077] In some embodiments of the present invention, the detection module is specifically used to: detect game markers in at least one frame of the video stream to obtain the confidence level of the game markers in the placement area; and determine that the game markers exist in the placement area if the confidence level of the game markers in the placement area is greater than a preset confidence threshold.
[0078] In some embodiments of the present invention, the state module is specifically used for: acquiring detection results of game marker detection on a series of consecutive frames of images in the video stream, the detection results including the position of the game marker in each frame of the series of consecutive frames; and determining that the state of the game marker is a preset stable state when there is at least one first target image in the series of consecutive frames; wherein, the first position of the game marker in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, each second position represents the position of the game marker in n preceding frames of the first target image, and each third position represents the position of the game marker in n subsequent frames of the first target image; n is a positive integer.
[0079] In some embodiments of the present invention, the state module is specifically used for: detecting the operation object of the game icon based on the video stream; and determining the state of the game icon based on the detection result of the operation object.
[0080] In some embodiments of the present invention, when the state module is used to detect the operation object of the game icon based on the video stream, it is specifically used to: determine that the image frame in the video stream in which the game icon is detected in the placement area is the second target image; and detect the operation object of the icon in the preceding frame of the second target image.
[0081] In some embodiments of the present invention, when the state module is used to determine the state of the game icon based on the detection result of the operation object, it is specifically used to: in response to the detection of the operation object in the preceding frame of the second target image, and the absence of the operation object in the second target image, determine the state of the game icon as a preset stable state; or, in response to the detection of the operation object in the preceding frame of the second target image, and the distance between the operation object and the game icon in the second target image being greater than a second preset distance threshold, determine the state of the game icon as a preset stable state.
[0082] In some embodiments of the present invention, the state module is specifically used to: determine the state of the game icon as a preset stable state when an operation object of the game icon is detected.
[0083] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the method in the first aspect, and will not be elaborated upon here.
[0084] Thirdly, at least one embodiment of the present invention provides an electronic device, please refer to the appendix. Figure 5 The diagram illustrates the structure of the device, which includes a memory and a processor. The memory stores computer instructions that can run on the processor, and the processor controls the game state based on the method described in any of the first aspects when executing the computer instructions.
[0085] Fourthly, at least one embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the first aspects.
[0086] In this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.
[0087] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not invented herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
Claims
1. A game state control method, characterized in that: include: In response to the game being in a preset prop operation state, obtaining a video stream of a game area, wherein the game area includes a placement area for a game marker; Detecting the video stream to determine whether there is a game marker in the placement area; In the case where a game marker exists in the placement area, determining a state of the game marker based on the video stream; When the state of the game marker is a preset stable state, the game is switched to a marker operation state.
2. The game state control method according to claim 1, characterized in that: The detecting the video stream to determine whether there is a game marker in the placement area includes: Performing game marker detection on at least one frame of image in the video stream to obtain the confidence level of the game marker in the placement area; When the confidence level of the game marker in the placement area is greater than a preset confidence level threshold, it is determined that the game marker is present in the placement area.
3. The game state control method according to claim 1 or 2, characterized in that: The determining the state of the game identifier based on the video stream comprises: Acquire a detection result of detecting a game marker on a plurality of consecutive frames of images in the video stream, wherein the detection result includes a position of the game marker in each frame of the plurality of consecutive frames of images; In the case where there is at least one frame of the first target image in the continuous multiple frames of images, determining that the state of the game marker is a preset stable state; The first position of the game marker in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, Each of the second positions represents a position of the game marker in n preceding frames of the first target image, Each of the third positions represents a position of the game marker in n subsequent frames of the first target image; n is a positive integer.
4. The game state control method according to any one of claims 1 to 3, characterized in that: The placement area includes at least two sub-placement areas, and the detecting the video stream to determine whether there is a game identifier in the placement area includes: Detecting each sub-placement area of the placement area based on the video stream, and determining whether there is a game marker in each sub-placement area; When the game marker exists in any one of the sub-placement areas, it is determined that the game marker exists in the placement area.
5. The game state control method according to any one of claims 1 to 4, characterized in that: The determining the state of the game identifier based on the video stream comprises: Detecting an operation object of the game identifier based on the video stream; The state of the game marker is determined based on the detection result of the operation object.
6. The game state control method according to claim 5, characterized in that: The detecting the operation object of the game identifier based on the video stream includes: Determine that an image frame in the video stream in which a game marker is detected in the placement area is a second target image; An operation object of the marker is detected in a preceding frame of the second target image.
7. The game state control method according to claim 6, characterized in that: The step of detecting the operation object of the marker in the preceding frame of the second target image includes: Detecting the operation object of the placement area in a preceding frame of the second target image; In response to detecting the presence of an operation object in the placement area in a preceding frame of the second target image, it is determined that the presence of the operation object of the game marker is detected.
8. The game state control method according to claim 6, characterized in that: The determining the state of the game identifier based on the detection result of the operation object includes: In response to detecting that an operating object exists in the placement area in a preceding frame of the second target image, and no operating object is detected in the second target image, determining that the state of the game marker is a preset stable state; or In response to detecting the presence of an operating object in the placement area in a preceding frame of the second target image, and the distance between the operating object and the game marker in the second target image is greater than a second preset distance threshold, the state of the game marker is determined to be a preset stable state.
9. The game state control method according to any one of claims 5 to 7, characterized in that: The determining the state of the game identifier based on the detection result of the operation object includes: In the case where the existence of the operation object of the game marker is detected, the state of the game marker is determined to be a preset stable state.
10. The game state control method according to any one of claims 5 to 9, characterized in that: The determining the state of the game identifier based on the video stream further includes: In response to not detecting an operation object of the game marker based on the video stream, it is determined that the state of the game marker is not a preset stable state.
11. The game state control method according to any one of claims 1 to 10, characterized in that: The props operated in the prop operation state include game coins; and the game identifiers include playing cards.
12. A game state control device, characterized in that: include: An acquisition module, configured to acquire a video stream of a game area in response to the game being in a preset prop operation state, wherein the game area includes a placement area for a game marker; A detection module, used to detect the video stream to determine whether there is a game marker in the placement area; A state module, configured to determine a state of the game marker based on the video stream when the game marker exists in the placement area; The switching module is used to switch the game to a marker operation state when the state of the game marker is a preset stable state.
13. The game state control device according to claim 12, characterized in that: The detection module is specifically used for: Performing game marker detection on at least one frame of image in the video stream to obtain the confidence level of the game marker in the placement area; When the confidence level of the game marker in the placement area is greater than a preset confidence level threshold, it is determined that the game marker is present in the placement area.
14. The game state control device according to claim 12 or 13, characterized in that: The state module is specifically used for: Acquire a detection result of detecting a game marker on a plurality of consecutive frames of images in the video stream, wherein the detection result includes a position of the game marker in each frame of the plurality of consecutive frames of images; In the case where there is at least one frame of the first target image in the continuous multiple frames of images, determining that the state of the game marker is a preset stable state; The first position of the game marker in the first target image is within the placement area, and the distance between the first position and each second position is less than a first preset distance threshold, or the distance between the first position and each third position is less than a first preset distance threshold, Each of the second positions represents a position of the game marker in n preceding frames of the first target image, Each of the third positions represents a position of the game marker in n subsequent frames of the first target image; n is a positive integer.
15. The game state control device according to any one of claims 12 to 14, characterized in that: The state module is specifically used for: Detecting an operation object of the game identifier based on the video stream; The state of the game marker is determined based on the detection result of the operation object.
16. The game state control device according to claim 15, characterized in that: When the state module is used to detect the operation object of the game identifier based on the video stream, it is specifically used to: Determine that an image frame in the video stream in which a game marker is detected in the placement area is a second target image; An operation object of the marker is detected in a preceding frame of the second target image.
17. The game state control device according to claim 16, characterized in that: When the state module is used to determine the state of the game identifier based on the detection result of the operation object, it is specifically used to: In response to detecting that an operating object exists in the placement area in a preceding frame of the second target image, and that no operating object is detected in the second target image, determining that the state of the game marker is a preset stable state; or In response to detecting the presence of an operating object in the placement area in a preceding frame of the second target image, and the distance between the operating object and the game marker in the second target image is greater than a second preset distance threshold, the state of the game marker is determined to be a preset stable state.
18. The game state control device according to any one of claims 15 to 17, characterized in that: The state module is specifically used for: In the case where the existence of the operation object of the game marker is detected, the state of the game marker is determined to be a preset stable state.
19. An electronic device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the method according to any one of claims 1 to 11 when executing the computer instructions.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
System and method for automated table game activity recognition
US20200034629A1