CN113996058B - Information processing method, apparatus, electronic device, and computer-readable storage medium - Google Patents
Information processing method, apparatus, electronic device, and computer-readable storage medium Download PDFInfo
- Publication number
- CN113996058B CN113996058B CN202111282702.XA CN202111282702A CN113996058B CN 113996058 B CN113996058 B CN 113996058B CN 202111282702 A CN202111282702 A CN 202111282702A CN 113996058 B CN113996058 B CN 113996058B
- Authority
- CN
- China
- Prior art keywords
- target
- application
- input event
- terminal
- event
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 62
- 238000003672 processing method Methods 0.000 title claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 127
- 238000000034 method Methods 0.000 claims abstract description 63
- 230000008569 process Effects 0.000 claims abstract description 46
- 230000004044 response Effects 0.000 claims description 39
- 238000012216 screening Methods 0.000 claims description 16
- 238000004806 packaging method and process Methods 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000013473 artificial intelligence Methods 0.000 abstract 1
- 238000012544 monitoring process Methods 0.000 description 67
- 230000005540 biological transmission Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 8
- 230000003993 interaction Effects 0.000 description 5
- 238000013507 mapping Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/20—Input arrangements for video game devices
- A63F13/21—Input arrangements for video game devices characterised by their sensors, purposes or types
- A63F13/214—Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads
- A63F13/2145—Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads the surface being also a display device, e.g. touch screens
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/30—Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
- A63F13/35—Details of game servers
- A63F13/355—Performing operations on behalf of clients with restricted processing capabilities, e.g. servers transform changing game scene into an encoded video stream for transmitting to a mobile phone or a thin client
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/10—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
- A63F2300/1068—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad
- A63F2300/1075—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad using a touch screen
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/30—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
- A63F2300/302—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device specially adapted for receiving control signals not targeted to a display device or game input means, e.g. vibrating driver's seat, scent dispenser
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses an information processing method, an information processing device, electronic equipment and a computer readable storage medium; when a target terminal application of a terminal is started, the input event of the terminal is acquired through the acquisition component of the target terminal application, the target input event of the target terminal application is identified from the input event in the acquisition process, and the target input event is processed through the logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component; the scheme can improve the processing efficiency of information processing, and the embodiment of the invention can be applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic and the like.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an information processing method, an apparatus, an electronic device, and a computer readable storage medium.
Background
In recent years, with the rapid development of internet technology, more and more information can be processed by application programs in terminals. For example, an input event generated by an input device of a terminal may be processed, especially in a cloud game scenario, where the input event needs to be converted into a system event by an operating system of the terminal to be transmitted to a terminal application for processing, thereby causing a large delay. To reduce latency, existing information processing methods may employ low latency touch input devices to process input events generated by a user's touch.
In the research and practice process of the prior art, the inventor finds that when the low-delay touch input device is adopted to process the input event, the touch track of the user is displayed on the physical screen, after the input event is processed, the touch track is replaced by the processed content, only the sensory delay of the user is reduced, the processing process of the input event still needs to be processed through the operating system of the terminal, the processed system event is transmitted to the terminal for application, and the problem of higher delay still exists, so that the processing efficiency of information processing is reduced.
Disclosure of Invention
The embodiment of the invention provides an information processing method, an information processing device, electronic equipment and a computer readable storage medium, which can improve the processing efficiency of information processing.
An information processing method, comprising:
when a target terminal application of a terminal is started, acquiring an input event of the terminal through an acquisition component of the target terminal application;
during the acquisition process, identifying a target input event aiming at the target terminal application from the input events;
and processing the target input event through a logic component of the target terminal application so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
Optionally, the embodiment of the invention further provides another information processing method, which is applied to the cloud game and comprises the following steps:
when a target cloud game application of a terminal is started, acquiring an input event of the terminal through an acquisition component of the target cloud game application;
during the acquisition process, identifying a target input event for the target cloud game application from the input events;
and processing the target input event through a logic component of the target cloud game application so as to avoid processing the event except the target input event acquired by the acquisition component by the logic component. Accordingly, an embodiment of the present invention provides an information processing apparatus including:
the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an input event of a terminal through an acquisition component of a target terminal application of the terminal when the target terminal application of the terminal is started;
the identification unit is used for identifying a target input event aiming at the target terminal application from the input events in the acquisition process;
and the processing unit is used for processing the target input event through a logic component of the target terminal application so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
Optionally, in some embodiments, the collecting unit may be specifically configured to receive an event collecting request sent by the target terminal application for an input event of the terminal; stopping terminal acquisition service according to the event acquisition request, so that the target terminal application starts an acquisition component, wherein the terminal acquisition service is used for acquiring an input event of the terminal; and acquiring the input event of the terminal through an acquisition component of the target terminal application.
Optionally, in some embodiments, the collecting unit may be specifically configured to start the terminal collecting service when receiving a request for stopping collecting sent by the target terminal application; and collecting the input event of the terminal based on the terminal collecting service.
Optionally, in some embodiments, the collecting unit may be specifically configured to obtain permission information of the target terminal application, and add an event collecting permission to the permission information, so that the target terminal application starts a collecting component; and acquiring the input event of the terminal through an acquisition component of the target terminal application.
Optionally, in some embodiments, the collecting unit may be specifically configured to intercept, by using the collecting component, the target event when the target terminal application receives the target event corresponding to the input event, so that the target terminal application ignores the target event.
Optionally, in some embodiments, the collecting unit may be specifically configured to obtain, when it is detected that the terminal application of the terminal is started, an application identifier of the currently started terminal application; when the application identifier is a preset application identifier, determining the currently started terminal application as a target terminal application; when a target terminal application of a terminal is started, the acquisition component of the target terminal application acquires an input event of the terminal, and the method comprises the following steps: and acquiring the input event of the terminal through an acquisition component of the target terminal application.
Optionally, in some embodiments, the processing unit may be specifically configured to identify event content in the target input event, and determine an event type of the target input event according to the event content; and processing the target input event by a logic component of the target terminal application based on the event type.
Optionally, in some embodiments, the processing unit may be specifically configured to determine processing logic corresponding to the target input event according to the event type; screening out a target logic component corresponding to the processing logic from logic components applied by the target terminal; and carrying out logic processing on the target input event through the target logic component.
Optionally, in some embodiments, the processing unit may be specifically configured to send, by using the acquisition component of the target terminal application, a logic processing request to the target logic component, so that the target logic component responds to the target input event; receiving response information returned by the target logic component, and updating current page information of the target terminal application based on the response information; and generating an updated page based on the updated page information, and displaying the updated page.
Optionally, in some embodiments, the information processing apparatus may further include a page update unit, where the page update unit may be specifically configured to encapsulate the response information to obtain application control data for the target terminal application, and send the application control data to an application server corresponding to the target terminal application; receiving application page information corresponding to the application control data returned by the application server; and updating the current page of the target terminal application according to the application page information, and displaying the updated page.
Optionally, in some embodiments, the identifying unit may be specifically configured to obtain, by using the collecting component, attribute information of the input event during a collecting process; identifying application address information corresponding to the input event in the attribute information; and screening out a target input event corresponding to the target terminal application from the input events according to the application address information.
Optionally, in some embodiments, the identifying unit may be specifically configured to obtain current application address information of the target terminal application; matching the current application address information with the application address information corresponding to the input event; and screening the input event successfully matched with the current application address information from the input events to obtain a target input event.
Optionally, in some embodiments, the page updating unit may be specifically configured to encapsulate the processed target input event to obtain game control data for the target cloud game application; sending the game control data to a game server corresponding to the target cloud game application, so that the game server renders a game picture of the target cloud game application according to the game control data; and receiving a game picture of the target cloud game application returned by the game server, and displaying the game picture of the target cloud game application. In addition, the embodiment of the invention also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores an application program, and the processor is used for running the application program in the memory to realize the information processing method provided by the embodiment of the invention.
In addition, the embodiment of the invention also provides a computer readable storage medium, which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any information processing generating method provided by the embodiment of the invention.
When a target terminal application of a terminal is started, the input event of the terminal is acquired through the acquisition component of the target terminal application, the target input event of the target terminal application is identified from the input event in the acquisition process, and the target input event is processed through the logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component; according to the scheme, the input event is acquired through the acquisition component of the target terminal application, then the acquired target input event is directly processed by the logic component of the target terminal application, and conversion and distribution are not needed through the operating system of the terminal, so that the transmission time of the input event is shortened, and the processing efficiency of information processing can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of an information processing method provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an information processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of acquisition mode adjustment for input events provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of acquisition rights adjustment for an input event provided by an embodiment of the present invention;
fig. 5 is a schematic flow chart of processing an input event by a target terminal application according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of transmitting an input event in a terminal device in the prior art according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of delay in the delivery of an input event according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a prior art terminal application processing a received system event according to an embodiment of the present invention;
FIG. 9 is another flow chart of an information processing method according to an embodiment of the present invention;
FIG. 10 is a diagram of a cloud gaming system architecture provided by an embodiment of the present invention;
FIG. 11 is a timing diagram of interaction between a terminal and a game server in a cloud game scenario provided by an embodiment of the present invention;
fig. 12 is a schematic structural view of an information processing apparatus provided by an embodiment of the present invention;
Fig. 13 is another schematic structural view of an information processing apparatus provided in an embodiment of the present invention;
fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides an information processing method, an information processing device and a computer readable storage medium. The information processing apparatus may be integrated in an electronic device, which may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
For example, referring to fig. 1, taking an example that an information processing apparatus is integrated in an electronic device, when a target terminal application of a terminal is started, the electronic device collects an input event of the terminal through a collection component of the target terminal application, in the collection process, a target input event of the target terminal application is identified from the input events, and the target input event is processed through a logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event collected by the collection component, and further, the processing efficiency of information processing is improved.
The information processing mainly processes input events generated by an input device of a terminal or an electronic device, where the input device refers to a hardware device that is directly operated by a user to issue control instructions, and may include a mouse, a keyboard, a touch screen, a handle, or other devices that can input information. In addition, the input event is processed through the logic component, so as to respond to the input event.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the viewpoint of an information processing apparatus which can be integrated in an electronic device which can be a server or a terminal or the like; the terminal may include a tablet computer, a notebook computer, a personal computer (PC, personal Computer), a wearable device, a virtual reality device, or other devices that can process information such as an input event.
An information processing method, comprising:
when the target terminal application of the terminal is started, the input event of the terminal is acquired through the acquisition component of the target terminal application, the target input event of the target terminal application is identified from the input event in the acquisition process, and the target input event is processed through the logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component.
As shown in fig. 2, the specific flow of the information processing method is as follows:
101. when a target terminal application of the terminal is started, an input event of the terminal is acquired through an acquisition component of the target terminal application.
The input event may be event information generated by an input device of the terminal, the user performs an input operation on the input device, and the input device converts the input information into the input event.
The acquisition component can be a component used for acquiring the input event of the terminal in the target terminal application, and is mainly used for acquiring the input event of the terminal, and when the target input event corresponding to the target terminal application is acquired, the logic component of the target terminal application is notified to process.
The method for collecting the input event of the terminal through the collection component of the target terminal application may be various, for example, the collection mode of the input event may be adjusted to collect the input event, or the collection authority of the target terminal application to the input event may be adjusted to collect the input event, which may be specifically as follows:
(1) Adjusting acquisition mode of input event
The collection mode may be understood as a mode of collecting an input event, and the collection mode may be system collection and application collection, where the system collection may be understood as collecting the input event through a terminal or a terminal collection service in an operating system in the terminal, and the application collection may be understood as collecting the input event through a collection component of a target terminal application. Most operating systems are usually under consideration of safety and stability, and are designed to not allow an application program to directly collect input events, so that a main collection mode is unified collection and dispatch by a terminal or an operating system of the terminal, but an input transmission flow under a special scene can be customized by a device manufacturer, so that a specific terminal can apply the capability of specifically collecting the input events.
The adjustment mode for collecting the input event by adjusting the collection mode of the input event may be various, for example, the system collection mode may be adjusted to an application collection mode, so that the input event of the terminal is collected by the collection component applied by the target terminal, which may be specifically as follows:
for example, an event acquisition request for an input event of the terminal sent by the target terminal application may be received, and according to the event acquisition request, the terminal acquisition service is stopped, so that the target terminal application starts an acquisition component, and the input event of the terminal is acquired through the acquisition component of the target terminal application.
The terminal acquisition service is used for acquiring input events of the terminal, and can be understood as acquisition services of the terminal or an operating system in the terminal, and is mainly used for acquiring the input events generated by input equipment of the terminal. Stopping the terminal service means that the system no longer collects the input events, thus submitting the task of input collection to the collection component of the target terminal application. In the running process of the target terminal application, the terminal can be in an application acquisition mode, the target terminal application automatically completes acquisition of the input event through the acquisition component, and the operating system does not acquire the input event.
Optionally, when the target terminal application stops running, the target terminal application may also send a request for stopping collecting the input event to the terminal, and at this time, the collecting mode of the input event may be adjusted to a system collecting mode, for example, when the request for stopping collecting sent by the target terminal application is received, a terminal collecting service is started, and the input event of the terminal is collected based on the terminal collecting service.
After the acquisition mode of the input event is adjusted to the system acquisition mode, the terminal can restore the original input event processing flow, so that normal input event dispatch and processing under a non-special scene can be ensured.
The adjustment of the collection mode of the input event mainly occurs in the starting and stopping operation stages of the target terminal application in a special scene, specifically, as shown in fig. 3, the system collects the input event through the terminal collection service in a non-special scene, when the target terminal application in the special scene is started, the target terminal application can send an event collection request, so as to inform the system of the change, namely, the adjustment of the collection mode, the system collection mode is adjusted to the application collection mode, and when the target terminal application is in operation, the input event of the terminal can be directly collected through the collection component in the application collection mode. When the target terminal application stops running, the target terminal application can send a stop acquisition request, the system is informed to adjust the acquisition mode of the input event, and when the stop acquisition request sent by the target terminal application is received, the application acquisition mode can be adjusted to be a system acquisition mode, so that terminal acquisition service is started, and the input event of the terminal is acquired based on the terminal acquisition service.
(2) Adjusting acquisition rights for input events
The acquisition permission can be understood as permission for acquiring the input event of the terminal, when the target terminal application has the acquisition permission, the target terminal application can acquire the input event of the terminal through the acquisition component, and the terminal or a system of the terminal can still acquire the input event of the terminal through the terminal acquisition service while the acquisition component of the target terminal application acquires the input event of the terminal.
The adjustment modes for adjusting the acquisition permission of the input event can be various, and specifically can be as follows:
for example, acquiring authority information of the target terminal application, adding event acquisition authority in the authority information so that the target terminal application starts an acquisition component, and acquiring an input event of the terminal through the acquisition component of the target terminal application.
The main function of adding the event acquisition permission in the permission information is to open the acquisition permission of the input event to a specific target terminal application, so that the target terminal application has the acquisition permission of the input event of the acquisition terminal, and the acquisition component of the target terminal application can be started to acquire the input event of the terminal.
Before the event acquisition permission is added into the permission information, the permission information of the target terminal application can be detected, and when the event acquisition permission is not contained in the permission information, the event acquisition permission can be added into the permission of the target terminal application, so that the target terminal application starts an acquisition component; when the permission information is detected to contain the event acquisition permission, a starting request for starting the acquisition component can be sent to the target terminal application, so that the target terminal application starts the acquisition component.
The terminal acquisition service can also acquire the input event while acquiring the input event of the terminal, and can convert the acquired input event into a target event, send the target event to the corresponding terminal application, and send the target event to the target terminal application when the terminal application corresponding to the target event is the target terminal application. At this time, the target terminal application may directly ignore the target event corresponding to the input event after the input event has been acquired by the acquisition component, and the manner of neglecting may be various, for example, when the target terminal application receives the target event corresponding to the input event, the target event may be directly intercepted by the acquisition component, so that the target terminal application ignores the target event, or the target terminal application directly discards or deletes the received target event.
In the scheme of adjusting the acquisition authority of the input event, it can be found that the target terminal application can directly acquire the input event through the acquisition component, and compared with the target event corresponding to the input event sent by the receiving system, multiple intermediate links such as conversion and sending are not needed, so that the transfer time of the input event can be greatly reduced, the target terminal application can obtain the input event faster, and thus the target event corresponding to the input event sent by the system can be directly ignored, and the method can be specifically shown in fig. 4.
After the collection mode or the collection authority of the input event is adjusted, the target terminal can start the collection assembly, the collection assembly is adopted to collect the input event of the terminal, for example, the collection assembly can be directly connected to an event port of the input device of the terminal, when the input device generates the input event, the collection assembly can directly read the input event, or the collection assembly is adopted to send interface information to the input device of the terminal, so that the input device of the terminal constructs an information transmission channel with the collection assembly through the interface information, and the collection assembly directly adopts the transmission channel to read the input event generated by the input device of the terminal.
When the terminal application is started, the currently started terminal application needs to be judged, and when the started terminal application is the target terminal application of the terminal, the input event of the terminal can be acquired through the acquisition component of the target terminal application, so that before the input event of the terminal is acquired through the acquisition component of the target terminal application when the target terminal application of the terminal is started, the currently started terminal application also needs to be detected, and various detection modes can be adopted, for example, when the terminal application of the terminal is detected to be started, the application identifier of the currently started terminal application is acquired, and when the application identifier is the preset application identifier, the currently started terminal application is determined to be the target terminal application, and at this time, the input event of the terminal can be acquired through the acquisition component of the target terminal application.
102. In the acquisition process, a target input event of the target terminal application is identified from the input events.
The target input event may be understood as an input event corresponding to an operation instruction input to the target terminal application by the user through the input device of the terminal.
The manner of identifying the target input event of the target terminal application from the input events may be various, and specifically may be as follows:
For example, in the acquisition process, attribute information of an input event is acquired through an acquisition component, application address information corresponding to the input event is identified in the attribute information, and a target input event corresponding to a target terminal application is screened out from the input event according to the application address information.
The attribute information of the input event may be information describing the attribute of the input event, for example, may include application address information that needs to be sent by the input event, a trigger time and a trigger object of the input event, where the application address information may be understood as address information of a terminal application that needs to be sent by the input event, and the address information may be an information interface address or a port address of the terminal application, and so on. According to the application address information, there may be various ways of screening the target input event corresponding to the target terminal application in the input event, for example, obtaining the current application address information of the target terminal, matching the current application address information with the application address information corresponding to the input event, and screening the input event successfully matched with the current application address information in the input event to obtain the target input event.
The current application address information of the target terminal application may be understood as address information such as an information interface address or a port address used for receiving an input event or a target event corresponding to the input event in the target terminal application.
In the acquisition process, the target input event identifying the target terminal application from the input may be completed by an identification module in a logic component of the target terminal application, or may be completed by an identification component or other identification modules in the terminal, or may also be completed by an acquisition component of the target terminal application. When the acquisition component is adopted for identification, the acquisition component can be configured through the target terminal application, so that the acquisition component has the capability of identifying the target input event corresponding to the target terminal application, and mainly because the acquisition component has universality, the acquisition component is required to be configured through the target terminal application.
103. And processing the target input event through a logic component of the target terminal application so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
The logic component may be a component in the target terminal application, which is used for logically processing an input event or a target event corresponding to the input event, the number of logic components integrated in the target terminal application may be one or more, different logic components may be used for logically processing input events corresponding to different logic types based on a specific application scenario, and the nature of the logic processing is to respond to the input event or the event corresponding to the target event, for example, in a shooting game, a control instruction for opening a scope is input through an input device, the input device generates the input event corresponding to the control instruction, and the terminal application designing the game responds to the input event, at this time, a game screen corresponding to the scope opening can be displayed on a game page of the terminal application.
The processing manner of the logic component to the target input event may be various, which may specifically be as follows:
for example, event content may be identified in the target input event, and an event type of the target input event may be determined according to the event content, and the target input event may be processed through a logic component of the target terminal application based on the event type.
The event type may be understood as a control type of a control instruction corresponding to the target input event, for example, taking the target terminal application as a game application program as an example, and may include a scene control type, a virtual object control type, and the like. Based on the event type, there may be various ways of processing the target input event by the logic component of the target terminal application, for example, determining processing logic corresponding to the target input event according to the event type, screening the target logic component corresponding to the processing logic from the logic components of the target terminal application, and performing logic processing on the target input event by the target logic component.
The processing logic may be understood as a logic type for performing logic processing on a target input event, for example, taking the target terminal application as an XX game, where the target input event is an operation instruction of transmitting skills of a virtual object in the game, and then the processing logic of the target input event may be skill transmitting logic of the virtual object. The method for determining the processing logic of the target input event may be various, for example, preset mapping information of the event type and the processing logic may be obtained, where the processing logic corresponding to the event type of the target input event is mapped in the preset mapping information, or preset processing logic information may also be obtained, where the processing logic capable of processing the target input event corresponding to the event type is identified in the preset processing logic information.
The method for logically processing the target input event through the target logic component may be various, for example, a logic processing request may be sent to the target logic component through an acquisition component of the target terminal application, so that the target logic component responds to the target input event, receives response information returned by the target logic component, updates current page information of the target terminal application based on the response information, generates an updated page based on the updated page information, and displays the updated page. The response information may be a control instruction for the target terminal application, which is generated after the target logic component performs logic processing on the target input event, for example, if the target terminal application is taken as a game application, and the target input event is an operation event of a virtual button for releasing a skill of a virtual object in a game picture by a user, then the response information may be a control instruction corresponding to the release skill of the virtual object in the game picture after the operation event is converted into the operation event. The current page information of the target terminal application can be updated based on the response information, for example, whether the target terminal application is used as a game application or the response information is a control instruction of the virtual object release skill, the picture information of the virtual object release skill can be generated in the current page, so that updated page information is obtained, and then the updated page can be drawn and displayed based on the updated page information.
Optionally, after receiving the response information returned by the target logic component, the processing may be performed by an application server corresponding to the target terminal application, for example, the response information may be encapsulated to obtain application control data for the target terminal application, and the application control data is sent to the application server corresponding to the target terminal application, and application page information corresponding to the application control data returned by the application server is received, and the current page of the target terminal application is updated according to the application page information, and the updated page is displayed.
The main purpose of packaging the response information is to package the response information into a network data packet so as to be sent to an application server corresponding to the target terminal application, and various ways of packaging the response information are used, for example, a control instruction for the target terminal application can be extracted from the response information, and the control instruction is added into a preset network data packet, so that application control data for the target terminal application can be obtained. The application page information may be understood as page information of a latest page of a target terminal application drawn by an application server according to application control data, and various modes may be used for generating the application page information by the application server, for example, the application server may directly extract a control instruction from an application control data packet after receiving the application control data, then draw the page information corresponding to the control instruction, and use the page information of the control instruction as application page information, or may map the control instruction in a virtual input device, thereby generating a virtual input event, then draw page information corresponding to the virtual input event, and use the page information as application page information.
The method comprises the steps that response information returned by a target logic component is processed through an application server corresponding to a target terminal application, the response information can be applied to a cloud game scene, the target terminal application deployed on a terminal side can directly generate input events of acquired user input information and convert the input events into control instructions in the cloud game scene, the control instructions are further packaged into application control data and sent to the application server, the application server draws page information according to the application control data and returns the page to the terminal, the terminal can update the current page of the target terminal application, unified allocation of the input events is not needed through a system of the terminal, and network delay in the cloud game scene is an important performance index, so that delay from the input information to page update of a cloud game user can be greatly reduced.
In this scheme, the processing procedure of the input event by the target terminal application may be as shown in fig. 5, after the application program is started, the acquisition component is started, and the acquisition component is mainly used for continuously acquiring the input event converted by the hardware input module by the hardware signal input by the user through the input device, and after the target input event aiming at the target terminal application is acquired, the logic component in the target terminal application is immediately notified, so that the logic component can directly perform logic processing on the target input event, and most importantly, the logic component only needs to process the target input event notified by the acquisition component, thereby avoiding processing other events except the target input event notified by the acquisition component. In the existing input event processing flow, the input event is mainly converted and dispatched by the operating system, as shown in fig. 6, the user generates a hardware signal through the input device, the hardware signal is converted into the input event by the hardware input module, the operating system collects the input event, after the input event is collected, the input event is converted into a system event, and the system event is dispatched to the corresponding terminal application, so that the terminal application receives and responds to the system event. In this process, there are two points that will make the delay of the signal from the input device of the terminal to the final terminal application high, as shown in fig. 7, and it can be found that the system and the terminal application are isolated, and the intermediate links in many software will pass through in the terminal device from the operating system to the terminal application. In addition, many device manufacturers add custom links to these links, further increasing the delay in delivery,
In the existing input event processing manner, after receiving a system event, a logic component of the terminal application is generally sent to the terminal application according to a natural frequency to execute the system event, taking an operating system as an android system as an example, a conventional processing flow of the system event by the terminal application can be as shown in fig. 8, the system event reaching the terminal application is not immediately sent to a corresponding logic component in a 16ms cycle, but is uniformly distributed at the end of the cycle, in the worst case, the system event reaching the terminal application is more than the whole cycle time (16 ms), and in the scheme, when a target input event aiming at the target terminal application is acquired by an acquisition component in the target terminal application, the target logic component for processing the target input event is determined, then the target logic component is directly informed to process the target input event, and the cycle processing mode of the target terminal application is directly bypassed, thereby effectively reducing input delay.
As can be seen from the above, in the embodiment of the present invention, when the target terminal application of the terminal is started, the input event of the terminal is collected by the collection component of the target terminal application, in the collection process, the target input event of the target terminal application is identified from the input event, and the target input event is processed by the logic component of the target terminal application, so as to avoid the logic component from processing events other than the target input event collected by the collection component; according to the scheme, the input event is acquired through the acquisition component of the target terminal application, then the acquired target input event is directly processed by the logic component of the target terminal application, and conversion and distribution are not needed through the operating system of the terminal, so that the transmission time of the input event is shortened, and the processing efficiency of information processing can be improved.
According to the method described in the above embodiments, examples are described in further detail below.
In this embodiment, the information post-processing apparatus is specifically integrated in an electronic device, the electronic device is a terminal, and the acquisition component is a monitoring component.
As shown in fig. 9, a specific flow of the information processing method is as follows:
201. when a target terminal application of the terminal is started, the terminal monitors an input event of the terminal through a monitoring component of the target terminal application.
For example, when the terminal application of the terminal is detected to be started, the terminal acquires an application identifier of the currently started terminal application, and when the application identifier is a preset application identifier, the currently started terminal application is determined to be a target terminal application.
The terminal may adjust a listening mode of the input event to listen to the input event, or may also adjust a listening authority of the target terminal application to the input event to listen to the input event, which may specifically be as follows:
(1) Terminal adjusts the listening mode of an incoming event
For example, the terminal receives an event monitoring request for an input event of the terminal sent by the target terminal application, stops the terminal monitoring service according to the event monitoring request, enables the target terminal application to start a monitoring component, and monitors the input event of the terminal through the monitoring component of the target terminal application.
Optionally, when receiving a request for stopping monitoring sent by the target terminal application, the terminal starts a terminal monitoring service, and monitors an input event of the terminal based on the terminal monitoring service.
(2) Terminal adjusts monitoring authority of input event
For example, acquiring authority information of the target terminal application, detecting the authority information of the target terminal application, and adding the event monitoring authority to the authority of the target terminal application when the event monitoring authority is not contained in the authority information, so that the target terminal application starts a monitoring component; when the permission information is detected to contain the event monitoring permission, a starting request for starting the monitoring component can be sent to the target terminal application, so that the target terminal application starts the monitoring component. And monitoring the input event of the terminal through a monitoring component of the target terminal application.
Optionally, when the target terminal application receives the target event corresponding to the input event, the terminal may intercept the target event directly through the monitoring component, so that the target terminal application ignores the target event, or the target terminal application directly discards or deletes the received target event and ignores the target event.
After the terminal adjusts the monitoring mode or the monitoring authority of the input event, the target terminal application can start the monitoring component, the monitoring component is adopted to monitor the input event of the terminal, for example, the monitoring component can be directly connected to an event port of the input device of the terminal, when the input device generates the input event, the monitoring component can directly read the input event, or the monitoring component is adopted to send interface information to the input device of the terminal, so that the input device of the terminal constructs an information transmission channel with the monitoring component through the interface information, and the monitoring component directly adopts the transmission channel to read the input event generated by the input device of the terminal.
202. And the terminal identifies a target input event of the target terminal application from the input events in the monitoring process.
For example, in the monitoring process, the terminal acquires attribute information of an input event through a monitoring component, identifies application address information corresponding to the input event in the attribute information, acquires current application address information of a target terminal, matches the current application address information with the application address information corresponding to the input event, screens out the input event successfully matched with the current application address information in the input event, and obtains the target input event.
203. The terminal identifies event content in the target input event to determine an event type of the target input event.
For example, the terminal may identify event content in the target input event, and determine an event type of the target input event according to a content format of the event content.
204. The terminal processes the target input event through the logic component of the target terminal application based on the event type, so as to avoid the logic component from processing events except the target input event monitored by the monitoring component.
For example, the terminal may obtain preset mapping information of the event type and the processing logic, where the processing logic corresponding to the event type of the target input event is mapped in the preset mapping information, or may also obtain preset processing logic information, where the processing logic capable of processing the target input event corresponding to the event type is identified in the preset processing logic information, so as to avoid that the logic component processes events other than the target input event monitored by the monitoring component.
And the terminal screens out a target logic component corresponding to the processing logic from the logic components of the target terminal application. The terminal sends a logic processing request to the target logic component through the monitoring component of the target terminal application, so that the target logic component responds to the target input event, receives response information returned by the target logic component, updates current page information of the target terminal application based on the response information, generates an updated page based on the updated page information, and displays the updated page.
Optionally, after receiving the response information returned by the target logic component, the terminal may further encapsulate the response information to obtain application control data for the target terminal application, and send the application control data to an application server corresponding to the target terminal application, where after receiving the application control data, the application server may directly extract a control instruction from the application control data packet, then draw page information corresponding to the control instruction, and use the page information of the control instruction as application page information, or may also map the control instruction in the virtual input device, thereby generating a virtual input event, then draw page information corresponding to the virtual input event, and use the page information as application page information. And receiving application page information corresponding to the application control data returned by the application server, updating the current page of the target terminal application according to the application page information, and displaying the updated page.
As can be seen from the above, when the target terminal application of the terminal is started, the terminal of this embodiment monitors the input event of the terminal through the monitoring component of the target terminal application, and in the monitoring process, identifies the target input event of the target terminal application from the input event, and processes the target input event through the logic component of the target terminal application, so as to avoid the logic component from processing events other than the target input event monitored by the monitoring component; according to the scheme, the input event is monitored through the monitoring component of the target terminal application, then the monitored target input event is directly processed by the logic component of the target terminal application, and conversion and distribution are not needed through the operating system of the terminal, so that the transmission time of the input event is shortened, and the processing efficiency of information processing can be improved.
According to the method described in the above embodiments, examples are described in further detail below.
In this embodiment, the information processing apparatus is specifically integrated in an electronic device, the electronic device is a terminal, and a scene in which the information processing apparatus performs information processing is a cloud game application scene will be described as an example.
In the cloud game application scenario, the whole cloud game system may include a game terminal and a game server, where the game terminal is used for a user to operate and display a corresponding game screen, an input device of the cloud game application, a display device and a client of the cloud game application may be integrated in the game terminal, the game server is used for receiving a control instruction generated based on operation information input by the user and sent by the terminal to render a game screen corresponding to the control instruction, and returning the game screen to the terminal, so that the terminal displays the game page, and a cloud game system architecture diagram may be shown in fig. 10. The information processing method under the cloud game scene can be specifically as follows:
when a target cloud game application of the terminal is started, acquiring an input event of the terminal through an acquisition component of the target cloud game application; in the acquisition process, a target input event aiming at the target cloud game application is identified from the input events, and the target input event is processed through a logic component of the target cloud game application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component. And packaging the processed target input event to obtain game control data for the target cloud game application, sending the game control data to a game server corresponding to the target cloud game application so that the game server renders a game picture of the target cloud game application according to the game control data, then receiving the game picture of the target cloud game application returned by the game server, and displaying the game picture of the target cloud game application.
In the cloud game scenario, the interaction between the terminal of the cloud game application and the game server can be found to be mainly the interaction of game control data and the interaction of game pictures, the specific interaction can be as shown in fig. 11, a user inputs operation information through an input device, the terminal generates an input event based on the operation information, a collection component of the cloud game application collects a target input event and converts the target input event into game control data through a logic component, the game control data is sent to the game server, the game server renders the game picture of the cloud game application based on the game control data, the game picture returns to the terminal, and the terminal displays the game picture.
Taking the acquisition component as a monitoring component as an example, the information processing method in the cloud game scene can perform input operation for a user through external or built-in input equipment of the terminal to generate a hardware signal, and a hardware input module in the terminal converts the generated hardware signal into an input event. When cloud game application in the terminal is not started, an operating system in the terminal monitors input events through terminal monitoring service, converts the monitored input events into system events, and distributes the converted system events to corresponding terminal applications.
When the cloud game application in the terminal is started, the input event can be monitored through the monitoring component in the cloud game application, and specific monitoring modes can be divided into two types, and the specific monitoring modes can be as follows:
(1) Adjusting listening mode of input event
For example, when the cloud game application is started, a notification which is negotiated with the system in advance is sent to the operating system of the terminal, the notification can be an event monitoring request, when the operating system receives the monitoring request, the monitoring mode of the input event is adjusted to be an application monitoring mode, at this time, the operating system does not monitor the input event any more, and the monitoring task of the input event is handed to the cloud game application. In the running process of the cloud game application, the terminal is always in an application monitoring mode, the cloud game application completes monitoring of the input event, and the operating system does not monitor.
Optionally, when the cloud game application exits, a notification negotiated in advance is still sent to the operating system, the operating system is notified to resume the normal system monitoring mode, and the monitoring task is returned to the operating system of the terminal again. Thereafter, the operating system reverts to a previous flow of listening and processing the input event, thereby ensuring event dispatch of the input event in non-special scenarios.
(2) Adjusting listening rights for incoming events
For example, when a cloud game application is started, acquiring authority information of the cloud game application, detecting whether the authority information contains an event monitoring authority of an input event, adding the event monitoring authority into the authority information when the authority information does not contain the event monitoring authority so as to enable the cloud game application to start a monitoring component, and sending a starting request to the cloud game application when the authority information contains the event monitoring authority so as to enable the cloud game application to start the monitoring component. Then, the input event is monitored by adopting a monitoring component of the cloud game application, and at the moment, the original monitoring behavior of the operating system on the input event is unchanged. Because the cloud game application has the direct monitoring authority of the input event, the cloud game application and the operating system simultaneously perform direct input event monitoring. In the process of monitoring the input event, the input event monitored by the operating system can be dispatched to the cloud game application only through conversion into the system event and through an intermediate flow, which means that the cloud game application can acquire the system event dispatched by the operating system faster than the input event dispatched by the operating system, therefore, the cloud game application can directly ignore the system event dispatched by the operating system or intercept the system event through the monitoring component, thereby indirectly ignoring the system event dispatched by the operating system.
During the process of adopting the monitoring component to monitor the input events, identifying the target input events aiming at the cloud game application from the monitored input events. And reading the content of the target input event, further determining the event type of the target input event, and mapping out processing logic corresponding to the event type. The target logic component for processing the input event is screened out from logic components of the cloud game application through processing logic, a logic processing request is sent to the target logic component through a monitoring component, so that the target logic component can directly perform logic processing on the target input event, the logic processing can be understood as converting the target input event into a control instruction aiming at a virtual scene or a virtual object in the game application, then the control instruction obtained after conversion is packaged into a preset network data packet, application control data is obtained, and the application control data is sent to an application server of the cloud game application.
After receiving the application control data sent by the terminal, the application server of the cloud game application can draw the latest game picture of the cloud game application according to the application control data, so that game picture information of the cloud game is obtained, and the game picture information is sent to the terminal. And the terminal updates the current game picture of the cloud game page according to the received game picture information and displays the updated game picture.
Therefore, it can be found that in the cloud game application scenario, the existing processing method of the input event needs to convert the input event into a system event and uniformly distribute the system event, when a plurality of cloud games run simultaneously, the network delay or the picture delay of each cloud game application is greatly increased, so that the experience effect of a user is poor.
In order to better implement the above method, the embodiment of the present invention further provides an information processing apparatus, where the information processing apparatus may be integrated into an electronic device, such as a server or a terminal, where the terminal may include a tablet computer, a notebook computer, and/or a personal computer.
For example, as shown in fig. 12, the information processing apparatus may include an acquisition unit 301, an identification unit 302, and a processing unit 303, as follows:
(1) An acquisition unit 301;
the collection unit 301 is configured to collect, when a target terminal application of the terminal is started, an input event of the terminal through a collection component of the target terminal application.
For example, the collection unit 301 may be specifically configured to adjust a collection mode of an input event to collect the input event when a target terminal application of the terminal is started, or adjust a collection authority of the target terminal application on the input event to collect the input event.
(2) An identification unit 302;
the identifying unit 302 is configured to identify, from the input events, a target input event for the target terminal application during the acquisition process.
For example, the identifying unit 302 may be specifically configured to obtain, by using an acquisition component, attribute information of an input event in an acquisition process, identify application address information corresponding to the input event in the attribute information, obtain current application address information of a target terminal, match the current application address information with the application address information corresponding to the input event, and screen out an input event successfully matched with the current application address information from the input event, so as to obtain the target input event.
(3) A processing unit 303;
and the processing unit is used for processing the target input event through the logic component of the target terminal application so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
The processing unit 303 may specifically be configured to identify event content in a target input event, determine an event type of the target input event according to the event content, determine a processing logic corresponding to the target input event according to the event type, screen a target logic component corresponding to the processing logic from logic components of a target terminal application, send a logic processing request to the target logic component through an acquisition component of the target terminal application, so that the target logic component responds to the target input event, receive response information returned by the target logic component, update current page information of the target terminal application based on the response information, generate an updated page based on the updated page information, and display the updated page.
Optionally, the information processing apparatus may further include a page update unit 304, as shown in fig. 13, specifically may be as follows:
and the page updating unit 304 is configured to update a current page of the target terminal application, and display the updated page.
For example, the page updating unit 304 may be specifically configured to encapsulate the response information to obtain application control data for the target terminal application, send the application control data to an application server corresponding to the target terminal application, receive application page information corresponding to the application control data returned by the application server, update a current page of the target terminal application according to the application page information, and display the updated page. In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the foregoing, in this embodiment, when the acquisition unit 301 starts the target terminal application of the terminal, the acquisition component of the target terminal application acquires the input event of the terminal, the recognition unit 302 recognizes the target input event of the target terminal application from the input event during the acquisition process, and the processing unit 303 processes the target input event through the logic component of the target terminal application, so as to avoid the logic component from processing events other than the target input event acquired by the acquisition component; according to the scheme, the input event is acquired through the acquisition component of the target terminal application, then the acquired target input event is directly processed by the logic component of the target terminal application, and conversion and distribution are not needed through the operating system of the terminal, so that the transmission time of the input event is shortened, and the processing efficiency of information processing can be improved.
The embodiment of the invention also provides an electronic device, as shown in fig. 14, which shows a schematic structural diagram of the electronic device according to the embodiment of the invention, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 14 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall detection of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
when the target terminal application of the terminal is started, the input event of the terminal is acquired through the acquisition component of the target terminal application, the target input event of the target terminal application is identified from the input event in the acquisition process, and the target input event is processed through the logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component.
For example, when the terminal application of the terminal is detected to be started, the application identifier of the currently started terminal application is obtained, when the application identifier is the preset application identifier, the currently started terminal application is determined to be the target terminal application, an event acquisition request for an input event of the terminal sent by the target terminal application can be received, according to the event acquisition request, the terminal acquisition service is stopped, the target terminal application starts an acquisition component, the acquisition component is directly connected to an event port of the input device of the terminal, when the input device generates the input event, the acquisition component can directly read the input event, or the acquisition component is adopted to send interface information to the input device of the terminal, so that the input device of the terminal constructs an information transmission channel with the acquisition component through the interface information, and the acquisition component directly adopts the transmission channel to read the input event generated by the input device of the terminal. Or acquiring authority information of the target terminal application, adding event acquisition authority in the authority information so that the target terminal application starts an acquisition component, adopting the acquisition component to directly access an event port of input equipment of the terminal, and directly reading the input event by the acquisition component when the input equipment generates the input event, or adopting the acquisition component to send interface information to the input equipment of the terminal, so that the input equipment of the terminal constructs an information transmission channel between the acquisition component and the acquisition component through the interface information, and directly adopting the transmission channel by the acquisition component to read the input event generated by the input equipment of the terminal. In the acquisition process, acquiring attribute information of an input event through an acquisition component, identifying application address information corresponding to the input event in the attribute information, acquiring current application address information of a target terminal, matching the current application address information with the application address information corresponding to the input event, and screening out the input event successfully matched with the current application address information in the input event to obtain the target input event. Identifying event content in a target input event, determining an event type of the target input event according to the event content, determining processing logic corresponding to the target input event according to the event type, screening a target logic component corresponding to the processing logic in a logic component of a target terminal application, sending a logic processing request to the target logic component through an acquisition component of the target terminal application, enabling the target logic component to respond to the target input event, receiving response information returned by the target logic component, updating current page information of the target terminal application based on the response information, generating an updated page based on the updated page information, and displaying the updated page, or packaging the response information to obtain application control data for the target terminal application, sending the application control data to an application server corresponding to the target terminal application, receiving application page information corresponding to the application control data returned by the application server, updating the current page of the target terminal application according to the application page information, and displaying the updated page.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
As can be seen from the above, in the embodiment of the present invention, when the target terminal application of the terminal is started, the input event of the terminal is collected by the collection component of the target terminal application, in the collection process, the target input event of the target terminal application is identified from the input event, and the target input event is processed by the logic component of the target terminal application, so as to avoid the logic component from processing events other than the target input event collected by the collection component; according to the scheme, the input event is acquired through the acquisition component of the target terminal application, then the acquired target input event is directly processed by the logic component of the target terminal application, and conversion and distribution are not needed through the operating system of the terminal, so that the transmission time of the input event is shortened, and the processing efficiency of information processing can be improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the information processing methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
when the target terminal application of the terminal is started, the input event of the terminal is acquired through the acquisition component of the target terminal application, the target input event of the target terminal application is identified from the input event in the acquisition process, and the target input event is processed through the logic component of the target terminal application, so that the logic component is prevented from processing events except the target input event acquired by the acquisition component.
For example, when the terminal application of the terminal is detected to be started, the application identifier of the currently started terminal application is obtained, when the application identifier is the preset application identifier, the currently started terminal application is determined to be the target terminal application, an event acquisition request for an input event of the terminal sent by the target terminal application can be received, according to the event acquisition request, the terminal acquisition service is stopped, the target terminal application starts an acquisition component, the acquisition component is directly connected to an event port of the input device of the terminal, when the input device generates the input event, the acquisition component can directly read the input event, or the acquisition component is adopted to send interface information to the input device of the terminal, so that the input device of the terminal constructs an information transmission channel with the acquisition component through the interface information, and the acquisition component directly adopts the transmission channel to read the input event generated by the input device of the terminal. Or acquiring authority information of the target terminal application, adding event acquisition authority in the authority information so that the target terminal application starts an acquisition component, adopting the acquisition component to directly access an event port of input equipment of the terminal, and directly reading the input event by the acquisition component when the input equipment generates the input event, or adopting the acquisition component to send interface information to the input equipment of the terminal, so that the input equipment of the terminal constructs an information transmission channel between the acquisition component and the acquisition component through the interface information, and directly adopting the transmission channel by the acquisition component to read the input event generated by the input equipment of the terminal. In the acquisition process, acquiring attribute information of an input event through an acquisition component, identifying application address information corresponding to the input event in the attribute information, acquiring current application address information of a target terminal, matching the current application address information with the application address information corresponding to the input event, and screening out the input event successfully matched with the current application address information in the input event to obtain the target input event. Identifying event content in a target input event, determining an event type of the target input event according to the event content, determining processing logic corresponding to the target input event according to the event type, screening a target logic component corresponding to the processing logic in a logic component of a target terminal application, sending a logic processing request to the target logic component through an acquisition component of the target terminal application, enabling the target logic component to respond to the target input event, receiving response information returned by the target logic component, updating current page information of the target terminal application based on the response information, generating an updated page based on the updated page information, and displaying the updated page, or packaging the response information to obtain application control data for the target terminal application, sending the application control data to an application server corresponding to the target terminal application, receiving application page information corresponding to the application control data returned by the application server, updating the current page of the target terminal application according to the application page information, and displaying the updated page.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium may execute the steps in any information processing method provided by the embodiments of the present invention, the beneficial effects that any information processing method provided by the embodiments of the present invention can be achieved, which are detailed in the previous embodiments and are not described herein.
Among other things, according to one aspect of the present application, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the information processing aspects or the input event processing aspects described above.
The foregoing has described in detail the methods, apparatus and computer readable storage medium for processing information provided by embodiments of the present invention, and specific examples have been provided herein to illustrate the principles and implementations of the present invention, the above examples being provided only to assist in understanding the methods and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.
Claims (12)
1. An information processing method, characterized by comprising:
when a target terminal application of a terminal is started, acquiring an input event of the terminal through an acquisition component of the target terminal application;
acquiring attribute information of the input event through the acquisition component in the acquisition process;
identifying application address information corresponding to the input event in the attribute information;
acquiring current application address information of the target terminal application;
matching the current application address information with the application address information corresponding to the input event;
screening out the input event successfully matched with the current application address information from the input events to obtain a target input event;
Identifying event content in the target input event, and determining the event type of the target input event according to the event content;
determining processing logic corresponding to the target input event according to the event type;
screening out a target logic component corresponding to the processing logic from logic components applied by the target terminal;
sending a logic processing request to the target logic component through the acquisition component of the target terminal application, so that the target logic component responds to the target input event;
receiving response information returned by the target logic component, and updating current page information of the target terminal application based on the response information;
and generating an updated page based on the updated page information, and displaying the updated page so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
2. The information processing method according to claim 1, wherein the collecting the input event of the terminal by the collecting component of the target terminal application includes:
receiving an event acquisition request for an input event of the terminal, which is sent by the target terminal application;
Stopping terminal acquisition service according to the event acquisition request, so that the target terminal application starts an acquisition component, wherein the terminal acquisition service is used for acquiring an input event of the terminal;
and acquiring the input event of the terminal through an acquisition component of the target terminal application.
3. The information processing method according to claim 2, wherein after the acquisition of the input event of the terminal by the acquisition component of the target terminal application, further comprising:
when receiving a request for stopping acquisition sent by the target terminal application, starting the terminal acquisition service;
and collecting the input event of the terminal based on the terminal collecting service.
4. The information processing method according to claim 1, wherein the collecting the input event of the terminal by the collecting component of the target terminal application includes:
acquiring authority information of the target terminal application, and adding event acquisition authorities in the authority information so that the target terminal application starts an acquisition component;
and acquiring the input event of the terminal through an acquisition component of the target terminal application.
5. The information processing method according to claim 4, characterized by further comprising:
when the target terminal application receives a target event corresponding to the input event, intercepting the target event through the acquisition component, so that the target terminal application ignores the target event.
6. The information processing method according to any one of claims 1 to 5, characterized in that, when a target terminal application of a terminal is started, before the input event of the terminal is collected by a collection component of the target terminal application, further comprising:
when the starting of the terminal application of the terminal is detected, acquiring an application identifier of the currently started terminal application;
when the application identifier is a preset application identifier, determining the currently started terminal application as a target terminal application;
when a target terminal application of a terminal is started, the acquisition component of the target terminal application acquires an input event of the terminal, and the method comprises the following steps: and acquiring the input event of the terminal through an acquisition component of the target terminal application.
7. The information processing method according to claim 1, wherein after receiving the response information returned by the target logic component, further comprising:
Packaging the response information to obtain application control data aiming at the target terminal application, and sending the application control data to an application server corresponding to the target terminal application;
receiving application page information corresponding to the application control data returned by the application server;
and updating the current page of the target terminal application according to the application page information, and displaying the updated page.
8. An information processing method, applied to a cloud game, comprising:
when a target cloud game application of a terminal is started, acquiring an input event of the terminal through an acquisition component of the target cloud game application;
acquiring attribute information of the input event through the acquisition component in the acquisition process;
identifying application address information corresponding to the input event in the attribute information;
acquiring current application address information of the target cloud game application;
matching the current application address information with the application address information corresponding to the input event;
screening out the input event successfully matched with the current application address information from the input events to obtain a target input event;
Identifying event content in the target input event, and determining the event type of the target input event according to the event content;
determining processing logic corresponding to the target input event according to the event type;
screening out a target logic component corresponding to the processing logic from logic components of the target cloud game application;
sending a logic processing request to the target logic component through a collection component of the target cloud game application, so that the target logic component responds to the target input event;
receiving response information returned by the target logic component, and updating current page information of the target cloud game application based on the response information;
and generating an updated page based on the updated page information, and displaying the updated page so as to avoid processing events except the target input event acquired by the acquisition component by the logic component.
9. The information processing method according to claim 8, further comprising, after receiving the response information returned by the target logic component:
packaging the processed target input event to obtain game control data aiming at the target cloud game application;
Sending the game control data to a game server corresponding to the target cloud game application, so that the game server renders a game picture of the target cloud game application according to the game control data;
and receiving a game picture of the target cloud game application returned by the game server, and displaying the game picture of the target cloud game application.
10. An information processing apparatus, characterized by comprising:
the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an input event of a terminal through an acquisition component of a target terminal application of the terminal when the target terminal application of the terminal is started;
the identification unit is used for acquiring attribute information of the input event through the acquisition component in the acquisition process; identifying application address information corresponding to the input event in the attribute information; acquiring current application address information of the target terminal application; matching the current application address information with the application address information corresponding to the input event; screening out the input event successfully matched with the current application address information from the input events to obtain a target input event;
the processing unit is used for identifying event content in the target input event and determining the event type of the target input event according to the event content; determining processing logic corresponding to the target input event according to the event type; screening out a target logic component corresponding to the processing logic from logic components applied by the target terminal; sending a logic processing request to the target logic component through the acquisition component of the target terminal application, so that the target logic component responds to the target input event; receiving response information returned by the target logic component, and updating current page information of the target terminal application based on the response information; and generating an updated page based on the updated page information, and displaying the updated page so as to avoid the logic component from processing events except the target input event acquired by the acquisition component.
11. An electronic device comprising a processor and a memory, the memory storing an application, the processor being configured to run the application in the memory to perform the steps in the information processing method of any one of claims 1 to 9.
12. A computer readable storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor to perform the steps in the information processing method according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111282702.XA CN113996058B (en) | 2021-11-01 | 2021-11-01 | Information processing method, apparatus, electronic device, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111282702.XA CN113996058B (en) | 2021-11-01 | 2021-11-01 | Information processing method, apparatus, electronic device, and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113996058A CN113996058A (en) | 2022-02-01 |
CN113996058B true CN113996058B (en) | 2023-07-25 |
Family
ID=79926103
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111282702.XA Active CN113996058B (en) | 2021-11-01 | 2021-11-01 | Information processing method, apparatus, electronic device, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113996058B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101737015B1 (en) * | 2016-11-29 | 2017-05-23 | 대한민국(방위사업청장) | Simulation engine system for war game based on discrete event system specification |
CN106693366A (en) * | 2016-12-06 | 2017-05-24 | 北京奇虎科技有限公司 | Method to verify legitimacy ofoperation and equipment and installation package reinforcement method and device |
CN107037951A (en) * | 2016-02-04 | 2017-08-11 | 中兴通讯股份有限公司 | Operator scheme automatic identifying method and terminal |
CN111385409A (en) * | 2018-12-29 | 2020-07-07 | 北京快如科技有限公司 | Communication input method, device, equipment and medium |
CN111803940A (en) * | 2020-01-14 | 2020-10-23 | 厦门雅基软件有限公司 | Game processing method and device, electronic equipment and computer-readable storage medium |
CN112306715A (en) * | 2020-10-30 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Event processing method and device |
WO2021083058A1 (en) * | 2019-10-28 | 2021-05-06 | 维沃移动通信有限公司 | Image processing method, server, and terminal device |
CN113209638A (en) * | 2021-05-08 | 2021-08-06 | 山东远鉴企业管理咨询有限公司 | A experience formula transaction system for finance and financing education propaganda |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040009813A1 (en) * | 2002-07-08 | 2004-01-15 | Wind Bradley Patrick | Dynamic interaction and feedback system |
-
2021
- 2021-11-01 CN CN202111282702.XA patent/CN113996058B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107037951A (en) * | 2016-02-04 | 2017-08-11 | 中兴通讯股份有限公司 | Operator scheme automatic identifying method and terminal |
KR101737015B1 (en) * | 2016-11-29 | 2017-05-23 | 대한민국(방위사업청장) | Simulation engine system for war game based on discrete event system specification |
CN106693366A (en) * | 2016-12-06 | 2017-05-24 | 北京奇虎科技有限公司 | Method to verify legitimacy ofoperation and equipment and installation package reinforcement method and device |
CN111385409A (en) * | 2018-12-29 | 2020-07-07 | 北京快如科技有限公司 | Communication input method, device, equipment and medium |
WO2021083058A1 (en) * | 2019-10-28 | 2021-05-06 | 维沃移动通信有限公司 | Image processing method, server, and terminal device |
CN111803940A (en) * | 2020-01-14 | 2020-10-23 | 厦门雅基软件有限公司 | Game processing method and device, electronic equipment and computer-readable storage medium |
CN112306715A (en) * | 2020-10-30 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Event processing method and device |
CN113209638A (en) * | 2021-05-08 | 2021-08-06 | 山东远鉴企业管理咨询有限公司 | A experience formula transaction system for finance and financing education propaganda |
Also Published As
Publication number | Publication date |
---|---|
CN113996058A (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190215364A1 (en) | Data processing method, storage medium, and electronic device | |
CN113485617B (en) | Animation display method and device, electronic equipment and storage medium | |
CN112169310B (en) | Game resource loading method and device, computer equipment and storage medium | |
CN110769050B (en) | Data processing method, data processing system, computer device, and storage medium | |
CN106682189B (en) | File name display method and device | |
CN110413383B (en) | Event processing method, device, terminal and storage medium | |
CN108170585A (en) | log processing method, device, terminal device and storage medium | |
CN111273955A (en) | Thermal restoration plug-in optimization method and device, storage medium and electronic equipment | |
CN108268232B (en) | Picture display method, device, system and storage medium | |
CN113996058B (en) | Information processing method, apparatus, electronic device, and computer-readable storage medium | |
CN104967598B (en) | The acquisition methods of a kind of customer multi-media authority information and device | |
CN112732250A (en) | Interface processing method, device and storage medium | |
KR102263977B1 (en) | Methods, devices, and systems for performing information provision | |
CN114201449A (en) | Log monitoring method and device, computer equipment and storage medium | |
CN114338830A (en) | Data transmission method and device, computer readable storage medium and computer equipment | |
CN113098781A (en) | Session list processing method, device, server and storage medium | |
CN112316416B (en) | Data searching method, device, computer equipment and storage medium | |
CN112333787B (en) | Data transmission method, device, storage medium, terminal and network access point equipment | |
CN113765886B (en) | Multimedia playing method and device, storage medium and electronic equipment | |
CN114189436B (en) | Multi-cluster configuration deployment method and device, electronic equipment and storage medium | |
CN114928759B (en) | Data processing method, data display method, device, equipment and storage medium | |
CN114726849B (en) | File transmission method, device, server and computer readable storage medium | |
CN113867817A (en) | Data processing method and device, electronic equipment and storage medium | |
CN117412275A (en) | Device control method, device, computer device and computer readable storage medium | |
CN117407186A (en) | Task execution method, device, electronic equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |