Light effect control method, device, product, medium and light effect control apparatus
By performing target detection on the game screen to determine the event and team categories, lighting effect control commands are generated to control lighting equipment, solving the problem of the single nature of traditional lighting effect control methods and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN QIANYAN TECH LTD
- Filing Date
- 2022-11-30
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional lighting control methods are limited in form and cannot be adapted to the content displayed on the screen, thus failing to enrich the user experience.
By performing target detection on the game screen, the event objects and their event categories, player objects and their team categories are determined. The intensity of lighting effect control is determined based on the number of player objects corresponding to the event category and team category, and corresponding lighting effect control commands are generated to control the lighting equipment to present diverse lighting effects.
It enables diverse lighting effects control based on the game screen content, enhancing the user's immersive visual experience.
Smart Images

Figure CN115884472B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting equipment control technology, specifically to a lighting effect control method, a lighting effect control device, a computer program product, a computer-readable storage medium, and a lighting effect control equipment. Background Technology
[0002] As people's living standards improve, they have higher demands for material life, leading to the rapid development of smart homes and the increasing number of people using them. As an important component of smart homes, lighting equipment is no longer simply a matter of providing illumination.
[0003] Traditional technology involves detecting the color of the displayed image at the edges of the display device in real time and driving the lighting equipment to emit the same color, creating a lighting effect that extends the color of the displayed image beyond the display device, resulting in a wider visual effect. However, this method of lighting control is simplistic and lacks the ability to adapt the lighting effect to the content displayed on the screen, thus failing to enrich the user experience. Summary of the Invention
[0004] The primary objective of this invention is to solve at least one of the above-mentioned problems by providing a lighting effect control method, apparatus, product, medium, and lighting effect control equipment.
[0005] To achieve the various objectives of this invention, the following technical solution is adopted:
[0006] To achieve one of the objectives of this invention, a lighting effect control method is provided, comprising the following steps:
[0007] Capture the screen of the game currently playing;
[0008] Perform target detection on the game screen to determine event objects and their event categories, player objects and their team categories;
[0009] The lighting effect type is determined based on the event category, the lighting effect control intensity is determined based on the number of player objects corresponding to each team category, and corresponding lighting effect control instructions are generated according to the lighting effect type and lighting effect control intensity.
[0010] Send the lighting effect control command to the lighting equipment to display the corresponding lighting effect.
[0011] Furthermore, target detection is performed on the game screen to determine event objects and their event categories, player objects and their team categories, including the following steps:
[0012] A preset target detection model is used to perform target detection on multiple game screens that are sequentially connected, and to predict the event objects and their event categories, player objects and their team categories corresponding to each game screen;
[0013] Determine whether the predicted event categories for multiple consecutive game screens are consistent. If they are consistent, confirm the event object and event category of the corresponding game screen.
[0014] After confirming the event category of the current game screen, obtain the predicted player objects and their team categories corresponding to multiple consecutive game screens before the current game screen within a preset time period;
[0015] The number of player objects included in each predicted team category corresponding to each game screen is counted, and the average value is calculated. The corresponding team category and player objects are then determined based on the average value.
[0016] Furthermore, the intensity of the lighting effect control is determined based on the number of player objects corresponding to each team category, including the following steps:
[0017] Determine the total number of all player objects based on the number of player objects contained in each team category;
[0018] Based on the total number of player objects, determine the number range to which it belongs;
[0019] The corresponding lighting effect control intensity is determined based on the gradient corresponding to the number of people.
[0020] Furthermore, after determining the player range to which a player belongs based on the total number of players, the following steps are included:
[0021] Calculate the difference in the number of player objects between team categories based on the number of player objects contained in each team category, and determine whether the difference is greater than a preset threshold.
[0022] When the difference is not greater than a preset threshold, the corresponding lighting effect control intensity is determined according to the first preset rule;
[0023] When the difference is greater than a preset threshold, it is determined whether the team category to which the event object belongs is the team category with the fewest player objects among all team categories;
[0024] When it falls under the category, the corresponding lighting effect control intensity is determined according to the second or third preset rule.
[0025] Furthermore, the first preset rule is to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of people interval, the second preset rule is to determine the corresponding lighting effect control intensity based on the preset maximum gradient, and the third rule is to determine the corresponding lighting effect control intensity based on the gradient to which the difference belongs.
[0026] Furthermore, the intensity of the lighting effect control includes any one or more of the following: lighting effect brightness, lighting effect display speed, and lighting effect color change gradient.
[0027] Furthermore, a preset target detection model is used to perform target detection on multiple sequentially occurring game frames, predicting the corresponding event objects and their event categories, player objects and their team categories for each game frame, including the following steps:
[0028] Multiple game screens are invoked sequentially;
[0029] Multiple threads are enabled to run different instances of the object detection model. In each thread, the corresponding instance is used to perform object detection for a corresponding game screen, predicting the event object and its event category, player object and its team category corresponding to the game screen.
[0030] To meet one of the objectives of this invention, a lighting effect control device is provided, comprising:
[0031] The data acquisition module is used to capture the game screen that is currently playing.
[0032] The target detection module is used to perform target detection on the game screen to determine event objects and their event categories, player objects and their team categories;
[0033] The instruction generation module is used to determine the lighting effect type based on the event category, determine the lighting effect control intensity based on the number of player objects corresponding to each team category, and generate corresponding lighting effect control instructions according to the lighting effect type and lighting effect control intensity.
[0034] The lighting effect control module is used to send the lighting effect control commands to the lighting equipment to display the corresponding lighting effects.
[0035] Furthermore, the target detection module includes:
[0036] The model detection submodule is used to perform target detection on multiple game screens that are sequentially connected using a preset target detection model, and to predict the event objects and their event categories, player objects and their team categories corresponding to each game screen.
[0037] The event judgment submodule is used to determine whether the predicted event categories for multiple consecutive game screens are consistent. When they are consistent, the event object and its event category for the corresponding game screen are confirmed.
[0038] The screen data acquisition submodule is used to acquire, after confirming the event category of the current game screen, the predicted player objects and their team categories corresponding to multiple consecutive game screens before the current game screen within a preset time period.
[0039] The data determination submodule is used to count the number of player objects contained in each predicted team category corresponding to each game screen, calculate its average value, and confirm the corresponding team category and its player objects based on the average value.
[0040] Furthermore, the instruction generation module includes:
[0041] The Total Count Determination submodule is used to determine the total number of all player objects based on the number of player objects contained in each team category;
[0042] The interval determination submodule is used to determine the number of players to which a player belongs based on the total number of player objects.
[0043] The first intensity determination submodule is used to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of people range.
[0044] Furthermore, after determining the interval sub-module, the following steps are included:
[0045] The difference comparison submodule is used to calculate the difference in the number of player objects between different team categories based on the number of player objects contained in each team category, and to determine whether the difference is greater than a preset threshold.
[0046] The second intensity determination submodule is used to determine the corresponding lighting effect control intensity according to the first preset rule when the difference is not greater than the preset threshold.
[0047] The team category discrimination submodule is used to determine whether the team category to which the event object belongs belongs to the team category with the fewest player objects among all team categories when the difference is greater than a preset threshold.
[0048] The third intensity determination submodule is used to determine the corresponding lighting effect control intensity according to the second or third preset rule when it belongs to the category.
[0049] Furthermore, the model detection submodule includes:
[0050] A screen invocation unit is used to sequentially invoke multiple game screens;
[0051] The multi-threaded parallel unit is used to enable multiple threads to run different instances of the object detection model. In each thread, the corresponding instance is used to perform object detection for a corresponding game screen and predict the event object and its event category, player object and its team category corresponding to the game screen.
[0052] To achieve one of the objectives of this invention, a computer-readable storage medium is provided, which stores, in the form of computer-readable instructions, a computer program implemented according to the described lighting effect control method, which, when invoked by a computer, executes the steps included in the method.
[0053] To suit one of the purposes of this invention, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in any embodiment of this application.
[0054] Compared with the prior art, the advantages of the present invention are as follows:
[0055] This application performs target detection on the playing game screen to determine event objects and their event categories, player objects and their team categories, and generates corresponding lighting effect control commands based on the lighting effect type determined by the event category and the lighting effect control intensity determined by the number of player objects corresponding to each team category. These commands then control the lighting equipment to present corresponding ambient lighting effects. This achieves diversified lighting effect control adapted to different event categories and the number of player objects, enhancing the user's immersive visual experience. Attached Figure Description
[0056] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0057] Figure 1 This is a schematic diagram of the circuit principle of a lighting effect control device according to a typical embodiment of the present invention.
[0058] Figure 2 This is a flowchart illustrating a typical embodiment of the lighting effect control method of the present invention.
[0059] Figure 3 This is a schematic diagram illustrating the process of target detection in a game screen during playback, according to an embodiment of the lighting effect control method of the present invention.
[0060] Figure 4 This is a schematic flowchart illustrating the process of determining the intensity of lighting effect control in a lighting effect control method according to an embodiment of the present invention.
[0061] Figure 5 This is a schematic flowchart illustrating the process of determining the intensity of lighting effect control in another embodiment of the present invention.
[0062] Figure 6 This is a schematic diagram illustrating the multi-threaded parallel recognition of multiple game screens in a lighting effect control method according to an embodiment of the present invention.
[0063] Figure 7 This is a schematic diagram of the structure of a lighting effect control device according to a typical embodiment of the present invention. Detailed Implementation
[0064] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.
[0065] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components, nor does it exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0066] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0067] In a typical embodiment of the present invention, the lighting effect control method is implemented based on the lighting effect control device 10, combined with... Figure 1 The lighting control device 10 includes a control unit 11 and a lighting device 12.
[0068] The control unit 11 and the lighting device 12 can be connected via a network. The network is typically the Internet, but can also be any network, including but not limited to a Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, the control unit 11 and the lighting device 12 can also communicate via specific communication protocols, including but not limited to BLE (Bluetooth Low Energy), WLAN (Wireless Local Area Network), Bluetooth, ZigBee, or Wi-Fi (Wireless Fidelity). The network may also include network entities such as routers and gateways, which are not shown in the figure.
[0069] In some embodiments, the control unit 11 can be used to acquire the raw video stream. The control unit 11 may include a hardware interface for acquiring the raw video stream.
[0070] In some implementations, the control unit 11 can be connected to devices such as XBOX (home video game console) and PS (PlayStation, video game console) via a hardware interface to obtain the raw video stream.
[0071] In some embodiments, the control unit 11 may be a SOC (System on Chip), CPU (central processing unit), MPU (Microcontroller Unit), etc., and the specific configuration can be set according to actual usage needs. This application does not impose any restrictions on this.
[0072] In some embodiments, the lighting device 12 may be a strip light, a bar light, a lamp post, or a plane light (containing multiple LEDs).
[0073] In some implementations, the lighting device 12 may include one or more lighting units, which can be combined according to actual usage needs.
[0074] In some implementations, each lighting unit may contain one or more LED beads, and the control unit 11 may control the brightness, color, etc. of the LED beads in the lighting unit, and may also control the number of lights on, thereby achieving different lighting effects of the lighting device 12.
[0075] In some implementations, the position and number of lighting devices 12 can be set according to actual usage needs. Based on the position of the lighting devices 12, the length, height and area of the lighting effect can also be controlled.
[0076] The lighting effect control method is implemented based on the lighting effect control equipment described above. Specifically, it combines... Figure 2 The lighting effect control method includes the following steps:
[0077] Step S1100: Obtain the game screen that is playing;
[0078] In one embodiment, the control unit connects to a display device and uses a hardware interface to access the playing game screen. After obtaining the original game screen with continuous timing, it splits it into at least two game screens. The hardware interface can be, for example, VGA (Video Graphics Array), DP (DisplayPort), HDMI (High Definition Multimedia Interface), DVI (Digital Visual Interface), etc. The original game screen includes, but is not limited to, game screen rendered by a game application, game screen from a live stream, or video of a game playing. Furthermore, the original game screen can be looped out using a video capture card. One of the game screens is sent to the display device for display, while the other game screen is formatted to convert it into an image format received by the multimedia processing chip in the control unit. The multimedia processing chip can be, for example, a System-on-Chip (SoC) chip or an NPU (neural-network processing unit) chip.
[0079] In another embodiment, a camera unit can be connected to the existing structure of the lighting effect control device. The camera unit can capture the game screen playing on the display device to generate the corresponding game screen, which is then acquired by the control unit.
[0080] Step S1200: Perform target detection on the game screen to determine the event object and its event category, and the player object and its team category;
[0081] The player object refers to a virtual target object selected and / or controlled by the player in the game, and its image displayed on the game screen, such as the image of a participating character in the game. Typically, player objects belonging to different game teams will not have completely identical images displayed on the game screen; that is, player objects belonging to different game teams have corresponding image features that distinguish them from player objects belonging to other game teams, such as different colors, different shapes, etc. It is easy to understand that the image features contained in the player object can be extracted by the object detection model and used to represent the game team to which the corresponding player object belongs.
[0082] The event object refers to the image displayed on the game screen triggered when a special event occurs during gameplay. These special events include, but are not limited to, the defeat of a target virtual object in the game, such as killing a "dragon," killing a "player," or killing two or more "players" within a time limit. The special events can be flexibly configured by those skilled in the art. The image contains image features representing the special event occurring during gameplay, allowing players to understand the special event through the image. It is easy to understand that the image features corresponding to the event object can be extracted by the object detection model and used to represent the special event to which the corresponding event object belongs.
[0083] The control unit can perform target detection on multiple sequentially occurring game screens using a preset target detection model deployed on the edge. Event objects and player objects within the game screens are used as target objects. Each target detection operation targets one game screen, predicting all detected target information at once. This target information includes the position of the corresponding target object within the game screen and the category to which the target object belongs. The target object can be determined from the game screen based on its position.
[0084] Furthermore, it can be understood that there are usually multiple game frames with the same event category that occur consecutively in time. For example, if the event category is "double kill," the corresponding event object will usually appear in the game frame for several seconds. However, each second usually contains multiple frames, so these consecutive game frames correspond to the same event category, and they are all "double kills." Since the object detection model can detect multiple game frames per second, and there is a small probability that the model will predict the event category incorrectly, to ensure the confidence of the event category predicted by the model, the model can be considered correct if the predicted event categories of multiple consecutive game frames are consistent, thus confirming the event object and its event category of the corresponding game frame. After confirming the event category of the current game frame, the predicted player object and its team category are obtained for multiple consecutive game frames preceding the current game frame within a preset time period. The preset time period is the duration that leads to the occurrence of the corresponding special event, and the specific preset time period can be set by those skilled in the art based on the corresponding special event. The special event is the event object to which the current game frame belongs. For example, the special event is "killing the 'Baron'", and the corresponding preset time period can be 2 minutes. The number of player objects included in each predicted team category corresponding to each game screen is counted, and its average value is calculated. Based on the average number of player objects corresponding to each team category, a game screen that meets the average number of player objects corresponding to each team category is selected from the multiple game screens obtained in a sequential order. The predicted player objects and their team categories for this game screen are confirmed, and the players corresponding to these player objects are regarded as special events to which the event objects corresponding to the event category participating in the current game screen belong.
[0085] The preset target detection model is any ready-made model suitable for target detection tasks that has been pre-trained to convergence; YOLO is the recommended choice.
[0086] Game footage containing event objects and / or player objects can be pre-collected as training samples. Each training sample is labeled with a supervisory tag, indicating the location information of the event objects and / or player objects within the game footage, as well as the event category to which the event object belongs and / or the team category to which the player object belongs. The event category can be flexibly set by those skilled in the art based on the specific event to which the event object belongs. For example, if the specific event to which the event object belongs is "killing two 'players' within a limited time," the corresponding event category could be "double kill," and "killing five 'players' within a limited time," the corresponding event category could be "double kill." The event category can be "pentakill". The team category can be flexibly set by those skilled in the art according to the game team to which the corresponding player belongs. For example, if the game team to which the player belongs is "blue team", the corresponding team category can be "team one". If the game team to which the player belongs is "red team", the corresponding team category can be "team two". The position information of the event object includes the center position (x, y) of the event object in the game screen, as well as its height (h) and width (w). The position information of the player object includes the center position (x, y) of the event object in the game screen, as well as its height (h) and width (w).
[0087] After labeling each training sample, a training set can be constructed by mapping each training sample and its supervision label. A single training sample and its supervision label are obtained from the training set. This training sample is input into the object detection model, and image feature information of the region corresponding to the coordinates marked by the supervision label in the game screen of the training sample is extracted. This image feature information represents the game team to which the corresponding player object belongs and / or the special event to which the corresponding event object belongs. The image feature information is then classified and mapped to a preset classification space representing multiple event categories and / or team categories. The classification probabilities corresponding to each classification space are obtained, and the event category and / or team category represented by the classification space with the highest classification probability are determined. Furthermore, a loss function is employed. Based on the event category and / or team category labeled by the supervision labels, and the location information of the labeled time objects or player objects, the loss value corresponding to the event category and / or team category represented by the classification space with the highest classification probability, as well as the loss value corresponding to the location information of the labeled event objects or player objects, are calculated. When each of these loss values reaches a preset threshold, it indicates that the object detection model has been trained to a convergent state, and model training can be terminated. Otherwise, it indicates that the model has not converged, and gradient updates are performed on the model according to each loss value. Typically, backpropagation is used to correct the weight parameters of each stage of the model to make the model further approach convergence. Then, the next training sample in the training set is used to iteratively train the model until the model is trained to a convergent state. The loss function can be flexibly set by those skilled in the art based on prior knowledge or experimental experience. It can be understood that the object detection model trained to convergence learns the ability to detect game screens and predict the location and event category of event objects, and the location and team category of player objects in one go.
[0088] Step S1300: Determine the lighting effect type according to the event category, determine the lighting effect control intensity according to the number of player objects corresponding to each team category, and generate corresponding lighting effect control instructions according to the lighting effect type and lighting effect control intensity.
[0089] The light effect type refers to the lighting effect presented on the lighting equipment, which can be flexibly set by those skilled in the art. For example, the light effect type is the fireworks type, and the specific light effect can be that the light lights up from the center and spreads outward in multiple directions, similar to the effect of "fireworks blooming"; the light effect type is the meteor type, and the specific light effect can be that the light lights up and shoots out in one or more directions, similar to the effect of "meteor streaking across the sky".
[0090] The lighting effect control intensity includes any one or more of the following: lighting effect brightness, lighting effect display speed, and lighting effect color change gradient.
[0091] The corresponding lighting effect types can be preset according to all event categories. For example, if the event category is "double kill," the corresponding lighting effect type is "meteor type," and if the event category is "pentakill," the corresponding lighting effect type is "firework type." In another embodiment, a preset number of player intervals can be established. Multiple intervals with progressively increasing player numbers can be preset based on the number of players in each game team. These intervals can be flexibly set by those skilled in the art. For example, the first interval is [2, 4], the second interval is [5, 7], and the third interval is [8-10]. Based on this, different lighting effect control intensities are set according to each gradient of the player intervals. These lighting effect control intensities can be flexibly set by those skilled in the art based on the corresponding gradients. It can be understood that the total number of player objects can be determined based on the number of player objects corresponding to each team category. Each total number of player objects has its own player interval, and the corresponding lighting effect control intensity can be determined based on the gradient of that player interval.
[0092] After completing the above settings for lighting effect types and lighting effect control intensity, for each lighting effect type, corresponding lighting effect control instructions are set in conjunction with each lighting effect control intensity. Then, each lighting effect control instruction is associated with the corresponding lighting effect type and lighting effect control intensity, the lighting effect type is associated with the corresponding event category, and the lighting effect control intensity is associated with the gradient of the corresponding number of people space, thus pre-constructing a lighting effect control table for use.
[0093] Step S1400: Send the lighting effect control command to the lighting equipment to display the corresponding lighting effect.
[0094] The control unit connects to the lighting equipment and outputs the lighting effect control command to the lighting equipment, enabling the lighting effect control circuit of the lighting equipment to generate a corresponding lighting effect control signal. This signal controls the light-emitting elements within the lighting equipment to emit light accordingly, presenting an ambient lighting effect corresponding to the target event type. The light-emitting elements can be either monochromatic or RGB (red, green, and blue) light-emitting elements.
[0095] As can be seen from the typical embodiments of this application, the technical solution of this application has many advantages, including but not limited to the following aspects:
[0096] This application performs target detection on the playing game screen to determine event objects and their event categories, player objects and their team categories, and generates corresponding lighting effect control commands based on the lighting effect type determined by the event category and the lighting effect control intensity determined by the number of player objects corresponding to each team category. These commands then control the lighting equipment to present corresponding ambient lighting effects. This achieves diversified lighting effect control adapted to different event categories and the number of player objects, enhancing the user's immersive visual experience.
[0097] Furthermore, in combination Figure 3 Step S1200: Perform target detection on the game screen to determine the event object and its event category, and the player object and its team category, including the following steps:
[0098] Step S1210: Use a preset target detection model to perform target detection on multiple game screens that are sequentially connected, and predict the event objects and their event categories, player objects and their team categories corresponding to each game screen;
[0099] A pre-trained, converged object detection model is used to detect objects in a game scene at a time, extracting the image feature information corresponding to the game scene. Based on the image feature information, the location and event type of the event object, the location and team type of the player object in the game scene are predicted at once. Then, the event object can be determined from the game scene based on the location of the event object, and the player object can be determined from the game scene based on the location of the player object.
[0100] Step S1220: Determine whether the predicted event categories for multiple consecutive game screens are consistent. If they are consistent, confirm the event object and event category of the corresponding game screen.
[0101] It is understandable that multiple consecutive game frames may correspond to the same event category. For example, if the event category is "double kill," the corresponding event object will typically appear on the game screen for several seconds. However, each second usually contains multiple frames, so these consecutive game frames will all correspond to the same event category, specifically "double kill." Since the object detection model can detect multiple game frames per second, and there is a small probability that the model will predict the wrong event category, to ensure the confidence of the model-predicted event categories, the model can be considered correct if multiple consecutive game frames all predict the same event category. This confirms the event object and its event category for each game frame.
[0102] Step S1230: After confirming the event category of the current game screen, obtain the predicted player objects and their team categories corresponding to multiple consecutive game screens before the current game screen within a preset time period.
[0103] The preset duration is the duration required for the corresponding special event to occur. The specific preset duration can be set by those skilled in the art based on the corresponding special event. The special event is the event object to which the current game screen belongs. For example, the special event is "killing the 'Dragon'", and the corresponding preset duration can be 2 minutes.
[0104] Step S1240: Count the number of player objects contained in each predicted team category corresponding to each game screen, calculate the average value, and confirm the corresponding team category and player objects based on the average value.
[0105] Based on the average number of player objects corresponding to each team category, a game screen that matches the average number of player objects corresponding to each team category is selected from the multiple game screens obtained in a sequential order. The player objects and their team categories predicted for this game screen are confirmed, and the players corresponding to these player objects are regarded as special events to which the event objects corresponding to the event categories participating in the current game screen belong.
[0106] In this embodiment, on the one hand, by determining that the predicted event categories for multiple consecutive game screens are consistent, the event objects and their event categories for the corresponding game screens are confirmed, ensuring the accuracy and reliability of the confirmed event objects and their event categories. On the other hand, by confirming the corresponding team category and its player objects based on the average number of player objects corresponding to each team category, the number of player objects participating in the corresponding special events can be effectively determined.
[0107] Furthermore, in combination Figure 4 Step S1300: Determine the lighting effect control intensity based on the number of player objects corresponding to each team category, including the following steps:
[0108] Step S1310: Determine the total number of all player objects based on the number of player objects contained in each team category;
[0109] Add up the number of player objects in each team category to calculate the total number of player objects.
[0110] Step S1320: Determine the number range to which a player belongs based on the total number of players;
[0111] Multiple player ranges with increasing gradients can be preset based on the number of players in each game team. The specific ranges can be flexibly set by those skilled in the art. For example, the first gradient range is [2, 4], the second gradient range is [5, 7], and the third gradient range is [8-10].
[0112] Step S1330: Determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of people range.
[0113] It is understandable that a higher gradient corresponds to a larger number of players, resulting in more intense battles in the game. Therefore, to ensure the lighting effects match this intensity, corresponding lighting effect control intensities can be preset based on the gradient of each player range. Higher gradients require stronger lighting effect control intensities. These intensities can be flexibly adjusted by those skilled in the art based on the description herein. The lighting effect control intensities include any one or more of the following: lighting brightness, lighting display speed, and lighting color change gradient. For example, a higher gradient and stronger lighting effect control intensities can manifest as higher lighting brightness, faster lighting display speed, and a larger lighting color change gradient.
[0114] In this embodiment, the intensity of the lighting effect is determined according to the gradient corresponding to the number of players in the game, so that it can reflect the intensity of the battle to a certain extent and enhance the atmosphere of the lighting effect.
[0115] Furthermore, in combination Figure 5 Step S1320, after determining the number range to which a player belongs based on the total number of players, includes the following steps:
[0116] Step S1321: Calculate the difference in the number of player objects between team categories based on the number of player objects contained in each team category, and determine whether the difference is greater than a preset threshold.
[0117] The preset threshold is used to measure the magnitude of the difference, and can be set as needed by those skilled in the art.
[0118] Step S1322: When the difference is not greater than a preset threshold, determine the corresponding lighting effect control intensity according to the first preset rule;
[0119] The first preset rule determines the corresponding lighting effect control intensity based on the gradient corresponding to the number of people range. The preset threshold can be set as needed by those skilled in the art.
[0120] When the difference is not greater than a preset threshold, it indicates that the difference is relatively small, that is, the difference in the number of player objects between different team categories is not large. The corresponding lighting effect control intensity can be determined based on the number range of player objects in the game, i.e., the number range, and its corresponding gradient.
[0121] Step S1323: When the difference is greater than a preset threshold, determine whether the team category to which the event object belongs belongs to the team category with the fewest player objects among all team categories;
[0122] When the difference is greater than a preset threshold, it indicates that the difference is relatively large, that is, the number of player objects between different team categories is relatively large, and the intensity of the battle is relatively high. A preset image classification model can be used to predict the classification probability of multiple team categories corresponding to the event object in the game screen, and determine the team category with the highest classification probability as the event object. Then, it is determined whether the team category belongs to the team category with the fewest player objects among all team categories.
[0123] It is understood that the event object typically contains image feature information representing the team category, which can be recognized by the image classification model to determine the team category represented by the image feature information. The preset image classification model is a model pre-trained to convergence suitable for performing image classification tasks. It is generally a model based on a convolutional neural network followed by a classifier. The convolutional neural network includes, but is not limited to, application-oriented neural network models based on basic network model architectures such as CNN and RNN, such as ResNet, Vision Transformer (ViT), and EfficientNet. The classifier can be an MLP (Multilayer Perceptron).
[0124] Training samples can be constructed by collecting game screens with different event objects. Each training sample is labeled with a supervisory label representing the team category to which the event object in the screen belongs. A training set is constructed to train the image classification model until the model converges. This enables the model to learn the ability to determine the classification probability corresponding to multiple preset team categories based on the image feature information representing the team category contained in the event object in the screen.
[0125] Step S1324: When it belongs to the category, determine the corresponding lighting effect control intensity according to the second preset rule or the third preset rule.
[0126] The second preset rule is to determine the corresponding lighting effect control intensity based on the preset maximum gradient, and the third rule is to determine the corresponding lighting effect control intensity based on the gradient to which the difference belongs.
[0127] It's easy to understand that when the intensity of the battle is high, the minimum number of player objects corresponding to the team category to which the event object belongs displayed on the game screen indicates that during the battle between the weaker and stronger teams, the weaker team's performance is more impressive. Therefore, the corresponding lighting effects should be stronger to accurately reflect the intensity of the game. The specific implementation is as follows:
[0128] The intensity of the current game situation is comparable to the number of players in the maximum gradient range, and the corresponding lighting effect control intensity is determined according to the preset maximum gradient.
[0129] Alternatively, the gradient corresponding to the difference can be preset as multiple increasing thresholds. The larger the value of the threshold, the stronger the lighting effect control intensity corresponding to the gradient, so that the corresponding lighting effect can more accurately reflect the intensity of the game. As an example, the multiple thresholds with increasing gradients can be 1, 2, and 3, which can be set as needed by those skilled in the art. Thus, the corresponding lighting effect control intensity can be determined according to the gradient to which the difference belongs.
[0130] In this embodiment, the various lighting effect control intensities can be specifically set as needed by those skilled in the art as disclosed in the relevant places. For example, a stronger lighting effect control intensity can manifest as higher lighting brightness, faster lighting effect display speed, and a greater gradient of lighting effect color change, among any one or more of these.
[0131] In one embodiment, when the team category to which the event object belongs is not the team category with the fewest player objects among all team categories, the corresponding lighting effect control intensity can be determined according to the first preset rule.
[0132] In this embodiment, by judging the difference in the number of player objects between different team categories, the corresponding lighting effect control intensity is flexibly determined so that it can, to a certain extent, represent the intensity of the actual battle and enhance the atmosphere of the lighting effects.
[0133] Furthermore, in combination Figure 6 Step S1210: Using a preset target detection model, target detection is performed on multiple game screens that are sequentially connected, predicting the event objects and their event categories, player objects and their team categories corresponding to each game screen, including the following steps:
[0134] Step S1211: Sequentially call up multiple game screens;
[0135] The control unit sequentially calls up multiple game screens according to a time sequence.
[0136] Step S1212: Enable multiple threads to run different instances of the object detection model. In each thread, use the corresponding instance to perform object detection for a corresponding game screen and predict the event object and its event category, player object and its team category corresponding to the game screen.
[0137] In one embodiment, the game screens received by the control unit are generated at a rate of 60 or even 120 per second. After a single target detection model completes target detection for one game screen, the next game screen is then detected. Such processing efficiency is usually not fast enough to keep up with the speed at which game screens are generated. Therefore, multiple instances of target detection models can be run concurrently in a multi-threaded manner to process multiple game screens simultaneously, which can greatly improve processing efficiency and ensure effectiveness.
[0138] The different examples are all object detection models that have been pre-trained to converge to the same level.
[0139] In this embodiment, multiple instances of the object detection model are run concurrently by multiple threads to process multiple game screens simultaneously, so as to obtain the corresponding output results of each thread in a basically synchronous manner. This greatly shortens the overall time of obtaining the corresponding output results by processing each game screen one by one through a single object detection model, and improves execution and response efficiency.
[0140] The present invention also provides a lighting effect control device, combined with Figure 7 The device includes:
[0141] Data acquisition module 1100 is used to acquire the game screen that is being played;
[0142] The target detection module 1200 is used to perform target detection on the game screen and determine the event object and its event category, and the player object and its team category.
[0143] The instruction generation module 1300 is used to determine the lighting effect type according to the event category, determine the lighting effect control intensity according to the number of player objects corresponding to each team category, and generate corresponding lighting effect control instructions according to the lighting effect type and lighting effect control intensity.
[0144] The lighting effect control module 1400 is used to send the lighting effect control command to the lighting equipment to display the corresponding lighting effect.
[0145] Furthermore, the target detection module 1200 includes:
[0146] The model detection submodule is used to perform target detection on multiple game screens that are sequentially connected using a preset target detection model, and to predict the event objects and their event categories, player objects and their team categories corresponding to each game screen.
[0147] The event judgment submodule is used to determine whether the predicted event categories for multiple consecutive game screens are consistent. When they are consistent, the event object and its event category for the corresponding game screen are confirmed.
[0148] The screen data acquisition submodule is used to acquire, after confirming the event category of the current game screen, the predicted player objects and their team categories corresponding to multiple consecutive game screens before the current game screen within a preset time period.
[0149] The data determination submodule is used to count the number of player objects contained in each predicted team category corresponding to each game screen, calculate its average value, and confirm the corresponding team category and its player objects based on the average value.
[0150] Furthermore, the instruction generation module 1300 includes:
[0151] The Total Count Determination submodule is used to determine the total number of all player objects based on the number of player objects contained in each team category;
[0152] The interval determination submodule is used to determine the number of players to which a player belongs based on the total number of player objects.
[0153] The first intensity determination submodule is used to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of people range.
[0154] Furthermore, after determining the interval sub-module, the following steps are included:
[0155] The difference comparison submodule is used to calculate the difference in the number of player objects between different team categories based on the number of player objects contained in each team category, and to determine whether the difference is greater than a preset threshold.
[0156] The second intensity determination submodule is used to determine the corresponding lighting effect control intensity according to the first preset rule when the difference is not greater than the preset threshold.
[0157] The team category discrimination submodule is used to determine whether the team category to which the event object belongs belongs to the team category with the fewest player objects among all team categories when the difference is greater than a preset threshold.
[0158] The third intensity determination submodule is used to determine the corresponding lighting effect control intensity according to the second or third preset rule when it belongs to the category.
[0159] Furthermore, the model detection submodule includes:
[0160] A screen invocation unit is used to sequentially invoke multiple game screens;
[0161] The multi-threaded parallel unit is used to enable multiple threads to run different instances of the object detection model. In each thread, the corresponding instance is used to perform object detection for a corresponding game screen and predict the event object and its event category, player object and its team category corresponding to the game screen.
[0162] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the lighting effect control method of any embodiment of this application.
[0163] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the method described in any embodiment of this application.
[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of the present invention can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0165] In summary, this application enables diverse lighting effect control to adapt to different event categories and the number of player objects, thereby enhancing the user's immersive visual experience.
[0166] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0167] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A lighting effect control method, characterized in that, The specific steps include the following: Capture the screen of the game currently playing; Perform target detection on the game screen to determine event objects and their event categories, player objects and their team categories; The lighting effect type is determined based on the event category, and the lighting effect control intensity is determined based on the number of player objects corresponding to each team category. Corresponding lighting effect control instructions are generated according to the lighting effect type and control intensity. This includes: determining the total number of player objects based on the number of player objects included in each team category; determining the player count interval based on the total number of player objects; and determining the corresponding lighting effect control intensity based on the gradient corresponding to the player count interval. This includes: calculating the difference in the number of player objects between different team categories based on the number of player objects included in each team category, and determining whether the difference is greater than a preset threshold. When the event category is determined, the lighting effect control intensity is determined. When the difference is not greater than a preset threshold, the corresponding lighting effect control intensity is determined according to the first preset rule, which is to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of players. When the difference is greater than the preset threshold, it is determined whether the team category to which the event object belongs belongs to the team category with the fewest player objects among all team categories. If it does, the corresponding lighting effect control intensity is determined according to the second preset rule or the third preset rule, where the second preset rule is to determine the corresponding lighting effect control intensity based on the preset maximum gradient, and the third preset rule is to determine the corresponding lighting effect control intensity based on the gradient to which the difference belongs. Send the lighting effect control command to the lighting equipment to display the corresponding lighting effect.
2. The method as described in claim 1, characterized in that, Performing object detection on the game screen to determine event objects and their event categories, player objects and their team categories includes the following steps: A preset target detection model is used to perform target detection on multiple game screens that are sequentially connected, and to predict the event objects and their event categories, player objects and their team categories corresponding to each game screen; Determine whether the predicted event categories for multiple consecutive game screens are consistent. If they are consistent, confirm the event object and event category of the corresponding game screen. After confirming the event category of the current game screen, obtain the predicted player objects and their team categories corresponding to multiple consecutive game screens before the current game screen within a preset time period; The number of player objects included in each predicted team category corresponding to each game screen is counted, and the average value is calculated. The corresponding team category and player objects are then determined based on the average value.
3. The method as described in claim 1, characterized in that, The lighting effect control intensity includes any one or more of the following: lighting effect brightness, lighting effect display speed, and lighting effect color change gradient.
4. The method as described in claim 2, characterized in that, A preset target detection model is used to perform target detection on multiple sequentially occurring game frames, predicting the corresponding event objects and their event categories, player objects and their team categories for each game frame, including the following steps: Multiple game screens are invoked sequentially; Multiple threads are enabled to run different instances of the object detection model. In each thread, the corresponding instance is used to perform object detection for a corresponding game screen, predicting the event object and its event category, player object and its team category corresponding to the game screen.
5. A lighting effect control device, comprising a control unit and a lighting device, wherein the lighting device has a built-in lighting effect control circuit, characterized in that, The control unit is used to run a computer program product, and when the computer program product is running, it executes the lighting effect control method as described in any one of claims 1 to 4.
6. A lighting effect control device, characterized in that, include: The data acquisition module is used to capture the game screen that is currently playing. The target detection module is used to perform target detection on the game screen to determine event objects and their event categories, player objects and their team categories; The instruction generation module is used to determine the lighting effect type based on the event category, determine the lighting effect control intensity based on the number of player objects corresponding to each team category, and generate corresponding lighting effect control instructions according to the lighting effect type and lighting effect control intensity. This includes: determining the total number of all player objects based on the number of player objects included in each team category; determining the player count interval to which the player objects belong based on the total number of player objects; and determining the corresponding lighting effect control intensity based on the gradient corresponding to the player count interval. This includes: calculating the difference in the number of player objects between different team categories based on the number of player objects included in each team category, and determining whether the difference is greater than a preset threshold. The difference is determined as follows: when the difference is not greater than a preset threshold, the corresponding lighting effect control intensity is determined according to a first preset rule, which is to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number of players; when the difference is greater than a preset threshold, it is determined whether the team category to which the event object belongs belongs to the team category with the fewest player objects among all team categories; when it does, the corresponding lighting effect control intensity is determined according to a second preset rule or a third preset rule, whereby the second preset rule is to determine the corresponding lighting effect control intensity based on a preset maximum gradient, and the third preset rule is to determine the corresponding lighting effect control intensity based on the gradient to which the difference belongs; The lighting effect control module is used to send the lighting effect control commands to the lighting equipment to display the corresponding lighting effects.
7. The lighting effect control device according to claim 6, characterized in that, The target detection module includes: a model detection submodule, used to perform target detection on multiple sequentially consecutive game screens using a preset target detection model, predicting the event objects and their event categories, player objects and their team categories corresponding to each game screen; an event judgment submodule, used to determine whether the predicted event categories for multiple sequentially consecutive game screens are consistent, and when consistent, confirming the event objects and their event categories for the corresponding game screen; a screen data acquisition submodule, used to acquire the predicted player objects and their team categories for multiple sequentially consecutive game screens before the current game screen within a preset time period after confirming the event category of the current game screen; and a data determination submodule, used to count the number of player objects included in each predicted team category for each game screen, calculate its average, and confirm its corresponding team category and player objects based on the average.
8. The lighting effect control device according to claim 6, characterized in that, The instruction generation module includes: a total number determination submodule, used to determine the total number of all player objects based on the number of player objects included in each team category; a range determination submodule, used to determine the number range to which a player belongs based on the total number of player objects; and a first intensity determination submodule, used to determine the corresponding lighting effect control intensity based on the gradient corresponding to the number range.
9. The lighting effect control device according to claim 6, characterized in that, After the interval determination submodule, it includes: a difference comparison submodule, used to calculate the difference in the number of player objects between different team categories based on the number of player objects contained in each team category, and to determine whether the difference is greater than a preset threshold; a second intensity determination submodule, used to determine the corresponding lighting effect control intensity according to a first preset rule when the difference is not greater than the preset threshold; a team category discrimination submodule, used to determine whether the team category to which the event object belongs belongs to the team category with the fewest number of player objects among all team categories when the difference is greater than the preset threshold; and a third intensity determination submodule, used to determine the corresponding lighting effect control intensity according to the second preset rule or the third preset rule when it belongs to the team category.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code, which can be called by a processor to execute the lighting effect control method as described in any one of claims 1 to 4.
11. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 4.