Data providing method and apparatus, device, and storage medium
By mirror -based supply -based supply, prepare the data required for the development of the test in advance, and mount them into the target environment, solve the impact of the traditional supply plan on the production system and resource consumption problems, and achieve efficient and secure data For the number.
Patent Information
- Application Number
- PCT/CN2024/104598
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-25
- Filing Date
- 2024-07-10
- Publication Date
- 2025-01-30
AI Technical Summary
When traditional data supply solutions provide data to a large number of developers and testers, frequent data collection has a great impact on the production system, and data processing and circulation require a large amount of storage resources and personnel investment, which consumes huge resources.
By mirror -based supply, prepare the data required for the development of the test in advance, use the mirror to create a copy of the target, and mount them into the target environment to achieve the rapid provision of data.
The efficiency of the number of confession of the development and testing scenarios has reduced the impact on the production system, reduced manual investment and resource consumption, and reduced the risk of sensitive data leakage.
Smart Images

Figure CN2024104598_30012025_PF_FP_ABST
Abstract
Description
Data supply method, device, equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 25, 2023, with application number 202310919494.2. The entire contents of the above application are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of computer technology, for example, to a data supply method, apparatus, device and storage medium. Background Art
[0003] To improve the quality of information system software development and testing, raw production data with a certain degree of complexity is often used as the test foundation. As a core asset in this field, raw production data often contains a considerable amount of sensitive information. Therefore, data security must be fully considered in software testing projects to prevent data leakage risks.
[0004] Traditional data supply solutions require several steps to provide test data, including data collection, importing the data into an intermediate repository, data processing, and importing the processed data into the development and testing environment. However, when using traditional data supply solutions to provide data to a large number of developers and testers, frequent data collection is required, significantly impacting production systems. Furthermore, data processing and circulation require significant storage resources and personnel investment, consuming significant resources.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a data supply method, apparatus, device, and storage medium, which provide data based on mirroring, can prepare the data required for development and testing in advance, improve the efficiency of data supply in development and testing scenarios, and reduce the impact of frequent data collection on the production system in traditional data supply solutions.
[0007] According to one aspect of the present application, a data supply method is provided, comprising:
[0008] Obtaining a data supply application, wherein the data supply application includes: environmental identification information and query information;
[0009] querying whether a target image corresponding to the query information exists in the initial image set, and in response to the existence of a target image corresponding to the query information, creating a target copy according to the target image;
[0010] The target copy is mounted to the target environment corresponding to the environment identification information according to the environment identification information.
[0011] According to another aspect of the present application, a data supply device is provided, the data supply device comprising:
[0012] A data supply application acquisition module is configured to acquire a data supply application, wherein the data supply application includes: environmental identification information and query information;
[0013] a target copy creation module configured to query whether a target image corresponding to the query information exists in the initial image set, and in response to the existence of a target image corresponding to the query information, create a target copy based on the target image;
[0014] The target replica mounting module is configured to mount the target replica to a target environment corresponding to the environment identification information according to the environment identification information.
[0015] According to another aspect of the present application, an electronic device is provided, comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data supply method described in any embodiment of the present application.
[0019] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data supply method described in any embodiment of the present application when executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The following is a brief introduction to the drawings required for use in the embodiments. The following drawings only illustrate some embodiments of the present application and should not be regarded as limiting the scope.
[0021] FIG1 is a flow chart of a data supply method according to an embodiment of the present application;
[0022] FIG2 is a flow chart of another method for providing data in an embodiment of the present application;
[0023] FIG3 is a workflow arrangement diagram in an embodiment of the present application;
[0024] FIG4 is a flow chart of data supply in an embodiment of the present application;
[0025] FIG5 is a flowchart of a workflow configuration in an embodiment of the present application;
[0026] FIG6 is a schematic structural diagram of a data supply device according to an embodiment of the present application;
[0027] FIG7 is a schematic structural diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. The embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, in addition to the process, method, system, product or equipment comprising a series of steps or units shown in the embodiments of the present application, other processes, methods, systems, products or equipment of this series of steps or units not clearly listed may also be included, or other steps or units inherent to these processes, methods, systems, products or equipment.
[0030] Before using the technical solutions disclosed in the multiple embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] Example 1
[0032] FIG1 is a flow chart of a data supply method provided in an embodiment of the present application. This embodiment is applicable to data supply situations. The method can be executed by a data supply device in an embodiment of the present application. The device can be implemented in software and / or hardware. As shown in FIG1 , the method specifically includes the following steps:
[0033] S110, obtaining a data supply application, wherein the data supply application includes: environmental identification information and query information.
[0034] The query information includes at least one of a target time tag, a target image tag, a target image name, and target database identification information.
[0035] The data supply application may further include: first identity identification information.
[0036] The environment identification information may be an Internet Protocol (IP) environment, or other information used to identify an environment.
[0037] S120: If a target image corresponding to the query information exists in the initial image set, create a target copy according to the target image.
[0038] The initial mirror set may be generated by: obtaining production environment data stored in at least one database; backing up the production environment data to obtain an initial backup data set; generating an initial copy based on the backup data in the initial backup data set; mounting and restoring the initial copy to a data processing environment; performing data processing operations on the initial copy mounted to the data processing environment to obtain a data-processed initial copy; and creating an initial mirror set based on the data-processed initial copy. The initial mirror set may also be generated by: obtaining production environment data stored in at least one database; backing up the production environment data to obtain an initial backup data set; generating an initial copy based on the backup data in the initial backup data set, and creating an initial mirror set based on the initial copy.
[0039] The images in the initial image set carry image tags, and the image tags may include: second identity information, image identification information, and other image attribute information.
[0040] If the target image corresponding to the query information exists in the initial image set, the method for creating a target replica based on the target image may be: querying the initial image set based on the target image tag; if an image with the same image tag as the target image tag exists in the initial image set, the image with the same image tag as the target image tag is determined as the target image, and the target replica is created based on the target image. If the target image corresponding to the query information exists in the initial image set, the method for creating a target replica based on the target image may also be: querying the initial image set based on the target image name; if an image with the same name as the target image name exists in the initial image set, the image with the same name as the target image name is determined as the target image, and the target replica is created based on the target image. If the target image corresponding to the query information exists in the initial image set, the method for creating a target replica based on the target image may also be: querying the initial image set based on the target database identification information; if an image with the same database as the database corresponding to the target database identification information exists in the initial image set, the image with the same database as the database corresponding to the target database identification information is determined as the target image, and the target replica is created based on the target image. If a target image corresponding to the query information exists in the initial image set, a method for creating a target copy based on the target image may also be: querying the initial image set based on the target time tag; if an image with a time tag identical to the target time tag exists in the initial image set, determining the image with the time tag identical to the target time tag as the target image, and creating a target copy based on the target image.
[0041] If the target image corresponding to the query information exists in the initial image set of the current system, a target copy is created based on the target image. If the target image corresponding to the query information does not exist in the initial image set of the current system, an application needs to be submitted to the target system. If the target image corresponding to the query information exists in the target system, the target system remotely copies the target image corresponding to the query information to the current system, so that the current system creates a target copy based on the target image corresponding to the query information. If the target image corresponding to the query information does not exist in the target system, the target system generates a target image corresponding to the query information and remotely copies the target image corresponding to the query information to the current system, so that the current system creates a target copy based on the target image corresponding to the query information.
[0042] S130: Mount the target replica to the target environment corresponding to the environment identification information according to the environment identification information.
[0043] The method of mounting the target replica to the target environment corresponding to the environment identification information according to the environment identification information may be: obtaining the target environment corresponding to the environment identification information, and mounting the target replica to the target environment corresponding to the environment identification information.
[0044] In the embodiment of the present application, by mounting the target copy to the target environment corresponding to the environment identification information, data can be provided to the target environment in minutes.
[0045] If the image is created based on a copy, and the copy is created after it has been mounted and restored (generally data processing is required, such as desensitization, slimming, etc., which all need to be mounted and restored first), the copy created by this image does not need to be mounted and restored, and only needs to be mounted to the target environment. If the image is created based on a copy, and the copy has not been mounted and restored (for example, a copy just created from a time point), the copy created by this image needs to be mounted and restored to the target environment. If the image is created based on the backup time point, the copy created by this image needs to be mounted and restored to the target environment. The above data sources are all oracle database scenarios, and the mounting methods of different databases are different. The embodiments of the present application are also aimed at oracle database scenarios. The above are also situations where the oracle instance needs to be open. If it does not need to be open, the copy created by this image does not need to be mounted and restored, and only needs to be mounted to the target environment.
[0046] Optionally, if a target image corresponding to the query information exists in the initial image set, before creating a target copy based on the target image, it also includes: obtaining production environment data stored in at least one database; backing up the production environment data to obtain an initial backup data set; generating an initial copy based on the backup data in the initial backup data set; mounting and restoring the initial copy to a data processing environment; performing data processing operations on the initial copy mounted on the data processing environment to obtain an initial copy after data processing; and creating an initial image set based on the initial copy after data processing.
[0047] The production environment refers to the customer's business environment. The database used to store production environment data shown in FIG2 is an Oracle database, and the production environment data may be business data.
[0048] The method of generating the initial copy based on the backup data in the initial backup data set can be: generating the initial copy based on the virtual cloning technology and the backup data in the initial backup data set. Based on the virtual cloning technology, no actual storage space is occupied, reducing the storage resource investment in the data transfer process.
[0049] The data processing operations include but are not limited to: desensitization processing and weight loss processing.
[0050] Using backup data as a data source can reduce the impact of frequent data collection in traditional data supply solutions on production systems.
[0051] The backup capability provided by the embodiments of the present application can realize the collection of original data. Using this method, the preparation data and the collection of the original data of the development and test scenario only need to share a copy, without the need for additional data collection workload.
[0052] The embodiment of the present application completes the two steps of data collection and data processing in advance and saves them by creating a mirror. When a data supply request is received, it is only necessary to select a suitable mirror according to the data supply request, create a copy, and then mount it to the target environment, which greatly improves the response to data supply needs and data delivery.
[0053] Optionally, a data processing operation is performed on the initial copy mounted on the data processing environment to obtain the initial copy after data processing, including: desensitizing the initial copy mounted on the data processing environment to obtain the initial copy after data processing; or, slimming the initial copy mounted on the data processing environment to obtain the initial copy after data processing; or, desensitizing the initial copy mounted on the data processing environment to obtain the desensitized initial copy, and slimming the desensitized initial copy to obtain the slimmed-down initial copy.
[0054] By slimming down and desensitizing data, the risk of sensitive data leakage can be reduced.
[0055] In a specific example, production environment data stored in at least one database is obtained, the production environment data is backed up to obtain backup data, the backup data is cloned based on cloning technology to obtain an initial copy, the initial copy is mounted and restored to a data processing environment, data processing operations are performed on the initial copy mounted to the data processing environment to obtain an initial copy after data processing, and an initial mirror set is created based on the initial copy after data processing.
[0056] As shown in Figure 2, backup management provides data backup capabilities. Through this function, production environment data can be backed up to the backup management storage according to the backup strategy and saved in the form of backup time points (snapshots).
[0057] Cloning is the process of converting a backup point or image into a virtual copy using virtual cloning technology. Mounting and restoring is the process of attaching a copy to the target environment and enabling the database instance to start normally by rolling back the logs.
[0058] The data processing system performs operations such as data masking or data slimming on replicas mounted to the data processing environment to protect sensitive data. Data masking involves transforming sensitive information into mirrored data using specific masking rules to protect sensitive data. Data slimming involves deleting unretained data by setting retention policies. For example, if a user only needs the data of a single database user, they can set a policy to retain that user's data. The data processing system will then delete all data except for the system user and the specified user.
[0059] Replica management provides functions such as creating, deleting, mounting, and unmounting replicas. The sources of replicas are as follows:
[0060] Create a copy at the backup point in time: A virtual clone is created at the backup point in time to generate a corresponding copy. If the production environment is damaged and the database needs to be restored, the copy can be mounted to a customer-provided environment. For Oracle databases, a recovery process is required to ensure data consistency before the database can be properly pulled up.
[0061] Empty copy: The data source of the empty copy is not the backup data, but the externally imported data.
[0062] Mirroring: Create replicas by cloning a mirror. A mirror is a collection of complete database information. Multiple replicas can be created simultaneously from a mirror, greatly improving data distribution efficiency.
[0063] Image data is read-only and cannot be modified. While copies can be created from it, the image itself cannot be mounted directly for use. Images include private and public images. Private images are those that are visible on the private image page and belong to the current user. Images created by a user are placed in that user's personal image. Public images are those that are visible on the public image page and have all permissions public. Public images cannot be directly cloned for use; they must first be copied to a personal image before cloning. Public images are images that are made visible to other users by modifying their permissions. The data in the images in image management is the test data required by developers and testers. Creating copies of images and mounting them to development and testing environments allows for rapid data distribution.
[0064] The sources of images are as follows:
[0065] Create a mirror at the backup time point: When developers and testers only need to obtain the backed-up data files and do not need to pull up the database, they can choose this method to create a mirror.
[0066] Replica creation mirror: The replica here can be a newly created replica or a replica after data processing.
[0067] Copy images from public mirrors: This feature enables cross-user level image data sharing.
[0068] Remote Image Copy: This feature enables cross-region data sharing. If the target image does not exist in the system used by the developer or tester, remote copying can be used to remotely copy the processed image data to the system environment used by the developer or tester for their use.
[0069] Other features of image management include:
[0070] Image tags: Image owners or administrators can set tags for images to help other users quickly find the target image.
[0071] Image permission settings: Only the image owner or user administrator has access to a newly created image. If you want to share an image with other users, you can change the image's access permissions. For example, Public: All users can see it and copy it; Visible Only: All users can see it but cannot copy it. If you want to copy it, you need to provide key authentication, and only after successful authentication can you copy it.
[0072] Mirror topology: records the source of the mirror and its derived copies and mirrors, facilitating data traceability and tracking.
[0073] Image version management: Perform version management on images created from the same data source, record data iteration information, and facilitate statistics and management of data usage.
[0074] In the embodiment of the present application, the development and testing environment refers to the environment used by development and testing personnel. When development and testing personnel need to use data, they only need to select an image, create a copy based on the image, and then mount it to the target environment before using it.
[0075] In order to improve the efficiency of preparing test data and reduce manual input, the workflow for creating an image provided by an embodiment of the present application is shown in Figure 3. The workflow refers to a process for completing a specific task by connecting multiple different types of nodes with connecting lines according to a certain topological relationship. A node refers to an entity abstracted from a task and can refer to a specific task. Depending on the task type, nodes can be divided into multiple types, including but not limited to: policy nodes, condition detection nodes, resource nodes, application nodes, verification nodes, data processing nodes, image nodes, cleanup nodes, etc.
[0076] In addition, users can ensure the timely recovery and destruction of copies by setting the copy retention time and cleanup method, which not only reduces resource waste but also improves data security.
[0077] Optionally, the data supply application further includes: first identity identification information;
[0078] If a target image corresponding to the query information exists in the initial image set, creating a target copy based on the target image, including: querying the initial image set according to the first identity information to obtain a first image set corresponding to the first identity information; if a target image corresponding to the query information exists in the first image set, creating a target copy based on the target image.
[0079] The first identity identification information is identification information used to represent the user's identity, for example, it can be an account number and password.
[0080] The initial image set is a public image set, and the initial image set includes a first image set. The first image set corresponding to the first identity information is a private image set corresponding to the development and testing personnel who submitted the data supply application.
[0081] Optionally, the method further includes: if the target image corresponding to the query information does not exist in the first image set, and the target image corresponding to the query information exists in the initial image set, obtaining an image tag carried by the target image, wherein the image tag includes: second identity information; sending a permission application to a user corresponding to the second identity information; and if permission application success information is received from the user corresponding to the second identity information, creating a target copy based on the target image.
[0082] The second identity identification information is identification information used to represent the user's identity, for example, it can be an account number and password.
[0083] If the user corresponding to the second identity information receives a permission application success message, it means that the development and testing personnel who submitted the data application have the permission to use the target image, that is, the user corresponding to the second identity information has enabled the user corresponding to the first identity information to use the target image.
[0084] If the target image corresponding to the query information does not exist in the private image collection corresponding to the development and tester who submitted the data request, the initial image collection is queried. If the target image corresponding to the query information does not exist in the initial image collection, an image acquisition request is sent to the target system, a first image is received from the target system, and a first copy is created based on the first image. If the target image corresponding to the query information exists in the initial image collection, the image tag carried by the target image is obtained, and a permission request is sent to the user corresponding to the second identity information. If a permission request success message is received from the user corresponding to the second identity information, a target copy is created based on the target image.
[0085] Optionally, the data supply application further includes: first identity identification information;
[0086] If the target image corresponding to the query information exists in the initial image set, creating a target replica based on the target image, including: if the target image corresponding to the query information exists in the initial image set, obtaining an image tag carried by the target image, wherein the image tag includes: second identity identification information; if the first identity identification information and the second identity identification information are the same, creating the target replica based on the target image.
[0087] If the first identity identification information and the second identity identification information are the same, it means that the target image is an image in the private image set corresponding to the development and testing personnel who submitted the data supply application.
[0088] Optionally, it also includes: if the first identity identification information and the second identity identification information are different, sending a permission application to the user corresponding to the second identity identification information; if permission application success information is received from the user corresponding to the second identity identification information, creating a target copy based on the target image.
[0089] If the first identity information and the second identity information are different, it means that the development and testing personnel who submitted the data supply application do not have the permission to use the target image and need to apply for permission to use from the creator of the target image.
[0090] Optionally, it also includes: if the target image corresponding to the query information does not exist in the initial image set, sending an image acquisition request to the target system, wherein the image acquisition request carries the query information; receiving a first image sent by the target system, wherein the first image is the image corresponding to the query information; creating a first copy based on the first image; and mounting the first copy to the target environment corresponding to the environment identification information.
[0091] If the target image corresponding to the query information does not exist in the current system, an image acquisition request is sent to the target system. If the first image corresponding to the query information exists in the target system, the target system remotely copies the first image to the current system so that the current system creates a first copy based on the first image; and mounts the first copy to the target environment corresponding to the environment identification information.
[0092] Optionally, the first image is an image corresponding to a second copy created by the target system according to target backup data, and the target backup data is backup data corresponding to the query information obtained by querying an initial backup data set by the target system.
[0093] The target system may query the initial backup data set to obtain the target backup data by: querying the initial backup data set to obtain the target backup data set corresponding to the target database identification information; and determining the backup data in the target backup data set whose backup time point matches the target time tag as the target backup data.
[0094] If the first image corresponding to the query information does not exist in the target system, a first image needs to be generated and remotely backed up to the current system so that the current system creates a first copy based on the first image; the first copy is mounted to the target environment corresponding to the environment identification information.
[0095] For example, if the system used by developers and testers is System B, and System A is responsible for data backup, data processing, and image creation, and System A and System B are different systems, then the image in System A needs to be remotely copied to System B. For example, when developers and testers need to use test data, they submit a request to System B. System B then determines whether there are any images that meet the requirements. If so, it selects an image and creates a copy for the developers and testers to use. If not, System B submits a request to the administrator of System A. System A checks to see if there are any images that meet the requirements. If so, it transmits the selected image data to System B via a one-way network and generates a corresponding image. If not, it generates the image by selecting a backup time point, processing the data, and creating the image, and then transmits it to System A.
[0096] In a specific example, if the target image corresponding to the query information does not exist in the initial image set of the current system, it means that the current system does not have the target image corresponding to the query information, and it is necessary to obtain the first image from the target system. The method of obtaining the first image from the target system can be: the current system sends a remote copy request to the target system, and the remote copy request carries the query information. If the first image corresponding to the query information exists in the target system, the target system directly remotely copies the first image to the current system. If the first image corresponding to the query information does not exist in the target system, the target system queries the initial backup data set to obtain the target backup data corresponding to the query information; the target system creates a second copy based on the target backup data; the target system obtains attribute information of the second copy; the target system determines whether data processing is required based on the attribute information of the second copy; if necessary, the target system mounts and restores the second copy to the data processing environment to obtain the second copy after data processing, and creates the first image based on the second copy after data processing; the target system remotely copies the first image to the current system, and after the current system obtains the first image, the current system creates the first copy based on the first image; the current system mounts the first copy to the target environment corresponding to the environment identification information. If not needed, the target system creates the first image based on the second copy, and the target system remotely copies the first image to the current system. After the current system obtains the first image, the current system creates the first copy based on the first image; the current system mounts the first copy to the target environment corresponding to the environment identification information.
[0097] In another specific example, as shown in FIG4 , the data supply process is as follows:
[0098] S10. The development and testing personnel submit a data application, and upon completion, proceed to step S20.
[0099] S20: First query whether there is a mirror that meets the query information according to the data supply application. If there is a mirror that meets the query information, execute step S40; otherwise, execute step S30.
[0100] S30: Send an image acquisition request to the target system, and receive a first image sent by the target system, wherein the first image is an image corresponding to the query information. If the first image corresponding to the query information exists in the target system, the target system remotely copies the first image to the current system. If the first image corresponding to the query information does not exist in the target system, a first image needs to be generated, and the generated first image is remotely backed up to the current system. Generating the first image includes the following steps:
[0101] S3.1. Select a backup time point that matches the query information to create a second copy, and determine whether the second copy needs data processing. If data processing is not required, execute step S3.2; otherwise, execute step S3.3.
[0102] S3.2. Create a first mirror image based on the second copy.
[0103] S3.3. Mount and restore the second copy to the data processing environment. If the tester needs complete test data but cannot provide the tester with data containing sensitive data, step S3.4 can be executed; if the tester only needs partial data, such as data under a database user, step S3.5 can be executed.
[0104] S3.4. Select a desensitization strategy and perform desensitization processing. After completion, proceed to step S3.2.
[0105] S3.5. Select a slimming strategy to perform slimming processing. After completion, execute step S3.2.
[0106] S40, select the mirror image to create a copy, and after completion, execute step S50.
[0107] S50. Mount the copy created by the mirror image to the development and testing environment for use by development and testing personnel.
[0108] In another specific example, as shown in FIG5 , the workflow nodes in FIG5 are configured according to FIG3 , and the workflow configuration process is as follows:
[0109] S1. Create a workflow task on the page and configure the workflow nodes. Once completed, proceed to step S2.
[0110] S2. Configure the policy node, which is the policy for workflow execution. After completion, proceed to step S3.
[0111] S3. Configure the resource node. The node is configured with production information and client information for mounting and recovering. After completion, proceed to step S4.
[0112] S4. Configure the application node. The node sets the configuration information related to mounting and recovery. After completion, execute step S5.
[0113] S5. Configure the data processing node, which will perform relevant processing on the replica data, such as data desensitization, data slimming, etc. After the configuration is completed, proceed to step S6.
[0114] S6: Configure the mirror node, which configures the generated mirror information. After completion, proceed to step S7.
[0115] S7: Configure a resource cleanup node, which configures the retention time and deletion method of the replica. After completion, proceed to step S8.
[0116] S8. Save the workflow and publish it.
[0117] If desensitization is required, the system-related user and password information needs to be desensitized. The technical solution of this embodiment obtains a data supply application, wherein the data supply application includes: environment identification information and query information; if there is a target image corresponding to the query information in the initial image set, a target copy is created according to the target image; according to the environment identification information, the target copy is mounted to the target environment corresponding to the environment identification information, which can prepare the data required for development and testing in advance, improve the efficiency of data supply in development and testing scenarios, reduce the impact of frequent data collection on the production system in traditional data supply solutions, and do not require manual intervention, reduce the risk of misoperation, and reduce the cost of manual input.
[0118] Example 2
[0119] Figure 6 is a schematic diagram of the structure of a data provisioning device provided in an embodiment of the present application. This embodiment is applicable to situations where data is provided to a target environment. The device can be implemented using software and / or hardware and can be integrated into any device that provides data provisioning functionality. As shown in Figure 6, the data provisioning device specifically includes: a data provisioning application acquisition module 210, a target replica creation module 220, and a target replica mounting module 230.
[0120] Among them, the data supply application acquisition module 210 is configured to obtain a data supply application, wherein the data supply application includes: environment identification information and query information; the target copy creation module 220 is configured to query whether there is a target image corresponding to the query information in the initial image set, and in response to the existence of a target image corresponding to the query information, create a target copy based on the target image; the target copy mounting module 230 is configured to mount the target copy to the target environment corresponding to the environment identification information according to the environment identification information.
[0121] The above-mentioned product can execute the method provided in any embodiment of this application, and has the corresponding functional modules and effects of the execution method.
[0122] Example 3
[0123] FIG7 shows a block diagram of an electronic device 10 that can be used to implement an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0124] As shown in FIG7 , the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, that is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the ROM 12 or the computer program loaded from the storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0125] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0126] The processor 11 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the data processing method.
[0127] In some embodiments, the data supply method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data supply method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the data supply method in any other suitable manner (e.g., via firmware).
[0128] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] Computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0130] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. A machine-readable storage medium can include an electrical connection based on one or more lines, 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 a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) configured to display information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be configured to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0133] A computing system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship is established by computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services.
[0134] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the multiple steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.
Claims
1. A method for providing data, comprising: Obtaining a data supply application, wherein the data supply application includes: environmental identification information and query information; querying whether there is a target image corresponding to the query information in the initial image set, and in response to the existence of the target image corresponding to the query information, creating a target copy according to the target image; The target copy is mounted to the target environment corresponding to the environment identification information according to the environment identification information.
2. The method according to claim 1, before querying whether there is a target image corresponding to the query information in the initial image set, further comprising: Obtaining production environment data stored in at least one database; Backing up the production environment data to obtain an initial backup data set; generating an initial copy according to the backup data in the initial backup data set; Restoring the initial copy to the data processing environment; Performing data processing operations on the initial copy mounted on the data processing environment to obtain the initial copy after data processing; An initial mirror set is created based on the processed initial copy of the data.
3. The method according to claim 2, wherein: The data supply application also includes: first identity identification information; Querying whether there is a target image corresponding to the query information in the initial image set, and in response to the existence of the target image corresponding to the query information, creating a target copy according to the target image, including: Querying the initial image set according to the first identity information to obtain a first image set corresponding to the first identity information; The first image set is queried whether there is a target image corresponding to the query information, and in response to the existence of the target image corresponding to the query information, a target copy is created according to the target image.
4. The method according to claim 3, further comprising: In response to the fact that the target image corresponding to the query information does not exist in the first image set, and the target image corresponding to the query information exists in the initial image set, acquiring an image tag carried by the target image, wherein the image tag includes: second identity information; Sending a permission request to the user corresponding to the second identity identification information; In response to the received permission application success information fed back by the user corresponding to the second identity identification information, a target copy is created according to the target image.
5. The method according to claim 2, wherein: The data supply application also includes: first identity identification information; Querying whether there is a target image corresponding to the query information in the initial image set, and in response to the existence of the target image corresponding to the query information, creating a target copy according to the target image, including: In response to the existence of a target image corresponding to the query information in the initial image set, acquiring an image tag carried by the target image, wherein the image tag includes: second identity information; It is determined whether the first identity information and the second identity information are the same, and in response to the first identity information and the second identity information being the same, a target copy is created according to the target image.
6. The method according to claim 5, further comprising: In response to the first identity information and the second identity information being different, sending a permission request to a user corresponding to the second identity information; In response to the received permission application success information fed back by the user corresponding to the second identity identification information, a target copy is created according to the target image.
7. The method according to claim 2, further comprising: In response to the absence of a target image corresponding to the query information in the initial image set, sending an image acquisition request to a target system, wherein the image acquisition request carries the query information; Receiving a first image sent by the target system, wherein the first image is a target image corresponding to the query information; Creating a first copy based on the first image; The first copy is mounted to the target environment corresponding to the environment identification information.
8. The method according to claim 7, wherein: The first image is an image corresponding to the second copy created by the target system according to the target backup data, and the target backup data is the backup data corresponding to the query information obtained by the target system querying the initial backup data set.
9. A data supply device, comprising: A data supply application acquisition module is configured to acquire a data supply application, wherein the data supply application includes: environmental identification information and query information; a target copy creation module, configured to query whether there is a target image corresponding to the query information in the initial image set, and in response to the existence of the target image corresponding to the query information, create a target copy according to the target image; The target copy mounting module is configured to mount the target copy to the The target environment corresponding to the environment identification information.
10. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the data supply method according to any one of claims 1 to 8.
11. A computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a processor to implement the data supply method according to any one of claims 1 to 8 when the instructions are executed.
Citation Information
Patent Citations
Application management method, system and server in hybrid cloud environment
CN112925565A
Data processing method
CN115952542A
Resource management method and device, electronic equipment and medium
CN116302540A
Data supply method, device and equipment and storage medium
CN116932503A
Method and apparatus for accessing mirrored logical volumes
US6216211B1