CN113996058A - Information processing method, information processing device, electronic equipment and computer readable storage medium - Google Patents

Information processing method, information processing device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113996058A
CN113996058A CN202111282702.XA CN202111282702A CN113996058A CN 113996058 A CN113996058 A CN 113996058A CN 202111282702 A CN202111282702 A CN 202111282702A CN 113996058 A CN113996058 A CN 113996058A
Authority
CN
China
Prior art keywords
target
application
terminal
input event
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.)
Granted
Application number
CN202111282702.XA
Other languages
Chinese (zh)
Other versions
CN113996058B (en
Inventor
潘博渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111282702.XA priority Critical patent/CN113996058B/en
Publication of CN113996058A publication Critical patent/CN113996058A/en
Application granted granted Critical
Publication of CN113996058B publication Critical patent/CN113996058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing 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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/214Input 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/2145Input 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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/355Performing operations on behalf of clients with restricted processing capabilities, e.g. servers transform changing game scene into an MPEG-stream for transmitting to a mobile phone or a thin client
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features 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/10Features 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/1068Features 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/1075Features 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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features 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/30Features 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/302Features 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, an acquisition assembly of the target terminal application acquires an input event of the terminal, in the acquisition process, the target input event of the target terminal application is identified from the input event, and the target input event is processed through a logic assembly of the target terminal application, so that the logic assembly is prevented from processing events except the target input event acquired by the acquisition assembly; 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

Information processing method, information processing device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an information processing method and 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 an application in a terminal. For example, an input event generated by an input device of the terminal may be processed, and particularly in a cloud game scenario, the input event needs to be converted into a system event by an operating system of the terminal and transmitted to the terminal application for processing, thereby causing a large delay. To reduce latency, existing information processing methods may employ a low latency touch input device to process input events generated by a user's touch.
In the research and practice process of the prior art, the inventor of the present invention finds that when a low-latency touch input device is used to process an input event, a touch trajectory of a user is displayed on a physical screen, and after the input event is processed, the touch trajectory is replaced with processed content, so that only the delay of the sense of the user is reduced, the processing process of the input event still needs to be processed by an operating system of a terminal, and the processed system event is transmitted to a terminal application, which still has the problem of high delay, and therefore, the processing efficiency of information processing is reduced.
Disclosure of Invention
Embodiments of the present invention provide an information processing method and apparatus, an electronic device, and a computer-readable storage medium, which can improve 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 assembly of the target terminal application;
in 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 prevent the logic component from processing events except the target input event collected by the collection component.
Optionally, an embodiment of the present invention further provides another information processing method, which is applied to a cloud game, and includes:
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;
processing the target input event through a logic component of the target cloud game application to avoid processing events other than the target input event collected by the collection component by the logic component. Accordingly, an embodiment of the present invention provides an information processing apparatus, including:
the terminal comprises a collecting unit, a processing unit and a processing unit, wherein the collecting unit is used for collecting an input event of the terminal through a collecting component of a target terminal application 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 prevent the logic component from processing events except the target input event acquired by the acquisition component.
Optionally, in some embodiments, the acquisition unit may be specifically configured to receive an event acquisition request for an input event of the terminal, where the event acquisition request 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 the input event of the terminal; and acquiring the input event of the terminal through an acquisition component applied by the target terminal.
Optionally, in some embodiments, the acquisition unit may be specifically configured to start the terminal acquisition service when receiving an acquisition stop request sent by the target terminal application; and acquiring the input event of the terminal based on the terminal acquisition service.
Optionally, in some embodiments, the acquisition unit may be specifically configured to acquire authority information of the target terminal application, and add an event acquisition authority to 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 applied by the target terminal.
Optionally, in some embodiments, the acquisition unit may be specifically configured to intercept, by the acquisition component, a target event corresponding to the input event when the target terminal application receives the target event, so that the target terminal application ignores the target event.
Optionally, in some embodiments, the acquisition unit may be specifically configured to, when it is detected that a terminal application of the terminal is started, acquire an application identifier of a 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 the terminal is started, the method for acquiring the input event of the terminal through the acquisition assembly of the target terminal application comprises the following steps: and acquiring the input event of the terminal through an acquisition component applied by the target terminal.
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 through 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, according to the event type, a processing logic corresponding to the target input event; screening out a target logic component corresponding to the processing logic from the logic components applied to 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 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 the 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 updating unit, where the page updating unit is specifically configured to encapsulate the response information, 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 identification unit may be specifically configured to acquire, by the acquisition component, attribute information of the input event in an acquisition 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 identification unit may be specifically configured to acquire current application address information of the target terminal application; matching the current application address information with application address information corresponding to the input event; and screening the input events which are successfully matched with the current application address information from the input events to obtain target input events.
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 can render a game picture of the target cloud game application according to the game control data; and 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 addition, an electronic device is further provided in an embodiment of the present invention, and includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the information processing method provided in the embodiment of the present invention.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to perform any one of the steps in the information processing and generating method provided by the embodiment of the present invention.
When a target terminal application of a terminal is started, an acquisition assembly of the target terminal application acquires an input event of the terminal, in the acquisition process, the target input event of the target terminal application is identified from the input event, and the target input event is processed through a logic assembly of the target terminal application, so that the logic assembly is prevented from processing events except the target input event acquired by the acquisition assembly; according to the scheme, the input event is collected through the collection component applied by the target terminal, and then the collected target input event is directly processed by the logic component applied by the target terminal without conversion and distribution through an operating system of the terminal, so that the transmission time of the input event is reduced, and the processing efficiency of information processing can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of an information processing method according to an embodiment of the present invention;
FIG. 2 is a 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 embodiments of the present invention;
FIG. 4 is a diagram illustrating an adjustment of acquisition permissions for input events according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of processing an input event by a target terminal application according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of delivering 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 illustrating a delay in the delivery process of an input event according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a terminal application processing a received system event in the prior art according to an embodiment of the present invention;
FIG. 9 is a schematic 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 sequence diagram of interaction between a terminal and a game server in a cloud game scenario according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an information processing apparatus provided by an embodiment of the present invention;
fig. 13 is another schematic structural diagram of an information processing apparatus according to 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 technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 into an electronic device, and the electronic device 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 basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
For example, referring to fig. 1, taking the example that the information processing apparatus is integrated in the electronic device, when a target terminal application of the 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, the target input event of the target terminal application is identified from the input event, and the target input event is processed through a logic component of the target terminal application, so as to prevent the logic component from processing events other than the target input event collected by the collection component, and further improve the processing efficiency of information processing.
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 a user directly operates to issue a control instruction, and may include a mouse, a keyboard, a touch screen, a handle, or other devices that can input information, for example. In addition, the input event is processed in a mode that the input event is logically processed through a logic component, and then the input event is responded.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of an information processing apparatus, which may be specifically integrated in an electronic device, where the electronic device may be a server or a terminal; the terminal may include a tablet Computer, a notebook Computer, a Personal Computer (PC), a wearable device, a virtual reality device, or other intelligent devices capable of processing information such as input events.
An information processing method comprising:
when a target terminal application of a terminal is started, an acquisition assembly of the target terminal application acquires input events of the terminal, in the acquisition process, the target input events of the target terminal application are identified from the input events, and the target input events are processed through a logic assembly of the target terminal application, so that the logic assembly is prevented from processing events except the target input events acquired by the acquisition assembly.
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 collected through a collection assembly of the target terminal application.
The input event may be event information generated by an input device of the terminal, and a 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 an input event of the terminal in the target terminal application, is mainly used for acquiring the input event of the terminal, and informs the logic component of the target terminal application to process when acquiring the target input event corresponding to the target terminal application.
The input event of the terminal can be collected by the collection component applied by the target terminal, for example, the collection mode of the input event can be adjusted to collect the input event, or the collection authority of the input event by the target terminal application can be adjusted to collect the input event, which specifically includes the following steps:
(1) adjusting acquisition mode of input events
The acquisition mode can be understood as a mode of acquiring an input event, the acquisition mode can be system acquisition and application acquisition, the system acquisition can be understood as acquiring the input event through a terminal or a terminal acquisition service in an operating system in the terminal, and the application acquisition can be understood as acquiring the input event through an acquisition component applied by a target terminal. Generally, most operating systems are in consideration of safety and stability, and are designed to not allow an application program to directly collect input events, so that the main collection mode is to uniformly collect and distribute the input events by the terminal or the operating system of the terminal, but the input transfer flow under a special scene can be customized by a device manufacturer, so that the specific terminal application can specifically collect the capability of the input events.
The input event can be collected by adjusting the collection mode of the input event, for example, the system collection mode can 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, and the method can 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 the terminal acquisition service is stopped according to the event acquisition request, so that the target terminal application starts the acquisition component and acquires the input event of the terminal through the acquisition component of the target terminal application.
The terminal acquisition service is used for acquiring input events of the terminal, can be understood as acquisition service 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 terminal services means that the system no longer collects input events, and thus hands 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 finishes acquisition of input events through the acquisition assembly, and the operating system does not perform acquisition.
Optionally, when the target terminal application stops operating, the target terminal application may further send a collection stop request for stopping collecting the input event to the terminal, and at this time, the collection mode of the input event may be adjusted to the system collection mode, for example, when the collection stop request sent by the target terminal application is received, the terminal collection service is started, and the input event of the terminal is collected based on the terminal collection 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 dispatching and processing under non-special scenes can be ensured.
Specifically, as shown in fig. 3, in a non-specific scene, the system collects an input event through a terminal collection service, when a target terminal application in the specific scene is started, the target terminal application can send an event collection request to notify the system of reassignment, the reassignment is to adjust a collection mode, the collection mode of the system is adjusted to an application collection mode, and when the target terminal application runs, the input event of the terminal can be directly collected through a collection component in the application collection mode. When the target terminal application stops running, the target terminal application can send a collection stopping request to inform a system to adjust the collection mode of the input event, and when the collection stopping request sent by the target terminal application is received, the application collection mode can be adjusted to the system collection mode, so that the terminal collection service is started, and the input event of the terminal is collected based on the terminal collection service.
(2) Adjusting acquisition permissions of input events
The acquisition permission can be understood as the 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 assembly, and when the acquisition assembly of the target terminal application acquires the input event of the terminal, the terminal or a system of the terminal can still acquire the input event of the terminal through the terminal acquisition service.
The adjustment mode for adjusting the acquisition permission of the input event may be various, and specifically may be as follows:
for example, authority information of the target terminal application is acquired, an event acquisition authority is added to the authority information, so that the target terminal application starts an acquisition component, and an input event of the terminal is acquired through the acquisition component of the target terminal application.
The method has the main function of adding the event acquisition permission in the permission information, namely opening 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 assembly of the target terminal application can be started to acquire the input event of the terminal.
Before adding the event acquisition permission into the permission information, the permission information of the target terminal application can be detected, and when the permission information does not contain the event acquisition permission, 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 convert the acquired input event into the target event and dispatch the target event to the corresponding terminal application, and when the terminal application corresponding to the target event is the target terminal application, the terminal acquisition service can send the target event to the target terminal application. At this time, the target terminal application has already acquired the input event through the acquisition component, and the target event corresponding to the input event can be directly ignored in various manners, for example, when the target terminal application receives the target event corresponding to the input event, the target terminal application can directly intercept the target event through 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 and the like for ignoring processing.
In the scheme of adjusting the collection permission of the input event, it can be found that the target terminal application can directly collect the input event through the collection component, and compared with the target event corresponding to the input event dispatched by the receiving system, the target terminal application does not need to go through a plurality of intermediate links such as conversion and dispatch, so that the transfer time of the input event can be greatly reduced, and the target terminal application can obtain the input event faster, so that the target event corresponding to the input event dispatched by the system can be directly ignored, and the scheme can be specifically as shown in fig. 4.
After the acquisition mode or the acquisition permission of the input event is adjusted, the acquisition component can be started by the target terminal application, the input event of the terminal is acquired by the acquisition component, the acquisition mode can be various, for example, the acquisition 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 acquisition component can directly read the input event, or the acquisition component is used for sending interface information to the input device of the terminal, so that the input device of the terminal constructs an information transmission channel between the acquisition component and the acquisition component through the interface information, and the acquisition component directly reads the input event generated by the input device of the terminal by using the transmission channel.
Wherein, when the terminal application is started in the terminal, the currently started terminal application needs to be judged, when the started terminal application is a target terminal application of the terminal, the input event of the terminal can be collected through the collection component of the target terminal application, therefore, when a target terminal application of a terminal is started, before an input event of the terminal is collected through a collection component of the target terminal application, the currently started terminal application needs to be detected in various ways, for example, when detecting that the terminal application of the terminal is started, acquiring the application identification of the currently started terminal application, when the application identifier is the preset application identifier, the currently started terminal application is determined to be the target terminal application, and at the moment, the input event of the terminal can be collected through the collection assembly 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 a user through an input device of the terminal.
The method for identifying the target input event applied by the target terminal from the input events may be various, and specifically may be as follows:
for example, in the acquisition process, the acquisition component acquires the attribute information of the input event, identifies the application address information corresponding to the input event in the attribute information, and screens out the target input event corresponding to the target terminal application from the input event according to the application address information.
The attribute information of the input event may be information describing an attribute of the input event, and may include, for example, application address information that the input event needs to be sent, 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 the input event needs to be sent, and the address information may be an information interface address or a port address of the terminal application, and the like. According to the application address information, various modes can be provided for screening out the target input event corresponding to the target terminal application from the input events, for example, current application address information of the target terminal is obtained, the current application address information is matched with the application address information corresponding to the input event, the input event successfully matched with the current application address information is screened out from the input events, and the target input event is obtained.
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 the input event or a target event corresponding to the input event in the target terminal application.
In the acquisition process, the identification of the target input event of the target terminal application from the input can be completed by an identification module in a logic component of the target terminal application, or can be completed by an identification component or other identification modules in the terminal, or can 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 needs to be configured through the target terminal application.
103. And processing the target input event through a logic component applied by the target terminal so as to prevent the logic component from processing events except the target input event collected by the collection component.
The logic components may be components used for performing logic processing on an input event or a target event corresponding to the input event in the target terminal application, the number of the logic components integrated in the target terminal application may be one or more, different logic components may be used for performing logic processing on input events corresponding to different logic types based on a specific application scenario, and the essence of the logic processing is in an event response to the input event or the target event corresponding to the input event, for example, in a shooting game, a control instruction for opening a sighting telescope is input through an input device, the input device generates the input event corresponding to the control instruction, the terminal application of the design game responds to the input event, and at this time, a game screen corresponding to the open sighting telescope may be displayed on a game page of the terminal application.
The processing mode of the target input event through the logic component may be various, and specifically may be as follows:
for example, the event content may be identified in the target input event, the event type of the target input event may be determined according to the event content, and the target input event may be processed by the 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, the event type may include a scene control type and a virtual object control type, and the like. Based on the event type, there are various ways to process the target input event through the logic component of the target terminal application, for example, according to the event type, determining the processing logic corresponding to the target input event, screening out the target logic component corresponding to the processing logic from the logic component of the target terminal application, and performing logic processing on the target input event through the target logic component.
The processing logic may be understood as a logic type for performing logic processing on the target input event, for example, if the target terminal application is an XX game, and the target input event is an operation instruction for transmitting a skill by a virtual object in the game, the processing logic of the target input event may be a 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 an event type and the processing logic may be obtained, and 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 be obtained, and the processing logic capable of processing the target input event corresponding to the event type is identified in the preset processing logic information.
For example, a logic processing request can be sent 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, 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 generated after the target logic component performs logic processing on the target input event, for example, if the target terminal application is also used as the game application, and the target input event is an operation event of a virtual button for a user to release skills of a virtual object in the game screen, the response information may be the control instruction for converting the operation event into the control instruction corresponding to the skills of releasing the virtual object in the game screen. The current page information of the target terminal application is updated based on the response information, and the updating mode can be various, for example, if the target terminal application is also used as the game application, and the response information is a control instruction for releasing the skill of the virtual object, the screen information for releasing the skill of the virtual object can be generated in the current page, so that the updated page information can be obtained, and then the updated page can be drawn based on the updated page information and displayed.
Optionally, after receiving the response information returned by the target logic component, the response information may be processed 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, the application control data is sent to the application server corresponding to the target terminal application, application page information corresponding to the application control data returned by the application server is received, 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 encapsulating the response information is to encapsulate the response information into a network data packet so as to be sent to an application server corresponding to the target terminal application, and there are various ways of encapsulating the response information, for example, a control instruction for the target terminal application may be extracted from the response information, and the control instruction is added to a preset network data packet, so that application control data for the target terminal application may be obtained. The application page information may be understood as the page information of the latest page of the target terminal application drawn by the application server corresponding to the target terminal application according to the application control data, and the manner in which the application server generates the application page information may be various, for example, after the application server receives the application control data, the application server may directly extract a control instruction from an application control data packet, then draw the page information corresponding to the control instruction, and use the page information of the control instruction as the application page information, or may map the control instruction in a virtual input device, thereby generating a virtual input event, and then draw the page information corresponding to the virtual input event, and use the page information as the application page information.
The method for processing the response information returned by the target logic component through the application server corresponding to the target terminal application can be applied to a cloud game scene, in the cloud game scene, the target terminal application deployed on the terminal side can directly generate the input event of the collected user input information into a control instruction, the control instruction is 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 without uniformly allocating the input event through a system of the terminal, and the network delay in the cloud game scene is a very important performance index, so that the delay from input information to page updating of the cloud game user can be greatly reduced.
In the scheme, the processing process of the input event by the target terminal application can be as shown in fig. 5, after the application program is started, the acquisition component is mainly used for continuously acquiring the input event converted by the hardware input module through 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, most importantly, the logic component only needs to process the target input event notified by the acquisition component, and avoids processing other events except the target input event notified by the acquisition component. In the existing input event processing flow, an operating system is mainly used for converting and dispatching an input event, as shown in fig. 6, a user generates a hardware signal through an input device, the hardware signal is converted into the input event through a 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 a corresponding terminal application, so that the terminal application receives and responds to the system event. In this process, there are two points that the delay from the signal of the input device of the terminal to the final terminal application becomes high, as shown in fig. 7, it can be seen that the system and the terminal application are isolated, and the transmission from the operating system to the terminal application is through many software intermediate links in the terminal device. In addition, many device manufacturers add custom links to these links, further increasing delivery delays,
wherein, in the existing input event processing manner, after receiving a system event, a terminal application will generally dispatch to a logic component of the terminal application for execution according to a natural frequency, taking an operating system as an android system as an example, a flow of processing the system event by the terminal application conventionally can be as shown in fig. 8, in a cycle of 16ms, a system event reaching the terminal application is not dispatched to a corresponding logic component immediately, but is distributed uniformly at the end of the cycle, and in the worst case, the system event reaching the terminal application is more than a whole cycle time (16ms), and in the present scheme, when a target input event aiming at the target terminal application is collected by a collection component in the target terminal application, a target logic component processing the target input event is determined, and then the target logic component is directly notified to process the target input event, the loop processing mode of the target terminal application is directly bypassed, so that the input delay is effectively reduced.
As can be seen from the above, in the embodiment of the present invention, when a target terminal application of a terminal is started, an acquisition component of the target terminal application acquires an input event of the terminal, in the acquisition process, the target input event of the target terminal application is identified from the input event, and the target input event is processed by a logic component of the target terminal application, so as to prevent 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 collected through the collection component applied by the target terminal, and then the collected target input event is directly processed by the logic component applied by the target terminal without conversion and distribution through an operating system of the terminal, so that the transmission time of the input event is reduced, and the processing efficiency of information processing can be improved.
The method described in the above examples is further illustrated in detail below by way of example.
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, an information processing method specifically includes the following steps:
201. when the target terminal application of the terminal is started, the terminal monitors the input event of the terminal through the monitoring component of the target terminal application.
For example, when detecting that a terminal application of the terminal is started, the terminal acquires an application identifier of the currently started terminal application, and when the application identifier is a preset application identifier, determines that the currently started terminal application is a target terminal application.
The terminal may adjust a monitoring mode of the input event to monitor the input event, or may also adjust a monitoring authority of the target terminal application to the input event to monitor the input event, which may specifically be as follows:
(1) terminal adjusting monitoring mode of input event
For example, the terminal receives an event monitoring request for an input event of the terminal, which is sent by the target terminal application, and stops the terminal monitoring service according to the event monitoring request, so that the target terminal application starts a monitoring component and monitors the input event of the terminal through the monitoring component of the target terminal application.
Optionally, when receiving a monitoring stop request 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 adjusting monitoring authority of input event
For example, the authority information of the target terminal application is obtained, the authority information of the target terminal application is detected, and when the authority information does not contain the event monitoring authority, the event monitoring authority can be added to the authority of the target terminal application, 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 applied by the target terminal.
Optionally, when the target terminal application receives a target event corresponding to the input event, the terminal may directly intercept the target event 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 so on.
The terminal can start the monitoring component by the application of the target terminal after adjusting the monitoring mode or the monitoring authority of the input event, the input event of the terminal is monitored by the monitoring component, and the monitoring mode can be various, 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 between the input device of the terminal and the monitoring component through the interface information, and the monitoring component directly reads the input event generated by the input device of the terminal by adopting the transmission channel.
202. And in the monitoring process, the terminal identifies a target input event applied by the target terminal from the input events.
For example, in the monitoring process, the terminal acquires attribute information of an input event through the monitoring component, identifies application address information corresponding to the input event in the attribute information, acquires current application address information of the target terminal, matches the current application address information with the application address information corresponding to the input event, and screens out the input event successfully matched with the current application address information in the input event to obtain the target input event.
203. The terminal identifies the event content in the target input event to determine the event type of the target input event.
For example, the terminal may recognize the event content in the target input event, and determine the event type of the target input event according to the content format of the event content.
204. And the terminal processes the target input event through the logic component applied by the target terminal based on the event type so as to prevent 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, and map the processing logic corresponding to the event type of the target input event in the preset mapping information, or may further obtain preset processing logic information, and identify the processing logic capable of processing the target input event corresponding to the event type in the preset processing logic information, so as to avoid the logic component from processing 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 applied by the target terminal. 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 package 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, after receiving the application control data, the application server may directly extract a control instruction from an 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 map the control instruction in a virtual input device, so as to generate 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 a target terminal application of a terminal is started, the terminal monitors an input event of the terminal through a monitoring component of the target terminal application, identifies the target input event of the target terminal application from the input event in the monitoring process, and processes the target input event through a logic component of the target terminal application, so as to prevent the logic component from processing events except 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, and then the monitored target input event is directly processed by the logic component of the target terminal application without conversion and distribution through the operating system of the terminal, so that the transmission time of the input event is reduced, and the processing efficiency of information processing can be improved.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the information processing apparatus is specifically integrated in an electronic device, the electronic device is a terminal, and a scenario in which the information processing apparatus performs information processing is a cloud game application scenario.
In a cloud game application scene, the whole cloud game system may include a game terminal and a game server, the game terminal is used for a user to operate and display a corresponding game picture, an input device of a 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 which is sent by the terminal and generated based on operation information input by the user to render the game picture corresponding to the control instruction, and returning the game picture to the terminal, so that the terminal displays the game page, and the cloud game system architecture diagram may be as shown in fig. 10. The information processing method in the cloud game scene specifically may be 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 can render 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.
Specifically, 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, converts the target input event into game control data through a logic component, and sends the game control data to the game server, the game server renders a game screen of the cloud game application based on the game control data, and the game screen is returned to the terminal, and the terminal displays the game screen.
The information processing method in the cloud game scene can be used for a user to perform input operation through external or internal 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 the cloud game application in the terminal is not started, the operating system in the terminal monitors the input event through the terminal monitoring service, converts the monitored input event into a system event, and distributes the converted system event to the corresponding terminal application.
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 the specific monitoring mode can be divided into two modes, specifically as follows:
(1) adjusting a listening mode of an input event
For example, when the cloud game application is started, a notification negotiated with the system in advance is sent to the operating system of the terminal, the notification may be an event monitoring request, and after the operating system receives the monitoring request, the monitoring mode of the input event is adjusted to an application monitoring mode, at this time, the operating system does not monitor the input event any more, and a 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 input events, 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 recover a normal system monitoring mode, and the monitoring task is returned to the operating system of the terminal again. After that, the operating system returns to the previous process of monitoring and processing the input event, thereby ensuring the event dispatch of the input event under the non-special scene.
(2) Adjusting snoop permissions for input events
For example, when a cloud game application is started, authority information of the cloud game application is acquired, whether event monitoring authority for inputting an event is included in the authority information is detected, when the authority information does not include the event monitoring authority, the event monitoring authority is added to the authority information, so that the cloud game application starts a monitoring component, and when the authority information includes the event monitoring authority, a starting request is sent to the cloud game application, so that the cloud game application starts the monitoring component. Then, a monitoring component of the cloud game application is adopted to monitor the input event, 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 carry out direct input event monitoring. In the process of monitoring the input event, the input event monitored by the operating system needs to be converted into a system event and sent to the cloud game application through an intermediate process, which means that the input event monitored by the cloud game application is faster than the system event sent by the operating system, so the cloud game application can directly ignore the system event sent by the operating system or intercept the system event through the monitoring component, and indirectly ignore the system event sent by the operating system.
In the process of monitoring the input events by adopting the monitoring component, target input events aiming at the cloud game application are identified 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 the processing logic corresponding to the event type. The method comprises the steps of screening out a target logic component for processing an input event from logic components of the cloud game application through processing logic, sending a logic processing request to the target logic component through a monitoring component, enabling the target logic component to directly carry out logic processing on the target input event, wherein 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, packaging the converted control instruction into a preset network data packet to obtain application control data, and sending the application control data 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 the 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 a cloud game application scenario, an existing input event processing method needs to convert an input event into a system event and distribute the system event uniformly, when a plurality of cloud games run simultaneously, network delay or picture delay of each cloud game application is greatly increased, so that a user experience effect is poor, the input event is processed by the scheme, the system does not need to distribute the input event uniformly, each cloud game application can independently monitor or collect the input event of the user, when the input event of the user aiming at the cloud game application is monitored or collected, the input event can be converted into a control instruction by using a logic component at the first time and sent to a cloud game server, so that the cloud game server can draw a game picture corresponding to the control instruction immediately, and then, based on game picture information returned by the cloud game server, the current game picture of the cloud game is updated, and the updated game picture is displayed, so that the network delay is greatly reduced, and the processing efficiency of information processing is improved.
In order to better implement the above method, the embodiment of the present invention further provides an information processing apparatus, which may be integrated in an electronic device, such as a server or a terminal, and 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 acquisition unit 301 is configured to acquire an input event of the terminal through an acquisition component of the target terminal application when the target terminal application of the terminal is started.
For example, the collecting unit 301 may be specifically configured to, when a target terminal application of the terminal is started, adjust a collecting mode of an input event to collect the input event, 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 a target input event for a target terminal application from the input events in the collecting process.
For example, the identifying unit 302 may be specifically configured to, in the collecting process, obtain attribute information of an input event through the collecting component, identify application address information corresponding to the input event in the attribute information, obtain current application address information of the target terminal, match the current application address information with the application address information corresponding to the input event, and screen, from the input events, an input event that is successfully matched with the current application address information, 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 applied by the target terminal so as to prevent the logic component from processing events except the target input event collected by the collection component.
The processing unit 303 may be specifically 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 processing logic corresponding to the target input event according to the event type, screen out 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, enable the target logic component to respond 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 updating unit 304, as shown in fig. 13, which may specifically be as follows:
and a page updating unit 304, 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 the current page of the target terminal application according to the application page information, and display the updated page. In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in this embodiment, when a target terminal application of a terminal is started, an acquisition unit 301 acquires an input event of the terminal through an acquisition component of the target terminal application, in the acquisition process, a recognition unit 302 recognizes the target input event of the target terminal application from the input event, and a processing unit 303 processes the target input event through a logic component of the target terminal application, so as to prevent 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 collected through the collection component applied by the target terminal, and then the collected target input event is directly processed by the logic component applied by the target terminal without conversion and distribution through an operating system of the terminal, so that the transmission time of the input event is reduced, and the processing efficiency of information processing can be improved.
An embodiment of the present invention further 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 present invention, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 14 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, 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 monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. 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 operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the 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 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
when a target terminal application of a terminal is started, an acquisition assembly of the target terminal application acquires input events of the terminal, in the acquisition process, the target input events of the target terminal application are identified from the input events, and the target input events are processed through a logic assembly of the target terminal application, so that the logic assembly is prevented from processing events except the target input events acquired by the acquisition assembly.
For example, when the terminal application of the terminal is detected to start, the application identification of the currently started terminal application is acquired, when the application identifier is the preset application identifier, determining the currently started terminal application as the target terminal application, an event collection request for an input event of the terminal transmitted by the target terminal application may be received, stopping the terminal acquisition service according to the event acquisition request, enabling the target terminal application to start the acquisition component, directly accessing the event port of the input device of the terminal by adopting the acquisition component, when the input device generates an input event, the acquisition component can read the input event directly, or, the acquisition component is adopted 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 input equipment of the terminal through the interface information, and the acquisition component directly adopts the transmission channel to read the input event generated by the input equipment of the terminal. Or acquiring authority information of the target terminal application, adding an event acquisition authority in the authority information so that the target terminal application starts an acquisition component, directly accessing the acquisition component to an event port of input equipment of the terminal, and when the input equipment generates an input event, the acquisition component can directly read the input event, or sending interface information to the input equipment of the terminal by using the acquisition component, so that the input equipment of the terminal constructs an information transmission channel between the input equipment and the acquisition component through the interface information, and the acquisition component directly reads the input event generated by the input equipment of the terminal by using the transmission channel. In the acquisition process, the attribute information of the input event is acquired through the acquisition assembly, the application address information corresponding to the input event is identified in the attribute information, the current application address information of the target terminal is acquired, the current application address information is matched with the application address information corresponding to the input event, the input event successfully matched with the current application address information is screened out from the input event, and the target input event is acquired. Recognizing 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 target logic components corresponding to the processing logic from logic components applied by a target terminal, sending a logic processing request to the target logic components through an acquisition component applied by the target terminal so that the target logic components respond to the target input event, receiving response information returned by the target logic components, updating current page information applied by the target terminal based on the response information, generating an updated page based on the updated page information, displaying the updated page, or packaging the response information to obtain application control data applied by the target terminal, and sending the application control data to an application server corresponding to the target terminal application, 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.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present invention, when a target terminal application of a terminal is started, an acquisition component of the target terminal application acquires an input event of the terminal, in the acquisition process, the target input event of the target terminal application is identified from the input event, and the target input event is processed by a logic component of the target terminal application, so as to prevent 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 collected through the collection component applied by the target terminal, and then the collected target input event is directly processed by the logic component applied by the target terminal without conversion and distribution through an operating system of the terminal, so that the transmission time of the input event is reduced, and the processing efficiency of information processing can be improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in 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 a target terminal application of a terminal is started, an acquisition assembly of the target terminal application acquires input events of the terminal, in the acquisition process, the target input events of the target terminal application are identified from the input events, and the target input events are processed through a logic assembly of the target terminal application, so that the logic assembly is prevented from processing events except the target input events acquired by the acquisition assembly.
For example, when the terminal application of the terminal is detected to start, the application identification of the currently started terminal application is acquired, when the application identifier is the preset application identifier, determining the currently started terminal application as the target terminal application, an event collection request for an input event of the terminal transmitted by the target terminal application may be received, stopping the terminal acquisition service according to the event acquisition request, enabling the target terminal application to start the acquisition component, directly accessing the event port of the input device of the terminal by adopting the acquisition component, when the input device generates an input event, the acquisition component can read the input event directly, or, the acquisition component is adopted 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 input equipment of the terminal through the interface information, and the acquisition component directly adopts the transmission channel to read the input event generated by the input equipment of the terminal. Or acquiring authority information of the target terminal application, adding an event acquisition authority in the authority information so that the target terminal application starts an acquisition component, directly accessing the acquisition component to an event port of input equipment of the terminal, and when the input equipment generates an input event, the acquisition component can directly read the input event, or sending interface information to the input equipment of the terminal by using the acquisition component, so that the input equipment of the terminal constructs an information transmission channel between the input equipment and the acquisition component through the interface information, and the acquisition component directly reads the input event generated by the input equipment of the terminal by using the transmission channel. In the acquisition process, the attribute information of the input event is acquired through the acquisition assembly, the application address information corresponding to the input event is identified in the attribute information, the current application address information of the target terminal is acquired, the current application address information is matched with the application address information corresponding to the input event, the input event successfully matched with the current application address information is screened out from the input event, and the target input event is acquired. Recognizing 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 target logic components corresponding to the processing logic from logic components applied by a target terminal, sending a logic processing request to the target logic components through an acquisition component applied by the target terminal so that the target logic components respond to the target input event, receiving response information returned by the target logic components, updating current page information applied by the target terminal based on the response information, generating an updated page based on the updated page information, displaying the updated page, or packaging the response information to obtain application control data applied by the target terminal, and sending the application control data to an application server corresponding to the target terminal application, 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.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any information processing method provided in the embodiment of the present invention, the beneficial effects that can be achieved by any information processing method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various alternative implementations of the information processing aspect or the input event processing aspect described above.
The above detailed description is provided for an information processing method, an information processing apparatus, and a computer-readable storage medium according to embodiments of the present invention, and specific examples are applied herein to illustrate the principles and implementations of the present invention, and the above descriptions of the embodiments are only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (18)

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 assembly of the target terminal application;
in 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 prevent the logic component from processing events except the target input event collected by the collection component.
2. The information processing method of claim 1, wherein the collecting the input event of the terminal by the collecting component of the target terminal application comprises:
receiving an event acquisition request aiming at 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 the input event of the terminal;
and acquiring the input event of the terminal through an acquisition component applied by the target terminal.
3. The information processing method according to claim 2, wherein after the collecting of the input event of the terminal by the collecting component of the target terminal application, the method further comprises:
starting the terminal acquisition service when receiving an acquisition stopping request sent by the target terminal application;
and acquiring the input event of the terminal based on the terminal acquisition service.
4. The information processing method of claim 1, wherein the collecting the input event of the terminal by the collecting component of the target terminal application comprises:
acquiring authority information of the target terminal application, and adding an event acquisition authority in the authority information so as to enable the target terminal application to start an acquisition component;
and acquiring the input event of the terminal through an acquisition component applied by the target terminal.
5. The information processing method according to claim 4, further comprising:
and when the target terminal application receives a target event corresponding to the input event, intercepting the target event through the acquisition assembly, so that the target terminal application ignores the target event.
6. The information processing method according to any one of claims 1 to 5, wherein 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, the method further includes:
when detecting that a terminal application of a terminal is started, 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 the terminal is started, the method for acquiring the input event of the terminal through the acquisition assembly of the target terminal application comprises the following steps: and acquiring the input event of the terminal through an acquisition component applied by the target terminal.
7. The information processing method according to any one of claims 1 to 5, wherein the processing the target input event by the logic component of the target terminal application includes:
identifying event content in the target input event, and determining the event type of the target input event according to the event content;
and processing the target input event through a logic component of the target terminal application based on the event type.
8. The information processing method of claim 7, wherein the processing the target input event by the logic component of the target terminal application based on the event type comprises:
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 the logic components applied to the target terminal;
and carrying out logic processing on the target input event through the target logic component.
9. The information processing method of claim 8, wherein the logically processing the target input event by the target logical component comprises:
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 the 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.
10. The information processing method according to claim 9, further comprising, after receiving the response information returned by the target logical component:
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.
11. The information processing method according to any one of claims 1 to 5, wherein the identifying, in the collecting process, a target input event for the target terminal application from the input events comprises:
in the acquisition process, acquiring attribute information of the input event through the acquisition assembly;
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.
12. The information processing method according to claim 11, wherein the screening, according to the application address information, a target input event corresponding to the target terminal application from the input events comprises:
acquiring current application address information of the target terminal application;
matching the current application address information with application address information corresponding to the input event;
and screening the input events which are successfully matched with the current application address information from the input events to obtain target input events.
13. An information processing method, which is applied to a cloud game, the method 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;
during the acquisition process, identifying a target input event for the target cloud game application from the input events;
processing the target input event through a logic component of the target cloud game application to avoid processing events other than the target input event collected by the collection component by the logic component.
14. The information processing method of claim 13, wherein after processing the target input event by the logic component of the target cloud game application, further comprising:
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 can render a game picture of the target cloud game application according to the game control data;
and 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.
15. An information processing apparatus characterized by comprising:
the terminal comprises a collecting unit, a processing unit and a processing unit, wherein the collecting unit is used for collecting an input event of the terminal through a collecting component of a target terminal application 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 prevent the logic component from processing events except the target input event acquired by the acquisition component.
16. An electronic device, comprising a processor and a memory, wherein the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the information processing method according to any one of claims 1 to 14.
17. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps in the information processing method according to any one of claims 1 to 14.
18. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the information processing method according to any one of claims 1 to 14.
CN202111282702.XA 2021-11-01 2021-11-01 Information processing method, apparatus, electronic device, and computer-readable storage medium Active CN113996058B (en)

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 true CN113996058A (en) 2022-02-01
CN113996058B 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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040009813A1 (en) * 2002-07-08 2004-01-15 Wind Bradley Patrick Dynamic interaction and feedback system
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040009813A1 (en) * 2002-07-08 2004-01-15 Wind Bradley Patrick Dynamic interaction and feedback system
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
CN113996058B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
WO2019174595A1 (en) Resource configuration method and apparatus, terminal, and storage medium
US10824449B2 (en) Application running method and device
CN111263181A (en) Live broadcast interaction method and device, electronic equipment, server and storage medium
JP7397094B2 (en) Resource configuration method, resource configuration device, computer equipment, and computer program
US20190199795A1 (en) Method and device for synchronizing backup data, storage medium, electronic device, and server
CN112245904B (en) Method, system, storage medium and computer device for supporting cross-service game
CN113485617B (en) Animation display method and device, electronic equipment and storage medium
WO2018086454A1 (en) Page data processing method and device
CN110769050B (en) Data processing method, data processing system, computer device, and storage medium
CN115460469A (en) Multi-video playing processing method and device, computer equipment and storage medium
CN114042310A (en) Game operation data collection method and device, computer equipment and storage medium
CN112423011A (en) Message reply method, device, equipment and storage medium
CN113996058B (en) Information processing method, apparatus, electronic device, and computer-readable storage medium
CN113763932B (en) Speech processing method, device, computer equipment and storage medium
CN115589432A (en) Message push management method, device, medium and equipment
CN114201449A (en) Log monitoring method and device, computer equipment and storage medium
CN114116090A (en) Information display method and device, electronic equipment and computer readable storage medium
CN113468346A (en) Resource processing method and device, electronic equipment and storage medium
CN112783860B (en) Method, device, storage medium and computer equipment for constructing mirror image database
CN112316416A (en) Data searching method and device, computer equipment and storage medium
CN114726849B (en) File transmission method, device, server and computer readable storage medium
CN112245911B (en) Method and device for issuing game program, storage medium and computer equipment
CN113867817A (en) Data processing method and device, electronic equipment and storage medium
CN114217969A (en) Execution function execution method and related equipment
CN116492671A (en) Virtual resource processing method, device, computer equipment and 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