Business loading method, apparatus, device, medium and program product
By executing action frame sequences and story content in parallel and synchronously during the loading of mini-program game data, the problem of user inability to interact was solved, improving user experience and retention.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-05
AI Technical Summary
During the loading process of mini-game data, user accounts can only wait and cannot interact with the storyline, resulting in a poor user experience.
During the loading of business data, the plot content is played by executing action frame sequences and receiving interactive operation messages to dynamically switch plot clues, thereby achieving parallel and synchronous execution of business data loading and plot content.
It improved user interactivity during the business data loading process, increased user retention, and reduced waiting time.
Smart Images

Figure CN122141230A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction, and in particular to a business loading method, apparatus, device, medium, and program product. Background Technology
[0002] Mini-programs include mini-games, which are games that can be played instantly and run within the application's client. When a mini-game launches, it needs to load its game data and can also play videos to help the user account quickly understand basic game information.
[0003] In related technologies, during the loading process of mini-program game data, a video with fixed plot content is usually played. Players corresponding to user accounts need to watch the video until the game data is fully loaded before they can enter the game scene and perform interactions.
[0004] However, due to the technical methods used, during the loading process of mini-program game data, players corresponding to user accounts can only wait and cannot interact. Summary of the Invention
[0005] This application provides a service loading method, apparatus, device, medium, and program product. The technical solution is as follows:
[0006] On the one hand, a business loading method is provided, the method including:
[0007] During the loading of business data, the action frame sequence of the i-th storyline is executed to play the plot content of the i-th storyline, where i is greater than 0;
[0008] Receive the operation message corresponding to the interaction operation, wherein the interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed;
[0009] In response to the operation message satisfying the trigger condition, the action frame sequence of the j-th storyline bound to the first action frame is executed to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0.
[0010] In response to the completion of the loading of the service data, the execution of the action frame sequence of the j-th storyline is stopped to stop the playback of the plot content of the j-th storyline, and the service indicated by the service data is started.
[0011] In some embodiments, the action frame is at least one of the following:
[0012] Create a video component; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, video resource address, whether to autoplay, whether playing, video zoom mode, video jump to a specified number of seconds, whether to loop; the events include at least one of the following: play to a specified number of seconds, video playback ends, video playback starts;
[0013] Pause the video of the specified video component; the attributes include: the action frame identifier of the specified video component to be paused; the event includes: pause;
[0014] Continue playing the video of the specified video component; the attributes include: the action frame identifier of the specified video component; the event includes: continue playing;
[0015] Create an audio component; the attributes include at least one of the following: audio resource address, whether to autoplay, whether to play, video jump to a specified number of seconds, whether to loop, and volume; the events include at least one of the following: playback reaches a specified number of seconds, audio playback ends, and audio playback begins.
[0016] Pause the audio of the specified audio component; the attributes include: the action frame identifier of the specified video component that needs to be paused; the event includes: pause;
[0017] Continue playing the audio from the specified audio component; the attributes include: the action frame identifier of the specified video component that needs to continue playing; the event includes: continue playing;
[0018] Create a texture component; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, transparency, local path of texture resource, width scaling factor, and height scaling factor; the events include: clicking the texture;
[0019] Create a rectangular area; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, and a color description string; the event includes: clicking the rectangular area;
[0020] Create a delayed execution; the attributes include at least one of the following: delay duration, cancellation status; the events include at least one of the following: delay end, delay active cancellation;
[0021] Create an animation function; the attributes include at least one of the following: the action frame identifier on which the animation is applied, duration, curvature function, top, bottom, left, right, visible, width, height, transparency, width scaling factor, and height scaling factor; the event includes: animation end;
[0022] Global variables; the attributes include at least one of the following: a numerical value, a global variable name; events include: an event triggered when a value is assigned, and an event triggered when a value is assigned and its value changes;
[0023] Set the properties of a specified action frame;
[0024] Conditional judgment;
[0025] End of story.
[0026] On the other hand, a service loading device is provided, the device comprising:
[0027] An execution module is used to execute the action frame sequence of the i-th storyline during the loading of business data, so as to play the plot content of the i-th storyline, where i is greater than 0;
[0028] A receiving module is used to receive an operation message corresponding to an interactive operation, wherein the interactive operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed;
[0029] The execution module is further configured to, in response to the operation message satisfying the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, wherein the i-th storyline and the j-th storyline are different storylines, and j is greater than 0;
[0030] The startup module is configured to, in response to the completion of the loading of the service data, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the service indicated by the service data.
[0031] On the other hand, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the business loading method as described above.
[0032] On the other hand, a computer-readable storage medium is provided that stores a computer program, which is loaded and executed by a processor to implement the business loading method described above.
[0033] On the other hand, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein a processor obtains the computer instructions from the computer-readable storage medium, causing the processor to load and execute them to implement the business loading method as described above.
[0034] The beneficial effects of the technical solutions provided in this application include at least the following:
[0035] This paper presents a method for parallel and synchronous execution of business data loading and story content playback, which also supports interaction with user accounts. During business data loading, by receiving operation messages corresponding to interactive operations, the system switches from executing the action frame sequence of the i-th storyline to executing the action frame sequence of the j-th storyline, thereby switching from playing the story content of the i-th storyline to playing the story content of the j-th storyline. Once the business data loading is complete, the business function indicated by the business data is initiated. Compared to related technologies where user accounts can only wait during business data loading, this method fills the gap in interaction during the data loading process and, to some extent, improves user retention. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application;
[0038] Figure 2 This is a schematic diagram illustrating the loading of a mini-program game provided in an exemplary embodiment of this application;
[0039] Figure 3 This is a schematic diagram illustrating a service loading method provided in an exemplary embodiment of this application;
[0040] Figure 4 This is a flowchart of a service loading method provided in an exemplary embodiment of this application;
[0041] Figure 5 This is a schematic diagram of a canvas provided in an exemplary embodiment of this application;
[0042] Figure 6 This is a schematic diagram illustrating the playback of a storyline provided in an exemplary embodiment of this application;
[0043] Figure 7 This is a schematic diagram illustrating the playback of a storyline provided in an exemplary embodiment of this application;
[0044] Figure 8 This is a schematic diagram illustrating the principle of a service loading method provided in an exemplary embodiment of this application;
[0045] Figure 9This is a block diagram of a service loading apparatus provided in an exemplary embodiment of this application;
[0046] Figure 10 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0049] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0050] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0051] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user-related data (e.g., user accounts, mini-program games, videos, audio, stickers, interactive operations). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins the steps related to collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without receiving confirmation from the user), the steps to collect user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0052] First, a brief introduction to the terms used in the embodiments of this application:
[0053] A mini program is a program that can be used without installation and can run within the client of an application. Optionally, the application can be at least one of the following: chat application, lifestyle service application, video application, entertainment application, travel application, social application, and health application.
[0054] In some embodiments, mini-programs also include multiple types, such as at least one of e-commerce, news, games, and lifestyle services. For games, the mini-program is called a mini-game, or simply a mini-game, which is a game that can be played instantly and run within the application's client.
[0055] An action frame is a component of various types provided to story designers or computer devices. Each component is called an action frame. Each action frame consists of at least two parts: at least one property and at least one event. The property defines the actual view representation when the action frame is executed, while the event is used to trigger new storylines.
[0056] A storyline is a container that sequentially concatenates at least two action frames. It is understood as a sequence of action frames consisting of at least two action frames. There can be at least two storylines, with one storyline serving as the main storyline to initiate the plot. Different storylines can correspond to different plot contents. Intersection of action frame sequences from different storylines is allowed; that is, at least a portion of the same action frames are permitted in the action frame sequences of different storylines. In some embodiments, at least a portion of the same action frames are also permitted in the action frame sequences of the same storyline. Optionally, the plot content corresponding to a storyline can be one or more combinations of videos, textures, audio, and animations from publicly available platforms or databases, or one or more combinations of videos, textures, audio, and animations corresponding to specific types of business data and / or business. The plot content is not limited here.
[0057] Global variables (var): These are variables that are stored within the storyline. They are variables that can be read and assigned values through external mini-program logic, and they are also variables that can be used to achieve data communication and interaction between the storyline and external mini-program logic.
[0058] Response: Used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which multiple operations are performed.
[0059] Figure 1 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application. The computer system 100 can serve as a system architecture for implementing a service loading method. The computer system 100 includes: a terminal 120 and a server 140.
[0060] Terminal 120 installs and runs a client application that supports mini-programs. Optionally, the application can be at least one of the following: chat application, lifestyle service application, video application, entertainment application, travel application, social application, and health application. Mini-programs also include various types, such as at least one of e-commerce, news, game, and lifestyle service applications.
[0061] For games, the mini-program is called a mini-game, or simply a mini-game. It's a game that can be played instantly and run within the application's client. This mini-game can be any of the following: battle royale shooter, virtual reality (VR) client, augmented reality (AR) application, 3D map application, virtual reality game, augmented reality game, first-person shooter (FPS), third-person shooter (TPS), multiplayer online battle arena (MOBA), strategy game (SLG), or party game.
[0062] Taking a mini-program game as an example, terminal 120 is the terminal used by the first user. The first user uses terminal 120 to control the controlled virtual character in the mini-program game. This control includes, but is not limited to, at least one of the following: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building virtual buildings.
[0063] Terminal 120 is connected to server 140 via a wireless network or a wired network.
[0064] Server 140 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud servers, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 140 includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center.
[0065] Server 140 includes processor 144 and memory 142. Memory 142 includes receiving module 1421, control module 1422 and sending module 1423. Receiving module 1421 is used to receive requests sent by the mini-program; control module 1422 is used to control the rendering of the mini-program screen; sending module 1423 is used to send responses to the mini-program; server 140 is used to provide background services for terminal 120.
[0066] Optionally, server 140 undertakes the main computing work and terminal 120 undertakes the secondary computing work; or, server 140 undertakes the secondary computing work and terminal 120 undertakes the main computing work; or, server 140 and terminal 120 collaborate on computing using a distributed computing architecture.
[0067] This application does not limit the form of the client installed on terminal 120, including but not limited to Apps (Applications, clients) and web pages installed on terminal 120. Terminal 120 can refer to one of multiple terminals; this application only uses one terminal 120 as an example. The device type of terminal 120 includes at least one of the following: smartphone, tablet computer, wearable device, PC (Personal Computer), laptop computer, and desktop computer; the device model is not limited. The following embodiments use a smartphone as an example of terminal 120.
[0068] Those skilled in the art will understand that the number of terminals 120 described above can be more or less. For example, there may be only one terminal 120 (i.e., a user playing against artificial intelligence), or there may be a total of 8 terminals 120 (1v1v1v1v1v1v1v1, with 8 users playing and being eliminated in a cyclical manner until a winner is determined), or more. This application does not limit the number, device type, or device model of the terminals 120 in its embodiments.
[0069] Taking a mini-program game as an example, and business data as mini-game data, a mini-game, or simply a game, is a type of game that can be played instantly and run within the application's client. When launching a mini-game, especially for the first time, the mini-game needs to fully load its game data, which can take several seconds.
[0070] In related technologies, there are two display methods: Method 1, during the loading process of the mini-program game data, a loading progress bar is displayed on the mini-program game interface to indicate the player's progress in loading the game data. For example, Figure 2This is a schematic diagram illustrating the loading of a mini-program game according to an exemplary embodiment of this application. A loading progress bar 10 is displayed on the mini-program game interface to indicate the loading progress of the game data. When the loading progress bar 10 is full, it indicates that loading is complete, and the player can enter the mini-program game to perform interactions. Alternatively, during the loading process of the mini-program game data, a video can be played simultaneously to help the player quickly understand the basic information of the mini-program game. Typically, a video with a fixed storyline is played, and the player needs to watch the video until the game data is fully loaded before entering the game scene to interact. However, in the methods of related technologies, during the loading process of the mini-program game data, the player can only wait and cannot interact with the game.
[0071] Based on this, this application provides a service loading method. During the loading of service data, the loading of service data and the playback of story content can be performed in parallel and synchronously. Furthermore, it also supports interaction between the story content and the user account. Figure 3 This is a schematic diagram illustrating a business loading method provided in an exemplary embodiment of this application. Taking the business data as mini-program game data as an example, the method is executed by a computer device, which can be... Figure 1 The steps of the service loading method for terminal 120 shown are briefly described below:
[0072] Step 1: During the loading of business data, execute the action frame sequence of the i-th storyline to play the plot content of the i-th storyline, where i is greater than 0; taking the mini-program as a mini-game and the business data as mini-game data as an example, refer to... Figure 3 As shown in (1), during the loading process of the mini-program game data, the following is not displayed: Figure 2 The loading progress bar 10 is shown, and the computer device directly displays the plot content 20 of the i-th storyline by directly executing the action frame sequence of the i-th storyline; optionally, a "skip" button is displayed in the upper left corner of the plot content 20, which can be clicked to end this plot content.
[0073] Step 2: Receive the operation message corresponding to the interaction operation. The interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed; see reference. Figure 3 As shown in (2), the player performs an interactive operation based on the "Click to Continue" button 30. The interactive operation can be a click or a double click. The interactive operation is triggered when the computer device executes the first action frame in the action frame sequence of the i-th story line. The computer device receives the operation message corresponding to the interactive operation.
[0074] Step 3: In response to the operation message meeting the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0. In response to the operation message meeting the trigger condition, the computer device executes the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline.
[0075] Step 4: In response to the completion of business data loading, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the business indicated by the business data; see reference. Figure 3 As shown in (3), in response to the completion of loading the mini-game data, the computer device stops executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and starts the mini-game, displaying the game interface 40 provided by the mini-game. For example, the game interface 40 can be one of the following: the history operation interface when the game was last exited, the game character settings interface, the game lobby interface, the newbie guide interface, or the game promotion interface.
[0076] In this embodiment, at least one corresponding action frame from video, textures, audio, and animation can be sequentially concatenated to obtain an action frame sequence. By executing the action frame sequence, the computer device can play the complete story content. The playback of this story content starts quickly, enabling the loading of business data and the playback of story content to be executed in parallel and synchronously.
[0077] Figure 4 This is a flowchart illustrating a service loading method provided in an exemplary embodiment of this application. The method is executed by a computer device, which may be... Figure 1 The terminal 120 shown. The method includes at least a portion of steps 220, 240, 260, and 280:
[0078] Step 220: During the loading of business data, execute the action frame sequence of the i-th storyline to play the plot content of the i-th storyline, where i is greater than 0.
[0079] Business data refers to the data that needs to be loaded when a business function is started. For example, the type of business function can be at least one of the following: client application, mini-program, document, computer program, computer software platform, and database. Correspondingly, the type of business data can be at least one of the following: client data, mini-program data, document content data, computer program code, computer software platform data, and database file.
[0080] In one scenario example, the business to be launched is a mini-program, and the business data is the mini-program's data. A mini-program is a program that can be used without installation and can run within the client of an application. Optionally, the application can be at least one of the following: chat application, lifestyle service application, video application, entertainment application, travel application, social application, and health application. Mini-programs also include various types, such as at least one of e-commerce, news, game, and lifestyle service categories. For games, the mini-program is called a mini-game, or simply a mini-game, which is a game that can be played instantly and run within the application's client. For mini-games, the business data specifically refers to the mini-game data.
[0081] A sequence of action frames is a sequence of at least two action frames linked together in an ordered manner. An action frame is a component of various types provided to story designers or computer devices; each component is called an action frame. Each action frame includes at least two components: at least one attribute (param) and at least one event (event). The attribute defines the actual view representation when the action frame is executed, while the event is used to trigger new storylines. Each action frame also has a unique action frame identifier (frameID), which can be one or more combinations of numbers, letters, characters, and special symbols. Each event has a corresponding event name (eventName) and a storyline identifier (StoryLineID) bound to it.
[0082] A storyline is a container that sequentially concatenates at least two action frames. It can be understood as a sequence of action frames consisting of at least two action frames. There can be at least two storylines, with one storyline serving as the main storyline to initiate the plot. Different storylines can correspond to different plot contents. Intersection of action frame sequences from different storylines is allowed; that is, at least some of the same action frames are permitted in the action frame sequences of different storylines. In some embodiments, at least some of the same action frames are also permitted in the action frame sequences of the same storyline. Each storyline also has a unique storyline ID, which can be one or more combinations of numbers, letters, characters, and special symbols.
[0083] The relationship between action frames, action frame sequences, and storylines is as follows: A storyline includes: a storyline identifier and an action frame sequence; an action frame sequence includes: at least two action frames in an ordered sequence; each of the at least two action frames includes: an action frame identifier, at least one attribute, and at least one event; each of the at least one event includes: an event name and a storyline identifier of the storyline to which it is bound.
[0084] For example, during the loading of business data, the computer device executes the action frame sequence of the i-th storyline to play the plot content of the i-th storyline, where i is greater than 0. The loading of business data and the playback of plot content are executed in parallel and synchronously.
[0085] There can be at least two storylines. The i-th storyline among these two storylines is set as the main storyline to initiate the plot. It should also be noted that each time step 220 is executed, that is, during each loading of business data, the i-th storyline can be completely identical, partially identical, or completely different; this is not limited here.
[0086] Taking a single data loading process as an example: The action frame sequence of the i-th storyline is executed to play the plot content of the i-th storyline. Optionally, the i-th storyline is a fixed storyline. For example, if there are at least two storylines: Storyline 1, Storyline 2, and Storyline 3, and the i-th storyline is fixed as Storyline 1, then in each data loading process, the action frame sequence of that storyline is executed starting from Storyline 1. Alternatively, the i-th storyline is a non-fixed storyline, including one of the following storylines:
[0087] A storyline is randomly selected; for example, any one of at least two storylines is randomly selected as the i-th storyline, and the action frame sequence of that storyline is executed.
[0088] A storyline is determined based on the user account's operation preference information. This operation preference information includes at least one of the following: the number and type of historical interaction operations, and the playback duration of the corresponding storyline and plot content when the historical interaction operation occurred. The user account's operation preference information is input into a prediction model to obtain a storyline determined based on this information. For example, if all of the user account's historical interaction operations are click operations, and the number of click operations exceeds a threshold, then the prediction model determines a storyline with click events, which is then used as the i-th storyline, and the action frame sequence for that storyline is executed.
[0089] A storyline is determined based on the user account's historical business execution progress. Business execution progress refers to the user account's progress in executing tasks when the business was last started, and can be indicated as a percentage. Different business execution progresses correspond to different storylines. A storyline corresponding to the user account's historical business execution progress is determined. For example, if the business execution progress is 50%, the storyline corresponding to that progress is selected as the i-th storyline, and the action frame sequence for that storyline is executed.
[0090] A storyline is determined based on the user account's historical business execution types; the business execution type is the type of task the user account performed when the business was last started. Different business execution types correspond to different storylines. A storyline corresponding to a specific business execution type is determined based on the user account's historical business execution types. For example, if the business execution type is "pick up equipment," then the storyline corresponding to that business execution type is selected as the i-th storyline, and the action frame sequence for that storyline is executed.
[0091] A storyline is determined based on the user account's historical playback progress. This historical playback progress represents the progress of the storyline played when the service was last started. This progress can be represented by a storyline identifier and a percentage, indicating which storyline was played last time and its progress. When the percentage is less than 1, the storyline corresponding to that playback progress is treated as the i-th storyline, and the remaining action frames in the action frame sequence are determined according to that playback progress, and the remaining action frames of that storyline are executed. When the percentage equals 1, the next storyline is determined based on the storyline corresponding to that playback progress, and this next storyline is treated as the i-th storyline, and the action frame sequence of that storyline is executed.
[0092] A storyline is determined based on the business role type and level created by the user account. Predefined storylines correspond to different business role types and levels created by the user account. The plot content of this storyline can be a character introduction for that business role type and / or a skill introduction for that level. Based on the business role type and level created by the user, the storyline corresponding to that business role type and level is taken as the i-th storyline, and the action frame sequence of that storyline is executed.
[0093] A storyline is determined based on the matching degree between the loaded business data and the plot content. The loaded business data is input into a detection model, which calculates the matching degree between the business data and the plot content corresponding to each of at least two storylines. The storyline with the highest matching degree is designated as the i-th storyline, and its action frame sequence is executed. For example, if the business data is mini-program game data, specifically a shooting game, the plot content with the highest matching degree could be plot content containing shooting actions and shooting scenes. The storyline corresponding to this plot content is designated as the i-th storyline, and its action frame sequence is executed.
[0094] A storyline is determined based on the start time of this business data loading; storylines corresponding to different start times are predefined. The storyline corresponding to the start time of this business data loading is taken as the i-th storyline, and the action frame sequence of that storyline is executed. For example, if the start time is nighttime, then the storyline whose plot content is a nighttime scene is determined as the i-th storyline.
[0095] A storyline is determined based on the user's current location; different storylines are predefined for different locations. The storyline corresponding to the user's current location is taken as the i-th storyline, and its action frame sequence is executed. For example, if the user's current location is city A, then the storyline corresponding to the promotional video for city A is taken as the i-th storyline, and its action frame sequence is executed. It should also be noted that this current location is obtained after authorization from the user account.
[0096] Step 240: Receive the operation message corresponding to the interaction operation, which is triggered when the first action frame in the action frame sequence of the i-th storyline is executed.
[0097] An operation message is a message encapsulated with the operation information of an interactive operation. Optionally, the operation information includes at least one of the following: the type of the interactive operation, the number of times it is performed, and the trigger time. An interactive operation is an interaction between a user account and the plot content of the i-th storyline, triggered by the user account. The types of interactive operations include at least one of the following: click, double-click, swipe, long press, gesture input, and text input.
[0098] Optionally, the interactive operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed. The first action frame is an action frame of a specified type, or an action frame corresponding to an interactive element in the plot content of the i-th storyline, or an action frame corresponding to a plot content change stage in the i-th storyline. When the first action frame is executed, the user account is allowed to trigger the interactive operation to achieve flexible switching of plot content. In one possible implementation, when the first action frame is executed, an interactive element is displayed in the plot content of the i-th storyline to allow the user account to trigger the interactive operation. The interactive element can be at least one of: a speech bubble, an icon, a sticker, text, a button, or an input box.
[0099] For example, the computer device receives an operation message corresponding to an interactive operation, which is triggered when the first action frame in the action frame sequence of the i-th storyline is executed. By parsing this operation message, it can be determined whether it is necessary to switch to the action frame sequence of the j-th storyline to play the plot content of the j-th storyline, thus achieving flexible switching of plot content.
[0100] Step 260: In response to the operation message meeting the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0.
[0101] The trigger condition is the condition that must be met when switching from playing the plot content of the i-th storyline to playing the plot content of the j-th storyline, or the condition that must be met when switching from executing the action frame sequence of the i-th storyline to executing the action frame sequence of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, specifically in that: their corresponding plot content is different, and all or at least some of the action frames in their corresponding action frame sequences are different.
[0102] In some embodiments, each action frame includes at least one attribute and at least one event. Each of the at least one event has a corresponding event name (eventName) and a storyline identifier (StoryLineID) bound to it. That is, each action frame is bound to a storyline, and the storyline bound to the first action frame is represented as the j-th storyline. For example, in response to an operation message satisfying a trigger condition, the computer device executes the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0. Accordingly, changes in plot content can be achieved based on interactive operations triggered by a user account.
[0103] Step 280: In response to the completion of business data loading, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the business indicated by the business data.
[0104] For example, in response to the completion of business data loading, the computer device stops executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and starts the business indicated by the business data, displaying the business interface. The business interface is a display interface provided by the business. Optionally, the business interface includes one of the following: the history operation interface from the last exit of the business, the business role setting interface, the business lobby interface, the new user guide interface, and the business promotion interface. In this embodiment, when the business is a mini-game, starting the business indicated by the business data starts the mini-game, and the business interface is the mini-game interface.
[0105] In some embodiments, when the service data has been loaded but the action frame sequence of the j-th storyline has not been completed (i.e., the plot content of the j-th storyline has not been played): the execution progress of the action frame sequence of the j-th storyline can be automatically saved, i.e., the playback progress of the j-th storyline can be automatically saved, and the service indicated by the service data can be started directly. Alternatively, a prompt message can be displayed in the plot content of the j-th storyline to indicate that the service data has been loaded, and the service indicated by the service data can be started in response to the triggering operation of the prompt message. Optionally, the prompt message can be at least one of text, an icon, or a loading progress bar.
[0106] In other embodiments, when the business data has not been fully loaded and the action frame sequence of the j-th storyline has been executed (i.e., the plot content of the j-th storyline has finished playing): the action frame sequence of the (j+1)-th storyline can be automatically executed sequentially to play the plot content of the (j+1)-th storyline. During the execution of the action frame sequence of the (j+1)-th storyline, the user can also switch to executing the action frame sequence of the x-th storyline by receiving an operation message corresponding to an interactive operation to play the plot content of the x-th storyline. Alternatively, when the last action frame in the action frame sequence of the j-th storyline is executed, a prompt message can be displayed to remind the user account that they need to continue waiting until the business data is fully loaded.
[0107] In one possible implementation, the plot content rendering canvas is overlaid on top of the business rendering canvas to allow the loading of business data and the playback of plot content to be executed in parallel and synchronously, and to display the plot content without showing the loading progress bar of the business data. Here, the plot content rendering canvas is the rendering canvas corresponding to the plot content being played. The business rendering canvas is the rendering canvas corresponding to the business operations indicated by the business data.
[0108] For example, the playback logic of the plot content and the loading logic of business data share the same JavaScript execution process. The computer device uses native drawing functions provided by the business side to render the plot content rendering canvas, thereby rendering and playing the plot content. Here, the business runs in the application's client; the business side refers to the client of the application where the business runs, or simply the client. The drawing functions, also known as plotting functions, include, but are not limited to, at least one of the following: the `line` function for drawing lines, the `circle` function for drawing circles, the `rectangle` function for drawing rectangles, and the `acrh` function for drawing polygons. In this embodiment, the rendering and playback of the plot content use native drawing functions provided by the business side, leveraging the capabilities of the business side itself, eliminating the need to wait for the business to start, and achieving fast playback of the plot content.
[0109] Optionally, during the playback of the story content, the sound in the business rendering canvas is muted, and the sound is restored after the story content playback stops. In this embodiment, when the business is a mini-game, the business rendering canvas is the mini-game rendering canvas, or simply the mini-game rendering canvas. As an example, Figure 5 This is a schematic diagram of a canvas provided in an exemplary embodiment of this application. Taking a mini-game as an example, the story content rendering canvas is implemented as the startup story native canvas 50, and the business rendering canvas is implemented as the mini-game rendering canvas 60. The startup story native canvas 50 is higher than the mini-game rendering canvas, which can also be understood as the startup story native canvas 50 being superimposed on the mini-game rendering canvas 60.
[0110] In summary, the service loading method provided in this application embodiment involves the following steps: During the loading of service data, the computer device executes the action frame sequence of the i-th storyline to play the plot content of the i-th storyline, where i is greater than 0; receives an operation message corresponding to an interactive operation, which is triggered when the first action frame in the action frame sequence of the i-th storyline is executed; in response to the operation message satisfying the triggering condition, the computer device executes the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, where the i-th and j-th storylines are different storylines, and j is greater than 0; in response to the completion of service data loading, the computer device stops executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and starts the service indicated by the service data. Accordingly, a method for parallel and synchronous execution of service data loading and plot content playback is provided, and the plot content also supports interaction with user accounts. During the loading of business data, by receiving operation messages corresponding to interactive operations, the system switches from executing the action frame sequence of the i-th storyline to executing the action frame sequence of the j-th storyline, thereby switching from playing the plot content of the i-th storyline to playing the plot content of the j-th storyline. Once the business data loading is complete, the business function indicated by the business data is initiated. Compared to related technologies where user accounts can only wait during the business data loading process, this approach fills the gap in interaction during the loading process and, to some extent, improves user retention.
[0111] In some embodiments, whether the operation message of the interactive operation meets the triggering condition needs to be determined based on the first action frame executed when the interactive operation is triggered. For example, step 260 is specifically implemented as step 262:
[0112] Step 262: In response to the operation message matching the first action frame, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline.
[0113] The triggering condition includes the matching of an operation message with a first action frame. Optionally, the first action frame includes at least one attribute and at least one event. The matching of the operation message with the first action frame can be that the operation message matches the at least one attribute, or matches the at least one event, or the matching degree of the operation message with the plot content of the j-th storyline bound to the first action frame is greater than a threshold.
[0114] For example, in response to an operation message matching a first action frame, a computer device executes the sequence of action frames for the j-th storyline bound to the first action frame to play the plot content of the j-th storyline.
[0115] In this embodiment, the first action frame can be bound to the j-th storyline. When the computer device responds to an operation message that matches the first action frame, it executes the action frame sequence of the j-th storyline bound to the first action frame. Based on the user account's interactive operation, the parallel execution of switching playback of different storyline plot content and loading of business data is realized.
[0116] In some embodiments, step 262 is specifically implemented as step 2620:
[0117] Step 2620: In response to the interaction event indicated by the operation message being one of the at least one events defined in the first action frame, execute the action frame sequence of the j-th storyline bound to the interaction event in the first action frame to play the plot content of the j-th storyline.
[0118] Matching an operation message with a first action frame means that the operation message matches at least one event within the first action frame. Specifically, the triggering condition is that the interaction event indicated by the operation message is one of at least one events defined in the first action frame. The interaction event indicates the type and / or function of the interaction operation. The types of interaction operations include at least one of: click, double-click, swipe, long press, gesture input, and text input. The corresponding interaction events include at least one of: click event, double-click event, swipe event, long press event, gesture input event, and text input event, and their functions can be at least one of: start playback, end playback, pause, resume playback, and cancel.
[0119] For example, in response to an interactive event indicated by an operation message, which is one of at least one event defined in a first action frame, the computer device executes the action frame sequence of the j-th storyline bound to the interactive event in the first action frame to play the plot content of the j-th storyline, thereby achieving the switching of plot content.
[0120] In this embodiment, the computer device determines whether to trigger the playback of the j-th storyline's plot content based on whether the interactive event indicated by the operation message is one of at least one events defined in the first action frame. On the one hand, this enables the parallel execution of switching and playing the plot content of different storylines and loading business data. On the other hand, it also improves the accuracy of playing or switching the plot content.
[0121] As an example, in the algorithm for playing story content, the order of at least two storylines can be set, and at least two storylines can be played in sequence. In the absence of interactive operations, Figure 6This is a schematic diagram illustrating the playback of a storyline provided in an exemplary embodiment of this application. For example, starting with the first storyline (storyline 1), the plot content of the first storyline is played. Next, the plot content of the second storyline (storyline 2) is played, and so on, until the plot content of the nth storyline (storyline n) is played. In the presence of interactive operations, Figure 7 This is a schematic diagram illustrating the playback of a storyline provided in an exemplary embodiment of this application. For example, starting from the i-th storyline (storyline i), the action frame sequence of the i-th storyline is executed to play the plot content of the i-th storyline. The action frame sequence of the i-th storyline is an ordered concatenation of action frame 1, action frame 2, up to action frame n. When action frame 2 is executed, the user account triggers an interactive operation, generating a new event. When the event meets the triggering condition, the action frame sequence of the j-th storyline (storyline j) is executed to switch to playing the plot content of the j-th storyline. The action frame sequence of the j-th storyline is an ordered concatenation of action frame 1, action frame 2, up to action frame n. The plot content ends when the execution reaches the end action frame of the action frame sequence of the j-th storyline, or when the action frame sequence of the j-th storyline is completed.
[0122] In some embodiments, following step 260 and parallel to step 280, step 290 is also included:
[0123] Step 290: In response to the operation message not meeting the trigger condition, continue executing the action frame sequence of the i-th storyline starting from the first action frame to continue playing the plot content of the i-th storyline.
[0124] For example, in response to an operation message not meeting the triggering condition, the computer device discards the operation message and continues to execute the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0125] In this embodiment, if the computer device responds to the fact that the operation message does not meet the triggering condition, it continues to play the plot content of the i-th storyline, thereby improving the accuracy of the plot content playback.
[0126] In some embodiments, step 290 is specifically implemented as step 292:
[0127] Step 292: In response to the operation message not matching the first action frame, continue executing the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0128] The triggering condition includes the operation message matching the first action frame. If the operation message does not meet the triggering condition, it means that the operation message does not match the first action frame. For example, in response to the operation message not matching the first action frame, the computer device continues to execute the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0129] In this embodiment, if the computer device responds to an operation message that does not match the first action frame, it will not switch the playback of the story content, but will continue to play the story content of the i-th storyline, thereby improving the accuracy of the playback of the story content.
[0130] In some embodiments, step 292 is specifically implemented as step 2920:
[0131] Step 2920: In response to the operation message indicating that the interaction event is not one of the at least one events defined in the first action frame, continue to execute the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0132] Matching an operation message with a first action frame means that the operation message matches at least one event in the first action frame. Specifically, the triggering condition is that the interaction event indicated by the operation message is one of the at least one events defined in the first action frame. For example, if the computer device responds to an interaction event indicated by the operation message not being one of the at least one events defined in the first action frame, it continues executing the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0133] In this embodiment, the computer device determines whether it needs to trigger the playback of the story content of the j-th storyline based on whether the interactive event indicated by the operation message is one of the at least one events defined in the first action frame, which can improve the accuracy of the playback or switching of the story content.
[0134] In some embodiments, step 240 is specifically implemented as steps 242 and 244:
[0135] Step 242: In response to the first action frame in the action frame sequence of the i-th storyline, the rendering instruction of the business side is called to display interactive elements in the plot content of the i-th storyline. The first action frame corresponds to interactive elements in the plot content of the i-th storyline.
[0136] Optionally, the first action frame is the action frame corresponding to an interactive element in the plot content of the i-th storyline. When the first action frame in the action frame sequence of the i-th storyline is executed, the interactive element is rendered in the plot content, so that the user account can trigger an interactive operation when observing the interactive element.
[0137] In some embodiments, the rendering and playback of the story content is achieved by the computer device calling the native drawing functions on the application side. The application side provides various rendering instructions corresponding to these drawing functions, which, when called, are used to render different story content and / or interactive elements.
[0138] For example, in response to the first action frame in the sequence of action frames executed up to the i-th storyline, the computer device calls the rendering instruction from the business side to display interactive elements in the plot content of the i-th storyline, and the first action frame corresponds to interactive elements in the plot content of the i-th storyline.
[0139] Step 244: Obtain the operation message generated by the business side based on the interaction operation on the interactive element.
[0140] After receiving an interaction action triggered by a user account for the interactive element, the service provider generates an operation message corresponding to that interaction action. For example, the computer device obtains the operation message generated by the service provider based on the interaction action for the interactive element.
[0141] In this embodiment, the computer device can obtain the operation message corresponding to the interactive operation, and can support the interaction between the plot content and the user account, thereby facilitating the playback or switching of subsequent plot content.
[0142] In some embodiments, the rendering of plot content and / or interactive elements is achieved through message projection. Projection can also be referred to as sending. In this embodiment, the computer device is provided with a model data layer and a view management layer. The model data layer, also known as the data layer, executes the action frame sequence of the storyline in this data layer. The view management layer, also known as the view layer, includes the action frame view logic corresponding to the action frame, which is used to call different rendering instructions from the business side to render the plot content and / or interactive elements corresponding to the action frame.
[0143] For example, step 242 is specifically implemented as step 2420:
[0144] Step 2420: In response to the first action frame in the action frame sequence of the i-th storyline, a rendering instruction is projected to the view layer, and the view layer calls the rendering instruction from the business side to render interactive elements in the plot content of the i-th storyline.
[0145] Optionally, in response to the first action frame in the action frame sequence executed up to the i-th storyline, the computer device projects a rendering instruction to the view layer. The view layer then calls the rendering instruction from the business side to render interactive elements within the plot content of the i-th storyline. Specifically, the rendering instruction corresponding to the first action frame is projected to the action frame view logic corresponding to the first action frame in the view layer. The action frame view logic corresponding to the first action frame in the view layer then calls the rendering instruction from the business side to render interactive elements within the plot content of the i-th storyline.
[0146] In this embodiment, the computer device can change the content displayed in the user interface (UI) to provide the user account with prompts on the interactive operations that can be performed, thereby supporting the interaction between the user account and the subsequent plot content, which is conducive to the switching of subsequent plot content.
[0147] For example, step 244 is specifically implemented as step 2440:
[0148] Step 2440: Obtain the operation message generated by the business side based on the interaction operation on the interactive element through the view layer, and parse the operation message to generate a first indication or a second indication. The first indication is used to indicate that the operation message meets the triggering condition, and the second indication is used to indicate that the operation message does not meet the triggering condition.
[0149] Optionally, the computer device obtains the operation message generated by the business end based on the interactive operation on the interactive element through the view layer, and the view layer parses the operation message to generate a first indication or a second indication. The first indication is used to indicate that the operation message meets the trigger condition, and the second indication is used to indicate that the operation message does not meet the trigger condition. Specifically, the operation message is parsed by the action frame view logic corresponding to the first action frame in the view layer. When the operation message meets the trigger condition, the first indication is generated; when the operation message does not meet the trigger condition, the second indication is generated; or the operation message can be directly discarded. Here, the operation message meeting the trigger condition means that the interactive event indicated by the operation message is one of at least one events defined by the first action frame. The operation message not meeting the trigger condition means that the interactive event indicated by the operation message is not one of at least one events defined by the first action frame.
[0150] In this embodiment, the computer device can parse the operation message to determine whether the operation message meets the triggering conditions, which is beneficial for switching and playing the plot content of the storyline and improves the accuracy of data processing.
[0151] As an example, Figure 8This is a schematic diagram illustrating the principle of a service loading method provided in an exemplary embodiment of this application. The computer device includes: a model data layer 70, a view management layer 80, and a client 90. The action frame sequence of the storyline is executed in the model data layer 70. The view management layer 80 includes action frame view logic corresponding to each action frame, used to invoke different rendering instructions from the client 90 to render the plot content and / or interactive elements corresponding to that action frame. Specifically, when action frame n in a storyline's action frame sequence is executed in the model data layer 70, the model data layer 70 sends a rendering instruction to the view management layer 80. The action frame view logic 1 corresponding to action frame n receives the rendering instruction. The action frame view logic 1, based on controlled components such as video, audio, and textures, combines various different rendering instructions provided by the client 90 to reasonably invoke them, thereby displaying interactive elements in the plot content. When a user account performs an interactive operation n on an interactive element, such as clicking or swiping, the client 90 sends an operation message to the view management layer 80. After receiving the operation message, the action frame view logic n parses it to determine whether it meets the event type defined by the action frame n. If it does not meet the defined event type, the operation message is discarded. If it meets the defined event type, the operation message or the first instruction corresponding to the operation message is sent to the action frame n of the model data layer 70. The action frame n will trigger the playback of new story content based on the bound storyline.
[0152] In some embodiments, it can be determined whether the business data has been fully loaded or the playback progress of the plot content can be obtained by detecting the values of at least a portion of the action frames in the currently executed action frame sequence. For example, after step 260 and before step 280, the method further includes step 270:
[0153] Step 270: In response to detecting that the second action frame in the action frame sequence of the j-th storyline has a specified value, determine that the business data loading is complete.
[0154] The second action frame is an action frame of a specified type in the action frame sequence. Optionally, the service side calls an interface function to modify the value of the second action frame. In one example, the service side calls the interface function to set the value of the second action frame to a specified value when the service data has been loaded. In this embodiment, the second action frame may specifically be a global variable. For example, in response to detecting that the second action frame in the action frame sequence of the j-th storyline has a specified value, the computer device determines that the service data has been loaded. Next, it stops executing the action frame sequence of the j-th storyline and starts the service indicated by the service data.
[0155] In this embodiment, the computer device can determine whether the business data has been loaded, thereby stopping playback or canceling the display of plot content, and can promptly start the business indicated by the business data.
[0156] In some embodiments, stopping the execution of the action frame sequence of the j-th storyline can also be achieved in several ways. For example, the method further includes step 320:
[0157] Step 320: In response to the execution of the end action frame, or in response to the plot content of the j-th storyline reaching the plot change stage, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline.
[0158] The ending action frame is an action frame in the action frame sequence of the j-th storyline, used to indicate the cessation of the action frame sequence of the j-th storyline. A plot change phase refers to a stage where the degree of change in the plot content exceeds a threshold. For example, it could be determined when a key character appears in the plot, when a scene transition occurs, or when a key event occurs.
[0159] For example, in response to executing an action frame to the end, the computer device stops executing the action frame sequence of the j-th storyline, thereby stopping the playback of the plot content of the j-th storyline. Alternatively, in response to the plot content of the j-th storyline reaching a plot change stage, the computer device stops executing the action frame sequence of the j-th storyline, thereby stopping the playback of the plot content of the j-th storyline.
[0160] This embodiment also provides two other ways to stop playing the storyline content. In practical applications, the appropriate method can be selected based on actual technical needs, thereby improving the flexibility of computer equipment in performing operations.
[0161] In some embodiments, step 310 is included before step 320:
[0162] Step 310: In response to the detection of a numerical change in the third action frame in the action frame sequence of the j-th storyline, determine that the plot content of the j-th storyline has reached the plot change stage.
[0163] The third action frame is an action frame of a specified type in the action frame sequence. In this embodiment, the third action frame can also be a global variable. For example, in response to detecting a change in the value of the third action frame in the action frame sequence of the j-th storyline, the computer device determines that the plot content of the j-th storyline has reached a plot change stage. Next, the execution of the action frame sequence of the j-th storyline can be stopped.
[0164] In this embodiment, the computer device can accurately detect the stage of change in the plot of the currently playing storyline, which is helpful in providing some information for the subsequent operations that the computer device needs to perform.
[0165] In some embodiments, global variables (var) are used to achieve data exchange between plot content and business logic. The plot designer or computer device can create global variables in the action frame sequence corresponding to the plot content; the global variable name (globalName) can be customized. The following interface functions are provided, represented as follows:
[0166] launchOpera.setGlobalVar(globalName:string,value:string)
[0167] launchOpera.getGlobalVar(globalName:string):string
[0168] launchOpera.onGlobalVarChange(globalName:string,callback:Function)
[0169] The `launchOpera` function has three types. `setGlobalVar` allows the application to set a new value for a specified global variable (`globalName`). `getGlobalVar` allows the application to retrieve the value of a specified global variable within the currently playing story content. `onGlobalVarChange` generates a callback when the value of a specified global variable in the currently playing story content changes, allowing the detection of different story progression stages.
[0170] In some embodiments, the data structure (FrameStruct) of an action frame is defined as follows:
[0171]
[0172] The action frame identifier (frameID) is a unique identifier assigned to the action frame in a single storyline design and can be a number. The attributes (params) store the attribute names and corresponding values of different attributes of an action frame, defined and stored using a key-value pair interface in JSON, XML, or other serialized structures. Since an action frame can have one or more events, the events can be an array structure, where each element contains a corresponding event name (eventName) and a storyline identifier (StoryLineID) corresponding to a new storyline to be executed after the event occurs.
[0173] In some embodiments, the storyline data structure (StoryLineStruct) is defined as:
[0174]
[0175] The StoryLineID is a unique identifier assigned to the storyline in a single plot design and can be a number. The Frames sequence will store the frame IDs corresponding to at least two frames in an ordered manner and can also be numbers.
[0176] In some embodiments, the complete plot content data structure (OperaDataStruct) includes: script name (name), creation time (data), action frame definition field (frameDefine), and story line definition field (storyLineDefine). The story line definition field includes: at least two story lines in an ordered sequence, story line identifiers for each of the at least two story lines, and an action frame sequence. The action frame sequence includes: at least two action frames in an ordered sequence, and each of the at least two action frames includes: an action frame identifier, at least one attribute, and at least one event. Each of the at least one event includes: an event name and a story line identifier of the story line to which it is bound.
[0177] In some embodiments, the data structure (OperaDataStruct) for plot content is defined as:
[0178]
[0179] The script name and creation time are basic information. The data structure of the action frame in the action frame definition field (frameStruct) and the data structure of the story line in the story line definition field (storyLineDefine) (StoryLineStruct) can be referred to the aforementioned embodiment. The complete data content can be stored and sent using JSON, XML, or other serialized structures.
[0180] In some embodiments, action frames can be of multiple types, and an action frame can be at least one of the following:
[0181] • Create a video component (createVideo); attributes include at least one of the following: top, bottom, left, right, visible, width, height, video resource address (url), whether to autoplay (autoplay), whether to play (playing), video scaling mode (objectFit), video jump to a specified number of seconds (seek), whether to loop (loop); events include at least one of the following: play to a specified number of seconds (onPlayTimeAt), video playback ends (onEnded), video playback starts (onPlay).
[0182] • Pause the video of the specified video component (pauseVideo); attributes include: the action frame identifier (video) of the specified video component to be paused; events include: pause (pause).
[0183] • Continue playing the video of the specified video component (playVideo); attributes include: the action frame identifier of the specified video component (video); events include: continue playing (play).
[0184] • Create an audio component (createAudio); attributes include at least one of the following: audio resource address (url), whether to autoplay (autoplay), whether to play (playing), video jump to a specified number of seconds (seek), whether to loop (loop), volume (volume); events include at least one of the following: play to a specified number of seconds (onPlayTimeAt), audio playback ends (onEnded), audio playback starts (onPlay).
[0185] • Pause the audio of the specified audio component (pauseAudio); attributes include: the action frame identifier (audio) of the specified video component to be paused; events include: pause (pause).
[0186] • Continue playing the audio of the specified audio component (playAudio); attributes include: the action frame identifier (audio) of the specified video component to be played; events include: continue playing (play).
[0187] • Create a texture component (createImage); attributes include at least one of the following: top, bottom, left, right, visible, width, height, opacity, local URL of the texture resource, scaleWidth, scaleHeight; events include: click on the texture (onClick).
[0188] • Create a rectangular area (createRect); attributes include at least one of the following: top, bottom, left, right, visible, width, height, and color description string; events include: click on the rectangular area (onClick).
[0189] • Create a delayed execution (setTimeout); the properties include at least one of the following: delay duration (timeout), cancellation status (cancel); the events include at least one of the following: delay end (onEnded), delayed active cancellation (onCancel).
[0190] • Create an animation function (creatAnimationFunction); properties include at least one of the following: the frame to which the animation is applied, duration, easing function, top, bottom, left, right, visible, width, height, opacity, scaleWidth, and scaleHeight; events include: animation end (onEnded).
[0191] • Global variables (var); properties include at least one of the following: value, global variable name (globalName); events include: the event triggered when a value is assigned (onChange), and the event triggered when a value is assigned and its value changes (onChanged).
[0192] • Set the attribute (setParam) of the specified action frame; the attribute includes at least one of the following: the action frame identifier (frame) of the specified action frame, the attribute name (param), and the new value (value).
[0193] • Conditional statement (if); Attributes include: the values of the two variables to be compared or the names of global variables (valueA, valueB); Events include at least one of the following: true (isTrue) or false (isFalse).
[0194] • End the story (end).
[0195] In some embodiments, the interactive operation is triggered when the action frame of the action frame sequence of the i-th storyline is executed. The first action frame is at least one of the following: creating a video component (createVideo), creating a texture component (createImage), creating a rectangular region (createRect), or creating an animation function (createAnimationFunction). In this embodiment, if the first action frame contains corresponding plot content and / or interactive elements, the user account can trigger the corresponding interactive operation.
[0196] Examples of application scenarios:
[0197] The business loading method provided in this application embodiment can be applied to mini-programs. Taking a game-type mini-program as an example, the mini-program includes mini-game data, the business data includes mini-game data, and the business indicated by the business data includes the mini-game data. This method is specifically implemented as at least some of the steps 420, 440, 460, and 480:
[0198] Step 420: During the loading of the mini-program game data, execute the action frame sequence of the i-th storyline to play the plot content of the i-th storyline, where i is greater than 0;
[0199] Step 440: Receive the operation message corresponding to the interaction operation. The interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed.
[0200] Step 460: In response to the operation message meeting the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0.
[0201] Step 480: In response to the completion of loading the mini-program game data, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the mini-program game.
[0202] In this embodiment, since the mini-game takes a relatively long time to load its data, especially during the initial launch, there is no interaction between the player and the game during this waiting period, which may affect user retention. This method compensates for this gap in interaction with the user account during the mini-game data loading process. By leveraging the native video, audio, and texture playback and display capabilities of the mini-game client, and based on the correlation between interactive operations and action frames, events, and storylines, flexible switching of the story content is achieved. The loading and initialization logic of the mini-game data is executed in parallel during the playback of the story content. After the game data is fully loaded, the user can choose to end the story content, which will smoothly fade out of the user's view, allowing the user account to continue interacting within the game scene. This also improves user retention to some extent.
[0203] In some embodiments, step 460 is specifically implemented as step 462:
[0204] Step 462: In response to the operation message matching the first action frame, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline.
[0205] In some embodiments, step 462 is specifically implemented as step 4620:
[0206] Step 4620: In response to the interaction event indicated by the operation message being one of at least one events defined in the first action frame, execute the action frame sequence of the j-th storyline bound to the interaction event in the first action frame to play the plot content of the j-th storyline.
[0207] In some embodiments, following step 460 and parallel to step 480, step 490 is also included:
[0208] Step 490: In response to the operation message not meeting the trigger condition, continue executing the action frame sequence of the i-th storyline starting from the first action frame to continue playing the plot content of the i-th storyline.
[0209] In some embodiments, step 490 is specifically implemented as step 492:
[0210] Step 492: In response to the operation message not matching the first action frame, continue executing the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0211] In some embodiments, step 492 is specifically implemented as step 4920:
[0212] Step 4920: In response to the operation message indicating that the interaction event is not one of the at least one events defined in the first action frame, continue executing the action frame sequence of the i-th storyline from the first action frame to continue playing the plot content of the i-th storyline.
[0213] In some embodiments, the mini-game runs on a client of an application that supports mini-programs, and the business logic is implemented as that client. Step 440 is specifically implemented as steps 442 and 444:
[0214] Step 442: In response to the first action frame in the action frame sequence executed up to the i-th storyline, the client's rendering instruction is invoked to display interactive elements in the plot content of the i-th storyline. The first action frame corresponds to interactive elements in the plot content of the i-th storyline.
[0215] Step 444: Obtain the operation message generated by the client based on the interaction operation on the interactive element.
[0216] In some embodiments, step 442 is specifically implemented as step 4420:
[0217] Step 4420: In response to the first action frame in the action frame sequence executed up to the i-th storyline, a rendering instruction is projected to the view layer, and the view layer calls the client's rendering instruction to render interactive elements in the plot content of the i-th storyline.
[0218] For example, step 444 is specifically implemented as step 4440:
[0219] Step 4440: Obtain the operation message generated by the client based on the interaction operation on the interactive element through the view layer, and parse the operation message to generate a first indication or a second indication. The first indication is used to indicate that the operation message meets the triggering condition, and the second indication is used to indicate that the operation message does not meet the triggering condition.
[0220] For example, after step 460 and before step 480, the method further includes step 470:
[0221] Step 470: In response to detecting that the second action frame in the action frame sequence of the j-th storyline has a specified value, determine that the mini-program game data has been loaded.
[0222] In some embodiments, stopping the execution of the action frame sequence of the j-th storyline can also be achieved in several ways. For example, the method further includes step 520:
[0223] Step 520: In response to the execution of the end action frame, or in response to the plot content of the j-th storyline reaching the plot change stage, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline.
[0224] In some embodiments, step 510 is included before step 520:
[0225] Step 510: In response to the detection of a numerical change in the third action frame in the action frame sequence of the j-th storyline, determine that the plot content of the j-th storyline has reached the plot change stage.
[0226] In some embodiments, the complete plot content data structure (OperaDataStruct) includes: script name (name), creation time (data), action frame definition field (frameDefine), and story line definition field (storyLineDefine). The story line definition field includes: at least two story lines in an ordered sequence, story line identifiers for each of the at least two story lines, and an action frame sequence. The action frame sequence includes: at least two action frames in an ordered sequence, and each of the at least two action frames includes: an action frame identifier, at least one attribute, and at least one event. Each of the at least one event includes: an event name and a story line identifier of the story line to which it is bound.
[0227] In some embodiments, action frames can be of multiple types, and an action frame can be at least one of the following:
[0228] • Create a video component (createVideo); attributes include at least one of the following: top, bottom, left, right, visible, width, height, video resource address (url), whether to autoplay (autoplay), whether to play (playing), video scaling mode (objectFit), video jump to a specified number of seconds (seek), whether to loop (loop); events include at least one of the following: play to a specified number of seconds (onPlayTimeAt), video playback ends (onEnded), video playback starts (onPlay).
[0229] • Pause the video of the specified video component (pauseVideo); attributes include: the action frame identifier (video) of the specified video component to be paused; events include: pause (pause).
[0230] • Continue playing the video of the specified video component (playVideo); attributes include: the action frame identifier of the specified video component (video); events include: continue playing (play).
[0231] • Create an audio component (createAudio); attributes include at least one of the following: audio resource address (url), whether to autoplay (autoplay), whether to play (playing), video jump to a specified number of seconds (seek), whether to loop (loop), volume (volume); events include at least one of the following: play to a specified number of seconds (onPlayTimeAt), audio playback ends (onEnded), audio playback starts (onPlay).
[0232] • Pause the audio of the specified audio component (pauseAudio); attributes include: the action frame identifier (audio) of the specified video component to be paused; events include: pause (pause).
[0233] • Continue playing the audio of the specified audio component (playAudio); attributes include: the action frame identifier (audio) of the specified video component to be played; events include: continue playing (play).
[0234] • Create a texture component (createImage); attributes include at least one of the following: top, bottom, left, right, visible, width, height, opacity, local URL of the texture resource, scaleWidth, scaleHeight; events include: click on the texture (onClick).
[0235] • Create a rectangular area (createRect); attributes include at least one of the following: top, bottom, left, right, visible, width, height, and color description string; events include: click on the rectangular area (onClick).
[0236] • Create a delayed execution (setTimeout); the properties include at least one of the following: delay duration (timeout), cancellation status (cancel); the events include at least one of the following: delay end (onEnded), delayed active cancellation (onCancel).
[0237] • Create an animation function (creatAnimationFunction); properties include at least one of the following: the frame to which the animation is applied, duration, easing function, top, bottom, left, right, visible, width, height, opacity, scaleWidth, and scaleHeight; events include: animation end (onEnded).
[0238] • Global variables (var); properties include at least one of the following: value, global variable name (globalName); events include: the event triggered when a value is assigned (onChange), and the event triggered when a value is assigned and its value changes (onChanged).
[0239] • Set the attribute (setParam) of the specified action frame; the attribute includes at least one of the following: the action frame identifier (frame) of the specified action frame, the attribute name (param), and the new value (value).
[0240] • Conditional statement (if); Attributes include: the values of the two variables to be compared or the names of global variables (valueA, valueB); Events include at least one of the following: true (isTrue) or false (isFalse).
[0241] • End the story (end).
[0242] In some embodiments, the interactive operation is triggered when the action frame of the action frame sequence of the i-th storyline is executed. The first action frame is at least one of the following: creating a video component (createVideo), creating a texture component (createImage), creating a rectangular region (createRect), or creating an animation function (createAnimationFunction). In this embodiment, if the first action frame contains corresponding plot content and / or interactive elements, the user account can trigger the corresponding interactive operation.
[0243] It should also be noted that for the implementation examples and their effects in combination with application scenarios, please refer to the aforementioned implementation examples and their effects of the business loading method, which will not be repeated here.
[0244] Figure 9This is a block diagram of a service loading apparatus provided in an exemplary embodiment of this application. The service loading apparatus 800 includes at least some of the following modules: an execution module 820, a receiving module 840, and a startup module 860.
[0245] The execution module 820 is used to execute the action frame sequence of the i-th storyline during the loading of business data, so as to play the plot content of the i-th storyline, where i is greater than 0;
[0246] The receiving module 840 is used to receive the operation message corresponding to the interactive operation, wherein the interactive operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed;
[0247] The execution module 820 is further configured to, in response to the operation message satisfying the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, wherein the i-th storyline and the j-th storyline are different storylines, and j is greater than 0;
[0248] The startup module 860 is configured to, in response to the completion of the loading of the service data, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the service indicated by the service data.
[0249] In some embodiments, the execution module 820 is configured to:
[0250] In response to the operation message matching the first action frame, the action frame sequence of the j-th storyline bound to the first action frame is executed to play the plot content of the j-th storyline.
[0251] In some embodiments, the execution module 820 is configured to:
[0252] In response to the interaction event indicated by the operation message being one of at least one events defined in the first action frame, the action frame sequence of the j-th storyline bound to the interaction event in the first action frame is executed to play the plot content of the j-th storyline.
[0253] In some embodiments, the execution module 820 is further configured to:
[0254] In response to the operation message not meeting the trigger condition, the action frame sequence of the i-th storyline continues to be executed from the first action frame to continue playing the plot content of the i-th storyline.
[0255] In some embodiments, the receiving module 840 is configured to:
[0256] In response to the first action frame in the action frame sequence executed in the i-th storyline, a rendering instruction from the business side is invoked to display interactive elements in the plot content of the i-th storyline. The first action frame corresponds to the interactive elements in the plot content of the i-th storyline.
[0257] Obtain the operation message generated by the business terminal based on the interaction operation on the interactive element.
[0258] In some embodiments, the receiving module 840 is configured to:
[0259] In response to the first action frame in the action frame sequence executed in the i-th storyline, the rendering instruction is projected to the view layer, and the view layer calls the rendering instruction from the business side to render the interactive element in the plot content of the i-th storyline.
[0260] In some embodiments, the receiving module 840 is configured to:
[0261] The view layer obtains the operation message generated by the business terminal based on the interaction operation on the interactive element, and the view layer parses the operation message to generate a first indication or a second indication. The first indication is used to indicate that the operation message meets the triggering condition, and the second indication is used to indicate that the operation message does not meet the triggering condition.
[0262] In some embodiments, the startup module 860 is configured to:
[0263] In response to detecting that the second action frame in the action frame sequence of the j-th storyline has a specified value, it is determined that the service data has been loaded.
[0264] In some embodiments, the startup module 860 is further configured to:
[0265] In response to the execution of the final action frame, or in response to the plot content of the j-th storyline reaching a plot change stage, the execution of the action frame sequence of the j-th storyline is stopped, so as to stop playing the plot content of the j-th storyline.
[0266] In some embodiments, the startup module 860 is configured to:
[0267] In response to the detection of a numerical change in the third action frame in the action frame sequence of the j-th storyline, it is determined that the plot content of the j-th storyline has reached the plot change stage.
[0268] In some embodiments, the data structure of the plot content includes: script name, creation time, action frame definition field, and story line definition field. The story line definition field includes: at least two story lines that are connected in an ordered manner, a story line identifier for each of the at least two story lines, and an action frame sequence.
[0269] The action frame sequence includes: at least two action frames in an ordered sequence, each of the at least two action frames including: an action frame identifier, at least one attribute, and at least one event, each of the at least one event including: an event name and a storyline identifier of a storyline to which it is bound.
[0270] In some embodiments, the action frame is at least one of the following:
[0271] Create a video component; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, video resource address, whether to autoplay, whether playing, video zoom mode, video jump to a specified number of seconds, whether to loop; the events include at least one of the following: play to a specified number of seconds, video playback ends, video playback starts;
[0272] Pause the video of the specified video component; the attributes include: the action frame identifier of the specified video component to be paused; the event includes: pause;
[0273] Continue playing the video of the specified video component; the attributes include: the action frame identifier of the specified video component; the event includes: continue playing;
[0274] Create an audio component; the attributes include at least one of the following: audio resource address, whether to autoplay, whether to play, video jump to a specified number of seconds, whether to loop, and volume; the events include at least one of the following: playback reaches a specified number of seconds, audio playback ends, and audio playback begins.
[0275] Pause the audio of the specified audio component; the attributes include: the action frame identifier of the specified video component that needs to be paused; the event includes: pause;
[0276] Continue playing the audio from the specified audio component; the attributes include: the action frame identifier of the specified video component that needs to continue playing; the event includes: continue playing;
[0277] Create a texture component; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, transparency, local path of texture resource, width scaling factor, and height scaling factor; the events include: clicking the texture;
[0278] Create a rectangular area; the attributes include at least one of the following: top, bottom, left, right, visible, width, height, and a color description string; the event includes: clicking the rectangular area;
[0279] Create a delayed execution; the attributes include at least one of the following: delay duration, cancellation status; the events include at least one of the following: delay end, delay active cancellation;
[0280] Create an animation function; the attributes include at least one of the following: the action frame identifier on which the animation is applied, duration, curvature function, top, bottom, left, right, visible, width, height, transparency, width scaling factor, and height scaling factor; the event includes: animation end;
[0281] Create a global variable; the attribute includes at least one of the following: a value, a global variable name; the events include: an event triggered when a value is assigned, and an event triggered when a value is assigned and the value changes;
[0282] Set the properties of a specified action frame;
[0283] Conditional judgment;
[0284] End of story.
[0285] In some embodiments, the business data includes mini-program game data, and the business indicated by the business data includes mini-program games;
[0286] The execution module 820 is used to execute the action frame sequence of the i-th storyline during the loading of the mini-program game data, so as to play the plot content of the i-th storyline, where i is greater than 0;
[0287] The receiving module 840 is used to receive the operation message corresponding to the interaction operation, wherein the interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed;
[0288] The execution module 820 is further configured to, in response to the operation message satisfying the triggering condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, wherein the i-th storyline and the j-th storyline are different storylines, and j is greater than 0;
[0289] The startup module 860 is used to stop executing the action frame sequence of the j-th storyline in response to the completion of loading the mini-program game data, so as to stop playing the plot content of the j-th storyline, and to start the mini-program game.
[0290] It should be noted that the specific limitations of the one or more service loading devices 800 provided above can be found in the limitations of the service loading method above, and will not be repeated here. Each module of the above device can be implemented entirely or partially by software, hardware, or a combination thereof. Each module can be embedded in the processor of the computer device in hardware form or independent of the processor, or it can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0291] This application also provides a computer device, which includes: a processor and a memory, wherein the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the service loading method provided in the above method embodiments.
[0292] Figure 10 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application.
[0293] The computer device 1000 can be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), or MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 1000 may also be referred to as a user device, portable terminal, or other names.
[0294] Typically, computer device 1000 includes a processor 1001 and a memory 1002.
[0295] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0296] The memory 1002 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one instruction, which is executed by the processor 1001 to implement the service loading method provided in the various method embodiments of this application.
[0297] In some embodiments, the computer device 1000 may also optionally include: a peripheral device interface 1003 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1004, a touch display screen 1005, a camera 1006, an audio circuit 1007, and a power supply 1008.
[0298] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0299] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0300] The touch display screen 1005 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 1005 also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to the processor 1001 for processing. The touch display screen 1005 is used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one touch display screen 1005, located on the front panel of the computer device 1000; in other embodiments, there may be at least two touch display screens, respectively located on different surfaces of the computer device 1000 or in a folded design; in some embodiments, the touch display screen 1005 may be a flexible display screen, located on a curved or folded surface of the computer device 1000. Furthermore, the touch display screen 1005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The touch display screen 1005 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0301] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is used for video calls or selfies, and the rear-facing camera is used for taking photos or videos. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, and a wide-angle camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, and panoramic shooting and VR (Virtual Reality) shooting by fusion of the main camera and the wide-angle camera. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0302] Audio circuit 1007 provides an audio interface between the user and computer device 1000. Audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to processor 1001 for processing, or input to radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different location within computer device 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker converts electrical signals from processor 1001 or radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, audio circuit 1007 may also include a headphone jack.
[0303] Power supply 1008 is used to supply power to the various components in computer device 1000. Power supply 1008 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1008 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0304] In some embodiments, the computer device 1000 further includes one or more sensors 1009. The one or more sensors 1009 include, but are not limited to, an accelerometer 1010, a gyroscope 1011, a pressure sensor 1012, an optical sensor 1013, and a proximity sensor 1014.
[0305] Accelerometer 1010 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1000. For example, accelerometer 1010 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1001 can control touchscreen 1005 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1010. Accelerometer 1010 can also be used for games or for acquiring user motion data.
[0306] The gyroscope sensor 1011 can detect the orientation and rotation angle of the computer device 1000. The gyroscope sensor 1011 can work in conjunction with the accelerometer sensor 1010 to acquire the user's 3D movements on the computer device 1000. Based on the data acquired by the gyroscope sensor 1011, the processor 1001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0307] The pressure sensor 1012 can be disposed on the side bezel of the computer device 1000 and / or on the lower layer of the touch display screen 1005. When the pressure sensor 1012 is disposed on the side bezel of the computer device 1000, it can detect the user's grip signal on the computer device 1000 and perform left / right hand recognition or quick operation based on the grip signal. When the pressure sensor 1012 is disposed on the lower layer of the touch display screen 1005, it can control operable controls on the UI interface based on the user's pressure operation on the touch display screen 1005. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0308] An optical sensor 1013 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the touch screen 1005 based on the ambient light intensity collected by the optical sensor 1013. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 based on the ambient light intensity collected by the optical sensor 1013.
[0309] The proximity sensor 1014, also known as a distance sensor, is typically located on the front of the computer device 1000. The proximity sensor 1014 is used to detect the distance between the user and the front of the computer device 1000. In one embodiment, when the proximity sensor 1014 detects that the distance between the user and the front of the computer device 1000 is gradually decreasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-on state to a screen-off state; when the proximity sensor 1014 detects that the distance between the user and the front of the computer device 1000 is gradually increasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-off state to a screen-on state.
[0310] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0311] In an exemplary embodiment, this application also provides a chip, which includes programmable logic circuits and / or program instructions, and is used to implement the service loading method provided in the above method embodiments when the chip is running on a computer device.
[0312] This application also provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the service loading method provided in the above method embodiments.
[0313] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the processor of the computer device to load and execute the service loading method provided in the above-described method embodiments.
[0314] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0315] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0316] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0317] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A service loading method, characterized in that, The method includes: During the loading of business data, the action frame sequence of the i-th storyline is executed to play the plot content of the i-th storyline, where i is greater than 0; Receive the operation message corresponding to the interaction operation, wherein the interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed; In response to the operation message satisfying the trigger condition, the action frame sequence of the j-th storyline bound to the first action frame is executed to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0. In response to the completion of the loading of the service data, the execution of the action frame sequence of the j-th storyline is stopped to stop the playback of the plot content of the j-th storyline, and the service indicated by the service data is started.
2. The method according to claim 1, characterized in that, The response that the operation message meets the trigger condition, executing the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, includes: In response to the operation message matching the first action frame, the action frame sequence of the j-th storyline bound to the first action frame is executed to play the plot content of the j-th storyline.
3. The method according to claim 2, characterized in that, The response to the operation message matching the first action frame, executing the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, includes: In response to the interaction event indicated by the operation message being one of at least one events defined in the first action frame, the action frame sequence of the j-th storyline bound to the interaction event in the first action frame is executed to play the plot content of the j-th storyline.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to the operation message not meeting the trigger condition, the action frame sequence of the i-th storyline continues to be executed from the first action frame to continue playing the plot content of the i-th storyline.
5. The method according to any one of claims 1 to 3, characterized in that, The operation message corresponding to the received interactive operation includes: In response to the first action frame in the action frame sequence executed in the i-th storyline, a rendering instruction from the business side is invoked to display interactive elements in the plot content of the i-th storyline. The first action frame corresponds to the interactive elements in the plot content of the i-th storyline. Obtain the operation message generated by the business terminal based on the interaction operation on the interactive element.
6. The method according to claim 5, characterized in that, The step of responding to the first action frame in the action frame sequence executed in the i-th storyline by invoking rendering instructions from the business side to display interactive elements in the plot content of the i-th storyline includes: In response to the first action frame in the action frame sequence executed in the i-th storyline, the rendering instruction is projected to the view layer, and the view layer calls the rendering instruction from the business side to render the interactive element in the plot content of the i-th storyline.
7. The method according to claim 6, characterized in that, The step of obtaining the operation message generated by the business terminal based on the interaction operation on the interactive element includes: The view layer obtains the operation message generated by the business terminal based on the interaction operation on the interactive element, and the view layer parses the operation message to generate a first indication or a second indication. The first indication is used to indicate that the operation message meets the triggering condition, and the second indication is used to indicate that the operation message does not meet the triggering condition.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: In response to detecting that the second action frame in the action frame sequence of the j-th storyline has a specified value, it is determined that the service data has been loaded.
9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: In response to the execution of the final action frame, or in response to the plot content of the j-th storyline reaching a plot change stage, the execution of the action frame sequence of the j-th storyline is stopped, so as to stop playing the plot content of the j-th storyline.
10. The method according to claim 9, characterized in that, The method further includes: In response to the detection of a numerical change in the third action frame in the action frame sequence of the j-th storyline, it is determined that the plot content of the j-th storyline has reached the plot change stage.
11. The method according to any one of claims 1 to 10, characterized in that, The data structure of the plot content includes: script name, creation time, action frame definition field, and story line definition field. The story line definition field includes: at least two story lines that are connected in an ordered manner, the story line identifier of each of the at least two story lines, and the action frame sequence. The action frame sequence includes: at least two action frames in an ordered sequence, each of the at least two action frames including: an action frame identifier, at least one attribute, and at least one event, each of the at least one event including: an event name and a storyline identifier of a storyline to which it is bound.
12. The method according to any one of claims 1 to 11, characterized in that, The business data includes mini-program game data, and the business indicated by the business data includes mini-program games; The method further includes: During the loading of the mini-program game data, the action frame sequence of the i-th storyline is executed to play the plot content of the i-th storyline, where i is greater than 0; Receive the operation message corresponding to the interaction operation, wherein the interaction operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed; In response to the operation message satisfying the triggering condition, the action frame sequence of the j-th storyline bound to the first action frame is executed to play the plot content of the j-th storyline. The i-th storyline and the j-th storyline are different storylines, and j is greater than 0. In response to the completion of loading the mini-program game data, the execution of the action frame sequence of the j-th storyline is stopped to stop playing the plot content of the j-th storyline, and the mini-program game is launched.
13. A service loading device, characterized in that, The device includes: An execution module is used to execute the action frame sequence of the i-th storyline during the loading of business data, so as to play the plot content of the i-th storyline, where i is greater than 0; A receiving module is used to receive an operation message corresponding to an interactive operation, wherein the interactive operation is triggered when the first action frame in the action frame sequence of the i-th storyline is executed; The execution module is further configured to, in response to the operation message satisfying the trigger condition, execute the action frame sequence of the j-th storyline bound to the first action frame to play the plot content of the j-th storyline, wherein the i-th storyline and the j-th storyline are different storylines, and j is greater than 0; The startup module is configured to, in response to the completion of the loading of the service data, stop executing the action frame sequence of the j-th storyline to stop playing the plot content of the j-th storyline, and start the service indicated by the service data.
14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the service loading method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the service loading method as described in any one of claims 1 to 12.
16. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor retrieves the computer instructions from the computer-readable storage medium, causing the processor to load and execute them to implement the service loading method as described in any one of claims 1 to 12.