Data processing method, device, electronic device and storage medium

By configuring interceptors and environmental identification in the database and combining independent environmental monitoring services, the high cost and complexity of data isolation solutions in the prior art are solved, efficient data isolation is achieved and application processing difficulty is reduced.

CN114925066BActive Publication Date: 2025-08-19JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210531410.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2025-08-19
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In the prior art, the deployment cost of implementing data isolation is high, the application data access is difficult, and the data processing logic is complex, resulting in increased testing and development difficulties.

Method used

By configuring an interceptor in the database, adding environment identifiers to the target data table, and performing conditional statement splicing when data change requests, environmental isolation of data tables is realized, combining independent environmental monitoring service management identification validity period and log monitoring to ensure accurate isolation of data tables.

Benefits of technology

It effectively reduces the complexity of data processing and deployment costs, realizes data isolation in various operating environments, and improves the accuracy and efficiency of testing and development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925066B_ABST
    Figure CN114925066B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method applicable to the field of big data technology, comprising: obtaining a first target environment identifier for data to be written and a current operating environment; writing the data to be written into a first target data table in a database; and, if an interceptor configured in the database is enabled, adding the first target environment identifier to the first target data table. Furthermore, the present disclosure provides a data processing device, an electronic device, and a readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of big data technology, and more specifically, to a data processing method, device, electronic device, readable storage medium, and computer program product. Background Art

[0002] With the evolution of internet architecture, enterprise projects are often divided into multiple microservices for independent deployment, and project iterations have shifted from waterfall to agile development. With rapid business growth, demand iterations often involve multiple concurrent development releases. This parallel development inevitably raises the issue of data isolation.

[0003] In the process of implementing the concept of the present disclosure, the inventors discovered that there are at least the following problems in the related art: the deployment cost of the solution for implementing data isolation in the related art is high and application data access is difficult. Summary of the Invention

[0004] In view of this, the present disclosure provides a data processing method, a data processing device, an electronic device, a readable storage medium, and a computer program product.

[0005] One aspect of the present disclosure provides a data processing method, including: obtaining a first target environment identifier of the data to be written and the current running environment; writing the above-mentioned data to be written into a first target data table of a database; and when the status of the interceptor configured in the above-mentioned database is turned on, adding the above-mentioned first target environment identifier to the above-mentioned first target data table.

[0006] According to an embodiment of the present disclosure, the above method also includes: in response to a data change request, obtaining the first structured query statement and the second target environment identifier carried in the above data change request; splicing the above first structured query statement and the conditional statement generated based on the above second target environment identifier through the above interceptor to obtain a second structured query statement; and executing the above second structured query statement in the above database to determine the second target data table with the above second target environment identifier from the above database, and performing data changes on the above second target data table.

[0007] According to an embodiment of the present disclosure, the above method also includes: calling the data interface between the management backend and the management backend to obtain the independent environment list from the above management backend; recording the above first target environment identifier in the above independent environment list; configuring the validity period of the above first target environment identifier based on the category of the above current running environment; and sending the updated independent environment list to the above management backend so that the above management backend can replace the stored independent environment list.

[0008] According to an embodiment of the present disclosure, the above method also includes: obtaining the current independent environment list from the above management background through heartbeat query, wherein the above current independent environment list includes multiple environment identifiers; determining the valid status of the environment identifier in the above current independent environment list based on the current system time; in the case of determining that there is a third target environment identifier whose valid status is represented as invalid, determining the third target data table with the above third target environment from the above database; and modifying the environment identifier of the above third target data table to a preset public environment identifier.

[0009] According to an embodiment of the present disclosure, the above method also includes: monitoring the log information of the above database to determine the fourth target data table on which the preset operation has been performed from the above log information; and when the above fourth target data table is not configured with an environment identifier, adding the preset public environment identifier to the above fourth target data table.

[0010] According to an embodiment of the present disclosure, the method further includes: when the state of the interceptor configured in the database is closed, adding a preset public environment identifier to the first target data table.

[0011] Another aspect of the present disclosure provides a data processing device, including: a first acquisition module, used to obtain the first target environment identifier of the data to be written and the current running environment; a storage module, used to write the above-mentioned data to be written into the first target data table of the database; and a first configuration module, used to add the above-mentioned first target environment identifier to the above-mentioned first target data table when the status of the interceptor configured in the above-mentioned database is turned on.

[0012] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method described above.

[0013] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.

[0014] Another aspect of the present disclosure provides a computer program product comprising computer executable instructions, which are used to implement the method described above when the instructions are executed.

[0015] According to an embodiment of the present disclosure, during the execution of business functions in the current operating environment, data generated during the execution of the business functions can be written to a first target data table, and the first target environment identifier of the current operating environment can be configured for the first target data table. Through the above technical means, because the data table configured with the environment identifier can only be called and processed by applications in the corresponding operating environment, this at least partially overcomes the technical problems of poor compatibility and complex data processing logic in the methods used to achieve data isolation in related technologies, and achieves data isolation in various operating environments, thereby effectively reducing the complexity of application data processing and reducing deployment costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0017] Figure 1 An exemplary system architecture to which the data processing method according to an embodiment of the present disclosure can be applied is schematically shown.

[0018] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0019] Figure 3 The flowchart of the data modification method according to the embodiment of the present disclosure is schematically shown.

[0020] Figure 4 The following schematically shows a system architecture diagram of an independent environment monitoring service according to an embodiment of the present disclosure.

[0021] Figure 5 The block diagram schematically shows a data processing device according to an embodiment of the present disclosure.

[0022] Figure 6 A block diagram schematically shows an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0026] When expressions such as “at least one of A, B, and C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, and C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.). When expressions such as “at least one of A, B, or C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, or C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.).

[0027] With the evolution of internet architecture technology, projects are being divided into multiple microservices for independent deployment, and project iterations are shifting from waterfall to agile development. With rapid business growth, requirements are often iterated across multiple parallel development releases. Within independent environments, HTTP, RPC, and MQ are only called and processed within their respective environments. This involves data isolation. For example, two concurrent requirements may modify the same type of data in the same table. Without data isolation, testing becomes more difficult for testers, making it difficult to quickly and accurately determine which requirement is causing the data change, leading to potential misleading results.

[0028] Related technologies typically use in-memory databases or multiple databases to achieve data isolation. However, these solutions have certain drawbacks in actual application. Using an in-memory database makes it inconvenient to query database data when debugging functions in a test environment. In-memory databases support fewer data formats and cannot meet the needs of many applications. As applications restart, the data in memory is refreshed, resulting in test data loss. Using multiple databases, multiple basic environments will inevitably lead to higher budget costs. It will also bring a series of problems such as synchronous maintenance of data table structures and initialization of data, increasing the complexity of data processing by applications and the workload of operations and maintenance.

[0029] In view of this, the embodiments of the present disclosure provide a data processing method for solving the problem of completely isolating database data in an independent environment; solving the problem that multiple parallel demands may modify the same type of data in the same table, which causes testers and developers to be unable to quickly and accurately predict the problem, causing certain misleading; and solving a series of problems such as high budget costs and difficulty in accessing application data in existing implementation solutions.

[0030] Specifically, embodiments of the present disclosure provide a data processing method, apparatus, electronic device, readable storage medium, and computer program product. The method includes: obtaining data to be written and a first target environment identifier of the current operating environment; writing the data to be written into a first target data table in a database; and, if an interceptor configured in the database is enabled, adding the first target environment identifier to the first target data table.

[0031] Figure 1 The following schematically illustrates an exemplary system architecture to which the data processing method according to an embodiment of the present disclosure can be applied. Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.

[0032] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 .

[0033] The terminal devices 101 , 102 , and 103 may be various electronic devices in a public environment or various independent environments, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0034] Various client applications may be installed on the terminal devices 101 , 102 , and 103 , such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software.

[0035] The user can perform operations in the client applications of the terminal devices 101 , 102 , and 103 to execute business functions and write data into the database directly or indirectly.

[0036] The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links.

[0037] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.

[0038] Server 105 may be a server that provides various services, such as a background management server that provides data isolation services for the data to be written generated by terminal devices 101, 102, and 103. The background management server may add an environmental tag to the data to be written before writing it to the corresponding data table. When a data change request is subsequently received, the background management server determines the data table that can be accessed based on the environmental tag.

[0039] It should be noted that the data processing method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiments of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data processing device provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the data processing method provided in the embodiments of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or by other terminal devices different from the terminal devices 101, 102, or 103. Accordingly, the data processing device provided in the embodiments of the present disclosure can also be set in the terminal devices 101, 102, or 103, or in other terminal devices different from the terminal devices 101, 102, or 103.

[0040] For example, the data to be written may be generated by any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or may be generated by an external device and imported into the terminal device 101. The terminal device 101 may then locally execute the data processing method provided in the embodiment of the present disclosure, or send the data to be written to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the data to be written may execute the data processing method provided in the embodiment of the present disclosure.

[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0042] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0043] like Figure 2 As shown, the method includes operations S201 to S203.

[0044] In operation S201 , the first target environment identifier of the data to be written and the current operating environment is obtained.

[0045] In operation S202 , the data to be written is written into a first target data table in the database.

[0046] In operation S203, when the state of the interceptor configured in the database is enabled, the first target environment identifier is added to the first target data table.

[0047] According to an embodiment of the present disclosure, the current operating environment may be an operating environment of an application program generating data to be written, including but not limited to independent environments such as a test environment and a production environment, and public environments. The specific implementation of the independent environment at the application layer is not limited herein.

[0048] According to an embodiment of the present disclosure, the environment identifier of the current running environment can be retrieved from the context of the application.

[0049] According to an embodiment of the present disclosure, different operating environments may be configured with different environment identifiers. For example, the environment identifier of a common environment is “common”, and the environment identifier of an independent environment is “Independent_xxx”.

[0050] According to an embodiment of the present disclosure, the first target data table may be a newly created data table, or may be a data table retrieved from a database based on keyword information in the data to be written.

[0051] According to an embodiment of the present disclosure, the interceptor can be implemented through a persistence layer framework such as mybatis.

[0052] According to an embodiment of the present disclosure, adding the first target environment identifier to the first target data table can be, for example: adding a field "independent_env_flag" for storing the environment identifier in the first target data table, and then adding the environment identifier corresponding to the current running environment as an attribute to the field.

[0053] According to an embodiment of the present disclosure, during the execution of business functions in the current operating environment, data generated during the execution of the business functions can be written to a first target data table, and the first target environment identifier of the current operating environment can be configured for the first target data table. Through the above technical means, because the data table configured with the environment identifier can only be called and processed by applications in the corresponding operating environment, this at least partially overcomes the technical problems of poor compatibility and complex data processing logic in the methods used to achieve data isolation in related technologies, and achieves data isolation in various operating environments, thereby effectively reducing the complexity of application data processing and reducing deployment costs.

[0054] Reference below Figures 3 and 4 , combined with specific embodiments Figure 2 The method shown is further explained.

[0055] According to an embodiment of the present disclosure, a mybatis custom plug-in jar package or starter can be configured in the configuration center, and an application that needs to access an independent environment introduces the jar package or starter to dynamically enable or disable the interceptor.

[0056] According to an embodiment of the present disclosure, when the state of the interceptor configured in the database is closed, a preset public environment identifier may be added to the first target data table.

[0057] Figure 3 The flowchart of the data modification method according to the embodiment of the present disclosure is schematically shown.

[0058] like Figure 3 As shown, the method includes operations S301 to S303.

[0059] In operation S301 , in response to a data change request, a first structured query statement and a second target environment identifier carried in the data change request are obtained.

[0060] In operation S302, the first structured query statement and the conditional statement generated based on the second target environment identifier are concatenated by an interceptor to obtain a second structured query statement.

[0061] In operation S303 , a second structured query statement is executed in the database to determine a second target data table having a second target environment identifier from the database, and data in the second target data table is modified.

[0062] According to an embodiment of the present disclosure, initiating a data change request and writing data to a database may be performed by application programs in different operating environments, that is, the second target environment identifier may be different from the first target environment identifier.

[0063] According to an embodiment of the present disclosure, the first structured query statement may include statements for executing operations such as update, insert, and delete.

[0064] According to an embodiment of the present disclosure, the conditional statement generated based on the second target environment identifier may be, for example, whereindependent_env_flag=${second target environment identifier}.

[0065] According to an embodiment of the present disclosure, when a business logic call within an independent environment reaches the persistence layer logic, a MyBatis interceptor can be triggered, which extracts the second target environment identifier from the application context. The first structured query statement containing operations such as update and delete is dynamically spliced within the interceptor with "where independent_env_flag = ${second target environment identifier}" to obtain a second structured query statement, which is then executed. If the first structured query statement contains complex join table operations, the environment identifier splicing process will also be performed after parsing the SQL statement.

[0066] According to an embodiment of the present disclosure, when executing the second structured query statement, data change operations can be performed only on the second target data table with the second target environment identifier, without performing any operations on other data tables, thereby logically achieving data isolation.

[0067] Figure 4 The following schematically shows a system architecture diagram of an independent environment monitoring service according to an embodiment of the present disclosure.

[0068] like Figure 4 As shown, the independent environment monitoring service can be used to manage the environment identifiers configured in the data table.

[0069] The independent environment monitoring service may include two parts, wherein the first part is used to monitor the deactivation and activation of the independent environment list, and the second part is used to monitor the log files of the database.

[0070] In the first part, first, the independent environment monitoring service can send a heartbeat query message to the management background through a heartbeat query to obtain the current independent environment list from the management background.

[0071] According to an embodiment of the present disclosure, a heartbeat query may initiate a query request at intervals of a certain period of time, and the query time interval may be set according to a specific application scenario.

[0072] According to an embodiment of the present disclosure, the current independent environment list may include multiple environment identifiers, and each environment identifier is configured with a validity period.

[0073] Afterwards, the independent environment monitoring service may determine the validity status of the environment identifiers in the current independent environment list based on the current system time.

[0074] According to an embodiment of the present disclosure, the validity period of different operating environments may be different. For example, the validity period of a public environment may be set to permanent, the validity period of a test environment may be set to 1 day, the validity period of a production environment may be set to 30 days, and so on.

[0075] According to an embodiment of the present disclosure, the validity period may be compared with the current system time to determine the validity status of the environment identifier in the current independent environment list.

[0076] Then, when it is determined that there is a third target environment identifier whose valid state is indicated as invalid, a third target data table having a third target environment is determined from the database, and the environment identifier of the third target data table is modified to a preset public environment identifier.

[0077] According to an embodiment of the present disclosure, the preset public environment identifier may be an environment identifier of a public environment.

[0078] According to an embodiment of the present disclosure, after the environment identifier of the third target data table is reset, the third target environment identifier in the current independent environment list may be deleted.

[0079] According to an embodiment of the present disclosure, after the application completes writing data, the environment identifier of the application's running environment can be written into an independent environment list, which can specifically include: calling the data interface between the application and the management backend to obtain the independent environment list from the management backend; recording the first target environment identifier in the independent environment list; configuring the validity period of the first target environment identifier based on the category of the current running environment; and sending the updated independent environment list to the management backend so that the management backend replaces the stored independent environment list.

[0080] In the second part, the independent environment monitoring service can monitor the database log information based on middleware such as canal to determine the fourth target data table where the preset operation has been performed from the log information. If the fourth target data table is not configured with an environment identifier, the preset public environment identifier is added to the fourth target data table.

[0081] According to an embodiment of the present disclosure, the log information may be information in a database binlog.

[0082] According to an embodiment of the present disclosure, the preset operation may be a data table DLL operation.

[0083] According to an embodiment of the present disclosure, adding the preset public environment identifier to the fourth target data table may include adding a field "independent_env_flag" for storing the environment identifier in the fourth target data table, and then adding the preset public environment identifier as an attribute to the field.

[0084] Figure 5 The block diagram schematically shows a data processing device according to an embodiment of the present disclosure.

[0085] like Figure 5 As shown, the data processing device 500 includes a first acquisition module 510 , a storage module 520 and a first configuration module 530 .

[0086] The first acquisition module 510 is configured to acquire the data to be written and a first target environment identifier of the current operating environment.

[0087] The storage module 520 is configured to write the data to be written into the first target data table of the database.

[0088] The first configuration module 530 is configured to add the first target environment identifier to the first target data table when the state of the interceptor configured in the database is enabled.

[0089] According to an embodiment of the present disclosure, during the execution of business functions in the current operating environment, data generated during the execution of the business functions can be written to a first target data table, and the first target environment identifier of the current operating environment can be configured for the first target data table. Through the above technical means, because the data table configured with the environment identifier can only be called and processed by applications in the corresponding operating environment, this at least partially overcomes the technical problems of poor compatibility and complex data processing logic in the methods used to achieve data isolation in related technologies, and achieves data isolation in various operating environments, thereby effectively reducing the complexity of application data processing and reducing deployment costs.

[0090] According to an embodiment of the present disclosure, the data processing device 500 further includes a second acquisition module, a first processing module, and an execution module.

[0091] The second acquisition module is configured to respond to the data change request and acquire the first structured query statement and the second target environment identifier carried in the data change request.

[0092] The first processing module is configured to concatenate the first structured query statement and the conditional statement generated based on the second target environment identifier through an interceptor to obtain a second structured query statement.

[0093] The execution module is used to execute the second structured query statement in the database to determine the second target data table with the second target environment identifier from the database and perform data changes on the second target data table.

[0094] According to an embodiment of the present disclosure, the data processing device 500 further includes a calling module, a recording module, a second configuration module, and a sending module.

[0095] The calling module is used to call the data interface between the management background and obtain the independent environment list from the management background.

[0096] The recording module is used to record the first target environment identifier in the independent environment list.

[0097] The second configuration module is configured to configure the validity period of the first target environment identifier based on the category of the current operating environment.

[0098] The sending module is used to send the updated independent environment list to the management background so that the management background can replace the stored independent environment list.

[0099] According to an embodiment of the present disclosure, the data processing device 500 further includes a third acquisition module, a first determination module, a second determination module, and a first modification module.

[0100] The third acquisition module is used to obtain the current independent environment list from the management background through heartbeat query, wherein the current independent environment list includes multiple environment identifiers.

[0101] The first determining module is configured to determine a valid state of an environment identifier in a current independent environment list based on a current system time.

[0102] The second determining module is configured to determine a third target data table having a third target environment from the database when it is determined that there is a third target environment identifier whose valid state is indicated as invalid.

[0103] The first modifying module is configured to modify the environment identifier of the third target data table to a preset public environment identifier.

[0104] According to an embodiment of the present disclosure, the data processing device 500 further includes a monitoring module and a third configuration module.

[0105] The monitoring module is used to monitor the log information of the database to determine the fourth target data table on which the preset operation has been performed from the log information.

[0106] The third configuration module is configured to add a preset public environment identifier to the fourth target data table if the environment identifier is not configured in the fourth target data table.

[0107] According to an embodiment of the present disclosure, the data processing device 500 further includes a fourth configuration module.

[0108] The fourth configuration module is used to add the preset public environment identifier to the first target data table when the state of the interceptor configured in the database is closed.

[0109] According to the modules, submodules, units, and subunits of the embodiments of the present invention, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be split into multiple modules for implementation. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, according to the modules, submodules, units, and subunits of the embodiments of the present invention, one or more thereof can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is run.

[0110] For example, any multiple of the first acquisition module 510, the storage module 520, and the first configuration module 530 can be combined into one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the storage module 520, and the first configuration module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 510 , the storage module 520 , and the first configuration module 530 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.

[0111] It should be noted that the data processing device part in the embodiment of the present disclosure corresponds to the data processing method part in the embodiment of the present disclosure. The description of the data processing device part specifically refers to the data processing method part and will not be repeated here.

[0112] Figure 6 A block diagram schematically shows an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 6 As shown, the computer electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure.

[0114] Various programs and data required for the operation of the electronic device 600 are stored in the RAM 603. The processor 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0115] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage portion 608 including a hard disk; and a communication portion 609 including a network interface card such as a LAN card or a modem. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 610 as needed, so that a computer program read therefrom can be installed into the storage portion 608 as needed.

[0116] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0117] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0118] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0119] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or the RAM 603 described above and / or one or more memories other than the ROM 602 and the RAM 603 .

[0120] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the data processing method provided by the embodiment of the present disclosure.

[0121] When the computer program is executed by the processor 601, the above functions defined in the system / device of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0122] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0123] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, as well as the combination of boxes in the block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. It will be understood by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of the present disclosure.

[0125] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data processing method, comprising: Obtain the first target environment identifier of the data to be written and the current operating environment; Writing the data to be written into a first target data table in a database; as well as When the state of the interceptor configured in the database is enabled, adding the first target environment identifier to the first target data table; The method further comprises: Obtain the current independent environment list from the management backend through a heartbeat query, wherein the current independent environment list includes multiple environment identifiers; Determining a valid state of an environment identifier in the current independent environment list based on the current system time; In the case where it is determined that there is a third target environment identifier whose validity status is indicated as invalid, determining a third target data table having the third target environment from the database; and The environment identifier of the third target data table is modified to a preset public environment identifier.

2. The method according to claim 1, further comprising: In response to a data change request, obtaining a first structured query statement and a second target environment identifier carried in the data change request; The first structured query statement and the conditional statement generated based on the second target environment identifier are concatenated by the interceptor to obtain a second structured query statement; as well as The second structured query statement is executed in the database to determine a second target data table having the second target environment identifier from the database, and data is modified in the second target data table.

3. The method according to claim 1, further comprising: Calling the data interface with the management backend to obtain the independent environment list from the management backend; Recording the first target environment identifier in the independent environment list; Configuring a validity period of the first target environment identifier based on the category of the current operating environment; as well as The updated independent environment list is sent to the management backend so that the management backend replaces the stored independent environment list.

4. The method according to claim 1, further comprising: monitoring log information of the database to determine, from the log information, a fourth target data table on which a preset operation has been performed; as well as In a case where the fourth target data table is not configured with an environment identifier, a preset public environment identifier is added to the fourth target data table.

5. The method according to claim 1, further comprising: When the state of the interceptor configured in the database is closed, the preset public environment identifier is added to the first target data table.

6. A data processing device comprising: A first acquisition module is used to obtain the data to be written and the first target environment identifier of the current operating environment; A storage module, configured to write the data to be written into a first target data table in a database; as well as A first configuration module is configured to add the first target environment identifier to the first target data table when the state of the interceptor configured in the database is enabled; A third acquisition module is used to obtain a current independent environment list from the management background through a heartbeat query, wherein the current independent environment list includes multiple environment identifiers; A first determining module, configured to determine a valid state of an environment identifier in the current independent environment list based on a current system time; a second determining module configured to, if it is determined that there is a third target environment identifier whose valid state is indicated as invalid, determine a third target data table having the third target environment from the database; and The first modifying module is configured to modify the environment identifier of the third target data table to a preset public environment identifier.

7. An electronic device comprising: one or more processors; a memory for storing one or more instructions, When the one or more instructions are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 5. 8 . A computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is enabled to implement the method according to claim 1 .

9. A computer program product, comprising computer executable instructions, for implementing the method according to any one of claims 1 to 5 when the computer executable instructions are executed.

Citation Information

Patent Citations

  • Data processing method based on multiple applications, computing equipment and storage medium

    CN111031052A

  • Data processing method and system, electronic equipment and storage medium

    CN111782717A