Data processing method, device and storage medium

Data dependencies are uniformly managed through the dependency management module, and dependency logic code is automatically generated using declaration annotations, which solves the problem of scattered data dependencies in the program and improves the stability and iteration efficiency of the program.

CN113900700BActive Publication Date: 2025-09-05DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010639421.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-06
Publication Date
2025-09-05
Estimated Expiration
2041-03-04

AI Technical Summary

Technical Problem

In the prior art, member variables of data in a program are dependent on each other in a dispersed manner, resulting in a large workload for modification and a high risk of errors, which affects the stability of program operation and the efficiency of iteration.

Method used

By introducing a dependency management module to uniformly manage data dependencies, using declaration annotations to automatically generate dependency logic code during the source code compilation phase, centralizing the data dependency methods and response logic of each functional module, reducing programming workload and improving code maintenance efficiency.

Benefits of technology

It improves the stability of program operation and the efficiency of iteration, reduces program complexity and error risks, and improves the convenience of code maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900700B_ABST
    Figure CN113900700B_ABST
Patent Text Reader

Abstract

This application relates to a data processing method, device, and storage medium. The method includes: when a program's functional module requires data, executing dependency logic code; the dependency logic code obtains an instance of the data from the program's dependency management module and assigns a value to the instance. The method provided in the embodiments of this application converges the data dependency methods and dependency sources, thereby improving program operation stability and reducing program code maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, and storage medium. Background Art

[0002] Programs contain a large number of member variables for data, which are often relied upon and used by multiple functional modules. When data changes, the functional modules that rely on these member variables often need to respond to the changes.

[0003] There are many ways to rely on member variables of data. Therefore, different functional modules may use different dependency methods to implement dependency on the same member variable, resulting in scattered dependency sources and dependency methods. When adding, deleting, or modifying member variables of data, it is necessary to adaptively modify the dependency logic of related functional modules. Due to the scattered dependency sources and dependency methods, the workload of modifying the dependency logic of related functional modules is large. On the one hand, it reduces the modification efficiency, and on the other hand, it increases the risk of modification errors, affecting the stability of program operation. If program defects are caused by errors in the dependency logic of related functional modules, the scattered dependency sources and dependency methods will also make it more difficult to locate and repair program defects, which will also affect the stability of program operation and the efficiency of program iteration. Summary of the Invention

[0004] In order to solve the problems of poor program running stability and difficulty in program code maintenance in the above-mentioned prior art, the embodiments of the present application propose a data processing method, device and storage medium.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0006] When the functional modules of the program need to use data and run dependent logic code;

[0007] The dependency logic code obtains an instance of the above data from the dependency management module of the program and assigns a value to the instance.

[0008] The method provided in the embodiment of the present application uses the dependency management module as the dependency source of the program's functional modules. The dependency management module provides the data dependency method, which converges the data dependency method and dependency source of each functional module, facilitates code maintenance and management, and thus can reduce program complexity and improve the stability of program operation.

[0009] Optionally, the source code of the above functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage.

[0010] During the source code writing stage, there is no need to write dependency logic for functional modules, which reduces the programming workload.

[0011] Optionally, the declaration annotation carries the assignment parameters of at least one first member variable declared in the functional module. Accordingly, when the functional module of the program needs to use data, the dependent logic code is run. The implementation method may include: when the functional module of the program needs to use the data of the first member variable, the dependent logic code is run, and the dependent logic code is automatically generated according to the assignment parameters of the first member variable during the source code compilation stage.

[0012] In the embodiment of the present application, the data that the function module can rely on, that is, the data of the first member variable, is declared in the declaration annotation of the function module. Accordingly, during the program running phase, the function module can use the data of the first member variable it declared.

[0013] Optionally, the above declaration annotation may also indicate the assignment parameters of at least one second member variable declared by a peripheral functional module of the above functional module. Accordingly, when the functional module of the program needs to use data, the dependent logic code is run. The implementation method may include: when the functional module of the program needs to use the data of the second member variable, the dependent logic code is run, and the dependent logic code is automatically generated according to the assignment parameters of the second member variable during the source code compilation stage.

[0014] In the embodiment of the present application, the declaration annotation of the functional module also indicates the assignment parameters of the second member variable declared by its peripheral functional module, and the functional module can also use the data of the second member variable.

[0015] Optionally, the above declaration annotation may also carry a qualifier, which is used to distinguish different data of the same data type.

[0016] Based on any of the above method embodiments, the member variables of the data include response logic code for each functional module that depends on the data. Accordingly, when the data changes, each response logic code is executed separately to enable each functional module that depends on the data to respond to the data change.

[0017] The method provided in the embodiment of the present application converges the response logic of each functional module, further improves the efficiency of code maintenance, and thus can improve the stability of program operation.

[0018] In a second aspect, an embodiment of the present application provides an electronic device, including:

[0019] The program's functional modules are used to run dependent logic code when data is needed;

[0020] The dependency logic code is used to obtain an instance of the data from a dependency management module of the program and assign a value to the instance.

[0021] The electronic device provided in the embodiment of the present application uses the dependency management module as the dependency source of the functional modules of the program. The dependency management module provides the data dependency method, converges the data dependency method and dependency source of each functional module, facilitates the maintenance and management of the code, thereby reducing the complexity of the program and improving the stability of the program operation.

[0022] Optionally, the source code of the functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage.

[0023] During the source code writing stage, there is no need to write dependency logic for functional modules, which reduces the programming workload.

[0024] Optionally, the declaration annotation carries the assignment parameters of at least one first member variable declared in the functional module. Accordingly, the functional module of the program is configured to execute dependent logic code when data of the first member variable is needed, where the dependent logic code is automatically generated during source code compilation based on the assignment parameters of the first member variable.

[0025] In the embodiment of the present application, the data that the function module can rely on, that is, the data of the first member variable, is declared in the declaration annotation of the function module. Accordingly, during the program running phase, the function module can use the data of the first member variable it declared.

[0026] Optionally, the declaration annotation may further indicate the assignment parameters of at least one second member variable declared by a peripheral function module of the function module. Accordingly, the function module of the program is configured to execute dependent logic code when data of the second member variable is needed, where the dependent logic code is automatically generated according to the assignment parameters of the second member variable during the source code compilation phase.

[0027] In the embodiment of the present application, the declaration annotation of the functional module also indicates the assignment parameters of the second member variable declared by its peripheral functional module, and the functional module can also use the data of the second member variable.

[0028] Optionally, the above declaration annotation may also carry a qualifier, which is used to distinguish different data of the same data type.

[0029] Based on any of the above electronic device embodiments, the member variables of the data include response logic code for each functional module that relies on the data. Accordingly, a monitoring component is also included for executing each response logic code when the data changes, so that each functional module that relies on the data can respond to the data change.

[0030] The electronic device provided in the embodiment of the present application converges the response logic of each functional module, further improves the efficiency of code maintenance, and thus can improve the stability of program operation.

[0031] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory;

[0032] The memory is used to store a program for executing any of the above method embodiments;

[0033] The processor is configured to execute the program stored in the memory.

[0034] The electronic device provided in the embodiment of the present application uses the dependency management module as the dependency source of the functional modules of the program. The dependency management module provides the data dependency method, converges the data dependency method and dependency source of each functional module, facilitates the maintenance and management of the code, thereby reducing the complexity of the program and improving the stability of the program operation.

[0035] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a program for implementing any of the above method embodiments.

[0036] The program stored in the computer-readable storage medium provided in the embodiment of the present application uses the dependency management module as the dependency source of the program's functional modules. The dependency management module provides the data dependency method, which converges the data dependency method and dependency source of each functional module, facilitates code maintenance and management, thereby reducing program complexity and improving the stability of program operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a dependency framework provided for one embodiment of the present application;

[0038] Figure 2 A schematic diagram of the binding relationship between the context space and the functional modules provided in one embodiment of the present application;

[0039] Figure 3 A flow chart of a data processing method provided in one embodiment of the present application;

[0040] Figure 4 A block diagram of an electronic device provided in accordance with an embodiment of the present application;

[0041] Figure 5 A schematic diagram of the structure of a mobile terminal provided in one embodiment of the present application;

[0042] Figure 6 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0044] In some processes described in the specification and claims of this application and the above-mentioned figures, multiple operations appear in a specific order, but it should be clearly understood that these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel.

[0045] The present application provides an automatic dependency framework that manages data dependencies uniformly through a dependency management module. The dependency management module provides a unified data dependency method and serves as a unified data dependency source. By converging data dependency methods and dependency sources, the efficiency of engineering iterations can be increased, the difficulty of fault location can be reduced, program complexity can be lowered, and program reliability can be improved.

[0046] Assume there are function module 1, function module 2 and function module 3, among which function module 1 depends on the data of member variable 1, function module 2 depends on the data of member variable 2 and member variable 3, and function module 3 depends on the data of member variable 2 and member variable 3. Then, you can use Figure 1 The architecture shown implements data dependencies.

[0047] Among them, the dependency management module provides instances of dependency data for each functional module and also manages member variables of the data.

[0048] Preferably, the member variables of the data provided in the embodiment of the present application include not only data, but also a monitoring component, which includes the response logic code of each functional module that depends on the data. By running the response logic code, the functional module can respond to data changes.

[0049] In this dependency framework, instead of writing data initialization and reference logic within each functional module, data dependencies are defined through annotation declarations. During the source code compilation phase, the APT (Annotation Processing Tool) technology automatically generates dependency logic code based on the declaration annotations. This dependency logic code is then executed to retrieve data instances from the dependency management module and assign values ​​to these instances.

[0050] The declaration annotation carries the assignment parameters of at least one member variable declared by the functional module (the member variable declared by this functional module is called the first member variable), and the assignment parameters are the parameters required to assign a value to an instance of the data of the member variable.

[0051] By carrying the assignment parameter of the first member variable in the annotation, the member variables that the functional module can rely on are limited. In actual applications, the member variables that it can rely on can also be indicated in the declaration annotation.

[0052] Optionally, the annotation may also indicate at least one member variable declared by a peripheral function module of the function module (a member variable declared by a peripheral function module is referred to as a second member variable). There are multiple ways to indicate this. In one implementation, the declaration annotation carries the assignment parameter of the second member variable. In another implementation, the declaration annotation carries the name of the peripheral function module.

[0053] The peripheral function module refers to the function module that calls the function module.

[0054] That is to say, a functional module can not only rely on the member variables declared by itself, but also rely on the member variables declared by its peripheral functional modules.

[0055] Each first member variable declared by a functional module can be defined as the corresponding context space of the functional module. Then, the context space corresponding to the peripheral functional module of the functional module is the peripheral context space of the functional module, and the functional module can use the data of the member variables in the peripheral context space.

[0056] like Figure 2 As shown, there are function modules A, B, and C. Function module A corresponds to context space 1, function module B corresponds to context space 2, and function module C corresponds to context space 3. Context space 1 includes member variables 1' and 2', context space 2 includes member variables 3' and 4', and context space 3 includes member variables 5' and 6'. Function module B is a peripheral function module of function module C, so context space 2 is the peripheral context space of function module C.

[0057] Function module A can only use the data of member variables 1' and member variables 2', function module B can only use the data of member variables 3' and member variables 4', and function module C can use the data of member variables 5' and member variables 6', as well as the data of member variables 3' and member variables 4'.

[0058] Each functional module is bound to only one context space, which constrains the scope of use of member variables.

[0059] If two or more member variables in the same context have the same data type, a qualifier is needed to distinguish different data of the same data type. The qualifier can be provided in the declaration annotation.

[0060] Based on the above dependency framework, the present application embodiment provides a data processing method, such as Figure 3 As shown, the method includes:

[0061] Step 301: When a functional module of a program needs to use data, it runs dependent logic code.

[0062] The functional module may use the data of the first member variable declared by the functional module, and further, may use the data of the second member variable declared by the peripheral functional module.

[0063] In the embodiment of the present application, each functional module's dependency on each data corresponds to a section of dependency logic code.

[0064] Step 302: The dependency logic code obtains an instance of the above data from the dependency management module of the program and assigns a value to the instance.

[0065] The method provided in the embodiment of the present application uses the dependency management module as the dependency source of the program's functional modules. The dependency management module provides the data dependency method, which converges the data dependency method and dependency source of each functional module, facilitates code maintenance and management, and thus can reduce program complexity and improve the stability of program operation.

[0066] Optionally, the source code of the above functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage.

[0067] As mentioned above, by using APT technology, dependency logic code can be uniformly and automatically generated for each functional module's dependency on each data according to the same rules. Developers of each functional module do not need to write dependency logic code independently, which reduces the programming workload and improves program reliability.

[0068] Optionally, the declaration annotation carries the assignment parameters of at least one first member variable declared in the functional module. Accordingly, when the functional module of the program needs to use data, the dependent logic code is run. The implementation method may include: when the functional module of the program needs to use the data of the first member variable, the dependent logic code is run, and the dependent logic code is automatically generated according to the assignment parameters of the first member variable during the source code compilation stage.

[0069] In the embodiment of the present application, the data that the function module can rely on, that is, the data of the first member variable, is declared in the declaration annotation of the function module. Accordingly, during the program running phase, the function module can use the data of the first member variable it declared.

[0070] Optionally, the above declaration annotation may also indicate the assignment parameters of at least one second member variable declared by a peripheral functional module of the above functional module. Accordingly, when the functional module of the program needs to use data, the dependent logic code is run. The implementation method may include: when the functional module of the program needs to use the data of the second member variable, the dependent logic code is run, and the dependent logic code is automatically generated according to the assignment parameters of the second member variable during the source code compilation stage.

[0071] In the embodiment of the present application, the declaration annotation of the functional module also indicates the assignment parameters of the second member variable declared by its peripheral functional module, and the functional module can also use the data of the second member variable.

[0072] Optionally, the above declaration annotation may also carry a qualifier, which is used to distinguish different data of the same data type.

[0073] When a certain data changes, multiple functional modules that rely on the data need to respond. In the prior art, functional modules can use at least the following two methods to monitor data changes. One is the message mechanism, that is, monitoring data changes by sending messages, but the message mechanism is overly decoupled. When the number of messages is too large, the source of the messages is complex, making it difficult to track the source of the messages, and it is also impossible to respond to data changes. The second is the interface callback mechanism, but due to the disagreement of the interface protocol, the processing of data change responses requires the addition of certain intermediate logic for compatibility, which increases the cost of code maintenance. It can be seen that the current data change monitoring method is not unified and the response logic is scattered. In response to this problem, based on any of the above method embodiments, the member variables of the above data include the response logic code of each functional module that depends on the data. Accordingly, when the data changes, each response logic code is executed separately to realize the response of each functional module that depends on the data to the data change.

[0074] The response logic code may, but is not limited to, use lambda expressions.

[0075] By adding the response logic code of each functional module in the member variables, you can complete data change responses such as database updates, system status flow, and UI refresh at the same time.

[0076] The method provided in the embodiment of the present application converges the response logic of each functional module, further improves the efficiency of code maintenance, and thus can improve the stability of program operation.

[0077] Based on the same inventive concept as the method, the embodiment of the present application further provides an electronic device, such as Figure 4 Shown, including:

[0078] The functional module 401 of the program is used to run dependent logic code when data is needed;

[0079] The dependency logic code 402 is used to obtain the instance of the data from the dependency management module of the program and assign a value to the instance.

[0080] The electronic device provided in the embodiment of the present application uses the dependency management module as the dependency source of the functional modules of the program. The dependency management module provides the data dependency method, converges the data dependency method and dependency source of each functional module, facilitates the maintenance and management of the code, thereby reducing the complexity of the program and improving the stability of the program operation.

[0081] Optionally, the source code of the functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage.

[0082] During the source code writing stage, there is no need to write dependency logic for functional modules, which reduces the programming workload.

[0083] Optionally, the declaration annotation carries the assignment parameters of at least one first member variable declared in the functional module. Accordingly, the functional module of the program is configured to execute dependent logic code when data of the first member variable is needed, where the dependent logic code is automatically generated during source code compilation based on the assignment parameters of the first member variable.

[0084] In the embodiment of the present application, the data that the function module can rely on, that is, the data of the first member variable, is declared in the declaration annotation of the function module. Accordingly, during the program running phase, the function module can use the data of the first member variable it declared.

[0085] Optionally, the declaration annotation may further indicate the assignment parameters of at least one second member variable declared by a peripheral function module of the function module. Accordingly, the function module of the program is configured to execute dependent logic code when data of the second member variable is needed, where the dependent logic code is automatically generated according to the assignment parameters of the second member variable during the source code compilation phase.

[0086] In the embodiment of the present application, the declaration annotation of the functional module also indicates the assignment parameters of the second member variable declared by its peripheral functional module, and the functional module can also use the data of the second member variable.

[0087] Optionally, the above declaration annotation may also carry a qualifier, which is used to distinguish different data of the same data type.

[0088] Based on any of the above electronic device embodiments, the member variables of the data include response logic code for each functional module that relies on the data. Accordingly, a monitoring component is also included for executing each response logic code when the data changes, so that each functional module that relies on the data can respond to the data change.

[0089] The electronic device provided in the embodiment of the present application converges the response logic of each functional module, further improves the efficiency of code maintenance, and thus can improve the stability of program operation.

[0090] Based on the same inventive concept as the method, an embodiment of the present application provides an electronic device, including a processor and a memory;

[0091] The memory is used to store a program for executing any of the above method embodiments;

[0092] The processor is configured to execute the program stored in the memory.

[0093] The electronic device provided in the embodiment of the present application uses the dependency management module as the dependency source of the functional modules of the program. The dependency management module provides the data dependency method, converges the data dependency method and dependency source of each functional module, facilitates the maintenance and management of the code, thereby reducing the complexity of the program and improving the stability of the program operation.

[0094] The electronic device may be a mobile terminal. Figure 5 As shown, the mobile terminal provided in the embodiment of the present application includes not only a processor and a memory, but also an input device (such as a touch screen, a camera, a microphone, etc.), an output device (such as a display screen, a speaker, etc.), a communication module, and a power module.

[0095] The memory, input device, output device, communication module, and power module are connected to the processor via a serial port, bus, or USB interface. For a single-processor mobile terminal, the processor is a CPU (central processing unit); for a dual-processor mobile terminal, the processor includes a master processor and a slave processor, with the master processor executing the application to implement the method provided in the embodiment of the present invention. If communication with the outside world is required, the slave processor controls the communication module to cooperate and implement the method; for a terminal device including a GPU (graphics processing unit) and a CPU, the processor refers to the GPU and the CPU, and the GPU and the CPU cooperate or the CPU alone to implement the method provided in the embodiment of the present application.

[0096] Among them, the memory of the mobile terminal can include, but is not limited to: Flash memory, RAM (random access memory), ROM (read-only memory), etc. RAM is mainly used to store programs and data when the mobile terminal is running. Programs that need to be executed or data that need to be processed must first be loaded into RAM. ROM is mainly used to check the configuration of the terminal device operating system and provide the most basic input and output (I / O) programs. Flash memory is a long-life non-volatile memory (it can still retain stored data information in the event of a power outage). Data deletion is not in units of single bytes, but in units of fixed blocks. Since Flash memory can still save data when the power is off, it is usually used to save setting information, such as user setting information for the mobile terminal.

[0097] It should be noted that for different mobile terminals (single-processor smartphones, dual-processor smartphones, smart wearable devices, tablet computers, etc.), it may include more than Figure 5 The mobile terminal shown may have more or fewer hardware structures, but as long as it includes a memory and a processor and can implement the functions of the above method embodiments, it is within the scope of protection of this disclosure.

[0098] The electronic device may also be a computer device, such as a personal computer. Figure 6 As shown, the computer device at least includes: a power supply, which is logically connected to the central processing unit through a power management system, so that the power management system can manage charging, discharging, and power consumption, etc.; a motherboard, which provides an electrical connection path between components, and each component transmits electrical signals through the motherboard, and each component is installed on the motherboard by plugging, welding, etc.; a central processing unit, which mainly includes an arithmetic logic unit (ALU), a program counter (PC), a register group, a cache memory (Cache), and a bus (Bus) interface for transmitting data, control and status; an internal memory, a disk (i.e., the above-mentioned memory storing the program for executing the method described in each method embodiment), an input unit (including a mouse, a keyboard, a touch panel, etc.), a display unit (including a display screen and a graphics card), and a network card, which exchange data with the central processing unit through the bus.

[0099] Based on the same inventive concept as the method, an embodiment of the present application provides a computer-readable storage medium storing a program for implementing any of the above method embodiments.

[0100] The program stored in the computer-readable storage medium provided in the embodiment of the present application uses the dependency management module as the dependency source of the program's functional modules. The dependency management module provides the data dependency method, which converges the data dependency method and dependency source of each functional module, facilitates code maintenance and management, thereby reducing program complexity and improving the stability of program operation.

[0101] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0102] The embodiments described above are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: When a function module of a program needs to use data, the dependency logic code corresponding to the function module's dependency on the data is run; the data includes: data of member variables that the function module depends on; The dependency logic code obtains an instance of the data from a dependency management module of the program and assigns a value to the instance; The source code of the functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage; The declaration annotation carries an assignment parameter of at least one second member variable declared by a peripheral function module of the function module, the peripheral function module being a module that calls the function module, and when the function module of the program needs to use data, running the dependency logic code corresponding to the dependency of the function module on the data includes: When a functional module of the program needs to use the data of the second member variable, the dependency logic code corresponding to the functional module's data dependency on the second member variable is run. The dependency logic code corresponding to the functional module's data dependency on the second member variable is automatically generated according to the assignment parameters of the second member variable during the source code compilation stage.

2. The method according to claim 1, characterized in that The declaration annotation carries the assignment parameters of at least one first member variable declared by the functional module. When the functional module of the program needs to use the data, the dependency logic code corresponding to the dependency of the functional module on the data is run, including: When a functional module of a program needs to use the data of the first member variable, the dependency logic code corresponding to the functional module's dependency on the data of the first member variable is run. The dependency logic code corresponding to the functional module's dependency on the data of the first member variable is automatically generated according to the assignment parameters of the first member variable during the source code compilation stage.

3. The method according to claim 1, characterized in that The declaration annotation also carries a qualifier, which is used to distinguish different data of the same data type.

4. The method according to any one of claims 1 to 3, characterized in that The member variables of the data include response logic codes of various functional modules that depend on the data, and the method further includes: When the data changes, each of the response logic codes is executed respectively to implement the response of each functional module dependent on the data to the data change.

5. An electronic device, characterized in that: include: The functional module of the program is used to run the dependency logic code corresponding to the dependency of the functional module on the data when data is needed; The data includes: data of member variables that the functional module depends on; Dependency logic code, used for obtaining an instance of the data from a dependency management module of the program and assigning a value to the instance; The source code of the functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage; The declaration annotation carries an assignment parameter of at least one second member variable declared by a peripheral function module of the function module, where the peripheral function module is a module that calls the function module. When the function module of the program needs to use data, the dependency logic code corresponding to the dependency of the function module on the data is run, including: When a functional module of the program needs to use the data of the second member variable, the dependency logic code corresponding to the functional module's data dependency on the second member variable is run. The dependency logic code corresponding to the functional module's data dependency on the second member variable is automatically generated according to the assignment parameters of the second member variable during the source code compilation stage.

6. The electronic device according to claim 5, characterized in that The source code of the functional module includes declaration annotations, and the dependency logic code is automatically generated by parsing the declaration annotations during the source code compilation stage.

7. An electronic device, characterized in that: including processor and memory; The memory is used to store a program for executing the method according to any one of claims 1 to 4; The processor is configured to execute the program stored in the memory.

8. A computer-readable storage medium, characterized in that A program for executing the method according to any one of claims 1 to 4 is stored.

Citation Information

Patent Citations

  • Method and device for realizing multi-version dependent isolation

    CN110968340A