Scene recognition method and electronic equipment
By obtaining system probe data to identify the network traffic characteristics of applications, the problem of efficiently and accurately identifying application running scenarios on resource-constrained devices is solved, thereby improving application performance and user experience.
Patent Information
- Application Number
- CN202410710730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2025-10-10
AI Technical Summary
Existing technologies make it difficult to efficiently and accurately identify application running scenarios on devices with limited time and resources, affecting application performance and user experience.
By obtaining the system probe data of the target application, its network traffic characteristics are determined, and these characteristics are used for scene recognition, including the number of network data packets, data packet size, bandwidth occupancy, etc., to identify live broadcast scenes or short video playback scenes.
It achieves efficient and accurate application scenario identification, provides reliable resource scheduling and system optimization support, and improves application performance and user experience.
Smart Images

Figure CN120769103A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of terminal, and in particular, to a scene recognition method and an electronic device. BACKGROUND
[0002] The running scene recognition for the application is beneficial to improve the application performance and the user experience. For the real-time application scene, the running scene recognition needs to be completed within a limited time and deployed on a device with limited resources.
[0003] Therefore, how to efficiently and accurately perform the running scene recognition has good practical value and market prospect. SUMMARY
[0004] To solve the above technical problems, the present application provides a scene recognition method and an electronic device. In the method, whether to perform running scene recognition on a target application is determined according to application running parameters of the target application. In the case of determining to perform the running scene recognition, system probe data associated with the target application is acquired, and network traffic features matching a current running scene of the target application are determined based on the system probe data. Then, the current running scene of the target application is recognized according to the network traffic features, and a scene recognition result is obtained. This is beneficial to realize efficient and accurate application scene recognition, provide effective data support for subsequent resource scheduling, system optimization or decision control, improve the application performance and the user experience.
[0005] In a first aspect, embodiments of the present application provide a scene recognition method applied to an electronic device, and the method comprises: determining whether to start running scene recognition for a target application according to application running parameters of the target application; in the case of determining to start the running scene recognition, acquiring system probe data associated with the target application; determining network traffic features of a current running scene of the target application based on the system probe data; and recognizing the current running scene according to the network traffic features and / or the system probe data, and obtaining a scene recognition result.
[0006] The application running parameters comprise at least one of the following parameters: an application package name, an application type, an application active state and a current running activity.
[0007] This is beneficial to realize efficient and accurate application scene recognition, provide credible decision support for optimizing resource allocation, improve the application technical performance, and significantly improve the user experience.
[0008] According to a first aspect, or any possible implementation mode of the above first aspect, the application running parameter comprises an application active state, and the determining whether to start the running scene recognition for the target application according to the application running parameter of the target application comprises: starting the running scene recognition for the target application in a case where the application active state indicates that the target application enters an active interface.
[0009] According to a first aspect, or any possible implementation mode of the above first aspect, the application running parameter comprises a current running activity, and the determining whether to start the running scene recognition for the target application according to the application running parameter of the target application comprises: determining whether the current running activity of the target application is a preset whitelist activity to be subjected to scene recognition; and starting the running scene recognition for the target application in response to the current running activity being the whitelist activity.
[0010] According to a first aspect, or any possible implementation mode of the above first aspect, in a case where it is determined to start the running scene recognition, the system probe data associated with the target application is acquired, comprising: in a case where it is determined to start the running scene recognition, determining whether the current running activity of the target application is changed; and in a case where the current running activity is not changed, sampling the system probe data associated with the current running scene of the target application at a preset frequency until a preset number threshold is reached.
[0011] According to a first aspect, or any possible implementation mode of the above first aspect, the method further comprises: in a case where the current running activity is changed, performing again the operation of determining whether to start the running scene recognition for the target application according to the application running parameter of the target application.
[0012] According to a first aspect, or any possible implementation mode of the above first aspect, the system probe data comprises at least one of the following data: a network data packet number, a network data packet size, a data packet transmission parameter and a bandwidth occupation amount.
[0013] According to a first aspect, or any possible implementation mode of the above first aspect, the system probe data comprises the network data packet number, and the determining the network flow feature of the current running scene of the target application based on the system probe data comprises: calculating a data transmission rate matched with a sampling time according to a time difference value corresponding to adjacent samplings and a number difference value of the network data packet number; and determining a network speed distribution feature matched with the current running scene as the network flow feature according to the data transmission rate based on a plurality of sampling times, wherein the network speed distribution feature indicates a rate interval and a rate stability of network data packet transmission.
[0014] According to the first aspect, or any implementation method of the first aspect above, the current running scenario is identified according to the network traffic characteristics to obtain a scene identification result, including: when the network speed distribution characteristics indicate that the data transmission rate based on each sampling moment is within the target rate range, determining that the current running scenario is a live broadcast scene; and when the network speed distribution characteristics indicate that there is a data transmission rate outside the target rate range, and there is a data transmission rate fluctuation value greater than a preset rate fluctuation threshold, determining that the current running scenario is a short video playback scene, wherein the length of the target rate interval is less than or equal to the preset interval length threshold.
[0015] According to the first aspect, or any implementation method of the first aspect above, the system probe data includes the number of network data packets, and the network traffic characteristics of the current operation scenario of the target application are determined based on the system probe data, including: when the number of network data packets corresponding to any sampling moment is greater than a preset number threshold, determining that the current operation scenario is a high-traffic operation scenario based on the sampling moment; and determining the persistence characteristics of the high-traffic operation scenario as the network traffic characteristics.
[0016] According to the first aspect, or any implementation method of the first aspect above, the current operating scenario is identified based on the network traffic characteristics to obtain a scene identification result, including: when the network traffic characteristics indicate that the current operating scenario is a continuous high-traffic operating scenario, determining that the current operating scenario is a live broadcast scene; and when the network traffic characteristics indicate that the current operating scenario is an intermittent high-traffic operating scenario, determining that the current operating scenario is a short video playback scene.
[0017] According to the first aspect, or any implementation of the first aspect above, the system probe data includes the network data packet size, and the network traffic characteristics of the current operation scenario of the target application are determined based on the system probe data, including: based on the network data packet size based on multiple sampling moments, determining the data packet size distribution characteristics that match the current operation scenario as the network traffic characteristics, wherein the data packet size distribution characteristics indicate the data packet size range and the stability of the data packet size.
[0018] According to the first aspect, or any one of the implementations of the first aspect, the identifying the current running scenario according to the network traffic feature comprises: determining that the current running scenario is a live streaming scenario in a case where the data packet size distribution feature indicates that the data packet size at each sampling time is within a target size interval; and determining that the current running scenario is a short video playing scenario in a case where the data packet size distribution feature indicates that there is a data packet size outside the target size interval and there is a data packet size fluctuation value greater than a preset size fluctuation threshold, wherein a length of the target size interval is less than or equal to a preset interval length threshold.
[0019] According to the first aspect, or any one of the implementations of the first aspect, the system probe data comprises the data packet transmission parameter, and the determining the network traffic feature of the current running scenario of the target application based on the system probe data comprises: determining a data packet sequence number and / or a data packet arrival time stamp of a network data packet sampled at a preset frequency according to the data packet transmission parameter; determining an arrival time interval between network data packets sampled at each adjacent time according to the data packet sequence number and / or the data packet arrival time stamp; and determining a data packet transmission mode matching the current running scenario as the network traffic feature according to the arrival time interval.
[0020] According to the first aspect, or any one of the implementations of the first aspect, the determining the network traffic feature of the current running scenario according to the arrival time interval comprises: determining that the data packet transmission mode matching the current running scenario is a continuous data stream mode in a case where the arrival time interval between network data packets sampled at each adjacent time is within a target interval; and determining that the data packet transmission mode is a discrete data block mode in a case where there is a time interval between network data packets sampled at adjacent times outside the target interval and there is a fluctuation value of the arrival time interval greater than a preset interval fluctuation threshold, wherein a length of the target interval is less than or equal to a preset interval length threshold, and the data packet transmission mode constitutes the network traffic feature.
[0021] According to the first aspect, or any one of the implementations of the first aspect, the identifying the current running scenario according to the network traffic feature comprises: determining that the current running scenario is a live streaming scenario in a case where the data packet transmission mode is a continuous data stream mode; and determining that the current running scenario is a short video playing scenario in a case where the data packet transmission mode is a discrete data block mode.
[0022] According to the first aspect, or any implementation method of the first aspect above, the system probe data includes the bandwidth occupancy, and the network traffic characteristics of the current operation scenario of the target application are determined based on the system probe data, including: when the bandwidth occupancy corresponding to any sampling moment is greater than a preset occupancy threshold, determining that the current operation scenario is a high-bandwidth occupancy scenario based on the sampling moment; and determining the persistence characteristics of the high-bandwidth occupancy scenario as the network traffic characteristics.
[0023] According to the first aspect, or any implementation method of the first aspect above, the current operating scenario is identified based on the network traffic characteristics to obtain a scene identification result, including: when the network traffic characteristics indicate that the current operating scenario is a continuous high-bandwidth occupancy scenario, determining that the current operating scenario is a live broadcast scene; and when the network traffic characteristics indicate that the current operating scenario is an intermittent high-bandwidth occupancy scenario, determining that the current operating scenario is a short video playback scene.
[0024] According to the first aspect, or any implementation of the first aspect above, the system probe data also includes a window change event, and the current running scene is identified based on the system probe data to obtain a scene identification result, including: when the system probe data indicates that a window change event based on the current running scene is detected, the current running scene is identified based on the window features of the current active window of the target application represented by the window change event to obtain the scene identification result. The window features include at least one of a window title, a window class name, a window content, and a specific application API.
[0025] According to the first aspect, or any implementation method of the first aspect above, the system probe data also includes a window change event, and the current running scenario is identified based on the system probe data to obtain a scene recognition result, including: when the system probe data indicates that a window change event based on the current running scenario is detected, the current running scenario is identified based on the network traffic characteristics and the window characteristics of the current active window of the target application represented by the window change event to obtain the scene recognition result.
[0026] According to the first aspect, or any implementation of the first aspect above, the method further includes: generating a scene category label that matches the scene recognition result; and binding the scene category label to at least one of the application package name, currently running activity and target component of the target application.
[0027] According to a first aspect, or any possible implementation mode of the first aspect, the method further comprises: forming a scene recognition database according to binding data between at least one of an application package name of a candidate application, a current running activity and a target component and a corresponding scene category label, wherein the candidate application comprises any application requiring running scene recognition, including the target application.
[0028] According to the first aspect, or any possible implementation mode of the first aspect, the method further comprises: scheduling network resources allocated to the current running scene of the target application according to the scene recognition result.
[0029] According to the first aspect, or any possible implementation mode of the first aspect, the scheduling of the network resources allocated to the current running scene of the target application according to the scene recognition result comprises: in a case where the scene recognition result indicates that the current running scene is a live scene, performing at least one of the following operations to schedule network resources allocated to the live scene: improving thread priority of a target thread for transmitting a live video stream; increasing bandwidth allocation amount for the current running scene of the target application; improving CPU frequency point allocated to the current running scene of the target application; and increasing QoS (Quality of Service) service quality label for the live video stream.
[0030] According to a second aspect, an embodiment of the present application provides a scene recognition method applied to an electronic device, the method comprising: determining whether to perform running scene recognition on a to-be-recognized application according to application running parameters of the to-be-recognized application; in a case where it is determined to perform running scene recognition, acquiring a scene category label matching a current running activity of the to-be-recognized application from a preset scene recognition database; and taking a scene type indicated by the scene category label as a scene recognition result for the current running activity of the to-be-recognized application, wherein the scene recognition database comprises binding data between candidate running activities of candidate applications and corresponding scene category labels, the candidate applications comprise any application requiring running scene recognition, and the candidate running activities comprise any activity requiring running scene recognition.
[0031] According to the second aspect, the application running parameters comprise at least one of the following parameters: at least one of an application package name, an application type, an application active state and a current running activity.
[0032] In a third aspect, an embodiment of the present application provides an electronic device comprising: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer program is executed by the one or more processors, the electronic device performs the following steps: determining whether to start operation scenario identification for the target application based on the application operation parameters of the target application; obtaining system probe data associated with the target application when it is determined to start the operation scenario identification; determining the network traffic characteristics of the current operation scenario of the target application based on the system probe data; and identifying the current operation scenario based on the network traffic characteristics and / or the system probe data to obtain a scene recognition result.
[0033] In a fourth aspect, an embodiment of the present application provides an electronic device comprising: one or more processors, a memory, a scene recognition application, and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer program is executed by the one or more processors, the electronic device performs the following steps: determining whether to perform operation scene recognition on the application to be identified based on the application operation parameters of the application to be identified; when it is determined to perform operation scene recognition, obtaining a scene category label that matches the current operation activity of the application to be identified from a preset scene recognition database; and using the scene type indicated by the scene category label as the scene recognition result for the current operation activity of the application to be identified, wherein the scene recognition database includes binding data between candidate operation activities of candidate applications and corresponding scene category labels, the candidate applications include any applications that require operation scene recognition, and the candidate operation activities include any activities that require operation scene recognition.
[0034] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on an electronic device, enables the electronic device to execute instructions of a method in any possible implementation of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram schematically shows the current running scenario of the application;
[0036] Figure 2 A schematic diagram of a media system in related art is schematically shown;
[0037] Figure 3 is a schematic structural diagram of an illustrative electronic device;
[0038] Figure 4A software structure block diagram of the electronic device is shown for illustration;
[0039] Figure 5 A diagram showing the relationship between activities and views is shown for illustration;
[0040] Figure 6 A diagram showing module interaction in a scene recognition process is shown for illustration;
[0041] Figure 7 A flowchart of a scene recognition method is shown for illustration;
[0042] Figure 8 Another diagram showing module interaction in a scene recognition process is shown for illustration;
[0043] Figure 9 Still another diagram showing module interaction in a scene recognition process is shown for illustration;
[0044] Figure 10 A diagram showing system probe data and network traffic characteristics is shown for illustration;
[0045] Figure 11 A diagram showing total network packet quantity in live streaming and short video playback scenarios is shown for illustration;
[0046] Figure 12 A diagram showing data transmission rate in live streaming and short video playback scenarios is shown for illustration;
[0047] Figure 13 Still another diagram showing module interaction in a scene recognition process is shown for illustration. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0049] The term “and / or” in the present document is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone.
[0050] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.
[0051] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0052] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.
[0053] Figure 1 This diagram schematically illustrates the current running scenario of an application. The current running scenario of an application can include a variety of situations, depending on the application type and the type of user operation. Common current running scenarios include video playback scenarios, social scenarios, work scenarios, live broadcast scenarios, and gaming scenarios.
[0054] Interface 101 schematically illustrates that the current application operation scenario is a video playback scenario, specifically a short video playback scenario. Short videos are characterized by being short and concise (e.g., less than 5 minutes in length) and rich in content. Short video playback scenarios typically use short video platforms as a platform, supporting user interactions such as liking, commenting, adding to favorites, and sharing video content (as shown in 102).
[0055] Interface 103 schematically illustrates that the current operating scenario of the application is a live broadcast scenario. Live broadcast scenarios require real-time transmission and online viewing of video content, and have very high requirements for the real-time transmission of video content. Live broadcast scenarios support real-time interaction between viewers and anchors, such as supporting interactive operations such as sending barrages, giving gifts, giving likes, and placing orders. Live broadcast scenarios need to have corresponding interactive functions and real-time feedback mechanisms. As shown in 104, user 1, user 2, and user 3 have each performed interactive operations of sending real-time barrages for the current live content. The current user of the electronic device can, for example, interact with the anchor or other users through barrages through interactive area 105.
[0056] Figure 2 The following schematic diagram shows a media system in related art. The media system includes, for example, a live broadcast system, a video playback system, and a music playback system.
[0057] Exemplarily, Figure 2 A part in FIG. 1 schematically shows a schematic diagram of a live broadcast system, which includes a host terminal A1, a live broadcast server A2 and a client A3. The live broadcast server A2 is communicatively connected with the host terminal A1 and the client A3, for example, by wired or wireless connection.
[0058] The host terminal A1 and the client A3 can include one or more. Any host terminal A1 can correspond to multiple clients A3, and any client A3 can correspond to only one host terminal A1 at the same time. A part schematically shows a live broadcast system composed of one host terminal A1, one live broadcast server A2 and multiple clients A3 (including a client A31, a client A32 and a client A3N) corresponding to the host terminal.
[0059] During live broadcast, the host terminal A1 sends live broadcast data to the live broadcast server A2, which processes and distributes the live broadcast data to all clients A3 watching the live broadcast. Exemplarily, after capturing video content, the host terminal A1 encodes and transmits the video content to the live broadcast server A2 in real time, which distributes the live broadcast data to the client A3 in real time. The client A3 receives and decodes the live broadcast data transmitted by the live broadcast server A2 and performs playback processing. Users can watch live broadcast content based on the client A3 and interact in real time. The client A3 needs to have good network speed and playback performance to ensure the smoothness and stability of the watching experience.
[0060] During the process of watching live broadcast content by the user through the client A3, real-time data transmission exists between the live broadcast server A2 and the host terminal A1 and the client A3.
[0061] Figure 2 B part in FIG. 2 schematically shows a schematic diagram of a short video playback system, which includes a video publishing terminal B1, a short video server B2 and a client B3. The short video server B2 is communicatively connected with the video publishing terminal B1 and the client B3, for example, by wired or wireless connection.
[0062] The video publishing terminal B1 and the client B3 can include one or more. Any video publishing terminal B1 can correspond to multiple clients B3, and any client B3 can correspond to multiple video publishing terminals B1. B part schematically shows a short video playback system composed of one video publishing terminal B1, one short video server B2 and multiple clients B3 (including a client B31, a client B32 and a client B3N) corresponding to the video publishing terminal.
[0063] The video publishing end B1 sends the video data after encoding and compression processing to the short video server B2, the short video server B2 receives and stores the video data, and provides management, distribution and transmission services for the video data for the client B3. The client B3 can access the short video server B2 through a short video playing application, and in the short video playing process, the user can perform interactive operations such as liking, commenting, collecting and sharing, and the client B3 can feed back the user's interactive behavior to the short video server B2.
[0064] In the process of the user watching the short video content through the client B3, the short video server B2 can not interact data with the video publishing end B1, and the short video server B2 and the client B3 can be non-real-time data transmission.
[0065] Embodiments of the present application provide a scene recognition scheme, which is applied to an electronic device. In the running process of a target application, whether to start the running scene recognition of the target application is determined according to the application running parameter of the target application. In the case of determining to start the running scene recognition, system probe data associated with the target application is obtained, and the network traffic feature of the current running scene of the target application is determined based on the system probe data. Next, the current running scene of the target application is recognized according to the network traffic feature, and a scene recognition result is obtained. Accurate and efficient real-time application scene recognition can be realized, which is beneficial to providing reliable data support for subsequent resource scheduling and system optimization.
[0066] The electronic device can include a mobile phone, a tablet computer, a smart watch, a notebook computer, a smart home, a vehicle-mounted device, a virtual-real fusion device, etc. Embodiments of the present application can be applied to various scenes requiring scene recognition.
[0067] As Figure 3 The structure of the electronic device 100 is shown in the structural schematic diagram. Optionally, the electronic device 100 can be referred to as a terminal, and can also be referred to as a terminal device. The specific product form of the electronic device 100 can be a smart terminal, such as a mobile phone, a tablet computer, a wearable device, an augmented reality / virtual reality device, a notebook computer, a vehicle-mounted device, a personal digital assistant (PDA), etc. The electronic device has a scene recognition function. Specifically, the functional modules involved in the present application can be deployed on the DSP chip of the related device, and specifically can be an application program or software therein. The scene recognition function can be realized through software installation or upgrading, and through the calling and cooperation of hardware.
[0068] It should be understood that Figure 3The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. Figure 3 The various components shown in the drawings may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0069] The electronic device 100 may include a processor 110, a memory 200, a mobile communication module 130, a wireless communication module 140, a sensor module 150, a button 160, a motor 161, an indicator 162, a camera 163, and a display screen 164. The sensor module 150 may include a pressure sensor, a gyroscope sensor, an acceleration sensor, a temperature sensor, a motion sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0070] The processor 110 may include one or more processing units, for example, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0071] The processor 110 may further include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
[0072] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 130, the wireless communication module 140, the modem processor, and the baseband processor.
[0073] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0074] The mobile communication module 130 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 130 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
[0075] The wireless communication module 140 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100.
[0076] In some embodiments, the antenna 1 and the mobile communication module 130 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 140 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0077] The electronic device 100 implements a display function through a GPU, a display screen 164, and an application processor, etc. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0078] The display screen 164 is used to display images, videos, etc. The display screen 164 includes a display panel. In some embodiments, the electronic device 100 can include 1 or N display screens 164, N being a positive integer greater than 1.
[0079] The electronic device 100 can implement a shooting function through an ISP, a camera 163, a video codec, a GPU, a display screen 164, and an application processor, etc.
[0080] The ISP is used to process data fed back by the camera 163. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the algorithm of the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, etc. of the shooting scene. In some embodiments, the ISP can be disposed in the camera 163.
[0081] The camera 163 is configured to capture still images or videos. An object projects an optical image through a lens to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, or the like. In some embodiments, the electronic device 100 can include one or N cameras 163, where N is a positive integer greater than 1.
[0082] The camera 163 can be located at an edge region of the electronic device, and can be an under-screen camera or a camera that can be lifted up. The camera 163 can include a front-facing camera and can also include a rear-facing camera. The specific position and form of the camera 163 are not limited in the embodiments of the present application. The electronic device 100 can include one or more focal length cameras, such as a long-focus camera, a wide-angle camera, an ultra-wide-angle camera, or a panoramic camera.
[0083] The memory 120 can be configured to store computer-executable program code including instructions. The processor 110 executes various functions of the electronic device 100 and data processing by running the instructions stored in the memory 120, such as enabling the electronic device 100 to implement the scene recognition method in the embodiments of the present application. The memory 120 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data created during use of the electronic device 100, and the like. In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0084] The touch sensor, also referred to as a "touch panel". The touch sensor can be disposed on the display screen 164, and the touch sensor and the display screen 164 form a touch screen, also referred to as a "touch screen". The touch sensor is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. The display screen 164 can provide visual output related to the touch operation.
[0085] The pressure sensor is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be disposed on the display screen 164. The electronic device 100 can also calculate a touch position based on a detection signal of the pressure sensor.
[0086] The gyroscope sensor can be configured to determine a motion posture of the electronic device 100. In some embodiments, the gyroscope sensor can be configured to determine an angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes).
[0087] The acceleration sensor can be configured to detect an acceleration of the electronic device 100 in each direction (typically three axes). When the electronic device 100 is stationary, the acceleration sensor can detect a magnitude and a direction of gravity. The acceleration sensor can also be configured to identify an electronic device posture, and can be applied to a landscape / portrait screen switching, a pedometer, and the like.
[0088] The keys 160 can include a power key (or a power button), a volume key, and the like. The keys 160 can be mechanical keys or touch keys. The electronic device 100 can receive a key input and generate a key signal input related to a user setting and a function control of the electronic device 100.
[0089] A software system of the electronic device 100 can employ a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Embodiments of the present disclosure exemplarily illustrate a software structure of the electronic device 100 by taking an Android system with a layered architecture as an example.
[0090] As shown in FIG. 1, the electronic device 100 can include a processor 120, a memory 130, an input device 150, a display device 160, and a communication device 170. Figure 4 As exemplarily shown in a software structure block diagram of the electronic device 100, the layered architecture of the electronic device 100 divides software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into five layers, from top to bottom, an application layer, an application framework layer, an Android runtime, a system layer, and a kernel layer.
[0091] The application layer can include a series of application packages, such as Figure 4 As shown, the application packages can include camera, gallery, video, and the like. The video application includes applications for playing, editing, and sharing video content, for example, a video social application, which can provide a platform for users to play, share, post, comment, and interact with video content.
[0092] The application framework layer provides an application programming interface (API) and a programming framework for applications of the application layer, including various components and services to support Android development for developers. The application framework layer includes some predefined functions. As shown in Figure 4 The application framework layer can include a window manager, a content provider, a notification manager, a resource manager, a scene recognition engine, and a scene recognition database, etc.
[0093] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots, etc.
[0094] The content provider is used to store and obtain data, and make the data accessible to applications. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.
[0095] The resource manager can provide various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0096] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification type messages that can automatically disappear after a short period of time without user interaction. For example, notification information is used to notify download completion, message reminders, etc. Notification information can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application running in the background, or a notification in the form of a dialog window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, electronic device vibration, indicator light blinking, etc.
[0097] The scene recognition engine can be used for target application running scene recognition, for example, for obtaining system probe data associated with the target application, determining the network traffic characteristics of the current running scene of the target application based on the system probe data, and identifying the current running scene of the target application based on the network traffic characteristics to obtain a scene recognition result. The scene recognition database includes binding data between application activities and corresponding scene category labels, and the data in the scene recognition database can be used for scene category recognition of the current running activity of the target application to obtain a scene recognition result.
[0098] The system layer includes system libraries and an Android Runtime. The system libraries can include a plurality of functional modules, such as an image rendering library, an image synthesis library, a function library, a media library, and a key management module. The key management module can provide necessary key management and encryption and decryption functions for an application program, such as functions for generating, storing, and managing encryption keys, for protecting the security of an application program and user data.
[0099] The Android Runtime includes a core library and a virtual machine, and is responsible for scheduling and management of the Android system. The core library includes two parts: one part is a function function called by the java language, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine, and the virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0100] It can be understood that, Figure 4 The components included in the system framework layer, the system library, and the runtime layer shown do not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements.
[0101] The kernel layer is a layer between the hardware and the above-mentioned software layers. The kernel layer at least includes display drivers, camera drivers, and sensor drivers. The hardware can include a camera, a display screen, a microphone, a processor, and a memory, and the like.
[0102] In Android development, an Activity is a part of the user interface of an application program, and is usually used to display a user interaction interface and process user operations. An Activity is a basic unit of a user interface, and each Activity can include one or more Views.
[0103] Figure 5 The relationship between an Activity and a View is schematically shown as follows: Figure 5 As shown, an Activity includes a Window object, which is implemented by a PhoneWindow. The PhoneWindow includes a ViewGroup composed of one or more Views, such as a TextView, an ImageView, and an otherView.
[0104] The running of the application involves switching and interaction between multiple Activities. When the user performs operations in the application, the system will start, destroy or switch the Activity according to the user's behavior, and the running state of the application is closely related to the creation, start, destruction and other operations of the Activity.
[0105] Activity is the basic unit of the user interface, and a single Activity may contain one or more Views. Various types of views in the Activity can be defined through XML declarations in the layout file, such as button, text, image and other types of views.
[0106] Activity is used to manage the lifecycle of View, receive user input events, and perform corresponding logical processing according to user input events. View is the basic element of the user interface, used to capture user events and display corresponding content. View can capture various user events such as click events, touch events, and sliding events. The events captured by View are passed to the corresponding Activity, which can perform corresponding processing according to the event type.
[0107] Taking a live scene as an example, the live scene may involve multiple Activities, such as the live interface of the anchor end and the viewing interface of the audience end. Each Activity may contain a view group composed of different types of Views, such as a live video viewing window, a chat input box, a like button, and other types of Views.
[0108] Taking a short video playing scene as an example, the short video playing scene may also involve multiple Activities, such as a video shooting interface, a video editing interface, a video sharing interface, and a video playing interface. Each Activity may contain a view group composed of different types of Views, such as a video preview window, an editing toolbar, a sharing button, and other types of Views.
[0109] The following will be described in conjunction with an interaction diagram of the modules shown in Figure 6 The scene recognition process is schematically illustrated.
[0110] As shown in Figure 6 The scene recognition engine can be located in the application program framework layer, and the scene recognition engine includes a system probe module, a traffic feature recognition module and an application scene recognition module. The system probe module includes, for example, a process load probe, a system load probe, a system event probe, a peripheral state probe, etc. The system probe module can interact with the traffic feature recognition module and the application scene recognition module, respectively.
[0111] The process load probe can subscribe to the process load from the kernel state, and determine the load of the target process according to the callback function fed back by the kernel state. Exemplarily, the target processes involved in the live streaming scenario include a transmission process, a decoding process, and the like. The transmission process is used to transmit the encoded data from the live streaming server to the client, and the transmission process is responsible for tasks such as processing network connections, packet transmission, error handling, and retransmission. The decoding process is used to receive, decode, and play audio and video data.
[0112] The system load probe can subscribe to the system load from the kernel state, and determine the system load according to the callback function fed back by the kernel state. The system load includes, for example, CPU load, network load, memory load, disk load, and the like. The categories of the network load can include, for example, data such as network throughput, network traffic pattern, network packet loss rate, and the like. The network throughput indicates, for example, the number of data packets sent and received by the electronic device per second.
[0113] The system event probe can subscribe to the system event from the kernel state, and determine the system event according to the callback function fed back by the kernel state. The system event includes, for example, a window change event, a process creation event, a thread creation event, and the like.
[0114] For example, the system event probe can send a request for subscribing to a target window change event to the API module, the API module can monitor whether the target window of the electronic device changes, and feed back the callback function to the system event probe after monitoring that the target window changes. The target window can be, for example, a current active window to be identified in a scene, and the current active window can be a top window of a target application, and the target application has only a single top window at the same time.
[0115] Alternatively, the system event probe can send a request for subscribing to a process creation event to the system event driver node, and the system event driver node forwards the request to the process manager of the system layer. The process manager can feed back the callback function to the system event probe through the system event driver node after creating a thread.
[0116] The traffic feature identification module can interact with the system probe module to obtain system probe data associated with the target application. The traffic feature module determines the network traffic feature of the current running scenario of the target application according to the obtained system probe data. The system probe data includes, for example, the number of network data packets, the size of network data packets, data packet transmission parameters, bandwidth occupation, and process load, and the like. The network traffic feature of the current running scenario includes, for example, the speed distribution feature, the persistence feature of the high-traffic running scenario, the data packet size distribution feature, the data packet transmission mode, the persistence feature of the high-bandwidth occupation scenario, and the like.
[0117] The application scenario recognition module can interact with the traffic feature recognition module to obtain the network traffic feature of the current running scenario of the target application. The application scenario recognition module can recognize the current running scenario based on the network traffic feature to obtain a scenario recognition result.
[0118] In addition, the application scenario recognition module can also directly interact with the system probe module to obtain system probe data associated with the target application. The system probe data includes, for example, GPU decoding events, window change events, process creation events, and the like. The application scenario recognition module can recognize the current running scenario based on the system probe data and / or the network traffic feature to obtain a scenario recognition result.
[0119] Figure 7 A flowchart of a scenario recognition method is schematically shown. Taking an electronic device as an execution subject, the scenario recognition method includes, for example, operations S110-S140.
[0120] In operation S110, the electronic device determines whether to start running scenario recognition for a target application according to application running parameters of the target application.
[0121] In operation S120, the electronic device obtains system probe data associated with the target application in a case where it is determined to start running scenario recognition.
[0122] In operation S130, the electronic device determines a network traffic feature of a current running scenario of the target application based on the system probe data.
[0123] In operation S140, the electronic device recognizes the current running scenario according to the network traffic feature and / or the system probe data to obtain a scenario recognition result.
[0124] The following exemplarily illustrates each operation example flow of the scenario recognition method of the embodiment.
[0125] In operation S110, the electronic device determines whether to start running scenario recognition for a target application according to application running parameters of the target application.
[0126] Exemplarily, the target application includes any application in a running state in the electronic device, and the electronic device can obtain the application running parameters of the target application through an operating system or a specific application program interface (API). The application running parameters include, for example, at least one of the following parameters: an application package name, an application type, an application active state, and a current running activity.
[0127] For example, the application package name uniquely identifies the target application. An electronic device can obtain the target application's package name using the getPackageName() method. In the Android system, a task is a stack of activities, each containing one or more applications' activities. Electronic devices can use the Android system's ActivityManager service to obtain information about the activities in a task, thereby determining the application's activity status and / or currently running activities.
[0128] The electronic device can determine whether to start the operation scenario identification for the target application based on the application operation parameters of the target application. For example, the electronic device determines whether the target application is a preset whitelist application for which the operation scenario identification is to be performed based on the application package name in the application operation parameters. In the case where the application package name indicates that the target application is a preset whitelist application, the electronic device starts the operation scenario identification for the target application. Alternatively, the electronic device determines whether the target application is a preset whitelist type for which the operation scenario identification is to be performed based on the application type in the application operation parameters. In the case where the application type of the target application is a preset whitelist type, the electronic device starts the operation scenario identification for the target application.
[0129] As another example, the electronic device determines whether the target application has entered the active interface based on the application activity status in the application running parameters. If the application activity status indicates that the target application has entered the active interface, the electronic device initiates running scenario recognition for the target application. Alternatively, the electronic device determines whether the current running activity of the target application is a preset whitelist activity for which scenario recognition is to be performed. If the current running activity is a preset whitelist activity, the electronic device initiates running scenario recognition for the target application.
[0130] In operation S120 , when determining to start the operation scene recognition, the electronic device obtains system probe data associated with the target application.
[0131] For example, when determining to initiate the operation scene recognition, the electronic device determines whether the current running activity of the target application has changed. The electronic device can obtain the currently displayed Activity instance of the application (the top activity in the Activity stack) and determine whether the current running activity of the target application has changed based on the currently displayed Activity instance.
[0132] In an example, in a case where the current running activity of the target application does not change, the electronic device samples the system probe data associated with the current running scenario of the target application at a preset frequency until the number of sampling times reaches a preset number threshold. The system probe data can include at least one of the following data: the number of network data packets, the size of network data packets, data packet transmission parameters, and bandwidth occupation.
[0133] The electronic device can capture network data packets transmitted in different links, for example, through Wireshark. According to the information such as the number characteristics, size characteristics, transmission parameters, and bandwidth occupation associated with the network data packets, the network load characteristics matching the current running scenario of the target application are determined.
[0134] The number of network data packets indicates the number of network data packets transmitted through the network within a preset time length. The ratio between the number of network data packets and the corresponding time length, for example, constitutes a data transmission rate matching the corresponding sampling time.
[0135] The size of network data packets indicates the size information of network data packets in the data transmission process, and the size of network data packets has an important influence on network performance and system load.
[0136] The data packet transmission parameters, for example, include data packet sequence numbers and / or data packet arrival time stamps, and the data packet transmission parameters can indicate that the transmission mode of the network data packets is a continuous data stream mode or a discrete data block mode.
[0137] The bandwidth occupation indicates the ratio between the actual bandwidth usage and the total bandwidth. In a case where the bandwidth occupation corresponding to any sampling time is greater than a preset occupation threshold, the current running scenario is determined to be a high bandwidth occupation scenario based on the sampling time. According to the persistence characteristics of the high bandwidth occupation scenario, the current running scenario can be determined to be a continuous high bandwidth occupation scenario or an intermittent high bandwidth occupation scenario.
[0138] In another example, in a case where it is determined that the current running activity of the target application changes, the electronic device performs again the operation of determining whether to start the running scenario recognition of the target application according to the application running parameters of the target application.
[0139] In operation S130, the electronic device determines the network traffic characteristics of the current running scenario of the target application based on the system probe data.
[0140] Exemplarily, the electronic device can monitor, analyze and schedule network traffic according to the acquired system probe data, to ensure effective allocation of network resources and high-quality operation of network services. For example, the electronic device can acquire system probe data associated with the target application and determine network traffic characteristics of the current running scenario of the target application through a traffic analysis tool, a network sniffer, a bandwidth monitoring tool, deep packet inspection, log analysis, a network performance management system, etc.
[0141] The traffic analysis tool, for example, includes Wireshark, NetFlow, sFlow, etc., which can be used to capture and analyze network packets to determine network traffic characteristics of the current running scenario. The network sniffer can be used to acquire and analyze network packets, and Wireshark is a commonly used network sniffer. The bandwidth monitoring tool can be used to monitor the use of network bandwidth in real time to assist in analyzing network traffic characteristics. Commonly used bandwidth monitoring tools, for example, include PRTG Network Monitor, SolarWinds Bandwidth Analyzer, etc. Deep packet inspection (DPI) can be used to analyze the payload and header information of network packets to achieve detailed network traffic analysis.
[0142] In operation S140, the electronic device identifies the current running scenario according to the network traffic characteristics and / or the system probe data, to obtain a scenario identification result.
[0143] Exemplarily, the electronic device can identify the current running scenario according to the network traffic characteristics of the current running scenario and / or the system probe data matching the current running scenario, to obtain a scenario identification result. The scenario identification result, for example, includes a live streaming scenario and a short video playing scenario.
[0144] In an example, after identifying the current running scenario, the electronic device can generate a scenario category label matching the scenario identification result, and bind the scenario category label with the current running activity of the target application.
[0145] The currently running activity is the activity displayed in the foreground of the target application, which is used to provide a user interface for interaction with the user. The current running scenario indicates the logic mode or operation mode currently executed by the target application, that is, it indicates the activity state of the currently running activity. The current running scenario may be implemented by one or more currently running activities, and the current running scenario may involve switching between multiple currently running activities. For example, a live broadcast scenario may involve live video playback activities, real-time interactive activities, and control panel activities. After the current running scenario is identified, the current running activities associated with the current running scenario can be tagged to bind the scenario category label to the current running activity of the target application.
[0146] The electronic device may also form a scene recognition database based on the binding data between the candidate running activities of the candidate applications and the corresponding scene category tags. The candidate applications include any application requiring running scene recognition, including the target application, and the candidate running activities include any activity requiring running scene recognition.
[0147] The following combination Figure 8 Another interactive schematic diagram of each module is shown to schematically illustrate the scene recognition process.
[0148] like Figure 8 As shown, the scene recognition engine in the application framework layer includes a system probe module, a scene recognition startup module, a traffic feature recognition module and an application scene recognition module.
[0149] The system probe module can interact with the activity management service in the application framework layer to obtain the target application's application runtime parameters. The activity management service is responsible for tasks such as activity management, task and activity stack management, process management, and broadcast reception management. For example, the activity management service can provide the scene recognition startup module with the target application's application runtime parameters. The application runtime parameters include at least one of the following parameters: application package name, application type, application activity status, and current running activity.
[0150] The system probe module sends the application running parameters of the target application to the scene recognition startup module, and the scene recognition startup module determines whether to start the running scene recognition for the target application based on the received application running parameters. For example, when the application active state indicates that the target application enters the activity interface, the scene recognition startup module determines to start the running scene recognition for the target application. Alternatively, the scene recognition startup module determines whether the current running activity of the target application is a preset whitelist activity to be scene recognized. In response to the current running activity being a whitelist activity, the scene recognition startup module determines to start the running scene recognition for the target application.
[0151] In a case where it is determined to start the scene recognition, the scene recognition starting module sends a recognition starting notification to the system probe module. The system probe module, in response to the received recognition starting notification, acquires system probe data matching the current running scene of the target application, and sends the system probe data to the traffic feature recognition module and the application scene recognition module. The traffic feature recognition module determines, according to the received system probe data, a network traffic feature of the current running scene of the target application, and sends the network traffic feature to the application scene recognition module. The application scene recognition module identifies, according to the received network traffic feature and / or system probe data, the current running scene of the target application, and obtains a scene recognition result.
[0152] As an optional embodiment, the application scene recognition module sends the scene recognition result to a scheduling engine located in the application program framework layer. The scheduling engine includes a load controller and a scheduling executor, and the load controller can be used to receive the scene recognition result provided by the application scene recognition module and system load data provided by the system probe module.
[0153] The system load data may, for example, include CPU core frequency point quantity, current CPU maximum running frequency, current CPU minimum running frequency, CPU occupancy rate, CPU program proportion, bandwidth occupancy, GPU load information, memory usage information, function call information, and the like.
[0154] The current running scene of the target application may, for example, be a live streaming scene or a short video playing scene. The system resources allocated by the electronic device for the live streaming scene and the short video playing scene may have some differences.
[0155] For example, the live streaming process needs to transmit a large amount of video data in real time, and the live streaming scene usually needs higher network bandwidth to support real-time video data transmission. In contrast, the short video playing scene can perform one-time video download or caching before playing, and the requirement for network bandwidth can be relatively low.
[0156] In addition, the live streaming scene can need stronger video decoding capability to decode and play the video stream in real time. The short video playing scene can only need one-time video decoding when the user watches. For another example, the live streaming scene needs higher CPU load capability to process tasks such as video decoding, video instant transmission, and user real-time interaction, while the CPU load capability required by the short video playing scene can be relatively low.
[0157] The load controller can schedule network resources allocated to the current running scene of the target application according to system load data and the scene recognition result, to obtain a load scheduling strategy. Alternatively, the load controller can also determine the load scheduling strategy for the current running scene only according to the scene recognition result. The load controller sends the load scheduling strategy to the scheduling executor, and the scheduling executor schedules network resources allocated to the current application scene of the target application based on the received load scheduling strategy.
[0158] For example, in the case where the scene recognition result indicates that the current running scene is a live streaming scene, the scheduling executor can perform at least one of the following operations to schedule network resources allocated to the live streaming scene: increasing the thread priority of a target thread for transmitting a live streaming video stream; increasing the bandwidth allocation amount for the current running scene of the target application; increasing the CPU frequency point allocated to the current running scene of the target application; and increasing the QoS (Quality of Service) mark for the live streaming video stream.
[0159] The CPU is a clock-driven system, and its load capacity is limited by the clock frequency. The higher the CPU frequency, the more instructions it can process per unit time, and the stronger the CPU load capacity. The scheduling executor increases the CPU frequency point allocated to the current running scene of the target application, which can improve the CPU's ability to process tasks such as video decoding, video instant transmission, and user real-time interaction.
[0160] The scheduling executor increases the QoS mark for the live streaming video stream, which is beneficial to ensure that the live streaming video stream is given priority in network transmission, and is beneficial to reduce the latency of network packet transmission, effectively ensuring that users have less delay and a more real-time live streaming experience. In addition, the scheduling executor increasing the QoS mark for the live streaming video stream can also effectively reduce the packet loss rate of network packet transmission, enhance the tolerance of live streaming video stream to network fluctuations and congestion, and thus improve the service quality and reliability of live streaming services.
[0161] In addition, the scheduling executor can also schedule at least one of the following network resources: GPU frequency, thread running core, application display frame rate, and screen refresh rate.
[0162] The following will be described in detail with reference to the interaction between the modules shown in Figure 9 Fig. 3, which illustrates the scene recognition process.
[0163] As shown in Figure 9 The scene recognition engine in the application program framework layer includes a system probe module, a scene recognition start module, a traffic feature recognition module, and an application scene recognition module.
[0164] The system probe module interacts with an activity management service in the application framework layer to obtain application running parameters of the target application. The application running parameters include, for example, at least one of the following parameters: an application package name, an application type, an application active state, and a current running activity. The system probe module sends the application running parameters to the scenario recognition starting module, which determines whether to start running scenario recognition for the target application according to the received application running parameters. In a case where it is determined to start scenario recognition, the scenario recognition starting module sends a recognition starting notification to the system probe module.
[0165] After receiving the recognition starting notification, the system probe module obtains the current running activity of the target application from the activity management service by a current running activity determination module in the system probe module, and determines whether the current running activity of the target application has changed. The current running activity determination module notifies a system probe data sampling module of whether the current running activity of the target application has changed.
[0166] The sampling frequency statistics module can be configured to count the sampling frequency of the system probe data, and notify the system probe data sampling module of whether the sampling frequency reaches a preset sampling threshold. In a case where the current running activity of the target application has not changed and the sampling frequency has not reached the preset sampling threshold, the system probe data sampling module samples the system probe data associated with the current running scenario of the target application at a preset frequency. After completing a single sampling of the system probe data, the system probe data sampling module sends a sampling notification to the sampling frequency statistics module, and the sampling frequency statistics module increments the counted sampling frequency of the system probe data based on the received sampling notification.
[0167] The system probe module sends the system probe data associated with the current running scenario of the target application to a traffic feature recognition module and an application scenario recognition module, respectively. The traffic feature recognition module determines the network traffic feature of the current running scenario of the target application according to the received system probe data, and sends the network traffic feature to the application scenario recognition module. The application scenario recognition module identifies the current running scenario of the target application according to the received network traffic feature and / or system probe data, and obtains a scenario recognition result.
[0168] Figure 10 An illustrative diagram of system probe data and network traffic features is shown, which includes, for example, a number of network data packets, a network data packet size, a data packet transmission parameter, a bandwidth occupancy, and a window change event.
[0169] The number of network packets indicates the number of network packets transmitted over the network within a preset duration. The ratio between the number of network packets and the corresponding duration, for example, constitutes the data transmission rate that matches the corresponding sampling moment. In addition, the original value of the number of network packets obtained by a single sampling, or the cumulative value of the number of network packets obtained by multiple samplings, can indicate the data transmission rate characteristics that match the current operating scenario. The reciprocal, difference, and differential values of the number of network packets can also indicate the data transmission rate characteristics that match the current operating scenario.
[0170] In one exemplary embodiment, when system probe data includes the number of network packets, the traffic feature identification module calculates the data transmission rate corresponding to the corresponding sampling moment based on the time difference and the number of network packets corresponding to adjacent sampling times. Based on the data transmission rates at multiple sampling moments, the traffic feature identification module determines a network speed distribution feature that matches the current operating scenario as the network traffic feature. The network speed distribution feature indicates the rate range and rate stability of network packet transmission.
[0171] The application scenario identification module identifies the current running scenario based on the network speed distribution characteristics and obtains a scenario identification result. For example, when the network speed distribution characteristics indicate that the data transmission rate based on each sampling moment is within the target rate interval, the current running scenario is determined to be a live broadcast scenario. When the network speed distribution characteristics indicate that the data transmission rate is outside the target rate interval and the data transmission rate fluctuation value is greater than the preset rate fluctuation threshold, the current running scenario is determined to be a short video playback scenario. The length of the target rate interval is less than or equal to the preset interval length threshold.
[0172] Figure 11 A schematic diagram schematically shows the total amount of network data packets in a live broadcast scenario and a short video playback scenario.
[0173] Since live broadcasting scenarios require real-time transmission of live video data, the data flow in live broadcasting scenarios is usually continuous. Therefore, as time goes by, the total amount of network data packets in live broadcasting scenarios shows a trend of continuous accumulation. Figure 11 As shown, when the current running scenario is a live broadcast scenario, the total amount of network data packets continues to increase over time.
[0174] In the short video playback scenario, the electronic device may first cache a video of a preset length, then play the video, and then cache the next video of a preset length. Therefore, the short video playback scenario may have intermittent data traffic characteristics. Figure 11 As shown, when the current running scenario is a short video playback scenario, as time increases, the total amount of network data packets may be in an increasing state or in a stable state, showing an overall non-continuously increasing fluctuation trend.
[0175] As an optional way, in the case that the system probe data includes network packet quantity, the application scenario recognition module can also directly recognize the current running scenario according to the system probe data to obtain the scenario recognition result. The network packet quantity includes, for example, network packet total quantity and network packet increment.
[0176] Figure 12 The schematic diagram of data transmission rate in the live broadcast scenario and the short video playing scenario is schematically shown.
[0177] As shown in Figure 12 the live broadcast scenario, the data transmission rate at each sampling time is within the target rate interval, that is, the fluctuation value of the data transmission rate at each sampling time is less than or equal to the preset rate fluctuation threshold. In the short video playing scenario, there is a data transmission rate outside the target rate interval, and there is a data transmission rate fluctuation value greater than the preset rate fluctuation threshold. The difference between the maximum data transmission rate and the minimum data transmission rate within the target rate interval indicates the interval length of the target rate interval, and the interval length of the target rate interval is less than or equal to the preset interval length threshold.
[0178] Continue to combine Figure 10 to explain, in the case that the system probe data includes network packet quantity, the traffic feature recognition module determines whether the network packet quantity corresponding to any sampling time is greater than the preset quantity threshold. In the case that the network packet quantity corresponding to any sampling time is greater than the preset quantity threshold, the traffic feature recognition module determines that the current running scenario is a high-traffic running scenario based on the sampling time. The traffic feature recognition module determines the persistence feature of the high-traffic running scenario as the network traffic feature.
[0179] The application scenario recognition module recognizes the current running scenario according to the persistence feature of the high-traffic running scenario to obtain the scenario recognition result. Illustratively, in the case that the network traffic feature indicates that the current running scenario is a persistent high-traffic running scenario, it is determined that the current running scenario is a live broadcast scenario. In the case that the network traffic feature indicates that the current running scenario is an intermittent high-traffic running scenario, it is determined that the current running scenario is a short video playing scenario.
[0180] The network packet size indicates the size information of the network packet in the data transmission process, and the network packet size has an important influence on the network performance and system load. Since the live broadcast scenario needs to transmit live broadcast video data in real time, the network packet size in the live broadcast scenario may be relatively large and maintain a relatively stable size distribution to support real-time transmission of video and audio content.
[0181] The network packet size in the short video playing scenario can be influenced by video encoding parameters, video length, and the like. The network packet size distribution can be more diversified. Generally, to achieve a higher data transmission rate, the video file in the short video playing scenario can be divided into smaller blocks for transmission. Therefore, the network packet size in the short video playing scenario can be relatively small.
[0182] In a case where the system probe data includes network packet sizes, the traffic feature recognition module determines, according to the network packet sizes based on the plurality of sampling moments, a packet size distribution feature matching the current running scenario as a network traffic feature. The packet size distribution feature indicates a packet size interval and stability of the packet size.
[0183] The application scenario recognition module recognizes the current running scenario according to the packet size distribution feature, and obtains a scenario recognition result. For example, in a case where the packet size distribution feature indicates that the packet sizes based on the sampling moments are within a target size interval, the application scenario recognition module determines that the current running scenario is a live streaming scenario. In a case where the packet size distribution feature indicates that there are packet sizes outside the target size interval, and there are packet sizes with a fluctuation value greater than a preset size fluctuation threshold, the application scenario recognition module determines that the current running scenario is a short video playing scenario. The length of the target size interval is less than or equal to a preset interval length threshold.
[0184] The packet transmission parameters include, for example, a packet sequence number and / or a packet arrival timestamp. The packet transmission parameters can indicate that the transmission mode of the network packets is a continuous data stream mode or a discrete data block mode. The packet sequence number can be indicated by, for example, a packet serial number or a packet identifier. The continuity between the packets can be determined by analyzing the packet sequence number. The continuous data stream usually has sequentially increasing sequence numbers and continuous identifiers.
[0185] By analyzing the packet arrival timestamp, the arrival time interval between the network packets can be determined. The continuous data stream usually has a short arrival time interval, and the arrival time interval between the network packets is relatively stable. In contrast, the discrete data blocks can have irregular arrival time intervals.
[0186] In a case where the system probe data comprises packet transmission parameters, the traffic feature recognition module determines, according to the packet transmission parameters, packet sequence numbers and / or packet arrival time stamps of the network packets obtained by sampling at the preset frequency. The traffic feature recognition module determines, according to the packet sequence numbers and / or the packet arrival time stamps, arrival time intervals between the network packets obtained by each adjacent sampling. In addition, the traffic feature recognition module determines, according to the arrival time intervals between the network packets obtained by each adjacent sampling, a packet transmission mode matching the current running scenario as the network traffic feature.
[0187] For example, in a case where the arrival time intervals between the network packets obtained by each adjacent sampling are within a target interval range, the traffic feature recognition module determines that the packet transmission mode matching the current running scenario is a continuous data stream mode. In a case where the time intervals between the network packets obtained by adjacent sampling are outside the target interval range, and the fluctuation value of the arrival time intervals is greater than a preset interval fluctuation threshold, the traffic feature recognition module determines that the packet transmission mode is a discrete data block mode. The length of the target interval range is less than or equal to a preset interval length threshold, and the packet transmission mode constitutes the network traffic feature.
[0188] The application scenario recognition module identifies the current running scenario according to the packet transmission mode to obtain a scenario recognition result. For example, in a case where the packet transmission mode is the continuous data stream mode, the application scenario recognition module determines that the current running scenario is a live streaming scenario. In a case where the packet transmission mode is the discrete data block mode, the application scenario recognition module determines that the current running scenario is a short video playing scenario.
[0189] Since the live streaming scenario needs to continuously transmit video and audio data streams, the live streaming scenario usually exhibits a persistent high bandwidth occupation demand. In addition, the live streaming scenario has a stable data transmission rate, so the fluctuation value of the bandwidth occupation amount is relatively small. Overall, the bandwidth occupation situation in the live streaming scenario usually exhibits characteristics such as a persistent high bandwidth occupation demand, a small bandwidth fluctuation, and a high-rate data transmission.
[0190] In the process of determining the network traffic feature based on the bandwidth occupation amount, for example, in a case where the bandwidth occupation amount corresponding to any sampling moment is greater than a preset occupation amount threshold, the traffic feature recognition module determines that the current running scenario is a high-bandwidth occupation scenario based on the sampling moment. In addition, the traffic feature recognition module determines a persistence feature of the high-bandwidth occupation scenario as the network traffic feature.
[0191] The application scenario recognition module recognizes the current running scenario according to the persistence characteristic of the high-bandwidth occupation scenario, and obtains a scenario recognition result. For example, when the network traffic characteristic indicates that the current running scenario is a persistent high-bandwidth occupation scenario, the application scenario recognition module determines that the current running scenario is a live broadcast scenario. When the network traffic characteristic indicates that the current running scenario is an intermittent high-bandwidth occupation scenario, the application scenario recognition module determines that the current running scenario is a short video playing scenario.
[0192] Continuing with Figure 10 For illustration, the system probe data can also include window change events.
[0193] For example, the application scenario recognition module can analyze the window characteristic of the current active window of the target application based on the obtained window change event. The window characteristic includes, for example, a window title, a window class name, window content, and a specific application API. For example, the application scenario recognition module can read the content of a specific control (such as a button, a label, etc.) in the current active window to recognize the window content of the current active window.
[0194] The application scenario recognition module can recognize the current running scenario of the target application according to the window characteristic of the current active window represented by the window change event, and obtain a scenario recognition result. The window characteristic includes, for example, a window title, a window class name, window content, and a specific application API. For example, when the window title of the current active window includes a specific preset keyword, such as a keyword including “live broadcast” or “Live”, the application scenario recognition module determines that the current running scenario of the target application is a live broadcast scenario. Alternatively, when the window content of the current active window includes real-time chat window content, live broadcast status display content, real-time interaction area content, etc., the application scenario recognition module determines that the current running scenario of the target application is a live broadcast scenario. Alternatively, when the current active window includes a real-time transmission API, a real-time interaction API, and a data statistics and analysis API, the application scenario recognition module determines that the current running scenario of the target application is a live broadcast scenario. The data statistics and analysis API is used to obtain, for example, live broadcast status information, the number of viewers, etc.
[0195] When the system probe data includes window change events, the application scenario recognition module can recognize the current running scenario based on the window change events, and obtain a scenario recognition result. Alternatively, the application scenario recognition module can further recognize the current running scenario in combination with the network traffic characteristic of the current running scenario.
[0196] As an optional manner, in a case that the system probe data comprises a plurality of data content items, the application scenario identification module can identify the current running scenario of the target application based on the plurality of data content items respectively, to obtain a scenario identification result. Exemplarily, a corresponding weight value can be set for each data content item, and the scenario identification result obtained based on each data content item is weighted based on the weight value, to obtain a comprehensive scenario identification result.
[0197] For example, the system probe data comprises network packet quantity, network packet size and packet transmission parameter. The weight values corresponding to the network packet quantity, the network packet size and the packet transmission parameter are 0.5, 0.3 and 0.2 respectively. The scenario identification results obtained based on the network packet quantity, the network packet size and the packet transmission parameter are 1, 1 and -1 respectively. The scenario identification result of 1 indicates that the corresponding system probe data indicates that the current running scenario of the target application is a live broadcast scenario. The scenario identification result of -1 indicates that the corresponding system probe data indicates that the current running scenario of the target application is a short video playing scenario.
[0198] The scenario identification result obtained based on each data content item is weighted according to the weight value corresponding to each data content item, to obtain a comprehensive scenario identification result. For example, the comprehensive scenario identification result obtained based on the network packet quantity, the network packet size and the packet transmission parameter is 1*0.5+1*0.3-1*0.2=0.6. In a case that the comprehensive scenario identification result is greater than or equal to 0, it indicates that the current running scenario of the target application is a live broadcast scenario. In a case that the comprehensive scenario identification result is less than 0, it indicates that the current running scenario of the target application is a short video playing scenario.
[0199] After obtaining the scenario identification result, the application scenario identification module can generate a scenario category label matched with the scenario identification result, and bind the scenario category label with at least one of the application package name, the current running activity and the target component of the target application, to obtain binding data. The application scenario identification module can send the binding data to the scenario identification database located in the application program framework layer, to update the scenario identification database by using the binding data. The current running activity of the target application comprises the target component described above.
[0200] The scenario identification database comprises binding data between at least one of the application package name, the current running activity and the target component of a candidate application and a corresponding scenario category label, and the candidate application comprises any application requiring running scenario identification.
[0201] The following will be described in combination with another interaction diagram of the modules shown in FIG. 8. Figure 13
[0202] AsFigure 13 As shown, the scene recognition engine in the application framework layer includes a system probe module, a scene recognition starting module and an application scene recognition module.
[0203] The system probe module interacts with the activity management service in the application framework layer to obtain application running parameters of the target application. The application running parameters include at least one of the following parameters: application package name, application type, application active state and current running activity. The system probe module sends the application running parameters to the scene recognition starting module, and the scene recognition starting module determines whether to start running scene recognition for the target application according to the received application running parameters.
[0204] In the case of determining to start scene recognition, the scene recognition starting module sends a recognition starting notification to the system probe module and the application scene recognition module respectively. The current running activity determination module in the system probe module obtains the current running activity of the target application from the activity management service after receiving the recognition starting notification, and sends the current running activity to the application scene recognition module.
[0205] The application scene recognition module obtains scene recognition data matching the current running activity of the target application from the preset scene recognition database in response to the received recognition starting notification. The scene recognition data includes, for example, a scene category label matching the current running activity.
[0206] In the case of obtaining the scene recognition data matching the current running activity, the application scene recognition module takes the scene type indicated by the scene category label as the scene recognition result for the current running activity of the application to be recognized. In the case of not obtaining the scene recognition data matching the current running activity, the application scene recognition module notifies the system probe module to obtain system probe data associated with the current running scene to implement running scene recognition according to the scene recognition method in the foregoing embodiments.
[0207] The scene recognition database includes binding data between candidate running activities of candidate applications and corresponding scene category labels. The candidate applications include any application that needs to be subjected to running scene recognition, and the candidate running activities include any activity that needs to be subjected to running scene recognition.
[0208] Optionally, the application scene recognition module can also obtain scene recognition data matching the application package name or the target component of the target application from the preset scene recognition database. The scene recognition data includes, for example, a scene category label matching the application package name or the target component.
[0209] Exemplarily, the scene recognition database can be updated based on a preset frequency, for example, the scene recognition database can be updated at a frequency of every 2 days / time. The updated scene recognition database can be used to assist in identifying the running scene of the target application.
[0210] It can be understood that, in order to implement the above functions, the electronic device comprises hardware and / or software modules corresponding to the respective functions. The algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of the present application.
[0211] All relevant content of each step involved in the above method embodiments can be cited from the function description of the corresponding function module, which will not be described here again.
[0212] The embodiment also provides an electronic device, comprising: one or more processors, a memory and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: determining whether to start running scene identification for a target application according to application running parameters of the target application; in the case of determining to start running scene identification, obtaining system probe data associated with the target application; determining network traffic characteristics of a current running scene of the target application based on the system probe data; and identifying the current running scene according to the network traffic characteristics to obtain a scene identification result.
[0213] The embodiment also provides a computer storage medium, which stores computer instructions, and when the computer instructions run on an electronic device, the electronic device performs the above related method steps to implement the scene identification method in the above embodiment.
[0214] The embodiment also provides a computer program product, which, when running on a computer, causes the computer to perform the above related steps to implement the scene identification method in the above embodiment.
[0215] In addition, the embodiments of the present application also provide a device, which can be a chip, a component or a module. The device can comprise a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device is running, the processor can execute the computer execution instructions stored in the memory to enable the chip to perform the scene identification method in the above method embodiments.
[0216] Among them, the electronic device, computer storage medium, computer program product or chip provided by the embodiment are used for executing the corresponding method provided above, so the beneficial effects achieved by them can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0217] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0218] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiment described above is only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0219] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0220] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0221] Any content of each embodiment of the present application, and any content of the same embodiment, can be freely combined. Any combination of the above is within the scope of the present application.
[0222] If the integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, includes several instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage media that can store program codes.
[0223] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are only illustrative, not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims, and all of them belong to the protection of the present application.
[0224] The steps of the method or algorithm described in combination with the disclosure of the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable ROM (EPROM), an electrically EPROM (EEPROM), a register, a hard disk, a mobile hard disk, a compact disc (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.
[0225] Those skilled in the art can understand that the functions described in the embodiments of the present application in the one or more examples above can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer program from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0226] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative rather than limiting, and those of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims.
Claims
1. A scene recognition method, characterized in that: Applied to electronic equipment, the method includes: Determining whether to initiate operation scenario recognition for the target application based on application operation parameters of the target application; In the case of determining to start the operation scenario identification, obtaining system probe data associated with the target application; Determining network traffic characteristics of the current running scenario of the target application based on the system probe data; and The current operation scenario is identified based on the network traffic characteristics and / or the system probe data to obtain a scenario identification result.
2. The method according to claim 1, characterized in that The application running parameters include at least one of the following parameters: application package name, application type, application active state and current running activity.
3. The method according to claim 2, characterized in that The application running parameters include an application active state, and determining whether to start running scenario recognition for the target application based on the application running parameters of the target application includes: When the application active state indicates that the target application has entered an active interface, running scenario identification for the target application is started.
4. The method according to claim 2, characterized in that The application running parameters include a current running activity, and determining whether to start running scenario recognition for the target application based on the application running parameters of the target application includes: Determining whether the currently running activity of the target application is a preset whitelist activity to be subjected to scene recognition; and In response to the current running activity being the whitelist activity, running scenario identification for the target application is started.
5. The method according to claim 1, wherein In the case of determining to start the operation scenario identification, obtaining system probe data associated with the target application includes: In the case of determining to start the running scenario identification, determining whether the current running activity of the target application has changed; and When the current running activity does not change, the system probe data associated with the current running scenario of the target application is sampled at a preset frequency until the number of sampling times reaches a preset threshold.
6. The method according to claim 5, characterized in that The method further comprises: In the case where the current running activity is changed, the operation of identifying the running scenario of the target application is performed again based on the application running parameters of the target application to determine whether to start.
7. The method according to claim 5, characterized in that The system probe data includes at least one of the following data: The number of network packets, network packet size, packet transmission parameters, and bandwidth usage.
8. The method according to claim 7, characterized in that The system probe data includes the number of network data packets, and determining the network traffic characteristics of the current running scenario of the target application based on the system probe data includes: Calculating a data transmission rate matching the corresponding sampling time according to a time difference corresponding to adjacent sampling times and a quantity difference of the network data packets; and Determine, based on the data transmission rates at multiple sampling moments, a network speed distribution feature that matches the current operating scenario as the network traffic feature, The network speed distribution characteristics indicate the rate range and rate stability of network data packet transmission.
9. The method according to claim 8, characterized in that Identify the current running scenario based on the network traffic characteristics to obtain a scenario identification result, including: If the network speed distribution characteristic indicates that the data transmission rate at each sampling moment is within a target rate range, determining that the current running scenario is a live broadcast scenario; and When the network speed distribution characteristics indicate that the data transmission rate is outside the target rate range and the data transmission rate fluctuation value is greater than the preset rate fluctuation threshold, the current operating scenario is determined to be a short video playback scenario, wherein the length of the target rate range is less than or equal to the preset interval length threshold.
10. The method according to claim 7, characterized in that The system probe data includes the number of network data packets, and determining the network traffic characteristics of the current running scenario of the target application based on the system probe data includes: When the number of network data packets corresponding to any sampling moment is greater than a preset number threshold, determining that the current operation scenario is a high-traffic operation scenario based on the sampling moment; and Determine a persistence feature of the high-traffic operation scenario as the network traffic feature.
11. The method according to claim 10, characterized in that Identify the current running scenario based on the network traffic characteristics to obtain a scenario identification result, including: When the network traffic characteristic indicates that the current operation scene is a continuous high-traffic operation scene, determining that the current operation scene is a live broadcast scene; and When the network traffic characteristic indicates that the current operation scene is an intermittent high-traffic operation scene, it is determined that the current operation scene is a short video playback scene.
12. The method according to claim 7, characterized in that The system probe data includes the network data packet size, and determining the network traffic characteristics of the current running scenario of the target application based on the system probe data includes: Determine, based on the network data packet sizes at multiple sampling moments, a data packet size distribution feature that matches the current operation scenario as the network traffic feature, The data packet size distribution characteristics indicate the data packet size interval and the stability of the data packet size.
13. The method according to claim 12, characterized in that Identify the current running scenario based on the network traffic characteristics to obtain a scenario identification result, including: If the data packet size distribution characteristic indicates that the data packet size at each sampling moment is within a target size range, determining that the current running scene is a live broadcast scene; and When the data packet size distribution characteristics indicate that there is a data packet size outside the target size range and there is a data packet size fluctuation value greater than a preset size fluctuation threshold, it is determined that the current running scene is a short video playback scene, wherein the length of the target size range is less than or equal to the preset range length threshold.
14. The method according to claim 7, wherein: The system probe data includes the data packet transmission parameters, and determining the network traffic characteristics of the current running scenario of the target application based on the system probe data includes: Determining, based on the data packet transmission parameters, data packet sequence numbers and / or data packet delivery timestamps of network data packets sampled at a preset frequency; Determining a delivery time interval between network data packets obtained from each adjacent sampling according to the data packet sequence number and / or the data packet delivery timestamp; According to the delivery time interval, a data packet transmission mode matching the current operation scenario is determined as the network traffic feature.
15. The method according to claim 14, characterized in that The determining, based on the delivery time interval, a data packet transmission mode that matches the current operation scenario as the network traffic feature includes: When the delivery time interval between the network data packets obtained from each adjacent sampling is within the target interval, determining that the data packet transmission mode matching the current operation scenario is a continuous data flow mode; When the time interval between network data packets obtained by adjacent sub-sampling is outside the target interval range, and the fluctuation value of the delivery time interval is greater than a preset interval fluctuation threshold, the data packet transmission mode is determined to be a discrete data block mode. The length of the target interval is less than or equal to a preset interval length threshold, and the data packet transmission mode constitutes the network traffic feature.
16. The method according to claim 15, characterized in that Identify the current running scenario based on the network traffic characteristics to obtain a scenario identification result, including: In a case where the data packet transmission mode is a continuous data stream mode, determining that the current running scene is a live broadcast scene; and When the data packet transmission mode is a discrete data block mode, it is determined that the current running scenario is a short video playback scenario.
17. The method according to claim 7, characterized in that The system probe data includes the bandwidth usage, and determining the network traffic characteristics of the current running scenario of the target application based on the system probe data includes: When the bandwidth occupancy corresponding to any sampling moment is greater than a preset occupancy threshold, determining that the current operation scenario is a high bandwidth occupancy scenario based on the sampling moment; and Determine a persistence feature of the high bandwidth usage scenario as the network traffic feature.
18. The method according to claim 17, characterized in that Identify the current running scenario based on the network traffic characteristics to obtain a scenario identification result, including: When the network traffic characteristics indicate that the current operation scenario is a continuous high bandwidth occupancy scenario, determining that the current operation scenario is a live broadcast scenario; and When the network traffic characteristics indicate that the current operation scenario is an intermittent high-bandwidth occupancy scenario, it is determined that the current operation scenario is a short video playback scenario.
19. The method according to claim 7, characterized in that The system probe data also includes a window change event. The current running scene is identified based on the system probe data to obtain a scene identification result, including: When the system probe data indicates that a window change event based on the current running scenario is detected, the current running scenario is identified according to window features of the current active window of the target application represented by the window change event to obtain the scenario identification result. The window features include at least one of a window title, a window class name, a window content, and a specific application API.
20. The method according to any one of claims 7 to 18, characterized in that The system probe data also includes a window change event. The current running scene is identified based on the system probe data to obtain a scene identification result, including: In a case where the system probe data indicates that a window change event based on the current running scenario is detected, identifying the current running scenario based on the network traffic characteristics and the window characteristics of the current active window of the target application represented by the window change event to obtain the scenario identification result, The window features include at least one of a window title, a window class name, a window content, and a specific application API.
21. The method according to claim 1, wherein The method further comprises: generating a scene category label that matches the scene recognition result; and The scenario category tag is bound to at least one of the application package name, the current running activity, and the target component of the target application.
22. The method according to claim 21, characterized in that The method further comprises: A scene recognition database is formed based on the binding data between the application package name, current running activity and at least one of the target components of the candidate application and the corresponding scene category label, wherein the candidate application includes any application that needs to perform running scene recognition, including the target application.
23. The method according to claim 1, wherein The method further comprises: The network resources allocated to the current running scenario of the target application are scheduled according to the scenario identification result.
24. The method according to claim 23, wherein Scheduling the network resources allocated to the current running scenario of the target application according to the scenario identification result includes: When the scene recognition result indicates that the current running scene is a live broadcast scene, performing at least one of the following operations to schedule network resources allocated to the live broadcast scene: Increase the thread priority of the target thread used to transmit the live video stream; Increasing the bandwidth allocation for the current running scenario of the target application; Increasing the CPU frequency allocated to the current running scenario of the target application; and Add a QoS quality of service mark for the live video stream.
25. A scene recognition method, characterized in that: Applied to electronic equipment, the method includes: Determining whether to perform operating scenario identification on the application to be identified based on application operating parameters of the application to be identified; In the case of determining to perform running scene recognition, obtaining a scene category label that matches the current running activity of the application to be recognized from a preset scene recognition database; and The scene type indicated by the scene category label is used as the scene recognition result for the current running activity of the application to be recognized, The scenario recognition database includes binding data between candidate running activities of candidate applications and corresponding scenario category labels, the candidate applications include any applications that require running scenario recognition, and the candidate running activities include any activities that require running scenario recognition.
26. The method according to claim 25, characterized in that The application running parameters include at least one of the following parameters: At least one of the application package name, application type, application activity status, and current running activity.
27. An electronic device, characterized in that: include: One or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: Determining whether to initiate operation scenario recognition for the target application based on application operation parameters of the target application; In the case of determining to start the operation scenario identification, obtaining system probe data associated with the target application; Determining network traffic characteristics of a current running scenario of the target application based on the system probe data; as well as The current operation scenario is identified based on the network traffic characteristics and / or the system probe data to obtain a scenario identification result.
28. An electronic device, characterized in that: include: One or more processors, a memory, a scene recognition application, and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: Determining whether to perform operating scenario identification on the application to be identified based on application operating parameters of the application to be identified; When it is determined to perform running scene recognition, obtaining a scene category label that matches the current running activity of the application to be recognized from a preset scene recognition database; as well as The scene type indicated by the scene category label is used as the scene recognition result for the current running activity of the application to be recognized, The scenario recognition database includes binding data between candidate running activities of candidate applications and corresponding scenario category labels, the candidate applications include any applications that require running scenario recognition, and the candidate running activities include any activities that require running scenario recognition.
29. A computer-readable storage medium, characterized in that The method comprises a computer program, which, when executed on an electronic device, enables the electronic device to execute the scene recognition method according to any one of claims 1 to 26.
Citation Information
Patent Citations
Resource allocation method, terminal and computer readable storage medium
CN115484223A
Application program management method, application program management system and terminal equipment
CN115529260A
High-performance scene identification method and device, electronic equipment and storage medium
CN116339893A
Scene recognition method, user experience prediction method and related device
CN117082231A
Data processing method and apparatus for virtual scene, electronic device, and storage medium
US20230043203A1