Submodule loading method and device, computer device, and storage medium
By acquiring business scenario information to load offline packages, parsing and rendering target entities, the problem of excessive resource consumption by game modules in non-game applications is solved, achieving smooth operation and improved user experience in different terminal environments.
Patent Information
- Application Number
- CN202211131034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-09-16
AI Technical Summary
When non-game applications load game modules, they consume excessive resources, causing the terminal environment to be unable to provide sufficient conditions, thus affecting the user experience.
By responding to user requests to obtain business scenario information, loading pre-defined offline packages for sub-modules, parsing target entities and rendering objects, and displaying objects according to the current scenario, offline packages are used for pre-loading and on-demand loading, saving resources.
It improves user experience, reduces resource consumption, and ensures smooth operation of game modules in different terminal environments.
Smart Images

Figure CN115454529B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of software development, and particularly relates to a sub-module loading method and device, computer equipment and a storage medium. BACKGROUND
[0002] In order to improve the user stickiness of an application program, some non-game application programs related to life and shopping also implant game modules, so that users can improve the participation and sense of belonging to the application program through games in the game module. However, compared with game application programs, the running resources that can be occupied by non-game application programs are usually limited, and the running environment also has various differences. For example, a mobile terminal running the non-game application program may be configured to be low, while the running of the game module needs to occupy a large amount of running resources. The terminal running the non-game application program cannot provide such a running condition. How to load the game module in the non-game application program and save the running resources becomes a problem to be solved. SUMMARY
[0003] The main purpose of the present application is to provide a sub-module loading method, device, equipment and computer storage medium, which aims to save the resources consumed by loading a sub-module including a target entity in an application program and improve the user experience of using the sub-module of the application program by the user.
[0004] In a first aspect, the present application provides a sub-module loading method, which comprises the following steps:
[0005] In response to a service request sent by a user based on an application program, obtaining service scenario information corresponding to the service request;
[0006] Loading a preset sub-module offline package based on the service scenario information, the sub-module offline package being used to realize the function of a corresponding sub-module;
[0007] Determining a target entity corresponding to a current scenario of the sub-module, and analyzing the target entity;
[0008] Loading the target entity after the analysis is completed, rendering the target entity, and creating an object according to the target entity after the loading is completed;
[0009] Displaying the object in the current scenario.
[0010] In a second aspect, the present application further provides a sub-module loading device, which comprises:
[0011] A service request response module, configured to obtain service scenario information corresponding to a service request sent by a user based on an application program in response to the service request;
[0012] An offline package loading module is configured to load a preset sub-module offline package based on the service scenario information, and the sub-module offline package is configured to implement the function of a corresponding sub-module.
[0013] A target entity determination module is configured to determine a target entity corresponding to a current scenario of the sub-module, and analyze the target entity.
[0014] An object creation module is configured to load the analyzed target entity, render the target entity, and create an object based on the loaded target entity.
[0015] An object display module is configured to display the object in the current scenario.
[0016] In a third aspect, the present application further provides a computer device, which comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the computer program is executed by the processor to implement the sub-module loading method.
[0017] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the sub-module loading method.
[0018] The present application provides a sub-module loading method, device, equipment and computer storage medium. The present application obtains service scenario information corresponding to a service request sent by a user based on an application program in response to the service request; loads a preset sub-module offline package based on the service scenario information, and the sub-module offline package is configured to implement the function of a corresponding sub-module; determines a target entity corresponding to a current scenario of the sub-module, and analyzes the target entity; loads the analyzed target entity, renders the target entity, and creates an object based on the loaded target entity; and displays the object in the current scenario. The present application saves the resources consumed by loading a sub-module including a target entity in an application program, and improves user experience. The present application preloads objects in a sub-module using an offline package, and loads target entities required by a current scenario, thereby saving the resources consumed by loading a sub-module including a target entity in an application program, and improving user experience. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0020] Figure 1 A flowchart of a sub-module loading method provided by an embodiment of the present application is shown in FIG. 1.
[0021] Figure 2 A use scenario diagram of a sub-module loading method provided by an embodiment of the present application is shown in FIG. 2.
[0022] Figure 3 A schematic block diagram of a sub-module loading device provided by an embodiment of the present application is shown in FIG. 3.
[0023] Figure 4 A structural schematic block diagram of a computer device related to an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0025] The flowchart shown in the drawings is only an example and does not necessarily include all the contents and operations / steps, nor does it necessarily need to be executed in the order described. For example, some operations / steps can be further decomposed, combined or partially merged, so the actual execution order may be changed according to the actual situation.
[0026] The embodiments of the present application provide a sub-module loading method, device, computer device and computer readable storage medium.
[0027] Some embodiments of the present application will be described in detail below with reference to the drawings. In the case of no conflict, the embodiments described below and the features in the embodiments can be combined with each other.
[0028] Please refer to Figure 1 , Figure 1A flowchart of a sub-module loading method provided by an embodiment of the present application is shown. The sub-module loading method can be used in a terminal or a server to save resources consumed by loading a sub-module including a target entity in an application program, and improve user experience of using a sub-module of the application program. The terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be a standalone server, a server cluster, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, etc.
[0029] Please refer to Figure 2 , Figure 2 A use scenario provided by an embodiment of the present application is shown. As shown in Figure 2 , an application program obtains a target entity in a sub-module offline package through a business request, so as to parse and render the target entity to obtain an object to be displayed by the sub-module of the application program. The sub-module offline package can be stored in a memory of a terminal where the application program is located, which is not limited herein.
[0030] As shown in Figure 1 , the sub-module loading method includes steps S101 to S105.
[0031] In step S101, in response to a business request sent by a user based on an application program, business scenario information corresponding to the business request is obtained.
[0032] For example, the application program is a non-game application program, and the application program includes at least one sub-module, which can be a game sub-module. Compared with existing game application programs, the running resources that can be occupied by a non-game application program are usually limited, and the terminal environment of a user running a non-game application program is also uneven. Using the sub-module loading method provided by the embodiment of the present application to load a game sub-module in a non-game application program can avoid the game sub-module in the non-game application program causing lag and affecting user experience.
[0033] For example, the function of the sub-module is implemented through a sub-module offline package, and the sub-module offline package is stored in a memory of a terminal running the application program.
[0034] Exemplarily, since different business scenarios of the application program correspond to different sub-modules, for example, different business scenarios correspond to different game sub-modules, it is necessary to determine the business scenario information corresponding to the current business scenario according to the business request sent by the user based on the application program, so as to load the corresponding sub-module offline package according to the business scenario information.
[0035] In step S102, a preset sub-module offline package is loaded based on the business scenario information, and the sub-module offline package is used to implement the function of the corresponding sub-module.
[0036] Exemplarily, since the sub-module offline package is stored in the memory of the terminal running the application program, the application program only needs to load the local sub-module offline package, without the need to obtain a large amount of information from the server, thereby reducing the interaction cost, reducing the waiting time of the user, and improving the smoothness of the user experience.
[0037] In some embodiments, the loading of the preset sub-module offline package based on the business scenario information comprises loading the preset sub-module offline package based on the business scenario information, wherein the sub-module comprises at least one entity, the entity comprises at least one component, the at least one component respectively corresponds to at least one task processing system, and the at least one task processing system implements the function of the entity corresponding to the component according to the component.
[0038] Exemplarily, the entity is used to generate an object in the current scenario, for example, a character or a prop in a game scenario.
[0039] Exemplarily, the component is used to represent the attribute possessed by each entity. For example, entity A has the attributes of movement, attack and damage, can move, attack other entities or be damaged by other entities, and therefore has a movement component, an attack component and a damage component; entity B only has the attribute of damage and can only be damaged by other entities but cannot attack other entities, and therefore only has a damage component.
[0040] Exemplarily, only data is included in the component, and the component is not used to implement the function, and the function of the entity corresponding to each component is implemented by the task processing system corresponding to each entity. Taking the attack attribute as an example, the attack task processing system can process the entity containing the attack component, and update the state of the entity according to the data of the attack component when the entity is attacked.
[0041] Exemplarily, the sub-module offline package architecture provided by the embodiments of the present application reduces the complexity of the sub-module code, makes the entities in the sub-module more flexible, and reduces the resources required to run the sub-module.
[0042] In some embodiments, the sub-module offline package is written based on a typescript language. The code written based on the typescript language can reduce the coupling of the sub-module code and facilitate the maintenance of the sub-module offline package.
[0043] In step S103, a target entity corresponding to the current scene of the sub-module is determined, and the target entity is parsed.
[0044] For example, the sub-module includes different game scenes, and a user can switch the game scenes according to operations on the terminal. Different game scenes include objects generated by different entities. By determining the target entity corresponding to the current scene, for example, a character or a prop that needs to be displayed in the current scene, the target entity required by the current scene is parsed on demand, rather than all entities in the offline package are parsed at one time. This reduces the running resources required by the terminal to parse the sub-module offline package and improves the user experience.
[0045] In some embodiments, the determination of the target entity corresponding to the current scene of the sub-module and the parsing of the target entity include: obtaining a scene label corresponding to the current scene; and determining at least one entity in the sub-module offline package as the target entity according to the scene label.
[0046] For example, the entities in the sub-module offline package include at least one preset entity label. The entity label is used to indicate a game scene corresponding to the entity, for example, to determine a game scene including the entity.
[0047] For example, when the target entity corresponding to the current scene is determined, the scene label of the current scene is obtained, the entity labels of the entities are matched according to the scene label, and the entity whose entity label matches the scene label of the current scene is determined as the target entity.
[0048] For example, the target entity of the current scene is determined by setting the scene label, the resource loading is realized on demand, and one entity can correspond to multiple entity labels, that is, one entity can be displayed in different game scenes, and the flexibility of sub-module loading is improved.
[0049] In step S104, the parsed target entity is loaded, the target entity is rendered, and an object is created according to the loaded target entity.
[0050] For example, after the target entity is parsed, an object displayed in the current scene is created according to the target entity.
[0051] For example, the entity loading, rendering, and object creation are parallel, the efficiency of sub-module loading is improved, and the fluency of the user visual experience is improved.
[0052] Step S105, displaying the object in the current scene.
[0053] In some embodiments, the displaying the object in the current scene comprises: obtaining configuration information of a terminal running the application program; determining a configuration level of the terminal according to the configuration information; and displaying the object in the current scene according to the configuration level.
[0054] For example, a terminal running a non-game program may have insufficient configuration to support the game sub-module. In order to prevent the user experience from being poor due to insufficient terminal configuration, the experience level is determined according to the configuration information of the terminal, so that the sub-module can run smoothly on terminals with different configurations.
[0055] For example, the application program can obtain the configuration information of the terminal, and determine the configuration level based on a preset configuration level determination rule according to the configuration information, so as to determine the experience level of the sub-module according to the configuration level. For example, the configuration level can be determined according to the running memory of the terminal. If the running memory of the terminal is greater than or equal to 8 GB, it is the first level, greater than or equal to 6 GB and less than 8 GB, it is the second level, and less than 6 GB, it is the third level. Of course, it is not limited to this, and the configuration level can also be determined according to other configuration parameters or in combination with multiple configuration parameters, which is not limited herein.
[0056] In some embodiments, the displaying the object in the current scene according to the configuration level comprises: determining a frame extraction frequency corresponding to the current scene according to the configuration level; and extracting frames of the current scene according to the frame extraction frequency.
[0057] For example, in the case of a low configuration level, appropriately reducing the frame rate of the current scene display can effectively save running resources and ensure normal operation of the sub-module.
[0058] For example, according to the correspondence between the configuration level and the frame extraction frame rate, the object and the current scene are displayed. For example, the frame of the terminal display with the first level configuration is not extracted, the frame of the terminal display with the second level configuration is extracted by 5%, and the frame of the terminal display with the third level configuration is extracted by 10%, so as to save resources without affecting the user's visual experience as much as possible.
[0059] In some embodiments, before the loading of the preset sub-module offline package based on the business scene information, the sub-module offline package is used to implement the function of the corresponding sub-module, further comprising: compressing the sub-module offline package according to the configuration level.
[0060] Exemplarily, for a terminal with a lower configuration level, resources can be saved by pre-compressing the offline package of the sub-module, such as displaying less detailed information in a game scene, appropriately reducing the definition of the game scene, and ensuring that resources are saved without affecting the visual experience of the user as much as possible.
[0061] Exemplarily, the compression degree corresponding to different configuration levels can be pre-set, which is not described herein.
[0062] In some embodiments, the sub-module loading method further includes releasing the processing thread corresponding to the task processing system when the task processing system completes a current task.
[0063] Exemplarily, the existing task processing system continuously occupies threads in the sub-module running device, and occupies a large amount of running resources. The technical solution provided in the embodiments of the present application saves the running resources of the sub-module by releasing the threads as soon as they are used, thereby improving the user experience.
[0064] Exemplarily, for a task processing system with a lower usage frequency, the corresponding processing thread can be released when the task processing system completes a current task. Specifically, the current task can be all tasks in the task queue of the task processing system, but is not limited thereto, which is not limited herein.
[0065] Exemplarily, the thread occupation mode of the task processing system can be pre-determined during development, such as pre-determining the thread occupation mode of each task processing system as continuous occupation or release as soon as used according to the usage frequency of each task processing system.
[0066] The sub-module loading method provided in the above embodiments can acquire business scene information corresponding to a business request sent by a user based on an application program in response to the business request; load a preset offline package of a sub-module based on the business scene information, the offline package of the sub-module being used to implement the function of the corresponding sub-module; determine a target entity corresponding to a current scene of the sub-module, analyze the target entity; load the analyzed target entity, render the target entity, create an object according to the loaded target entity; and display the object in the current scene. The offline package can be used to pre-load the object in the sub-module, and the target entity required by the current scene is loaded, thereby saving the resources consumed by loading the sub-module including the target entity in the application program, and improving the user experience.
[0067] Please refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a sub-module loading device according to an embodiment of the present application, which can be configured in a server or a terminal, and is used to execute the sub-module loading method described above.
[0068] As Figure 3As shown, the sub-module loading apparatus comprises a service request response module 110, an offline package loading module 120, a target entity determination module 130, an object creation module 140, and an object display module 150.
[0069] The service request response module 110 is configured to acquire service scenario information corresponding to a service request sent by a user based on an application in response to the service request.
[0070] The offline package loading module 120 is configured to load a preset sub-module offline package based on the service scenario information, the sub-module offline package being used to implement a function of a corresponding sub-module.
[0071] The target entity determination module 130 is configured to determine a target entity corresponding to a current scenario of the sub-module and analyze the target entity.
[0072] The object creation module 140 is configured to load the analyzed target entity, render the target entity, and create an object based on the loaded target entity.
[0073] The object display module 150 is configured to display the object in the current scenario.
[0074] The object display module 150 comprises a configuration information acquisition module, a configuration level determination module, and an object display sub-module.
[0075] The configuration information acquisition module is configured to acquire configuration information of a terminal running the application.
[0076] The configuration level determination module is configured to determine a configuration level of the terminal based on the configuration information.
[0077] The object display sub-module is configured to display the object in the current scenario based on the configuration level.
[0078] The object display sub-module comprises a frame extraction frequency determination module and a current scenario frame extraction module.
[0079] The frame extraction frequency determination module is configured to determine a frame extraction frequency corresponding to the current scenario based on the configuration level.
[0080] The current scenario frame extraction module is configured to extract frames of the current scenario based on the frame extraction frequency.
[0081] The sub-module loading apparatus further comprises an offline package compression module.
[0082] The offline package compression module is configured to compress the sub-module offline package based on the configuration level.
[0083] The offline package loading module 120 includes an offline package architecture module.
[0084] The offline package architecture module is configured to load a preset sub-module offline package based on the service scenario information, wherein the sub-module includes at least one entity, the entity includes at least one component, and the at least one component corresponds to at least one task processing system respectively, and the at least one task processing system implements the function of the entity corresponding to the component according to the component.
[0085] The sub-module loading device includes a processing thread management module.
[0086] The processing thread management module is configured to release a processing thread corresponding to a task processing system when the task processing system completes a current task.
[0087] The target entity determination module 130 includes a scenario label determination module and a target entity determination sub-module.
[0088] The scenario label determination module is configured to obtain a scenario label corresponding to the current scenario.
[0089] The target entity determination sub-module is configured to determine at least one entity in the sub-module offline package as the target entity according to the scenario label.
[0090] It should be noted that, for the convenience and brevity of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the foregoing method embodiments, and will not be described herein.
[0091] The method and device of the present application can be used in many general or special computing system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0092] The above-described method and device can be implemented as a computer program in the form of a computer program product, which can be executed in a computer, such as a computer readable storage medium.Figure 4 The computer device shown runs on.
[0093] Please refer to Figure 4 , Figure 4 The structural schematic block diagram of a computer device provided by the embodiment of the application. The computer device can be a server or a terminal.
[0094] As Figure 4 shown, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory can include a storage medium and an internal memory.
[0095] The storage medium can store an operating system and a computer program. The computer program includes program instructions which, when executed, can cause the processor to perform any one of the sub-module loading methods.
[0096] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
[0097] The internal memory provides an environment for the execution of the computer program in the storage medium, which, when executed by the processor, can cause the processor to perform any one of the sub-module loading methods.
[0098] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand Figure 4 that the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the application, and does not constitute a limitation on the computer device to which the scheme of the application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0100] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0101] In response to a service request sent by a user based on an application, obtain service scenario information corresponding to the service request;
[0102] Load a preset sub-module offline package based on the service scenario information, the sub-module offline package being used to implement a function of a corresponding sub-module;
[0103] Determine a target entity corresponding to the current scenario of the sub-module, and analyze the target entity;
[0104] Load the analyzed target entity, render the target entity, and create an object based on the loaded target entity;
[0105] Display the object in the current scenario.
[0106] In one embodiment, the processor, when implementing the displaying of the object in the current scenario, is configured to:
[0107] Obtain configuration information of a terminal running the application;
[0108] Determine a configuration level of the terminal based on the configuration information;
[0109] Display the object in the current scenario based on the configuration level.
[0110] In one embodiment, the processor, when implementing the displaying of the object in the current scenario based on the configuration level, is configured to:
[0111] Determine a frame extraction frequency corresponding to the current scenario based on the configuration level;
[0112] Extract frames of the current scenario based on the frame extraction frequency.
[0113] In one embodiment, the processor, before implementing the loading of the preset sub-module offline package based on the service scenario information, is further configured to:
[0114] Compress the sub-module offline package based on the configuration level.
[0115] In one embodiment, the processor, when implementing the loading of the preset sub-module offline package based on the service scenario information, is configured to:
[0116] Load a preset sub-module offline package based on the service scenario information, wherein the sub-module comprises at least one entity, the entity comprises at least one component, and the at least one component respectively corresponds to at least one task processing system, and the at least one task processing system implements the function of the entity corresponding to the component according to the component.
[0117] In one embodiment, the sub-module loading method is used to implement:
[0118] When the task processing system completes the current task, release the processing thread corresponding to the task processing system.
[0119] In one embodiment, when the processor implements the determining of the target entity corresponding to the current scenario of the sub-module and the parsing of the target entity, the processor is used to implement:
[0120] Obtain a scenario label corresponding to the current scenario;
[0121] According to the scenario label, determine that at least one entity in the sub-module offline package is the target entity.
[0122] It should be noted that, for the convenience and brevity of description, the above description of the specific working process of the sub-module loading can refer to the corresponding process in the foregoing sub-module loading control method embodiment, and will not be described here.
[0123] The embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the method implemented by the program instructions when executed can refer to each embodiment of the sub-module loading method of the present application.
[0124] The computer readable storage medium can be an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0125] It should be understood that the terms used herein in the specification are only for the purpose of describing particular embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, unless otherwise indicated by context, the singular forms "a," "an," and "the" are intended to include the plural forms as well.
[0126] It should also be understood that, in the specification and the appended claims, the terms "and / or" is used to mean one or more of the associated listed items, as well as any combination of any of the associated listed items. It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.
[0127] The above-mentioned embodiment serial numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A sub-module loading method, characterized by, The method comprises: in response to a user sending a service request based on an application, obtaining service scenario information corresponding to the service request; loading a preset sub-module offline package based on the service scenario information, the sub-module offline package being used to implement the function of a corresponding sub-module; determining a target entity corresponding to the current scenario of the sub-module, and analyzing the target entity; loading the target entity after the analysis is completed, rendering the target entity, and creating an object based on the loaded target entity; displaying the object in the current scenario; wherein the sub-module offline package is stored in the memory of a terminal running the application; the loading of the preset sub-module offline package based on the service scenario information comprises: loading a preset sub-module offline package based on the service scenario information, wherein the sub-module includes at least one entity, the entity includes at least one component, the at least one component corresponds to at least one task processing system respectively, and the at least one task processing system implements the function of the entity corresponding to the component according to the component; the entity is used to generate an object in the current scenario, and the object at least includes a character or a prop in a game scenario; the component is used to represent the attributes possessed by each entity, and the component at least includes a movement component, an attack component, and a damage component; the function of the entity corresponding to each component is implemented by the task processing system corresponding to each entity.
2. The sub-module loading method of claim 1, wherein, the displaying of the object in the current scenario comprises: obtaining configuration information of a terminal running the application; determining the configuration level of the terminal according to the configuration information; displaying the object in the current scenario according to the configuration level.
3. The sub-module loading method of claim 2, wherein, the displaying of the object in the current scenario according to the configuration level comprises: determining the frame extraction frequency corresponding to the current scenario according to the configuration level; frame extraction is performed on the current scenario according to the frame extraction frequency.
4. The sub-module loading method of claim 2, wherein, before the loading of the preset sub-module offline package based on the service scenario information, the sub-module offline package being used to implement the function of a corresponding sub-module, the method further comprises: compressing the sub-module offline package according to the configuration level.
5. The sub-module loading method of claim 1, wherein, the method further comprises: when a task processing system completes a current task, releasing the processing thread corresponding to the task processing system.
6. The sub-module loading method of claim 1, wherein, the determination of the target entity corresponding to the current scenario of the sub-module and the analysis of the target entity comprise: obtaining a scenario tag corresponding to the current scenario; determining at least one entity in the sub-module offline package as the target entity according to the scenario tag.
7. A sub-module loading device, characterized by, the sub-module loading device comprises: a service request response module, configured to obtain service scenario information corresponding to a service request sent by a user based on an application in response to the service request; an offline package loading module, configured to load a preset sub-module offline package based on the service scenario information, the sub-module offline package being used to implement the function of a corresponding sub-module; a target entity determination module, configured to determine a target entity corresponding to the current scenario of the sub-module, and analyze the target entity; An object creation module is configured to load the target entity after the target entity is parsed, render the target entity, and create an object based on the loaded target entity; An object display module is configured to display the object in the current scene; The sub-module offline package is stored in a memory of a terminal running the application program; The sub-module offline package is loaded based on the business scenario information, and the sub-module includes at least one entity, the entity includes at least one component, the at least one component corresponds to at least one task processing system, and the at least one task processing system implements a function of the entity corresponding to each component according to each component; The entity is configured to generate an object in the current scene, and the object includes at least one of a character or a prop in a game scene. The component is configured to represent an attribute possessed by each entity, and the component includes at least one of a movement component, an attack component, and a damage component. The function of the entity corresponding to each component is implemented by the task processing system corresponding to each entity. The computer device includes a processor, a memory, and a computer program stored on the memory and executable by the processor, and when the computer program is executed by the processor, the steps of the sub-module loading method in any one of claims 1 to 6 are implemented.
8. A computer device, comprising: The computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the sub-module loading method in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Resource allocation method based on cloud service, related device, equipment and system
CN111988392A
Virtual object detection method and device, and readable storage medium
CN112915539A