Data processing methods, apparatus, electronic devices and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-06
- Publication Date
- 2026-08-14
AI Technical Summary
[0021]本公开的第六方面实施例提出了一种芯片,该芯片包括一个或多个接口和一个或多个处理器;接口用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令,当处理器执行计算机指令时,使得电子设备执行本公开第一方面实施例中描述的方法。
Smart Images

Figure CN122570031A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, apparatus, electronic device and storage medium. Background Technology
[0002] In scenarios where multiple sub-applications need to run within a single application runtime environment, multiple sub-applications of the application can be loaded and run within the same application runtime environment, and multiple sub-applications share one application runtime environment. Summary of the Invention
[0003] This disclosure provides a data processing method, apparatus, electronic device, and storage medium to solve problems in the related art.
[0004] A first aspect of this disclosure provides a data processing method, the method comprising: In scenarios where multiple sub-applications need to run in a single-application runtime environment, multiple sub-applications of the application are identified in response to application startup; During the operation of multiple sub-applications, state isolation is performed on the multiple sub-applications.
[0005] In some embodiments, state isolation of multiple sub-applications includes: Identify the identification information corresponding to each of the multiple sub-applications, and determine the isolated storage area corresponding to the identification information; the identification information is created during the application startup process, and the isolated storage area is created during the application startup process. Based on the identification information, the state data generated by multiple sub-applications during operation are stored in the corresponding isolated storage areas.
[0006] In some embodiments, the method further includes: Retrieve the state attributes of multiple sub-applications; Determine the dependencies between multiple sub-applications based on their state attributes; Update the state properties of multiple sub-applications based on dependencies.
[0007] In some embodiments, determining the dependencies between multiple sub-applications based on their state attributes includes: Determine the changes in the state attributes of multiple sub-applications during runtime; Based on the changes in the state attributes of multiple sub-applications during operation, determine the dependencies between state attributes. Determine the dependencies between multiple sub-applications based on the changes in dependencies.
[0008] In some embodiments, updating the state attributes of multiple sub-applications based on dependencies includes: Identify the dependent sub-applications and their corresponding dependent sub-applications in the dependency relationship; the state attributes of the dependent sub-applications change as the state attributes of the dependent application change; In response to changes in the state attributes of the dependent sub-application, the state attributes of the dependent sub-application are adjusted accordingly.
[0009] In some embodiments, the method further includes: Get the runtime load of multiple sub-applications; Adjust the storage amount of the isolated storage area corresponding to each of the multiple sub-applications according to the operating load; the operating load and the storage amount are positively correlated.
[0010] In some embodiments, the method includes: Determine the utilization of dependencies between multiple sub-applications; Based on utilization, dependencies between multiple sub-applications are reduced.
[0011] A second aspect of this disclosure provides a data processing apparatus, comprising: The determination unit is used to determine multiple sub-applications of an application in response to application startup, in scenarios where there are multiple sub-applications running in a single application runtime environment. An isolation unit is used to isolate the state of multiple sub-applications during their operation.
[0012] In some embodiments, the isolation unit includes: The determination module is used to determine the identification information corresponding to each of the multiple sub-applications, and to determine the isolated storage area corresponding to the identification information; the identification information is created during the application startup process, and the isolated storage area is created during the application startup process. The storage module is used to store the state data generated by multiple sub-applications during operation in corresponding isolated storage areas based on the identification information.
[0013] In some embodiments, the apparatus further includes: The acquisition unit is used to acquire the status attributes of multiple sub-applications; The determining unit is also used to determine the dependencies between multiple sub-applications based on the state attributes of multiple sub-applications; The update unit is used to update the state properties of multiple sub-applications based on dependencies.
[0014] In some embodiments, the determining unit is further configured to: Determine the changes in the state attributes of multiple sub-applications during runtime; Based on the changes in the state attributes of multiple sub-applications during operation, determine the dependencies between state attributes. Determine the dependencies between multiple sub-applications based on the changes in dependencies.
[0015] In some embodiments, the updating unit is further configured to: Identify the dependent sub-applications and their corresponding dependent sub-applications in the dependency relationship; the state attributes of the dependent sub-applications change as the state attributes of the dependent application change; In response to changes in the state attributes of the dependent sub-application, the state attributes of the dependent sub-application are adjusted accordingly.
[0016] In some embodiments, the apparatus further includes: The acquisition unit is also used to acquire the runtime load of multiple sub-applications; The adjustment unit is used to adjust the storage amount of the isolated storage area corresponding to each of the multiple sub-applications according to the operating load; the operating load and the storage amount are positively correlated.
[0017] In some embodiments, the apparatus includes: The determination unit is also used to determine the utilization of dependencies between multiple sub-applications; The processing unit is used to reduce the dependencies between multiple sub-applications based on utilization.
[0018] A third aspect of this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the first aspect of this disclosure.
[0019] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium that, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform the methods described in the first aspect of this disclosure.
[0020] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in the embodiments of the first aspect of this disclosure.
[0021] A sixth aspect of this disclosure provides a chip including one or more interfaces and one or more processors; the interfaces are configured to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processors, cause the electronic device to perform the methods described in the first aspect of this disclosure.
[0022] In summary, the data processing method proposed in this disclosure includes, in scenarios where multiple sub-applications require operation in a single application runtime environment, identifying multiple sub-applications in response to application startup; and isolating the states of these multiple sub-applications during their operation. This state isolation for multiple sub-applications in scenarios where multiple sub-applications require operation in a single application runtime environment reduces mutual interference between the states of multiple sub-applications within the same application runtime environment.
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0025] Figure 1 A flowchart of a data processing method provided in an embodiment of this disclosure; Figure 2 A flowchart illustrating the entire data processing process provided in this embodiment of the disclosure; Figure 3 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of another data processing apparatus provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. Detailed Implementation
[0026] Some embodiments of this disclosure will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. Various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a particular order. Furthermore, for clarity and brevity, descriptions of features known in the art may be omitted.
[0027] The embodiments described in the following examples of this disclosure are not representative of all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0028] In scenarios where multiple sub-applications need to run within a single application runtime environment, multiple sub-applications of the application can be loaded and run within the same application runtime environment, and multiple sub-applications share one application runtime environment.
[0029] Therefore, to address the problems existing in related technologies, this disclosure proposes a data processing method. This method includes, in scenarios where multiple sub-applications require operation in a single-application runtime environment, identifying multiple sub-applications in response to application startup; and isolating the states of these multiple sub-applications during their operation. Isolating the states of multiple sub-applications in scenarios where multiple sub-applications require operation in a single-application runtime environment reduces mutual interference between the states of multiple sub-applications within the same application runtime environment.
[0030] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.
[0031] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0032] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure.
[0033] In this embodiment of the disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the aforementioned," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression.
[0034] In some embodiments, the terms “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “if…”, “if…”, etc., can be used interchangeably.
[0035] In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”.
[0036] The prefixes such as "first" and "second" in the embodiments of this disclosure are only for distinguishing different descriptive objects and do not constitute restrictions on the position, order, priority, number or content of the descriptive objects. For the description of the descriptive objects, please refer to the description in the claims or the context of the embodiments. The use of prefixes should not constitute unnecessary restrictions.
[0037] In the embodiments of this disclosure, "multiple" refers to two or more.
[0038] In the embodiments disclosed herein, terms such as “import”, “input”, and “read in” can be used interchangeably.
[0039] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.
[0040] In some embodiments, the collection, storage, use, processing, transmission, provision, and application of user personal information as described in this disclosure comply with relevant laws and regulations and do not violate public order and good morals. It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should be conducted only after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notification and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0041] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this disclosure. This method can be applied to application scenarios such as smart terminals, for example, executed by a terminal with integrated data processing functions or a processor within a terminal, or executed by other devices suitable for data processing; this disclosure does not limit its application. Figure 1 As shown, the data processing method includes steps S101-S102.
[0042] Step S101: In a scenario where there is a need to run multiple sub-applications in a single application runtime environment, in response to application startup, determine the multiple sub-applications of the application.
[0043] In the embodiments of this disclosure, a single-application runtime environment can be an independent application runtime container. This environment can provide the necessary runtime resources for multiple sub-applications within the application, where runtime resources can be RAM. The runtime requirements of the multiple sub-applications can be multiple functional modules that need to run simultaneously or sequentially, with different sub-applications corresponding to different functions. Applications include, but are not limited to, websites, e-commerce platforms, and applications (APPs). Sub-applications can be modules (bundles). Multiple sub-applications of an application can be determined based on a pre-defined list of sub-applications. However, it should be clarified that this is not intended to limit the determination of sub-applications to the above method; other methods can also be used. By determining sub-applications during application startup, the necessary runtime resources can be allocated to them, improving application runtime efficiency.
[0044] Step S102: During the operation of multiple sub-applications, state isolation is performed on the multiple sub-applications.
[0045] In the embodiments of this disclosure, state isolation ensures that the state data generated by each sub-application during the operation of multiple sub-applications are independent and do not interfere with each other. This state data includes, but is not limited to, operating parameters, user operation records, and function execution results. State isolation can reduce the impact of anomalies in one sub-application on other sub-applications.
[0046] In summary, the data processing method proposed in this disclosure includes, in scenarios where multiple sub-applications require operation in a single application runtime environment, identifying multiple sub-applications in response to application startup; and isolating the states of these multiple sub-applications during their operation. This state isolation for multiple sub-applications in scenarios where multiple sub-applications require operation in a single application runtime environment reduces mutual interference between the states of multiple sub-applications within the same application runtime environment.
[0047] For example, when performing state isolation for multiple sub-applications, the following methods can be used, but are not limited to: determining the identification information corresponding to each of the multiple sub-applications, and determining the isolation storage area corresponding to the identification information; the identification information is created during the application startup process, and the isolation storage area is created during the application startup process; based on the identification information, the state data generated by the multiple sub-applications during operation is stored in the corresponding isolation storage area.
[0048] In the embodiments of this disclosure, the identification information can be a hash identifier, which can be assigned to each sub-application using a hash algorithm. The isolated storage area can be a hash table, which can be assigned to each sub-application using a hash algorithm. The storage space of each hash table can be the same or different. However, it should be clarified that this statement is not intended to limit the identification information to hash identifiers; it can also be other identification information, and the isolated storage area can be a hash table or other isolated storage areas. The one-to-one correspondence between the identification information and the isolated storage area allows the state data generated by the sub-application to be stored according to the corresponding identification information, improving the accuracy of isolation between state data.
[0049] In practical applications, the updating of the state attributes of sub-applications can be achieved in, but is not limited to, the following ways: obtaining the state attributes of multiple sub-applications; determining the dependencies between multiple sub-applications based on their state attributes; and updating the state attributes of multiple sub-applications based on their dependencies.
[0050] In the embodiments of this disclosure, state attributes can be feature quantities describing the running status of sub-applications, and state attributes can be numerical attributes. Dependencies can be causal relationships between multiple state attributes, that is, a change in one state attribute will cause a change in one or more other state attributes. Updating multiple state attributes based on dependencies achieves synchronous adjustment of multiple state attributes, improving the coordination of multi-sub-application operation.
[0051] For example, when determining the dependencies between multiple sub-applications based on their state attributes, the following methods can be used, but are not limited to: determining the changes in the state attributes of the multiple sub-applications during operation; determining the change dependencies between the state attributes based on the changes in the state attributes of the multiple sub-applications during operation; and determining the dependencies between the multiple sub-applications based on the change dependencies.
[0052] In the embodiments of this disclosure, the state attribute change information can be a set of records showing that the state attributes of a sub-application change over time during its operation. The state attribute change information includes the time point of the change, the state attribute value before the change, and the state attribute value after the change. The change dependency relationship can be a temporal relationship between state attribute changes, i.e., the time interval between changes in two state attributes is less than a preset time threshold, and the number of times the two state attributes undergo the same change is greater than a preset number threshold. The dependency relationship can be represented in the form of a graph, which includes nodes and edges, where nodes can be state attributes and edges can be the directions of the dependency relationship. Determining the change dependency relationship based on the state attribute change information clarifies the association between different state attribute changes. Inferring the dependency relationship between state attributes from the change dependency relationship can improve the accuracy of dependency relationship determination.
[0053] For example, when updating the state properties of multiple sub-applications based on dependencies, the following methods can be used, but are not limited to: determining the dependent sub-applications and their corresponding dependent sub-applications in the dependency relationship; changing the state properties of the dependent sub-applications as the state properties of the dependent sub-applications change; and adjusting the state properties of the dependent sub-applications in response to changes in the state properties of the dependent sub-applications.
[0054] In the embodiments of this disclosure, for ease of understanding, an example is provided. Assume there are two sub-applications, a and b, where a is the dependent sub-application and b is the dependent sub-application. The state attributes of a include A and B, and the state attributes of b include C and D. The state attribute of a changes from A to B, and the state attribute of b changes from C to D. When a change in the state attribute of a from A to B is detected, the state attribute of B is changed from C to D. Adjusting the state attribute changes of the dependent sub-application based on the specific state attribute changes of the dependent sub-application makes the adjustment process targeted, reduces unnecessary state attribute adjustments, and thus reduces resource consumption.
[0055] In practical applications, the storage capacity of isolated storage areas can be adjusted in the following ways, but not limited to: obtaining the operating load of multiple sub-applications; adjusting the storage capacity of the isolated storage areas corresponding to each of the multiple sub-applications based on the operating load; and the operating load and storage capacity are positively correlated.
[0056] In the embodiments of this disclosure, the storage amount is adjusted according to the operating load, and the operating load and the storage amount are positively correlated, so that the storage amount of the isolated storage area matches the actual operating needs of the sub-application. This reduces the loss of state data caused by insufficient storage when the operating load is high, and also reduces the waste of storage space caused by excessive storage when the operating load is low.
[0057] In practical applications, dependency adjustments can be achieved in ways that are not limited to the following: determining the utilization rate of dependencies between multiple sub-applications; and reducing dependencies between multiple sub-applications based on the utilization rate.
[0058] In the embodiments of this disclosure, dependencies whose utilization rate is less than a preset utilization rate threshold within a preset period can be deleted. Dependencies can be deleted based on utilization rate, which can remove useless dependencies and reduce the resource consumption of monitoring dependencies during the operation of sub-applications.
[0059] In the embodiments of this disclosure, in order to facilitate a better understanding of the entire data processing process, based on Figure 1 The embodiment shown, Figure 2This flowchart illustrates the entire data processing process provided in this embodiment. After the app loads the bundle file through a single instance (in a scenario where multiple sub-applications exist within a single application runtime environment), a unique identifier (id) is generated as the data state isolation key for the current result card (i.e., the sub-application). Simultaneously, the current card subscribes to the state corresponding to the id. Multiple bundles are isolated using unique id identifiers after loading. When the state store data is updated, a caching algorithm accurately retrieves the dependent attributes, and a broadcast mode precisely notifies the dependent modules of the update. The caching algorithm uses attribute getters to accurately trigger subscriber updates by checking if the corresponding attribute value has been updated. Upon application startup, a unique hash identifier is assigned to each bundle, and an independent hash table is created based on this identifier to store the bundle's state data. The hash table design ensures that the state data of different bundles are physically isolated, avoiding state pollution. A hash algorithm is used to generate unique identifiers for the bundles, and the hash table structure is initialized. The hash table uses chaining to handle collisions, ensuring fast access to state data. It solves the problem of incomplete state isolation in multi-bundle reuse scenarios and avoids mutual interference of state data between different bundles.
[0060] In the embodiments of this disclosure, during application runtime, the state changes of each bundle are monitored in real time, and a dependency graph is constructed. The dependency graph uses nodes to represent state attributes and edges to represent dependencies between attributes. By analyzing the dependency graph, it can be determined which state attribute changes will trigger updates to other attributes.
[0061] A depth-first search (DFS) algorithm is used to traverse state attributes and construct a dependency graph. The dependency graph is stored in the form of an adjacency list for easy subsequent dependency analysis. This solves the problem of inaccurate dependency updates; the dependency graph can accurately identify the state attributes that need to be updated, avoiding unnecessary state updates.
[0062] In the embodiments of this disclosure, when a state attribute changes, other state attributes that need to be updated are determined based on the dependency graph, and only these attributes are updated. The update process is implemented using a publish-subscribe pattern to ensure accurate delivery of change notifications. In the publish-subscribe pattern, when a state attribute changes, the publisher sends a change notification, and the subscriber subscribes to the changes of related attributes according to the dependency graph. The update process uses a batch processing mechanism to reduce unnecessary computation and network overhead. This solves the problem of low efficiency in dependency updates, minimizes unnecessary state updates through precise dependency updates, and improves the performance of the front-end application.
[0063] In the embodiments of this disclosure, performance metrics and resource usage are continuously monitored during method execution, and optimizations are made based on the monitoring results. Optimization measures include dynamically adjusting the hash table size and optimizing the storage structure of the dependency graph. Performance monitoring tools are used to collect performance data in real time, and dynamic adjustments are made based on data feedback. A gradual optimization strategy is adopted to ensure a smooth transition during the optimization process. This solves the problem of improper resource management, ensuring efficient operation of the front-end application and efficient resource utilization through dynamic optimization. It also resolves the problem of mutual interference between state data of different bundles, ensuring that cards in multiple result replies do not affect each other. It guarantees the stability of multi-card replies on the page without hijacking all attributes, avoiding listening to all attributes. By using dependency subscription to obtain only the values of the corresponding attributes, application performance is improved.
[0064] Corresponding to the data processing method described above, the present invention also proposes a data processing apparatus. Since the apparatus embodiments of the present invention correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to in the method embodiments described above, and will not be repeated here.
[0065] Figure 3 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure. The data processing apparatus includes: The determining unit 41 is used to determine multiple sub-applications of an application in response to application startup in a scenario where there is a need to run multiple sub-applications in a single application runtime environment. Isolation unit 42 is used to isolate the state of multiple sub-applications during their operation.
[0066] In summary, according to the data processing apparatus proposed in this disclosure, the apparatus includes, in a scenario where there is a need to run multiple sub-applications in a single application runtime environment, determining multiple sub-applications of the application in response to application startup; and isolating the states of the multiple sub-applications during their operation. Isolating the states of multiple sub-applications in a scenario where there is a need to run multiple sub-applications in a single application runtime environment reduces mutual interference between the states of multiple sub-applications in the same application runtime environment.
[0067] In one possible implementation of this disclosure, the isolation unit 42 includes: The determination module 421 is used to determine the identification information corresponding to each of the multiple sub-applications, and to determine the isolated storage area corresponding to the identification information; the identification information is created during the application startup process, and the isolated storage area is created during the application startup process. Storage module 422 is used to store the state data generated by multiple sub-applications during operation in corresponding isolated storage areas according to the identification information.
[0068] In one possible implementation of the embodiments of this disclosure, such as Figure 4 As shown, the device also includes: Acquisition unit 43 is used to acquire the status attributes of multiple sub-applications; The determining unit 41 is also used to determine the dependency relationship between multiple sub-applications based on the state attributes of multiple sub-applications; Update unit 44 is used to update the state attributes of multiple sub-applications based on dependencies.
[0069] In one possible implementation of this disclosure, the determining unit 41 is further configured to: Determine the changes in the state attributes of multiple sub-applications during runtime; Based on the changes in the state attributes of multiple sub-applications during operation, determine the dependencies between state attributes. Determine the dependencies between multiple sub-applications based on the changes in dependencies.
[0070] In one possible implementation of this disclosure, the updating unit 44 is further configured to: Identify the dependent sub-applications and their corresponding dependent sub-applications in the dependency relationship; the state attributes of the dependent sub-applications change as the state attributes of the dependent application change; In response to changes in the state attributes of the dependent sub-application, the state attributes of the dependent sub-application are adjusted accordingly.
[0071] In one possible implementation of the embodiments of this disclosure, such as Figure 4 As shown, the device also includes: The acquisition unit 43 is also used to acquire the running load of multiple sub-applications; Adjustment unit 45 is used to adjust the storage amount of the isolated storage area corresponding to each of the multiple sub-applications according to the operating load; the operating load is positively correlated with the storage amount.
[0072] In one possible implementation of the embodiments of this disclosure, such as Figure 4 As shown, the device includes: The determining unit 41 is also used to determine the utilization rate of dependencies between multiple sub-applications; Processing unit 46 is used to reduce the dependencies between multiple sub-applications based on utilization.
[0073] Since the apparatus provided in this embodiment corresponds to the methods provided in the above embodiments, the implementation of the methods is also applicable to the apparatus provided in this embodiment, and will not be described in detail in this embodiment.
[0074] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.
[0075] Figure 5 This is a block diagram illustrating an electronic device 500 for implementing the above-described data processing method according to an exemplary embodiment. For example, the electronic device 500 may be applied to servers, cloud environments, operational service platforms, various computer platforms, terminal systems, and web page systems.
[0076] Reference Figure 5 The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0077] Processing component 502 typically controls the overall operation of electronic device 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0078] Memory 504 is configured to store various types of data to support the operation of electronic device 500. Examples of this data include instructions for any application or method operating on electronic device 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0079] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0080] Multimedia component 508 includes a screen that provides an output interface between electronic device 500 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When electronic device 500 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0081] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0082] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0083] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or a component of electronic device 500, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0084] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio), or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0085] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0086] Embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in the above embodiments of this disclosure.
[0087] Embodiments of this disclosure also provide a computer program product comprising a computer program executable by a programmable device, the computer program having, when executed by the programmable device, the method described in the above embodiments of this disclosure.
[0088] For cases where electronic devices can be chips or chip systems, see [link to relevant documentation]. Figure 6 The diagram shows the structure of the chip. Figure 6 The chip shown includes a processor 601 and an interface 602. There can be one or more processors 601, and multiple interfaces 602.
[0089] Optionally, the chip also includes a memory 603 for storing necessary computer programs and data.
[0090] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.
[0091] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0092] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0093] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0094] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0095] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0096] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0097] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0098] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A data processing method, characterized in that, The method includes: In a scenario where there is a need to run multiple sub-applications in a single-application runtime environment, multiple sub-applications of the application are determined in response to application startup; During the operation of the multiple sub-applications, state isolation is performed on the multiple sub-applications.
2. The method according to claim 1, characterized in that, The state isolation of the multiple sub-applications includes: The identification information corresponding to each of the multiple sub-applications is determined, and the isolated storage area corresponding to the identification information is determined; the identification information is created during the application startup process, and the isolated storage area is created during the application startup process. Based on the identification information, the state data generated by the multiple sub-applications during operation are stored in the corresponding isolated storage areas.
3. The method according to claim 1, characterized in that, The method further includes: Obtain the status attributes of the multiple sub-applications; The dependencies between the multiple sub-applications are determined based on their state attributes. The state attributes of the multiple sub-applications are updated based on the dependencies.
4. The method according to claim 3, characterized in that, Determining the dependencies between the multiple sub-applications based on their state attributes includes: Determine the changes in the state attributes of the multiple sub-applications during their operation; Based on the changes in the state attributes of the multiple sub-applications during operation, determine the change dependencies between the state attributes; Based on the changes in dependencies, the dependencies between the multiple sub-applications are determined.
5. The method according to claim 3, characterized in that, The step of updating the state attributes of the multiple sub-applications according to the dependency relationship includes: Identify the dependent sub-applications and their corresponding dependent sub-applications in the dependency relationship; the state attributes of the dependent sub-applications change as the state attributes of the dependent application change; In response to changes in the state attributes of the dependent sub-application, the state attributes of the dependent sub-application are adjusted accordingly.
6. The method according to claim 2, characterized in that, The method further includes: Obtain the runtime load of the multiple sub-applications; Based on the operating load, the storage amount of the isolated storage area corresponding to each of the multiple sub-applications is adjusted; the operating load is positively correlated with the storage amount.
7. The method according to claim 4, characterized in that, The method includes: Determine the utilization rate of the dependencies between the multiple sub-applications; Based on the utilization rate, the dependencies between the multiple sub-applications are reduced.
8. A data processing apparatus, characterized in that, The device includes: The determining unit is used to determine multiple sub-applications of an application in response to application startup, in a scenario where there is a need to run multiple sub-applications in a single application runtime environment. An isolation unit is used to isolate the states of the multiple sub-applications during their operation.
9. The apparatus according to claim 8, characterized in that, The isolation unit includes: The determination module is used to determine the identification information corresponding to each of the plurality of sub-applications, and to determine the isolated storage area corresponding to the identification information; the identification information is created during the application startup process, and the isolated storage area is created during the application startup process; The storage module is used to store the state data generated by the multiple sub-applications during operation in the corresponding isolated storage area according to the identification information.
10. The apparatus according to claim 8, characterized in that, The device further includes: The acquisition unit is used to acquire the status attributes of the multiple sub-applications; The determining unit is further configured to determine the dependency relationship between the multiple sub-applications based on the state attributes of the multiple sub-applications; The update unit is used to update the state attributes of the multiple sub-applications according to the dependencies.
11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
12. A computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
13. A program product, characterized in that, Includes computer instructions for causing a computer to perform the method of any one of claims 1-7.