Mini-program data management method, device, computer equipment, and storage medium
By performing page monitoring of the applet and modular processing of Redux data, the complexity and concurrency of the applet data management are solved, and unified data management and rapid rendering are realized in a multi-page environment.
Patent Information
- Application Number
- CN202011431704.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-09
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-12-09
AI Technical Summary
The data management method of existing applets leads to high data complexity and uncontrollable concurrency problems when multiple pages are obtained and operated simultaneously.
By listening to each page of the applet, using Redux to perform data modular processing, data update processing is performed in the corresponding data module when data is updated, avoiding simultaneous calls of global fields, and using overlay and fusion data update methods. And synchronously update data on the associated page.
Reduces data complexity, avoids uncontrollable concurrency problems, and ensures the uniformity of multi-page data and the rapid rendering and display of pages.
Smart Images

Figure CN112416410B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mini-program technology, and in particular to a data management method, apparatus, computer device and storage medium for mini-programs. Background Art
[0002] With the development of computer technology, mini programs have emerged. Mini programs are applications that can be used without downloading and installing, such as WeChat mini programs. Since a mini program has only one APP (Application) instance and is shared by all pages, the existing data management for mini programs usually uses a global field to store global data.
[0003] However, this method of storing global data in global fields not only has high data complexity, but also easily causes uncontrollable concurrency problems when multiple pages simultaneously obtain and operate instances. Summary of the invention
[0004] Based on this, it is necessary to provide a data management method, device, computer equipment and storage medium for small programs that can reduce data complexity and avoid uncontrollable concurrency problems in response to the above technical problems.
[0005] A data management method for a small program, the method comprising:
[0006] Perform page monitoring on each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux;
[0007] When it is determined through monitoring that data update occurs on the mini-program page, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
[0008] In one embodiment, when monitoring determines that data update occurs on the mini-program page, data update processing is performed in a data module corresponding to the mini-program page where data update occurs, including:
[0009] When monitoring determines that data update occurs on the mini-program page, obtaining a module identifier of a data module corresponding to the mini-program page where data update occurs;
[0010] According to the module identifier, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
[0011] In one embodiment, performing data update processing in a data module corresponding to the mini-program page where data update occurs according to the module identifier includes:
[0012] Call the data update method;
[0013] The module identifier is passed as an object into the called data update method, and the data update is completed in the data module corresponding to the mini-program page where the data update occurs through the data update method.
[0014] In one embodiment, after performing data update processing in the data module corresponding to the mini-program page where data update occurs, the method further includes:
[0015] In addition to the mini program page where data update currently occurs, determine other mini program pages associated with the data where data update occurs, and obtain associated mini program pages;
[0016] Synchronously, data update processing is performed in the data module corresponding to the associated mini-program page.
[0017] In one embodiment, after performing the data update process, the method further includes:
[0018] Obtain the updated mini program page data from the data module where the data update process occurs;
[0019] Removing pure field data from the mini program page data to obtain data to be rendered;
[0020] The interface is rendered and displayed according to the data to be rendered, and the mini-program page with updated data is updated.
[0021] In one embodiment, removing pure field data from the mini-program page data to obtain data to be rendered includes:
[0022] Using a pure data regular expression, querying the data carrying a pure data identifier in the mini program page data; the pure data regular expression is specified in the mini program page constructor;
[0023] The data carrying the pure data identifier is removed from the mini-program page data to obtain the data to be rendered.
[0024] In one of the embodiments, the data updating method includes an overlay data updating method and a fusion data updating method;
[0025] When the data update is data overwriting, calling the overwriting type data update method;
[0026] When the data update is data fusion, the fusion data update method is called.
[0027] A data management device for a small program, the device comprising:
[0028] A monitoring module is used to monitor each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux;
[0029] The data update module is used to perform data update processing in the data module corresponding to the mini-program page where the data update occurs when it is determined through monitoring that the mini-program page has data update.
[0030] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-mentioned methods for managing data of a small program when executing the computer program.
[0031] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the data management method for a mini-program described in any one of the above items.
[0032] The above-mentioned mini-program data management method, device, computer equipment and storage medium perform page monitoring on each mini-program page of the mini-program respectively. Since each mini-program page performs data modularization based on redux and includes its own corresponding data module, when the data of the mini-program page is updated, data update processing is performed in the data module corresponding to the updated mini-program page, thereby managing the data of each mini-program page in different data modules. This not only reduces data complexity, but also can process them separately in their respective data modules when multiple pages simultaneously obtain and operate instances, thereby avoiding simultaneous calls to global fields and avoiding uncontrollable concurrency problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 An application environment diagram of a data management method for a small program in an embodiment;
[0034] Figure 2 A schematic diagram of a flow chart of a data management method for a mini-program in one embodiment;
[0035] Figure 3 A schematic diagram of a flow chart of a data management method for a mini-program in another embodiment;
[0036] Figure 4 A schematic diagram of a flow chart of a method for updating a mini-program page in one embodiment;
[0037] Figure 5 is a structural block diagram of a data management device for a small program in an embodiment;
[0038] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] The data management method of the mini program provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 monitors each applet page of the applet on the terminal 102 respectively, wherein each applet page includes a corresponding data module, and each data module is obtained by data modularization based on redux; when the server 104 monitors and determines that the applet page has a data update, the data update process is performed in the data module corresponding to the applet page where the data update occurs. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0041] In one embodiment, Figure 2 As shown, a data management method for a small program is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0042] Step S202, page monitoring is performed on each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux.
[0043] Among them, Mini Program pages refer to different pages on the Mini Program, and data modules are modules that correspond to Mini Program pages one by one and are used to manage Mini Program data. Redux is a predictable state container for JS (JavaScript, a lightweight, interpreted or just-in-time compiled high-level programming language with function priority) applications.
[0044] Specifically, the mini program is redeveloped in advance through Redux so that each mini program page includes a corresponding data module. The createStore(Object) method of Redux receives multiple modules for combination, and each module contains its own attributes (state) and methods (action). Therefore, the createStore(Object) method of Redux is built-in, and each data module for managing the mini program page data is created through the createStore(Object) method. When using the mini program, the page monitoring is performed on each mini program page in the mini program, and the update of the page data is perceived in real time through the page monitoring.
[0045] Step S204, when it is determined through monitoring that data update occurs on the mini-program page, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
[0046] Among them, data update refers to changes in data, including creating data, updating data, etc.
[0047] Specifically, when it is determined through page monitoring that data update occurs on the mini program page, the data update process is completed in the data module corresponding to the mini program page where the data update occurs. For example, when mini program page A changes, data update process is performed in data module A corresponding to mini program page A.
[0048] The data management method of the above-mentioned mini program performs page monitoring on each mini program page of the mini program respectively. Since each mini program page is modularized based on redux for data and includes its own corresponding data module, when the data of the mini program page is updated, the data update processing is performed in the data module corresponding to the updated mini program page, thereby managing the data of each mini program page in different data modules. This not only reduces the complexity of data, but also can process them separately in their respective data modules when multiple pages simultaneously obtain and operate instances, thereby avoiding simultaneous calls to global fields and avoiding uncontrollable concurrency problems.
[0049] In one embodiment, step S204 includes: when monitoring determines that data update occurs on the mini-program page, obtaining the module identifier of the data module corresponding to the mini-program page where data update occurs; and performing data update processing in the data module corresponding to the mini-program page where data update occurs according to the module identifier.
[0050] The module identifier is an identifier used to uniquely identify a data module. The module identifier may be a name, number, etc. specified for the data module when the data module is created.
[0051] Specifically, when it is necessary to perform data update processing on the mini-program page where data update occurs, obtain the module identifier of the data module corresponding to the mini-program page where data update occurs. Then, according to the module identifier of the corresponding data module, perform data update processing in the data module corresponding to the mini-program page. In this embodiment, data update processing is performed through module identification to accurately perform data update processing in the data module corresponding to the mini-program page where data update occurs.
[0052] In one embodiment, data update processing is performed in the data module corresponding to the mini-program page where data update occurs based on the module identifier, including: calling a data update method; passing the module identifier as an object into the called data update method, and completing the data update in the data module corresponding to the mini-program page where data update occurs through the data update method.
[0053] The data update method is a built-in method for updating data, including the overwrite data update method set[name]Data and the fusion data update method Update[name]Data. The difference between Update[name]Data and set[name]Data lies in the processing of objects. The set method will completely overwrite, while the update method will fuse.
[0054] Specifically, when data update processing is performed, the corresponding data update method is called. Then, the obtained module identifier is passed into the data update method as an object, and the data update is completed in the data module corresponding to the mini-program page where the data update occurs through the data update method. That is, when the data representation of the data module is represented by the name (name) A, the data update method after the module identifier is passed in is set[A]Data, Update[A]Data. In this embodiment, the data of the corresponding data module is updated through the built-in data update method.
[0055] In one embodiment, the called data update method can be called according to the actual situation of the mini-program page data being updated. When the data update of the mini-program page is a data overlay type data update, the overlay type data update method is called. When the data update is a data fusion type data update, the fusion type data update method is called. The actual status of the mini-program page data being updated can be determined by page monitoring. In this embodiment, the accuracy of the update is ensured by calling different built-in data update methods.
[0056] In one embodiment, Figure 3 As shown, after step S204, the following steps are also included:
[0057] Step S206, in addition to the mini-program page where data update currently occurs, determine other mini-program pages associated with the data where data update occurs, and obtain associated mini-program pages.
[0058] Step S208, synchronously perform data update processing in the data module corresponding to the associated mini-program page.
[0059] Specifically, since many data are shared by multiple data, in order to ensure the unification of data, after the data is updated on a certain mini-program page, the data update process should be uniformly performed on other mini-program pages related to the updated data. Therefore, after the data on a certain mini-program page is updated, in addition to the mini-program page where the data update currently occurs, other mini-program pages associated with the data where the data update occurs are determined to obtain the associated mini-program page. That is, query other mini-program pages related to the updated data to obtain the associated mini-program page. Then, the data update process is performed in the data module corresponding to the associated mini-program page in the same manner. That is, the module identifier of the data module corresponding to the associated mini-program page is obtained, the data update method of the same type is called, and the module identifier corresponding to the associated mini-program page is passed into the data update method as an object, and the data update method is executed by the data module of the associated mini-program page to complete the data update process.
[0060] In this embodiment, by synchronously updating the data of the associated mini-program pages, the uniformity of the data can be ensured.
[0061] In one embodiment, Figure 4 As shown, after the data update process is performed, the mini program page update is also included. The mini program page update includes the following steps
[0062] Step S402, obtaining the updated mini-program page data from the data module where the data update process occurs.
[0063] Step S404, remove the pure field data in the mini program page data to obtain the data to be rendered.
[0064] Step S406, performing interface rendering and displaying the mini-program page according to the data to be rendered, and completing page update for the mini-program page with updated data.
[0065] Specifically, after the data update process, in order to ensure the accuracy of the page display, the updated mini-program page data is obtained from the data module where the data update process occurs to render and display the updated mini-program page. Among them, since Redux is compatible with pure data fields, and pure data fields are usually some data that are not used for interface rendering. Therefore, in order to achieve fast interface rendering, the pure field data in the mini-program page data can be removed, and the remaining data is the data to be rendered that needs to be rendered. Then, the interface rendering is performed on the data to be rendered. After the interface rendering is completed, the rendered mini-program page is displayed on the terminal, thereby synchronously completing the page update of the mini-program page. In this embodiment, after the data update process is completed, the interface rendering and display are performed by the updated data to ensure the consistency of the mini-program page display.
[0066] In one embodiment, step S404 includes: using a pure data regular expression to query the data carrying a pure data identifier in the mini-program page data; the pure data regular expression is specified in the mini-program page constructor; and the data carrying the pure data identifier is removed from the mini-program page data to obtain the data to be rendered.
[0067] Among them, the pure data regular expression is a pre-configured regular expression for querying with pure data identifiers, which can be specified in the mini program page constructor Component. That is, specify pureDataPattern (pure data identifier) as a regular expression in the options of the constructor Component. The pure data identifier is a pre-configured identifier used to indicate that the data is pure data. The pure data identifier is added with a prefix / suffix to the field name of each data through configuration, so that the field complies with the pure data field rules.
[0068] Specifically, the obtained mini-program page data is queried using the specified pure data regular expression, and the fields whose field names conform to the pure data regular expression are queried, that is, the data with a pure data identifier in the queried field name. Then, the data carrying the pure data identifier is determined to be a pure data field and does not need to be rendered, so it is removed from the mini-program page data, and the remaining data is the data to be rendered. In this embodiment, the interface is rendered after the pure data that does not need to be rendered is removed by the pure data identifier, thereby improving the update performance of the page.
[0069] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0070] In one embodiment, Figure 5 As shown, a data management device for a small program is provided, including: a monitoring module 502 and a data updating module 504, wherein:
[0071] The monitoring module 502 is used to monitor each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux.
[0072] The data update module 504 is used to perform data update processing in the data module corresponding to the mini-program page where the data update occurs when monitoring determines that the mini-program page has data update.
[0073] In one embodiment, the data update module 504 is also used to obtain the module identifier of the data module corresponding to the mini-program page where the data update occurs when monitoring determines that the mini-program page has a data update; according to the module identifier, perform data update processing in the data module corresponding to the mini-program page where the data update occurs.
[0074] In one embodiment, the data update module 504 is also used to call a data update method; the module identifier is passed as an object into the called data update method, and the data update is completed in the data module corresponding to the mini-program page where the data update occurs through the data update method.
[0075] In one embodiment, the data update module 504 is also used to determine other mini-program pages associated with the data on which the data update occurred, in addition to the mini-program page on which the data update occurred, to obtain associated mini-program pages; and synchronously perform data update processing in the data module corresponding to the associated mini-program page.
[0076] In one embodiment, the data management device of the mini program also includes a rendering module, which is used to obtain the mini program page data after data update from the data module where data update processing occurs; remove the pure field data in the mini program page data to obtain the data to be rendered; perform interface rendering and display of the mini program page according to the data to be rendered, and complete the page update of the mini program page with updated data.
[0077] In one embodiment, the rendering module is also used to use a pure data regular expression to query the data carrying a pure data identifier in the mini-program page data; the pure data regular expression is specified in the mini-program page constructor; the data carrying the pure data identifier is removed from the mini-program page data to obtain the data to be rendered.
[0078] In one embodiment, the data update module 504 is also used to call an overlay data update method when the data update of the mini program page is data overlay; and call a fusion data update method when the data update is data fusion.
[0079] For the specific definition of the data management device of the mini program, please refer to the definition of the data management method of the mini program above, which will not be repeated here. The various modules in the data management device of the above mini program can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0080] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store small program related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data management method for a small program is implemented.
[0081] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0082] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0083] Each mini program page of the mini program is monitored separately; each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux;
[0084] When monitoring determines that data update occurs on the mini-program page, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
[0085] In one embodiment, the processor also implements the following steps when executing the computer program: when monitoring and determining that data update occurs on the mini-program page, obtain the module identifier of the data module corresponding to the mini-program page where the data update occurs; based on the module identifier, perform data update processing in the data module corresponding to the mini-program page where the data update occurs.
[0086] In one embodiment, when the processor executes the computer program, it also implements the following steps: calling the data update method; passing the module identifier as an object into the called data update method, and completing the data update in the data module corresponding to the mini-program page where the data update occurs through the data update method.
[0087] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in addition to the mini-program page where the data update currently occurs, other mini-program pages associated with the data where the data update occurs are determined to obtain associated mini-program pages; and data update processing is synchronously performed in the data module corresponding to the associated mini-program page.
[0088] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the updated mini-program page data from the data module where the data update processing occurs; removing the pure field data in the mini-program page data to obtain the data to be rendered; performing interface rendering and displaying the mini-program page according to the data to be rendered, and completing the page update of the mini-program page with updated data.
[0089] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using the pure data regular expression to query the data carrying the pure data identifier in the mini-program page data; the pure data regular expression is specified in the mini-program page constructor; the data carrying the pure data identifier is removed from the mini-program page data to obtain the data to be rendered.
[0090] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the data update of the mini-program page is data overlay, the overlay type data update method is called; when the data update is data fusion, the fusion type data update method is called.
[0091] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0092] Each mini program page of the mini program is monitored separately; each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux;
[0093] When monitoring determines that data update occurs on the mini-program page, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
[0094] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when monitoring determines that data update occurs on the mini-program page, the module identifier of the data module corresponding to the mini-program page where the data update occurs is obtained; based on the module identifier, data update processing is performed in the data module corresponding to the mini-program page where the data update occurs.
[0095] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calling the data update method; passing the module identifier as an object into the called data update method, and completing the data update in the data module corresponding to the mini-program page where the data update occurs through the data update method.
[0096] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in addition to the mini-program page where the data update currently occurs, other mini-program pages associated with the data where the data update occurs are determined to obtain associated mini-program pages; and data update processing is synchronously performed in the data module corresponding to the associated mini-program page.
[0097] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the updated mini-program page data from the data module where the data update processing occurs; removing the pure field data in the mini-program page data to obtain the data to be rendered; performing interface rendering and displaying the mini-program page according to the data to be rendered, and completing the page update of the mini-program page with updated data.
[0098] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the pure data regular expression, querying the data carrying the pure data identifier in the mini-program page data; the pure data regular expression is specified in the mini-program page constructor; removing the data carrying the pure data identifier from the mini-program page data to obtain the data to be rendered.
[0099] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the data update of the mini-program page is data overlay, the overlay data update method is called; when the data update is data fusion, the fusion data update method is called.
[0100] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data management method for a small program, characterized in that: The method comprises: Perform page monitoring on each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux; the data module is a module for managing mini program data corresponding to the mini program page one by one; When monitoring determines that data update occurs on the mini-program page, data update processing is performed in the data module corresponding to the mini-program page where data update occurs; Obtain the updated mini program page data from the data module where the data update process occurs; Using a pure data regular expression, query the data carrying a pure data identifier in the mini program page data; the pure data regular expression is specified in the mini program page constructor; the pure data regular expression is a pre-configured regular expression for querying a regular expression carrying a pure data identifier; the pure data identifier is a pre-configured identifier for indicating that the data is pure data; Removing the data carrying the pure data identifier from the mini-program page data to obtain data to be rendered; The interface is rendered and displayed according to the data to be rendered, and the mini-program page with updated data is updated.
2. The method according to claim 1, characterized in that When monitoring determines that data update occurs on the mini-program page, data update processing is performed in a data module corresponding to the mini-program page where data update occurs, including: When monitoring determines that data update occurs on the mini-program page, obtaining a module identifier of a data module corresponding to the mini-program page where data update occurs; According to the module identifier, data update processing is performed in the data module corresponding to the mini-program page where data update occurs.
3. The method according to claim 2, characterized in that The step of performing data update processing in a data module corresponding to the mini-program page where data update occurs according to the module identifier includes: Call the data update method; The module identifier is passed as an object into the called data update method, and the data update is completed in the data module corresponding to the mini-program page where the data update occurs through the data update method.
4. The method according to claim 1, characterized in that: After performing data update processing in the data module corresponding to the mini-program page where data update occurs, the method further includes: In addition to the mini program page where data update currently occurs, determine other mini program pages associated with the data where data update occurs, and obtain associated mini program pages; Synchronously, data update processing is performed in the data module corresponding to the associated mini-program page.
5. The method according to claim 3, characterized in that: The data updating method includes an overlay data updating method and a fusion data updating method; When the data update is data overwriting, calling the overwriting type data update method; When the data update is data fusion, the fusion data update method is called.
6. A data management device for a small program, characterized in that: The device comprises: A monitoring module, used to monitor each mini program page of the mini program respectively; wherein each mini program page includes a corresponding data module, and each data module is obtained by data modularization based on Redux; the data module is a module for managing mini program data corresponding to the mini program page one by one; A data update module, for performing data update processing in a data module corresponding to the mini-program page where data update occurs, when monitoring determines that data update occurs on the mini-program page; A rendering module is used to obtain the updated mini-program page data from the data module where data update processing occurs; use a pure data regular expression to query the data carrying a pure data identifier in the mini-program page data; the pure data regular expression is specified in the mini-program page constructor; the pure data regular expression is a pre-configured regular expression for querying a regular expression carrying a pure data identifier; the pure data identifier is a pre-configured identifier for indicating that the data is pure data; remove the data carrying the pure data identifier from the mini-program page data to obtain data to be rendered; perform interface rendering and display of the mini-program page according to the data to be rendered, and complete the page update of the mini-program page with updated data.
7. The device according to claim 6, characterized in that The data update module is also used to obtain the module identifier of the data module corresponding to the mini-program page where the data update occurs when monitoring determines that the mini-program page has a data update; and perform data update processing in the data module corresponding to the mini-program page where the data update occurs according to the module identifier.
8. The device according to claim 7, characterized in that The data update module is also used to call a data update method; the module identifier is passed as an object into the called data update method, and the data update is completed in the data module corresponding to the mini-program page where the data update occurs through the data update method.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
