Processing method and device and electronic equipment
By calling the image processing engine in the game, analyzing and labeling target objects, and providing real-time auxiliary prompts, it solves the problem of users' lack of participation in the game and improves the game experience and auxiliary effects.
Patent Information
- Application Number
- CN202410544886.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-23
AI Technical Summary
In game application scenarios, when users are unable to complete game tasks, they need to watch videos of others completing tasks or rely on the help of experienced users, resulting in a reduced sense of game experience and a lack of participation.
By calling the image processing engine, it analyzes the screen of the target application in real time, obtains the label and location of the target object, and superimposes prompt items on the game screen to provide auxiliary prompts without directly completing the task, improving the user's sense of participation and experience.
It improves the user's sense of participation and experience in the game, and enhances the timeliness and accuracy of auxiliary effects without increasing hardware costs or affecting the game frame rate.
Smart Images

Figure CN118535263A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and relates to but is not limited to a processing method, device and electronic device. Background Art
[0002] In the game application scenario, users complete the given tasks by themselves. When they cannot complete the game tasks, they need to watch other people's task completion videos to learn skills, which undoubtedly breaks the user's gaming experience; or they need experienced users to help them pass, such as directly operating on their behalf. This leads to a lack of user participation in the game process, further reducing the user's gaming experience. Summary of the invention
[0003] The present application provides a processing method, an apparatus, an electronic device, a storage medium, and a computer program product.
[0004] The technical solution of this application is implemented as follows:
[0005] In a first aspect, the present application provides a processing method, the method comprising:
[0006] If the target application is running, call the image processing engine;
[0007] Processing a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state;
[0008] Based on the tag and the position, a prompt item of the target object is superimposed and displayed on a screen where the target application is in a running state.
[0009] In a second aspect, the present application provides a processing device, including:
[0010] A monitoring module, used to monitor the target application in running state;
[0011] A control module, configured to call an image processing engine if the target application is in a running state, wherein the image processing engine is configured to process a target image to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application being in a running state;
[0012] A marking module is used to overlay and display a prompt item of the target object on a screen where the target application is in a running state based on the label and the position.
[0013] In a third aspect, the present application further provides an electronic device, the electronic device comprising a display screen and a processor;
[0014] The processor is used to: call an image processing engine if the target application is in a running state; process a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state; and display a prompt item of the target object on a screen in which the target application is in a running state based on the label and the position.
[0015] In a fourth aspect, the present application further provides a storage medium, on which a computer program is stored. When the computer program on the storage medium is executed, the above-mentioned processing method provided by the present application is implemented.
[0016] In a fifth aspect, the present application also provides a computer program product, including a computer program or instructions, which implement the above-mentioned processing method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a processing method provided in an embodiment of the present application Figure 1 ;
[0018] Figure 2 A schematic diagram of a processing method provided in an embodiment of the present application Figure 2 ;
[0019] Figure 3 A schematic diagram of a processing method provided in an embodiment of the present application Figure 3 ;
[0020] Figure 4 A schematic diagram of a processing method provided in an embodiment of the present application Figure 4 ;
[0021] Figure 5 A schematic diagram of a processing method provided in an embodiment of the present application Figure 5 ;
[0022] Figure 6 A schematic diagram of the structure of a processing device provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0024] Figure 8 An artificial intelligence game space architecture diagram provided for an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0026] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0027] In the following description, the terms "first\second\third" are used only as examples to distinguish different objects, and do not represent a specific order for the objects, nor do they have a limitation on the order of precedence. It is understandable that "first\second\third" can be interchanged with a specific order or order of precedence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0028] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this application are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0029] In the related art, there are two solutions for identifying characters in competitive games: (1) Running the AI model and recognition separately on a new graphics card to ensure the inference efficiency of the AI model while also minimizing the impact on the FPS frame rate of competitive games. (2) Running the AI model on a discrete graphics processing unit (dGPU), capturing the game screen, and using the model to identify and locate the characters in the game.
[0030] However, the above two solutions have the following disadvantages: (1) they require additional hardware costs and have certain requirements for models that support additional independent graphics cards; (2) AI models running on dGPUs will cause competition with game resources. In order to reduce the impact on the game frame rate (FPS), the player's machine configuration is generally required to be very high, otherwise the experience will be poor and the universality will be poor.
[0031] Moreover, after identifying and locating the characters in the game, they directly help users complete game tasks, which leads to a lack of user participation and reduces the user's gaming experience.
[0032] Based on the above-mentioned related issues, the embodiment of the present application provides a processing method, in which an image processing engine is called when the target application is in a running state; the image of the real-time screen of the target application in the running state is analyzed according to the image processing engine to obtain a label representing the target object and a position representing the target object, and the label and position of the target object are automatically obtained by using the image processing engine, thereby improving the speed and accuracy of obtaining the label and position; according to the label and position, a prompt item of the target object is superimposed and displayed on the screen of the target application in the running state, and by superimposing and displaying the prompt item of the target object on the real-time screen of the target application in the running state, only warning and prompting the user are provided, and the user's operation is not helped. In this way, the user's sense of participation in the game is improved through the auxiliary effect, and the user's experience of the game is further improved. On the other hand, by using the image processing engine to process the screen of the running state of the target application in real time and perform real-time prompt warnings, the displayed prompt items can follow the refresh rate of the game screen, further improving the auxiliary effect and timeliness of the assistance to the user.
[0033] The embodiments of the present application provide a processing method, a device, an electronic device, a storage medium, and a computer program product. In practical applications, the processing method can be implemented by a processing device, and each functional entity in the processing device can be collaboratively implemented by hardware resources of the electronic device, such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0034] Below, various embodiments of the processing method, device, electronic device, storage medium and computer program product provided in the embodiments of the present application are described.
[0035] In the first aspect, the embodiment of the present application provides a processing method. The function implemented by the method can be implemented by calling a program code by a processor in an electronic device (such as a controller), and of course the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.
[0036] It should be noted that in the embodiments of the present application, the electronic device may be a mobile terminal such as a mobile phone or a tablet, and the target terminal may be a terminal such as a personal computer (PC); the specific electronic device and target terminal may be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0037] Below, the processing method provided in the embodiment of the present application is explained by taking an electronic device as an execution subject as an example.
[0038] The present application embodiment provides a processing method, which is applied to electronic equipment. Figure 1 A schematic diagram of a processing method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the processing method may include but is not limited to the following S101 to S103:
[0039] Step S101: If the target application is in running state, the image processing engine is called.
[0040] The target application may refer to any game software that is used for assistance, such as competitive games, board games, etc. The game software may be a local game or a cloud game.
[0041] The embodiment of the present application does not limit the method of calling the image processing engine. For example, the image processing engine may be automatically called after the target application is started, or the image processing engine may be called according to the instruction input by the user.
[0042] Step S102: Processing a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state.
[0043] The target object can be an object in the target image that needs to be marked, such as an enemy in a competitive game or a card in a chess and card game.
[0044] The label of the target object may refer to the category label of the target object, such as person, wall, sign, etc.
[0045] The position of the target object can be represented by the coordinate point of the target object; it can also be the center coordinates, length and width of the target object's circumscribed rectangle; it can also be represented by a color that does not exist in the target image, for example, if there is no red in the target object, the red area is used to represent the position of the target object.
[0046] The embodiment of the present application does not limit the specific method of acquiring the target image, and the target image can be acquired by programming; it can also be acquired by recording software.
[0047] The image processing engine is used to output the label representing the target object and the position representing the target object based on the target image. The image processing engine can be any pre-trained image processing engine with reasoning ability. The image processing engine has reasoning ability, which means that the image processing engine can analyze and deduce the target object label and position by analyzing the target image, combining the language rules, logical rules and massive knowledge learned in the pre-training stage, and through semantic analysis and pattern recognition.
[0048] In advance, a plurality of target images may be acquired; an initial image processing engine is trained based on the plurality of target images and the corresponding target objects in each target image, and an image processing engine is obtained after the training is completed.
[0049] It should be noted that the image processing engine may include only one image processing engine for processing; or may include two image processing engines for processing. Exemplarily, a single image processing engine is used to analyze the target image to output a label representing the target object and a position representing the target object; or a first image processing engine is used to analyze the target image first, output a first result, and then a second image processing engine is used to analyze the first result, output a label representing the target object and a position representing the target object.
[0050] Step S103: Based on the tag and the position, a prompt item of the target object is displayed on the screen where the target application is in the running state.
[0051] Prompt items are used to guide or assist users in playing games. The content of the prompt items can be pre-set for the target object, or can be determined by the user according to the actual situation after the target object is determined. The embodiment of the present application does not limit the form of the prompt items, which can be text language, or a mark point, or a mark box.
[0052] It should be noted that the image processing engine analyzes the target image and marks prompt items for the target objects in the screen image when the target application is running to assist users in playing the game. It will not affect the running of the game itself. In other words, the running of the target application and the image processing engine run independently and do not interfere with each other.
[0053] In an embodiment of the present application, when the target application is in a running state, an image processing engine is called; the image processing engine is used to analyze the real-time screen in the running state of the target application, derive the label and position of the target object in the output implementation screen; and the label and position are used to superimpose and display the prompt item of the target object in the real-time screen image of the running target application.
[0054] For example, if the first target application is a competitive game, the image processing engine is a single-model image processing engine. When the competitive game is in operation, the single-model image processing engine is called to analyze the screen in the competitive game operation state, directly output the tag and position of the enemy in the screen in the competitive game operation state, and display a green dot on the head of the enemy in the screen in the competitive game operation state based on the tag and position of the enemy.
[0055] Exemplarily, if the first target application is a chess and card game, the image processing engine is a single-model image processing engine. When the chess and card game is in operation, the single-model image processing engine is called to analyze the screen in the chess and card game operation state, and directly output the label and position of the chess and card in the screen in the chess and card game operation state. Here, the label can be a number or model on the chess and card, and a mark box is displayed on the chess and card number in the chess and card game operation state screen based on the label and position of the chess and card.
[0056] Exemplarily, if the first target application is a competitive game, the image processing engine includes two image processing engines. When the competitive game is in operation, the first image processing engine is first called to analyze the screen in the competitive game operation state and output the positions of multiple objects; the second image processing engine is then called to analyze the positions of multiple objects and output the tags and positions of the enemies in the screen in the competitive game operation state, and a green dot is displayed on the head of the enemy in the screen in the competitive game operation state based on the tags and positions of the enemies.
[0057] Exemplarily, if the first target application is a chess and card game, the image processing engine includes two image processing engines. When the chess and card game is in operation, the first image processing engine is first called to analyze the screen in the chess and card game operation state and output the positions of multiple cards; then the second image processing engine is called to analyze the positions of multiple cards and output the labels and positions of the chess and cards in the screen in the chess and card game operation state, and a mark box is displayed on the chess and card number in the chess and card game operation state screen based on the labels and positions of the chess and cards.
[0058] Exemplarily, calling the image processing engine is equivalent to turning on a game assistant to help users with auxiliary prompts and warnings in the game, but will not help users directly complete game tasks.
[0059] In the embodiment of the present application, first, when the target application is in the running state, the image processing engine is called in time, and then the auxiliary function is turned on in time; then, the image processing engine is used to process the target application to analyze the image of the real-time screen of the target application in the running state, and the label representing the target object and the position representing the target object are obtained. By using the image processing engine, the label and position of the target object in the real-time screen are automatically obtained, so that the auxiliary function can follow the refresh of the screen, and the speed and accuracy of obtaining the label and position are improved; according to the label and position, the prompt item of the target object is superimposed on the screen of the target application in the running state. By superimposing the prompt item of the target object on the real-time screen of the target application in the running state, only the user is warned and prompted, and it does not help the user to operate. In this way, the user's sense of participation in the game is improved through the auxiliary effect, and the user's experience of the game is further improved. On the other hand, by using the image processing engine to process the screen of the running state of the target application in real time and perform real-time prompts and warnings, the displayed prompt items can follow the refresh rate of the game screen, further improving the auxiliary effect and timeliness of the assistance to the user.
[0060] In another embodiment, Figure 2 A schematic diagram of a processing method provided in an embodiment of the present application Figure 2 ,refer to Figure 2 As shown, the processing method may also include but is not limited to the following S201 to S205:
[0061] Step S201: If the target application is in running state, the image processing engine is called.
[0062] Step S202: Processing a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state.
[0063] Step S203: Based on the tag and the position, a prompt item of the target object is displayed on the screen where the target application is in the running state.
[0064] For the implementation process of S201 to S203, reference may be made to the detailed description of S101 to S103 above, which will not be repeated here.
[0065] Step S204: obtaining an operation image, wherein the operation image is an image of a real-time screen corresponding to an operation item generated in response to the input information representing the user input operation obtained when the target application is in a running state.
[0066] The operation image refers to an image that a user can operate when the target application is in the running state.
[0067] Input information is information used to represent user operations. The embodiment of the present application does not specifically limit the form of input information, and the input information can be text information, voice information, or mouse movement information. For example, the input information can be information input by the user moving the mouse; it can also be information input by the user operating the keyboard.
[0068] For example, the operation image may be an image of a user aiming a gun at an enemy, or an image of a user selecting a chess or card game.
[0069] Step S205: determining whether the prompt item is switched from a first state to a second state based on the positions of the operation image and the target object, wherein the prompt item in the first state and the prompt item in the second state have different meanings for prompting the target object.
[0070] The first state of the prompt item is used to mark the target object. For example, the first state is used to mark the enemy in the game.
[0071] The second state of the prompt item is used to mark the target object when the position of the user operation area in the operation image matches the position of the target object. For example, when the user aims a gun at the enemy, the second state is used to mark the target object.
[0072] It should be noted that the process of determining whether the prompt item switches from the first state to the second state may be that the image processing engine analyzes the operation image and outputs the result for the input information, that is, determining the switching state will not affect the target application, and the two run independently.
[0073] Simply put, after the user performs an operation in the screen image of the target application running state, an operation image is obtained; the position of the operation object in the operation image is matched with the position of the target object. If the operation object matches the position of the target object, the prompt item is switched from the first state to the second state, otherwise, the prompt item remains in the first state.
[0074] Exemplarily, the target application is the "Peace Elite" game. After the user starts the game, the image processing engine is called to process the game screen, the enemy's label and position are determined, and a prompt item is displayed above the enemy's head in the game screen according to the enemy's label and position. The prompt item is a green marking point. The operation image of the user aiming at the enemy is obtained, and the position of the user's aiming point is matched with the enemy's position. If the aiming point matches the enemy's position, the green marking point is changed to a red marking point; otherwise, the green marking point is kept unchanged.
[0075] In an embodiment of the present application, the state of the prompt item is changed by matching the image of the user's operation with the position of the target object, thereby further assisting and warning the user. This improves the assistance effect without interfering with the user's operation, thereby improving the user's gaming experience and fun.
[0076] In another embodiment, Figure 3 A schematic diagram of a processing method provided in an embodiment of the present application Figure 3 ,like Figure 3 As shown, the processing method may include but is not limited to the following S301 to S306:
[0077] S301: If the target application is in running state, call the image processing engine.
[0078] For the implementation process of S301, reference may be made to the detailed description of S101 above, which will not be repeated here.
[0079] S302: Obtain a target image.
[0080] The target image is an image of a real-time screen corresponding to the target application in the running state. The embodiment of the present application does not limit the method for obtaining the target image.
[0081] S303: Process each frame of the target image based on the first image processing engine to obtain multiple local images for each frame of the target image, each of the multiple local images includes an object; and a combination of the multiple local images is smaller than the target image.
[0082] A local image refers to an object to be identified in a target image. For example, if there are people, flowers, guns and other objects in the target image, then the people, flowers and guns are local images, and the area where the people, flowers and guns are located is the area where the local image is located.
[0083] Exemplarily, S303 is implemented as follows: the electronic device inputs the target image into a pre-trained first image processing engine, uses its vectorized reasoning capability to perform computational processing on the input target image, and obtains and outputs a plurality of local images.
[0084] S304: Processing the multiple partial images based on a second image processing engine to obtain label information corresponding to the multiple partial images; the first image processing engine is different from the second image processing engine.
[0085] Label information is used to indicate the category of an object. For example, a label can be a person, a plant, a gun, etc.
[0086] Exemplarily, S304 is implemented as follows: the electronic device inputs multiple local images into a pre-trained second image processing engine, uses its vectorized reasoning ability to perform computational processing on the input multiple local images, and obtains and outputs label information corresponding to the multiple local images.
[0087] S305: Determine a target tag based on the multiple tag information, where the target tag corresponds to a target object.
[0088] The target tag is the tag of the target object that needs to be paid attention to during the operation of the target application. For example, if the target object in a competitive game is the enemy, then the target tag is the enemy; if the target object in a card counter is the number of chess and card codes, then the target tag is the number of chess and card codes.
[0089] Exemplarily, S305 is implemented as follows: the electronic device searches for a target tag from multiple tags according to a keyword.
[0090] S306: Displaying a prompt item of the target tag on the screen where the target application is in the running state based on the target tag and the position of the partial image corresponding to the target tag.
[0091] The position of the local image is used to indicate the area where the local image is located. The embodiment of the present application does not specifically limit the position of the image. For example, it can be the coordinates of the four vertices of the circumscribed rectangle of the local image; it can also be the center point, length and width of the rectangle outside the local image; it can also be the position of the local image represented by different color areas.
[0092] Exemplarily, S306 is implemented as follows: finding the target object in the target image according to the target tag and the position of the local image corresponding to the target tag, and displaying a prompt item of the target tag on the target image in the target object.
[0093] In the embodiment of the present application, the first embodiment of S301-S306 may include: first, when the target application is in the running state, call the image processing engine; second, obtain the target image; then, input each frame of the target image into the first image processing engine, the first image processing engine roughly processes each frame of the target image, and quickly obtains multiple local objects; then, inputs the multiple local objects into the second image processing engine, derives and outputs the label information corresponding to the multiple local objects; then, determines the target label among the multiple labels; finally, according to the position of the target label and the local image corresponding to the target label, displays the prompt item of the target label on the screen where the target application is in the running state. In this way, by using the first image processing engine to roughly process the target image, the speed of the first image processing engine in processing the target object is improved, and the speed of displaying the prompt item of the target label is further improved, thereby improving the user experience.
[0094] In the embodiment of the present application, the second embodiment of S301-S306 may include: first, when the target application is in the running state, calling the image processing engine; second, obtaining the target image; then, inputting each frame of the target image into the first image processing engine for processing, deriving and outputting multiple local objects, wherein the combination of multiple local objects is smaller than the target object; then, inputting the local image smaller than the target image into the second image processing engine; finally, displaying the prompt item of the target tag on the screen where the target application is in the running state according to the position of the target tag and the local image corresponding to the target tag. In this way, the target image is processed by the first image processing engine, the target image is decomposed into small local images and unnecessary image parts are eliminated, the image data is reduced, thereby reducing the calculation amount of the second image processing engine, speeding up the calculation speed of the second image processing engine, further improving the speed of displaying the prompt item of the target tag, and improving the user experience.
[0095] In the embodiment of the present application, the third embodiment of S301-S306 includes: first, when the target application is in the running state, the image processing engine is called; second, the target image is obtained; then, the Nth frame of the target image is input into the first image processing engine, and the first image processing engine derives and outputs multiple Nth local images; then, while the multiple Nth local images are input into the second image processing engine, the N+1th frame of the target image is input into the first image processing engine, and the first image processing engine and the second image processing engine process synchronously; finally, according to the position of the target tag and the local image corresponding to the target tag, the prompt item of the target tag is displayed on the screen where the target application is in the running state. In this way, by processing multiple frames of images in parallel by the first image processing engine and the second image processing engine, multiple frames of target images can be partially processed in parallel in the target application, which further improves the speed of displaying the prompt item of the target tag and improves the user experience.
[0096] In the above three embodiments, embodiment one and embodiment two can be combined. For example, embodiments S301-S306 can also include: inputting each frame of target image into the first image processing engine, the first image processing engine roughly processes each frame of target image, and quickly obtains multiple local objects, wherein the combination of multiple local objects is smaller than the target object; then, inputting the local image smaller than the target image into the second image processing engine; finally, displaying the prompt item of the target label on the screen where the target application is in the running state according to the position of the target label and the local image corresponding to the target label. It should be noted that any two combinations of the above three embodiments can increase the speed of displaying the prompt item of the target label; the combination of the above three embodiments can also increase the speed of displaying the prompt item of the target label. It will not be elaborated here.
[0097] In another embodiment, Figure 4A schematic diagram of a processing method provided in an embodiment of the present application Figure 4 ,like Figure 4 As shown, the processing method may include but is not limited to the following S401 to S407:
[0098] Step S401: If the target application is in running state, the image processing engine is called.
[0099] For the implementation process of S401, reference may be made to the detailed description of S101 above, which will not be repeated here.
[0100] Step S402: Obtain a target image.
[0101] For the implementation process of S402, reference may be made to the detailed description of S302 above, which will not be repeated here.
[0102] Step S403: Process each frame of the target image based on the first image processing engine to obtain an array representing multiple local images, where each group of elements of the array includes four coordinate points, and the image corresponding to the region formed by the four coordinate points is a local image.
[0103] An array used to represent the location of the partial image in the target image. Here, the array can be the coordinates of the four vertices of the circumscribed rectangle of the partial image.
[0104] Exemplarily, S403 is implemented as follows: inputting each frame of the target image into the first image processing engine, and the first image processing engine derives and outputs four coordinate points in the plurality of local images.
[0105] In another embodiment, the elements in the array may also be the coordinates of the center point of the circumscribed rectangle of the local image, and the length and width of the circumscribed rectangle.
[0106] Step S404: Processing the local image represented by each group of elements in the array based on the second image processing engine to obtain a label for each group of elements in the array.
[0107] The label of each group of elements is the category label of the local image corresponding to each group of elements.
[0108] The embodiment of the present application does not limit the determination of the local image represented by each group of elements. For example, a correspondence relationship between each group of elements and the local image is pre-established. Correspondingly, after determining a group of elements, the group of elements is matched with the element group in the correspondence relationship to determine the local image corresponding to the group of elements.
[0109] Exemplarily, S404 is implemented as follows: the local image represented by each group of elements in the array is input into the second image processing engine, and the second image processing engine infers and outputs a label of each element.
[0110] Step S405: adding a label to each group of elements in the array.
[0111] Exemplarily, S405 is implemented as follows: after using the second image processing engine to determine the label of the local image corresponding to each group of elements, a label is added to each group of elements.
[0112] Step S406: determining a target tag based on the multiple tags, where the target tag corresponds to a target object.
[0113] For the implementation process of S406, reference may be made to the detailed description of S305 above, which will not be repeated here.
[0114] Step S407: displaying a prompt item of the target tag on the screen where the target application is in the running state based on a group of elements including the target tag.
[0115] Exemplarily, S407 is implemented as follows: finding the target object in the target image according to four coordinate points in a group of elements in the target tag, and displaying a prompt item of the target tag at the target object.
[0116] In the present embodiment, after acquiring the target image, the target image is input into the first image processing engine, the first image processing engine analyzes the target image, and outputs an array corresponding to each local image in multiple local images; the local image corresponding to each array is determined; the multiple local images are input into the second image processing engine, the second image processing engine analyzes the local images, determines the corresponding category label of each local image, and adds a label to each local image; the target label is queried among the multiple labels according to the keyword, the target object in the target image is determined according to a set of elements of the target label, and the prompt item of the target label is displayed at the target object in the screen where the target application is running.
[0117] In an embodiment of the present application, first, by using a first image processing engine, four coordinate points representing the position of a local image are obtained, thereby improving the processing speed of the first image processing engine; then, the local image corresponding to the four coordinate points is input into a second image processing engine to obtain a corresponding target label, and by deleting unnecessary parts and reducing the amount of data, the processing speed of the second image processing engine is improved, further improving the reasoning process of the entire target image, improving the speed of displaying prompt items of the target label, and improving the user experience.
[0118] In another embodiment, the second image processing engine processes a plurality of partial images for the Nth frame target image while the first image processing engine processes the N+1th frame target image.
[0119] N is an integer greater than or equal to 1.
[0120] In an embodiment of the present application, when there is a first image processing engine and a second image processing engine in the image processing engine, in addition to serially processing each frame of the target image, it can also include parallel processing of the two image processing engines. Exemplarily, the target image is obtained; then, the Nth frame of the target image is input into the first image processing engine, and the first image processing engine derives and outputs multiple Nth partial images; then, while the multiple Nth partial images are input into the second image processing engine, the N+1th frame of the target image is input into the first image processing engine, and the first image processing engine and the second image processing engine process synchronously; finally, according to the position of the target tag and the partial image corresponding to the target tag, a prompt item of the target tag is displayed on the screen where the target application is in the running state.
[0121] In an embodiment of the present application, multiple frames of images are processed in parallel by the first image processing engine and the second image processing engine, so that multiple frames of target images can be partially processed in parallel in the target application, further improving the speed of displaying prompt items of target tags.
[0122] In another embodiment, the processing method may include but is not limited to the following S501:
[0123] Step S501: configuring a first processor to run the first image processing engine and a second processor to run the second image processing engine based on the computing resources occupied by the target application;
[0124] The computing performance of the first processor is higher than the computing performance of the second processor;
[0125] The first processor is different from a processor running the target application;
[0126] The second processor is different from the processor running the target application;
[0127] The first processor and the second processor are different processors, or different computing cores in the same processor.
[0128] The embodiment of the present application does not specifically limit the method for obtaining the occupied computing resources. By way of example, the computing resources occupied by the target application can be obtained through a resource detection module, a task manager, a performance monitor, logs, and monitoring.
[0129] The occupied computing resources are used to characterize the resource occupation in the processor. Generally, the resource occupation ratio indicates the occupied computing resources.
[0130] The processor is the hardware unit that runs the image processing engine. The processors include: IGPU, DGPU, NPU, CPU big core and CPU small core, etc.
[0131] The embodiment of the present application does not limit the number of second image processors, which can be set according to actual conditions.
[0132] Exemplarily, when the second image processing engine processes multiple local images, the multiple local images may be divided into multiple processors so that the multiple local images are processed in parallel.
[0133] It should be noted that when the image processing engine is used to assist the user in providing warning, the operation of the target application will not be affected. Therefore, the first processor is different from the processor of the target application, and the second processor is different from the processor of the target application.
[0134] Exemplarily, the first embodiment of S501 is: obtaining resource occupancy ratios of different processors occupied by the target application, sorting the resource occupancy ratios from low to high, and taking the first M processors that meet the preset resource occupancy ratio conditions in the sorting results as the first processor and the second processor, wherein there may be one or more second processors. M is an integer greater than or equal to 2. In the first embodiment of S501, by selecting processors with less computing resources for the first processor and the second processor, it is ensured that the processors can fully bear the operation of the image processing engine, thereby improving the computing speed of the image processing engine;
[0135] It should be noted that the first image processing engine needs to process the entire target image to obtain multiple local images; while the second image processing engine can distribute the multiple local images to different processors so that the multiple local images can be processed in parallel. Therefore, the computing performance of the first processor can be higher than that of the second processor.
[0136] In another embodiment, the computing performance of the first processor may also be the same as that of the second processor.
[0137] Exemplarily, the second embodiment of S501 is: according to the resource occupancy ratio of the target application to different processors and the score table obtained by pre-testing, the first processor and the second processor are configured. The score table is a test effect score table obtained by the experimenter running the first image processing engine and the second image processing engine on each processor in advance. In the second embodiment of S502, the score table obtained by pre-testing provides a benchmark for determining the first processor and the second processor, reduces the workload of configuring the first processor and the second processor, and further improves the speed and efficiency of the image processing engine in processing images.
[0138] In an embodiment of the present application, a first processor and a second processor different from the processor of the target application are configured according to the computing resources occupied by the target application to avoid the image processing engine competing with the target application for resources when running, affecting the frame rate of the target application and reducing the user experience.
[0139] In another embodiment, the first image processing engine and the second image processing engine both belong to a real-time computer vision model, the first image processing engine is used to recognize objects, and the second image processing engine is used to predict the classification of objects.
[0140] A real-time computer vision model is a system based on artificial intelligence technology that understands and interprets images or data in real time. Common computer vision models include but are not limited to: video target tracking models based on deep learning, convolutional neural network models, motion estimation models based on optical flow, etc.
[0141] The first image processing engine may be any pre-trained model capable of identifying objects. For example, the first image processing engine may be a lightweight deep neural network (MobileNet) model.
[0142] The second image processing engine may be any pre-trained model that has the function of predicting object classification. For example, the second image processing engine may be a deep residual network (Residual Network-18, Resnet18) model.
[0143] In the application embodiment, the use of a real-time computer vision model can improve the efficiency, speed, intelligence, etc. of image processing, thereby further improving the speed and accuracy of displaying target label prompt items.
[0144] In another embodiment, the display prompt items for the target object of a frame of target image are completed within the target time.
[0145] It should be noted that when the frame rate reaches 10 to 12 frames per second, a video will be formed, that is, the display prompt items of the target object of 10 to 12 frames of target images need to be completed within 1 second (s).
[0146] The target time can be any time period that meets the conditions, for example, greater than 0.08s, 0.1s, etc.
[0147] In an embodiment of the present application, by completing the display prompt items of the target object of a frame of target image within the target time, the speed of displaying the prompt items of the target label is ensured to be consistent with the refresh rate of the target application, thereby ensuring the user experience.
[0148] Below, the processing method provided by this application is described through a complete embodiment.
[0149] For competitive games, the game screen changes very quickly, requiring users to find the enemy in a very short time and react quickly in order to win the game.
[0150] With the rapid development of AI computing power and technology, this application proposes a processing method with the help of AI models to provide players with rapid assistance and improve their competitive level without increasing hardware costs and almost without affecting the game frame rate (FPS) performance.
[0151] Figure 5 A schematic diagram of a processing method provided in an embodiment of the present application Figure 5 ,like Figure 5 As shown, the method includes steps S1 to S12:
[0152] Step S1: monitor the start of the game process to be assisted.
[0153] It should be understood that the target application may be gaming software.
[0154] Step S2: Start the game software assistant.
[0155] It will be appreciated that the gaming software assistant may include an image processing engine.
[0156] Step S3: monitor for a period of time, identify the occupation ratio of the game to the CPU core, iGPU, NPU and other hardware resources, and sort them from low to high according to the occupation ratio.
[0157] It should be understood that hardware such as CPU big and small cores, iGPU, NPU, etc. are processors.
[0158] Step S4: Based on the sorting result, determine the first processor and the second processor.
[0159] Step S5: deploying two image processing engines on the first processor and the second processor.
[0160] Step S6: Obtain the target image of the real-time screen when the game is running.
[0161] Here, the target image may be a game screen.
[0162] Step S7: Process the target image based on the first image processing engine to obtain multiple local images.
[0163] Here, the first image processing engine is AI model 1.
[0164] Step S8: Process the local image based on the second image processing engine to obtain a label corresponding to the local image.
[0165] Here, the second image processing engine is AI model 2. The label is a category label.
[0166] Step S9: Determine a target tag among multiple tags.
[0167] The target tag can be an enemy in the game.
[0168] Step S10: Based on the target tag and the position of the target tag, a prompt item of the target object is superimposed and displayed on the screen where the target application is in the running state.
[0169] The prompt item can be a mark of the target object in the game screen, and the prompt item can be used to assist the user in foresight.
[0170] Step S11: Determine whether the time for displaying the prompt item of the target object in a frame of the target image meets the target time. If it meets the target time, execute step S11; otherwise, execute step S5.
[0171] The time for displaying the prompt item of the target object in one frame of the target image can be the recognition efficiency.
[0172] Step S12: using the first processor to run the first image processing engine, and using the second image processor to run the second image processing engine.
[0173] The advantages of the embodiments of the present application over the prior art are as follows: (1) After using two smaller models, the requirements for computing power are reduced, so that CPU large cores, CPU small cores, iGPUs, NPUs and other hardware with lower computing power can be used for reasoning, avoiding competing for resources with the dGPU used by games. (2) After using two smaller models, the object recognition model and the classification model can be run on different hardware, and can be operated in parallel, greatly improving the overall efficiency of capturing images, framing objects, classification, and annotation prompts, thereby improving the user experience.
[0174] In a second aspect, an embodiment of the present application provides a processing device, Figure 6 A schematic diagram of the structure of a processing device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the processing device 600 includes:
[0175] Monitoring module 601, used to monitor the target application program in running state;
[0176] The control module 602 is used to call the image processing engine if the target application is in a running state, wherein the image processing engine is used to process the target image to obtain a label representing the target object and the position representing the target object, and the target image is an image of a real-time screen corresponding to the target application in a running state;
[0177] The marking module 603 is used to overlay and display a prompt item of the target object on the screen where the target application is in a running state based on the tag and the position.
[0178] In some embodiments, the processing device also includes a determination module for obtaining an operation image, wherein the operation image is an image of a real-time screen corresponding to an operation item generated in response to input information obtained to represent a user input operation when the target application is in a running state; based on the position of the operation image and the target object, determining whether the prompt item switches from a first state to a second state, the prompt item in the first state and the prompt item in the second state have different meanings for prompting the target object.
[0179] In some embodiments, the control module 602 is also used to obtain a target image; based on the first image processing engine, each frame of the target image is processed to obtain multiple local images for each frame of the target image, each of the multiple local images includes an object; the combination of the multiple local images is smaller than the target image; based on the second image processing engine, the multiple local images are processed to obtain label information corresponding to the multiple local images; the first image processing engine is different from the second image processing engine.
[0180] In some embodiments, the marking module 603 is also used to determine a target tag based on the multiple tags, where the target tag corresponds to a target object; and to display a prompt item of the target tag on a screen where the target application is running based on the position of the target tag and a local image corresponding to the target tag.
[0181] In some embodiments, the control module 602 is also used to process each frame of the target image based on the first image processing engine to obtain an array representing multiple local images, each group of elements of the array includes four coordinate points, and the image corresponding to the area constituted by the four coordinate points is a local image.
[0182] In some embodiments, the control module 602 is further used to process the local image represented by each group of elements in the array based on the second image processing engine to obtain a label for each group of elements in the array; and add a label to each group of elements in the array.
[0183] In some embodiments, the marking module 603 is further configured to display a prompt item of the target tag on the screen where the target application is in a running state based on a group of elements including the target tag.
[0184] In some embodiments, the second image processing engine processes a plurality of partial images for the Nth frame target image while the first image processing engine processes the N+1th frame target image.
[0185] In some embodiments, the processing device also includes a configuration module for configuring a first processor to run the first image processing engine and a second processor to run the second image processing engine based on the computing resources occupied by the target application; wherein the computing performance of the first processor is higher than the computing performance of the second processor; the first processor is different from the processor running the target application; the second processor is different from the processor running the target application; the first processor and the second processor are different processors, or different computing cores in the same processor.
[0186] In some embodiments, the first image processing engine and the second image processing engine both belong to a real-time computer vision model, the first image processing engine is used to recognize objects, and the second image processing engine is used to predict the classification of objects.
[0187] In some embodiments, the display prompt item for the target object of a frame of target image is completed within the target time.
[0188] Thirdly, Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, an electronic device 700 includes a display screen 701 and a processor 702:
[0189] Display 701
[0190] Processor 702 is used to call an image processing engine if the target application is in a running state; based on the image processing engine, process the target image to obtain a label representing the target object and the position representing the target object, the target image is an image of a real-time screen corresponding to the target application in a running state; based on the label and the position, superimpose a prompt item of the target object on the screen when the target application is in a running state.
[0191] In a specific implementation process, the monitoring module 601, the control module 602 and the marking module 603 can be implemented by a processor 702 located on the electronic device.
[0192] In some embodiments, the processor 702 further includes a hardware layer, wherein the hardware layer includes a CPU, an iGPU or a dGPU, and an NPU.
[0193] The embodiment of the present application also provides an artificial intelligence game space (AIPC Gaming Zone) architecture diagram 800, which includes an application layer 801 for providing an interactive interface to the user and calling the framework of the image processing engine in the model layer; a model layer 802 for providing an image processing engine building framework, wherein the framework may include ONNX, OpenVino and Pytorch, etc.; a hardware layer acceleration layer 803 for accelerating the reasoning speed of the image processing engine using an optimized acceleration model accelerator, wherein the acceleration model optimizer may include: TesorRT, bigDL-LLM and DirectML, etc.; a hardware layer 804 for running program instructions in the image processing engine, wherein the hardware layer includes CPU, iGPU or dGPU, NPU. It can be understood that the small model is independent, and it is converted into the format of which framework to run. The model framework is equivalent to the basic function of realizing the neural network (small model-neural network algorithm). The model framework deals with hardware, and the small model is a function that can be implemented with any framework (ONNX, OpenVino and Pytorch). In the above embodiments of the present application, the first image engine is a small model (such as MobileNet, etc.), and the recognition rate of the small model (such as MobileNet) is adjusted, such as reducing its recognition rate to improve its processing speed, and the second image engine is another small model (such as Resnet18, etc.), and the first image engine and the second image engine are both implemented on one side of the electronic device for reasoning.
[0194] Exemplarily, the application layer calls the small model in the model layer, and through the model framework in the model layer (the small model runs on the model framework), the small model runs on the hardware in the hardware layer such as the hardware in the above implementation (for example, CPU, iGPU or dGPU, NPU) or on different cores of a processor.
[0195] In some embodiments, the electronic device 700 further includes: a communication bus, an external communication interface, and a memory. The communication bus is configured to realize connection communication between these components. The external communication interface may include a standard wired interface and a wireless interface. The memory is configured to store instructions and applications executable by the processor 1102, and can also cache data to be processed or processed by the processor 702 and each module in the electronic device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0196] It should be noted that the various units included in the processing device provided in the embodiment of the present application can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.
[0197] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0198] It should be noted that in the embodiment of the present application, if the above-mentioned processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0199] In a fourth aspect, the present application further provides a storage medium, on which a computer program is stored. When the computer program on the storage medium is executed, the steps in the processing method provided in the embodiment of the present application are implemented.
[0200] In a fifth aspect, the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the above-mentioned processing method.
[0201] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0202] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0203] It should be noted that, in the application, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0204] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0205] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0206] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0207] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0208] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0209] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A processing method, the method comprising: If the target application is running, call the image processing engine; Processing a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state; Based on the tag and the position, a prompt item of the target object is superimposed and displayed on a screen where the target application is in a running state.
2. The method according to claim 1, further comprising: Obtaining an operation image, wherein the operation image is an image of a real-time screen corresponding to an operation item generated by the target application in a running state in response to the obtained input information representing the user input operation; Based on the positions of the operation image and the target object, it is determined whether the prompt item is switched from a first state to a second state, and the prompt item in the first state and the prompt item in the second state have different meanings for prompting the target object.
3. The method according to claim 1, wherein the step of obtaining a label representing a target object and a position representing the target object by processing the target image based on the image processing engine comprises: Obtaining a target image; Processing each frame of the target image based on the first image processing engine to obtain a plurality of partial images for each frame of the target image, each of the plurality of partial images including an object; a combination of the plurality of partial images is smaller than the target image; Processing the multiple partial images based on a second image processing engine to obtain label information corresponding to the multiple partial images; the first image processing engine is different from the second image processing engine; The method of displaying the prompt item of the target object on the screen in which the target application is running based on the tag and the position includes: Determine a target tag based on the multiple tags, the target tag corresponding to the target object; A prompt item of the target tag is displayed on a screen where the target application is in a running state based on the target tag and a position of a partial image corresponding to the target tag.
4. The method according to claim 3, wherein the first image processing engine processes each frame of the target image to obtain a plurality of local images for each frame of the target image, comprising: Processing each frame of the target image based on the first image processing engine to obtain an array representing a plurality of local images, wherein each group of elements of the array includes four coordinate points, and the image corresponding to the region formed by the four coordinate points is a local image; The step of processing the plurality of partial images based on the second image processing engine to obtain label information corresponding to the plurality of partial images includes: Processing the local image represented by each group of elements in the array based on the second image processing engine to obtain a label for each group of elements in the array; Adding labels to each group of elements in the array; The step of displaying a prompt item of the target tag on a screen in which the target application is running based on the position of the target tag and the partial image corresponding to the target tag includes: Based on a group of elements including the target tag, a prompt item of the target tag is displayed on a screen where the target application is in a running state. 5 . The method according to claim 3 , wherein the second image processing engine processes a plurality of partial images for the Nth frame target image while the first image processing engine processes the N+1th frame target image.
6. The method according to claim 3, further comprising: Based on the computing resources occupied by the target application, configuring a first processor to run the first image processing engine and a second processor to run the second image processing engine; The computing performance of the first processor is higher than the computing performance of the second processor; The first processor is different from a processor running the target application; The second processor is different from the processor running the target application; The first processor and the second processor are different processors, or different computing cores in the same processor.
7. According to the method of claim 6, the first image processing engine and the second image processing engine both belong to a real-time computer vision model, the first image processing engine is used to identify objects, and the second image processing engine is used to predict the classification of objects.
8. The method according to claim 1, wherein the display prompt items for the target object of a frame of target image are completed within the target time.
9. A processing device comprising: A monitoring module, used to monitor the target application in running state; A control module, configured to call an image processing engine if the target application is in a running state, wherein the image processing engine is configured to process a target image to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application being in a running state; A marking module is used to overlay and display a prompt item of the target object on a screen where the target application is in a running state based on the label and the position.
10. An electronic device comprising: Display A processor for invoking an image processing engine if the target application is in a running state; Processing a target image based on the image processing engine to obtain a label representing a target object and a position representing the target object, wherein the target image is an image of a real-time screen corresponding to the target application in a running state; Based on the tag and the position, a prompt item of the target object is superimposed and displayed on a screen where the target application is in a running state.
