A management method and device for a public test library, and electronic equipment

By detecting and adjusting permissions and using exclusive locks to bind the main responsible system, the problem of data loss or overwriting when multiple systems share the hive database is solved, ensuring data integrity and business progress.

CN110457941BInactive Publication Date: 2024-08-23CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910636943.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-15
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When multiple systems share the same hive database, data loss or data overwriting is prone to occur, seriously affecting business progress.

Method used

By detecting whether the db_sid key field and/or region_sid key field exists in the system table of the target hive database, adjust the permissions of the non-main responsible system to view permissions to prevent them from modifying data, and use exclusive locks to bind the main responsible system and hive database to ensure data integrity.

Benefits of technology

It effectively avoids data loss or overwriting, ensures the normal progress of business, restores data to a compliant state through log files, and provides timely warnings for unauthorized use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110457941B
    Figure CN110457941B
Patent Text Reader

Abstract

The present invention relates to the technical field of business process optimization, and discloses a management method and device for a public test library, and an electronic device. The method comprises: when it is detected that a target hive database is used, obtaining the identity of a system using the target hive database; wherein the target hive database is any one of multiple hive databases of the public test library; judging whether the system to which the identity belongs is the main responsible system of the target hive database according to the identity; if not, executing a scanning script to detect whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database; if so, adjusting the authority of the system to which the above identity belongs to a viewing authority, so that the system to which the identity belongs cannot modify the data of the target hive database. It can avoid the loss of data in the public test library or the overwriting of data, and ensure the progress of business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of business process optimization, and in particular to a management method and device for a public test library, and electronic equipment. Background Art

[0002] The public test library, Business Data Platform (BDP), is a cloud server that can upload data and charts needed for daily office work, and then output visualized data or charts after professional integration and analysis. Through BDP, relevant persons in charge of the enterprise can understand and master the enterprise's operating data in a timely manner, so as to optimize and allocate resources more reasonably and efficiently.

[0003] At present, BDP generally includes multiple hive databases, which are often used to store basic data of the operational data store (ODS) layer. These basic data mainly come from various systems. However, in practice, it is found that when multiple systems use the same hive database, data loss or data overwriting often occurs, which seriously affects the business progress. For example, when system A and system B use the same hive database, the results submitted by system B may destroy the results submitted by system A, resulting in the loss or overwriting of system table data in system A.

[0004] Therefore, how to effectively manage BDP and avoid data loss or data overwriting in the public test library is one of the hot issues that needs to be solved urgently. Summary of the invention

[0005] In order to solve the problem of data loss or data overwriting in a public test library, the present invention provides a management method and device for a public test library, and an electronic device.

[0006] A first aspect of an embodiment of the present invention discloses a method for managing a public test library, wherein the public test library includes multiple hive databases, and the method includes:

[0007] When it is detected that the target hive database is used, obtaining the identity of the system using the target hive database; wherein the target hive database is any one of the multiple hive databases;

[0008] According to the identity identifier, determine whether the system to which the identity identifier belongs is the primary responsible system of the target hive database;

[0009] If the system to which the identity belongs is not the primary responsible system of the target hive database, execute a scanning script to detect whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database;

[0010] If the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, the permission of the system to which the identity belongs is adjusted to the viewing permission so that the system to which the identity belongs cannot modify the data of the target hive database.

[0011] As an optional implementation manner, in the first aspect of the embodiment of the present invention, judging, according to the identity identifier, whether the system to which the identity identifier belongs is the primary responsible system of the target hive database includes:

[0012] Obtaining a business table of the target hive database; the business table is used to indicate the primary responsible system of the target hive database at the current moment;

[0013] According to the identity identifier, determining whether the system to which the identity identifier belongs matches the primary responsible system indicated at the current moment in the service table;

[0014] If the system to which the identity identifier belongs matches the primary responsible system indicated in the business table at the current moment, determining that the system to which the identity identifier belongs is the primary responsible system of the target hive database;

[0015] If the system to which the identity identifier belongs does not match the primary responsible system indicated in the business table at the current moment, it is determined that the system to which the identity identifier belongs is not the primary responsible system of the target hive database.

[0016] As an optional implementation, in the first aspect of the embodiment of the present invention, after determining that the system to which the identity belongs is not the primary responsible system of the target hive database if the system to which the identity belongs does not match the primary responsible system indicated in the business table at the current moment, and before executing the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database, the method further includes:

[0017] Create a script file;

[0018] Importing scanning parameters into the script file to generate the scanning script; wherein the scanning parameters at least include the name of the target hive database, the type of the target hive database and the path of the target hive database.

[0019] As an optional implementation, in the first aspect of the embodiment of the present invention, if the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, after adjusting the permission of the system to which the identity belongs to be the viewing permission so that the system to which the identity belongs cannot modify the data of the target hive database, the method further includes:

[0020] Obtain the log file of the target hive database;

[0021] Determine, according to the log file, a target update record of a system table of the target hive database; the target update record is an update record of the system table of the target hive database after the system to which the identity belongs uses the target hive database;

[0022] According to the target update record, the system table of the target hive database is restored to a compliant state; the compliant state is the state before the db_sid key field and / or the region_sid key field is generated in the target update record.

[0023] As an optional implementation, in the first aspect of the embodiment of the present invention, after restoring the system table of the target hive database to a compliant state according to the target update record, the method further includes:

[0024] Send unauthorized information to the system to which the identity belongs, so as to warn the user who operates the system to which the identity belongs of unauthorized use of the target hive database.

[0025] As an optional implementation manner, in the first aspect of the embodiment of the present invention, if the system to which the identity identifier belongs matches the primary responsible system indicated in the business table at the current moment, after determining that the system to which the identity identifier belongs is the primary responsible system of the target hive database, the method further includes:

[0026] The main responsible system and the target hive database are bound by using an exclusive lock, so that other systems except the main responsible system cannot modify the data in the target hive database.

[0027] As an optional implementation, in the first aspect of the embodiment of the present invention, after the exclusive lock is used to bind the main responsible system and the target hive database so that other systems except the main responsible system cannot modify the data of the target hive database, the method further includes:

[0028] Detecting whether an end instruction is received; the end instruction is used to instruct the main responsible system to end the use of the target hive database;

[0029] If the end instruction is received, the exclusive lock is released to restore the target hive database to an idle state.

[0030] A second aspect of an embodiment of the present invention discloses a management device for a public test library, wherein the public test library includes multiple hive databases, and the device includes:

[0031] A first acquisition unit is used to acquire an identity of a system using the target hive database when it is detected that the target hive database is used; wherein the target hive database is any one of the multiple hive databases;

[0032] A judging unit, configured to judge, based on the identity identifier, whether the system to which the identity identifier belongs is the primary responsible system of the target hive database;

[0033] A first detection unit is used to execute a scanning script to detect whether a db_sid key field and / or a region_sid key field exists in a system table of the target hive database when the judgment unit determines that the system to which the identity belongs is not the primary responsible system of the target hive database;

[0034] The adjustment unit is used to adjust the permission of the system to which the identity belongs to be a viewing permission when the first detection unit detects that the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0035] A third aspect of an embodiment of the present invention discloses an electronic device, the electronic device comprising:

[0036] processor;

[0037] A memory, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, a method for managing a public test library disclosed in the first aspect of an embodiment of the present invention is implemented.

[0038] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute a method for managing a public test library disclosed in the first aspect of an embodiment of the present invention.

[0039] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0040] A management method for a public test library provided by the present invention comprises the following steps: when it is detected that a target hive database is used, obtaining an identity of a system using the target hive database; wherein the target hive database is any one of multiple hive databases of the public test library; judging whether the system to which the identity belongs is the primary responsible system of the target hive database according to the identity; if not, executing a scanning script to detect whether a db_sid key field and / or a region_sid key field exist in a system table of the target hive database; if so, adjusting the authority of the system to which the above identity belongs to a viewing authority, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0041] Under this method, if it is determined based on the identity identifier that the system to which the identity identifier belongs is not the primary responsible system of the target hive database, the management device of the public test library further detects whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database. If so, it indicates that the system to which the identity identifier belongs may affect the normal use of the target hive database by other systems. The management device of the public test library adjusts the authority of the system to which the above-mentioned identity identifier belongs to a viewing authority, so that the system to which the identity identifier belongs cannot modify the data of the target hive database, thereby avoiding data loss or data overwriting in the public test library and ensuring business progress.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0044] Figure 1 is a schematic diagram of the structure of a device disclosed in an embodiment of the present invention;

[0045] Figure 2 is a flow chart of a method for managing a public test library disclosed in an embodiment of the present invention;

[0046] Figure 3 is a flow chart of another method for managing a public test library disclosed in an embodiment of the present invention;

[0047] Figure 4 is a flow chart of another method for managing a public test library disclosed in an embodiment of the present invention;

[0048] Figure 5It is a structural schematic diagram of a management device for a public test library disclosed in an embodiment of the present invention;

[0049] Figure 6 It is a structural schematic diagram of another public test library management device disclosed in an embodiment of the present invention;

[0050] Figure 7 It is a structural schematic diagram of another public test library management device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0052] Embodiment 1

[0053] The implementation environment of the present invention may be an electronic device, such as a smart phone, a tablet computer, or a desktop computer. The images stored in the electronic device may be: images downloaded from the Internet; images received via a wireless connection or a wired connection; images captured by a built-in camera of the electronic device.

[0054] Figure 1 1 is a schematic diagram of a structure of a device disclosed in an embodiment of the present invention. The device 100 may be the electronic device mentioned above. Figure 1 As shown, the apparatus 100 may include one or more of the following components: a processing component 102 , a memory 104 , a power component 106 , a multimedia component 108 , an audio component 110 , a sensor component 114 , and a communication component 116 .

[0055] The processing component 102 generally controls the overall operation of the device 100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 102 may include one or more processors 118 to execute instructions to perform all or part of the steps of the method described below. In addition, the processing component 102 may include one or more modules to facilitate the interaction between the processing component 102 and other components. For example, the processing component 102 may include a multimedia module to facilitate the interaction between the multimedia component 108 and the processing component 102.

[0056] The memory 104 is configured to store various types of data to support operations on the device 100. Examples of such data include instructions for any application or method operating on the device 100. The memory 104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The memory 104 also stores one or more modules, which are configured to be executed by the one or more processors 118 to complete all or part of the steps in the method shown below.

[0057] The power supply component 106 provides power to the various components of the device 100. The power supply component 106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 100.

[0058] The multimedia component 108 includes a screen that provides an output interface between the device 100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel. If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. The screen may also include an organic light emitting display (OLED).

[0059] The audio component 110 is configured to output and / or input audio signals. For example, the audio component 110 includes a microphone (MIC), which is configured to receive external audio signals when the device 100 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal can be further stored in the memory 104 or sent via the communication component 116. In some embodiments, the audio component 110 also includes a speaker for outputting audio signals.

[0060] The sensor assembly 114 includes one or more sensors for providing various aspects of status evaluation for the device 100. For example, the sensor assembly 114 can detect the open / closed state of the device 100, the relative positioning of the components, and the sensor assembly 114 can also detect the position change of the device 100 or a component of the device 100 and the temperature change of the device 100. In some embodiments, the sensor assembly 114 can also include a magnetic sensor, a pressure sensor or a temperature sensor.

[0061] The communication component 116 is configured to facilitate wired or wireless communication between the device 100 and other devices. The device 100 can access a wireless network based on a communication standard, such as WiFi (Wireless-Fidelity). In an embodiment of the present invention, the communication component 116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an embodiment of the present invention, the communication component 116 also includes a near field communication (NFC) module for facilitating short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, ultra-wideband (UWB) technology, Bluetooth technology and other technologies.

[0062] In an exemplary embodiment, the device 100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors, digital signal processing devices, programmable logic devices, field programmable gate arrays, controllers, microcontrollers, microprocessors or other electronic components to perform the following method.

[0063] Embodiment 2

[0064] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a method for managing a public test library disclosed in an embodiment of the present invention. Figure 2As shown, the method may include the following steps:

[0065] 201. When it is detected that the target hive database is in use, an identity of a system using the target hive database is obtained.

[0066] In the embodiment of the present invention, the public test library includes multiple hive databases, wherein the target hive database is any one of the multiple hive databases of the public test library, which is not limited in the embodiment of the present invention. In the embodiment of the present invention, the above-mentioned identity identifier can be a system ID, which is not limited in the embodiment of the present invention.

[0067] It is understandable that each system has a unique identity. When a system accesses a hive database through its access interface, the hive database access interface will record the identity of the system. Therefore, when it is detected that the target hive database is in use, the management device of the public test library can obtain the identity of the system using the target hive database through the access interface, such as the ID of the system.

[0068] 202. According to the identity identifier, determine whether the system to which the identity identifier belongs is the primary responsible system of the target hive database; if not, execute step 203; otherwise, end this process.

[0069] In the embodiment of the present invention, the management device of the public test library can identify the identity identifier based on the acquired identity identifier, and use this to determine whether the system to which the identity identifier belongs is the primary responsible system of the target hive database. If not, the management device of the public test library executes step 203 to execute a scanning script to detect whether a db_sid key field and / or a region_sid key field exists in the system table of the target hive database.

[0070] 203. Execute the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database; if yes, execute step 204; otherwise, end this process.

[0071] In the embodiment of the present invention, it can be understood that when multiple systems use the same hive database, the system table of the hive database will generate key fields such as the db_sid key field and the region_sid key field. For example, when the A system and the B system use the target hive database, the result submitted by the B system may destroy the result submitted by the A system, so that the data of the system table of the target hive database is tampered, such as changing the uppercase letters to lowercase letters, which will cause the data of the system table of the target hive database to be lost, and generate non-compliant system tables with db_sid key fields and / or region_sid key fields. In the embodiment of the present invention, the management device of the public test library can execute a scanning script to detect whether the db_sid key field and / or region_sid key field exist in the system table of the target hive database. If they exist, it indicates that the system to which the above-mentioned identity belongs affects the normal use of the target hive database by the main responsible system of the target hive database. The management device of the public test library executes step 204 to adjust the authority of the system to which the identity belongs to the view authority, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0072] 204. Adjust the permission of the system to which the identity belongs to to view permission, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0073] In an embodiment of the present invention, when it is detected that the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, the management device of the public test library can adjust the authority of the system to which the above-mentioned identity identification belongs to a viewing authority, so that the system to which the identity identification belongs can only read the data of the target hive database but cannot modify the data of the target hive database, which can prevent the system to which the identity identification belongs from modifying the data of the target hive database and affecting the normal use of the target hive database by the main responsible system.

[0074] In the embodiment of the present invention, sometimes a certain system is not the main responsible system of the target hive database, but the system may need to temporarily use the target hive database due to urgent transaction processing. At this time, as an optional implementation method, before executing step 204 to adjust the authority of the system to which the above-mentioned identity belongs to to the viewing authority, the following steps can also be performed: the management device of the public test library can detect whether the system to which the identity belongs carries a temporary call instruction when accessing the target hive database through the access interface. If the temporary call instruction is carried, the management device of the public test library adds a temporary lock to the system to which the identity belongs, so that the system to which the identity belongs can temporarily read and modify the data in the system table of the target hive database; if the temporary call instruction is not carried, the management device of the public test library executes step 204 to adjust the authority of the system to which the identity belongs to to the viewing authority, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0075] In the embodiment of the present invention, a temporary lock is a lock that ensures that a certain system can temporarily read and modify data in the system table of the hive database. For example, if a temporary lock is added to system Q, then even if system Q is not the main responsible system of the target hive database, system Q can read and modify data in the system table of the target hive database.

[0076] By implementing this implementation mode, if the system to which the above-mentioned identity belongs needs to temporarily use the target hive database for emergency business processing, the management device of the public test library adds a temporary lock to the system to which the identity belongs, which can ensure the normal operation of the business.

[0077] It can be seen that the implementation Figure 2 In the described method, the management device of the public test library determines whether the system to which the identity belongs is the primary responsible system of the target hive database based on the identity identifier. If not, the management device of the public test library further detects whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database. If so, it indicates that the system to which the identity belongs may affect the normal use of the target hive database by other systems. The management device of the public test library adjusts the authority of the system to which the above identity belongs to a viewing authority, so that the system to which the identity belongs cannot modify the data of the target hive database, which can avoid data loss or data overwriting in the public test library and ensure business progress.

[0078] Embodiment 3

[0079] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another method for managing a public test library disclosed in an embodiment of the present invention. Figure 3As shown, the method may include the following steps:

[0080] 301. When it is detected that the target hive database is in use, an identity of a system using the target hive database is obtained.

[0081] In the embodiment of the present invention, the public test library includes multiple hive databases, wherein the target hive database is any one of the multiple hive databases of the public test library, which is not limited in the embodiment of the present invention. In the embodiment of the present invention, the above-mentioned identity identifier can be a system ID, which is not limited in the embodiment of the present invention.

[0082] 302. Obtain the business table of the target hive database.

[0083] In the embodiment of the present invention, the business table is used to indicate the primary responsible system of the target hive database at the current moment.

[0084] 303. According to the identity identifier, determine whether the system to which the identity identifier belongs matches the main responsible system indicated at the current moment in the business table; if not, execute steps 304 to 307; if not, execute step 309.

[0085] In the embodiment of the present invention, the business table records the primary responsible system of the target hive database at the current moment, wherein the identifier used to identify the primary responsible system can be the identity identifier of the primary responsible system, such as the system ID. The management device of the public test library can first obtain the business table of the target hive database, and then compare the identity identifier of the system using the target hive data with the identity identifier of the primary responsible system of the target hive database at the current moment in the business table. If the identity identifier of the system using the target hive data matches the identity identifier of the primary responsible system of the target hive database at the current moment in the business table, it indicates that the system to which the identity identifier belongs is the primary responsible system of the target hive database; if the identity identifier of the system using the target hive data does not match the identity identifier of the primary responsible system of the target hive database at the current moment in the business table, it indicates that the system to which the identity identifier belongs is not the primary responsible system of the target hive database.

[0086] In the embodiment of the present invention, step 302-step 303 is implemented, and the business table of the target hive database is used to determine whether the system to which the identity belongs matches the primary responsible system indicated in the business table at the current moment according to the identity identifier. If they match, step 304 is executed, and the management device of the public test library determines that the system to which the identity belongs is the primary responsible system of the target hive database; if they do not match, step 309 is executed, and the management device of the public test library determines that the system to which the identity belongs is not the primary responsible system of the target hive database; the primary responsible system of the target hive database can be accurately determined.

[0087] 304. Determine that the system to which the identity belongs is not the primary responsible system of the target hive database.

[0088] 305. Create a script file.

[0089] In the embodiment of the present invention, the script file, i.e., the script program, is generally a programming language provided by an application program, which can combine different commands and automatically and continuously execute them in a determined order. In the embodiment of the present invention, the application program may include a browser (javascript, VBScript) and a multimedia creation tool, which is not limited in the embodiment of the present invention.

[0090] 306. Import the scanning parameters into the script file to generate a scanning script.

[0091] In the embodiment of the present invention, the scanning parameters at least include the name of the target hive database, the type of the target hive database and the path of the target hive database, which are not limited in the embodiment of the present invention.

[0092] In the embodiment of the present invention, by implementing steps 305 and 306, a script file is created and scanning parameters are imported into the script file to generate a scanning script, thereby improving the efficiency of generating the scanning script.

[0093] In the embodiment of the present invention, because the public test library includes multiple hive databases, the management device of the public test library often manages more than one hive database. Therefore, further, as an optional implementation method, if it is necessary to scan other hive databases of the public test library later, the management device of the public test library can change the scanning parameters and import the changed scanning parameters into the script file to generate a new scanning script.

[0094] By implementing this embodiment, when the management device of the public test library needs to scan other hive databases of the public test library, it only needs to change the scanning parameters without rewriting the scanning script, which can improve the generation efficiency of the scanning script.

[0095] 307. Execute the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database; if yes, execute step 308; otherwise, end this process.

[0096] 308. Adjust the permission of the system to which the identity belongs to to view permission so that the system to which the identity belongs cannot modify the data in the target hive database.

[0097] 309. Determine that the system to which the identity belongs is the primary responsible system of the target hive database.

[0098] In the embodiment of the present invention, if the management device of the public test library determines in step 303 that the system to which the above-mentioned identity belongs matches the primary responsible system indicated at the current moment in the business table, step 309 is executed, and the management device of the public test library determines that the system to which the identity belongs is the primary responsible system of the target hive database.

[0099] It can be seen that with the implementation Figure 2 Compared to the described approach, the implementation Figure 3 The described method uses the business table of the target hive database to determine whether the system to which the identity belongs matches the primary responsible system indicated in the business table at the current moment according to the identity identifier. If they match, the system to which the identity belongs is the primary responsible system of the target hive database, and the primary responsible system of the target hive database can be accurately determined. In addition, by creating a script file and importing scanning parameters into the script file to generate a scanning script, the generation efficiency of the scanning script can be improved.

[0100] Embodiment 4

[0101] See also Figure 4 , Figure 4 FIG. 1 is a flow chart of another method for managing a public test library disclosed in an embodiment of the present invention. Figure 4 As shown, the method may include the following steps:

[0102] 401. When it is detected that the target hive database is in use, an identity of a system using the target hive database is obtained.

[0103] In the embodiment of the present invention, the public test library includes multiple hive databases, wherein the target hive database is any one of the multiple hive databases of the public test library, which is not limited in the embodiment of the present invention. In the embodiment of the present invention, the above-mentioned identity identifier can be a system ID, which is not limited in the embodiment of the present invention.

[0104] 402. Obtain the business table of the target hive database.

[0105] In the embodiment of the present invention, the business table is used to indicate the primary responsible system of the target hive database at the current moment.

[0106] 403. According to the identity identifier, determine whether the system to which the identity identifier belongs matches the main responsible system indicated at the current moment in the business table; if not, execute steps 404 to 412; if not, execute steps 413 to 416.

[0107] 404. It is determined that the system to which the identity belongs is not the primary responsible system of the target hive database.

[0108] 405. Create a script file.

[0109] 406. Import the scanning parameters into the script file to generate a scanning script.

[0110] In the embodiment of the present invention, the scanning parameters at least include the name of the target hive database, the type of the target hive database and the path of the target hive database, which are not limited in the embodiment of the present invention.

[0111] 407. Execute the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database; if yes, execute step 408; otherwise, end this process.

[0112] 408. Adjust the permissions of the system to which the identity belongs to view permissions so that the system to which the identity belongs cannot modify the data in the target hive database.

[0113] 409. Get the log file of the target hive database.

[0114] In the embodiment of the present invention, the log file is a record file or a set of files used to record system operation events, and can be used to process historical data and track diagnostic problems.

[0115] In the embodiment of the present invention, each time data in the system table of the target hive database is updated, a log file of the target hive database will have a record. Therefore, the management device of the public test library can determine the target update record of the system table of the target hive database according to the log file, wherein the target update record is an update record of the system table of the target hive database after the system to which the above-mentioned identity belongs uses the target hive database, and then according to the target update record, the system table of the target hive database is restored to the state before the db_sid key field and / or the region_sid key field are generated.

[0116] 410. Determine the target update record of the system table of the target hive database according to the log file.

[0117] In the embodiment of the present invention, the target update record is an update record of a system table of the target hive database after the system to which the above-mentioned identity belongs uses the target hive database.

[0118] 411. Restore the system table of the target hive database to a compliant state according to the target update record.

[0119] In the embodiment of the present invention, the compliance status is the status before the db_sid key field and / or the region_sid key field is generated in the target update record.

[0120] In the embodiment of the present invention, steps 409 to 411 are implemented to first determine the target update record based on the log file of the target hive database, and then restore the system table of the target hive database to a compliant state based on the target update record. The system table of the target hive database can be restored to normal, so that the main responsible system of the target hive database can be used normally.

[0121] 412. Send unauthorized information to the system to which the identity belongs, so as to warn the user who operates the system to which the identity belongs that the user has unauthorized use of the target hive database.

[0122] In the embodiment of the present invention, step 412 is implemented to send unauthorized information to the system to which the identity belongs, so as to promptly warn the user who operates the system to which the identity belongs, so that the user can suspend the use of the target hive database.

[0123] As an optional implementation, after sending the unauthorized information to the system to which the identity belongs in step 412, the following steps may also be performed:

[0124] Mark and record the system to which the identity belongs;

[0125] Detect whether the number of times the system to which the identity belongs is recorded exceeds a preset number;

[0126] If it exceeds, an alarm signal is sent to the terminal used by relevant managers so that they can focus on handling it.

[0127] In the embodiment of the present invention, the preset number of times can be the number of times set by the developer after a large number of experimental results, and the embodiment of the present invention is not limited. In the embodiment of the present invention, if it is detected that the number of times the system to which the identity belongs is recorded exceeds the preset number of times, it indicates that the system to which the identity belongs has been used unauthorized multiple times. In order to ensure the data security of the public test library, the management device of the public test library can send an alarm signal to the terminal used by the relevant management personnel, so that the relevant management personnel can focus on handling it.

[0128] This implementation method is implemented by detecting whether the number of times the system to which the identity identification belongs is recorded exceeds the preset number. If so, it indicates that the system to which the identity identification belongs has been used unauthorized multiple times. The management device of the public test library can send an alarm signal to the terminal used by the relevant management personnel so that the relevant management personnel can focus on handling it, thereby preventing data leakage of the public test library and ensuring the data security of the public test library.

[0129] 413. Determine that the system to which the identity belongs is the primary responsible system for the target hive database.

[0130] 414. Use an exclusive lock to bind the main responsible system and the target hive database so that other systems except the main responsible system cannot modify the data in the target hive database.

[0131] In the embodiment of the present invention, the exclusive lock is a lock that prevents other systems except the main responsible system from modifying the data in the system table of the target hive database.

[0132] For example, if system T adds an exclusive lock to hive database M, that is, binds system T and hive database M, then hive database M only allows system T to read and modify data in the system table of hive database M. At this time, if system R also uses hive database M, then hive database M can only read data in the system table of hive database M, but cannot modify data in the system table of hive database M.

[0133] 415. Check whether an end instruction is received; if so, execute step 416; otherwise, continue to execute step 415.

[0134] In the embodiment of the present invention, the end instruction is used to instruct the main responsible system to end the use of the target hive database.

[0135] 416. Release the exclusive lock to restore the target hive database to an idle state.

[0136] In the embodiment of the present invention, if an end instruction is received, the management device of the public test library releases the exclusive lock, so that the target hive database is restored to an idle state to ensure normal use in the next stage; if no end instruction is received, the management device of the public test library continues to execute step 415 until an end instruction is received.

[0137] In the embodiment of the present invention, by implementing steps 414 to 416, the exclusive lock is used to bind the main responsible system and the target hive database, so that other systems except the main responsible system can be prevented from modifying the data of the target hive database, thereby ensuring the normal use of the main responsible system. When the end instruction is received, the exclusive lock is released, so that the target hive database can be restored to an idle state, thereby ensuring the normal use of the next stage.

[0138] It can be seen that with the implementation Figure 3 Compared to the described approach, the implementation Figure 4The described method can restore the system table of the target hive database to a compliant state according to the target update record, and can restore the system table of the target hive database to normal, so that the main responsible system of the target hive database can be used normally. In addition, sending unauthorized information to the system to which the identity belongs can timely warn the user who operates the system to which the identity belongs, so that the user can suspend the use of the target hive database. In addition, using an exclusive lock to bind the main responsible system and the target hive database can prevent other systems except the main responsible system from modifying the data of the target hive database, thereby ensuring the normal use of the main responsible system. In addition, when the end instruction is received, the exclusive lock is released, so that the target hive database can be restored to an idle state, ensuring normal use in the next stage.

[0139] Embodiment 5

[0140] See also Figure 5 , Figure 5 Schematic diagram of a structure of a public test library management device disclosed in an embodiment of the present invention. Figure 5 As shown, the device may include: a first acquisition unit 501, a judgment unit 502, a first detection unit 503 and an adjustment unit 504, wherein:

[0141] The first acquisition unit 501 is used to acquire the identity of the system using the target hive database when it is detected that the target hive database is in use.

[0142] In the embodiment of the present invention, the public test library includes multiple hive databases, wherein the target hive database is any one of the multiple hive databases of the public test library, which is not limited in the embodiment of the present invention.

[0143] It is understandable that each system has a unique identity. When a system accesses a hive database through the hive database access interface, the hive database access interface will record the identity of the system. Therefore, when it is detected that the target hive database is in use, the first acquisition unit 501 can obtain the identity of the system using the target hive database through the access interface, such as the ID of the system.

[0144] The judgment unit 502 is used to judge whether the system to which the identity belongs is the primary responsible system of the target hive database according to the identity.

[0145] The first detection unit 503 is used to execute a scanning script to detect whether a db_sid key field and / or a region_sid key field exists in a system table of the target hive database when the judgment unit 502 judges that the system to which the identity belongs is not the primary responsible system of the target hive database.

[0146] The adjustment unit 504 is used to adjust the permission of the system to which the above identity belongs to view permission when the first detection unit 503 detects that the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, so that the system to which the identity belongs cannot modify the data of the target hive database.

[0147] In the embodiment of the present invention, when the first detection unit 503 detects that the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, the adjustment unit 504 can adjust the permission of the system to which the above-mentioned identity identification belongs to a viewing permission, so that the system to which the identity identification belongs can only read the data of the target hive database but cannot modify the data of the target hive database, which can prevent the system to which the identity identification belongs from modifying the data of the target hive database and affecting the normal use of the target hive database by the main responsible system.

[0148] In an embodiment of the present invention, sometimes a certain system is not the main responsible system of the target hive database, but the system may need to temporarily use the target hive database due to urgent transaction processing. At this time, as an optional implementation method, before the adjustment unit 504 adjusts the authority of the system to which the above-mentioned identity identification belongs to the viewing authority, the following steps can also be performed: the first detection unit 503 can detect whether the system to which the identity identification belongs carries a temporary call instruction when accessing the target hive database through the access interface. If the temporary call instruction is carried, the adjustment unit 504 adds a temporary lock to the system to which the identity identification belongs, so that the system to which the identity identification belongs can temporarily read and modify the data in the system table of the target hive database; if the temporary call instruction is not carried, the adjustment unit 504 adjusts the authority of the system to which the identity identification belongs to the viewing authority, so that the system to which the identity identification belongs cannot modify the data of the target hive database.

[0149] In the embodiment of the present invention, a temporary lock is a lock that ensures that a certain system can temporarily read and modify data in the system table of the hive database. For example, if a temporary lock is added to system Q, then even if system Q is not the main responsible system of the target hive database, system Q can read and modify data in the system table of the target hive database.

[0150] In this implementation mode, if the system to which the above-mentioned identity belongs needs to temporarily use the target hive database for emergency business processing, the adjustment unit 504 adds a temporary lock to the system to which the identity belongs, so as to ensure the normal operation of the business.

[0151] It can be seen that the implementation Figure 5The management device of the public test library described herein determines whether the system to which the identity belongs is the primary responsible system of the target hive database according to the identity identifier. If not, it further detects whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database. If so, it indicates that the system to which the identity belongs may affect the normal use of the target hive database by other systems. The authority of the system to which the above identity belongs is adjusted to a viewing authority so that the system to which the identity belongs cannot modify the data of the target hive database, thereby avoiding data loss or data overwriting in the public test library and ensuring business progress.

[0152] Embodiment 6

[0153] See also Figure 6 , Figure 6 It is a structural schematic diagram of another public test library management device disclosed in an embodiment of the present invention. Figure 6 The management device of the public test library shown is composed of Figure 5 The management device of the public test library shown is optimized. Figure 5 Compared with the management device of the public test library shown, Figure 6 The management device of the public test library shown may also include: a creation unit 505 and a generation unit 506, wherein:

[0154] The judging unit 502 includes:

[0155] The acquisition subunit 5021 is used to acquire the business table of the target hive database; wherein the business table is used to indicate the primary responsible system of the target hive database at the current moment;

[0156] The judgment subunit 5022 is used to judge whether the system to which the identity belongs matches the main responsible system indicated at the current moment in the business table according to the identity;

[0157] The first determination subunit 5023 is used to determine that the system to which the identity belongs is not the primary responsible system of the target hive database when the determination subunit 5022 determines that the system to which the identity belongs does not match the primary responsible system indicated in the business table at the current moment;

[0158] The second determining subunit 5024 is used to determine that the system to which the identity belongs is the primary responsible system of the target hive database when the determining subunit 5022 determines that the system to which the identity belongs matches the primary responsible system indicated in the business table at the current moment.

[0159] The creation unit 505 is used to create a script file after the judgment subunit 5022 determines that the system to which the above-mentioned identity belongs does not match the primary responsible system indicated in the business table at the current moment, the first determination subunit 5023 determines that the system to which the identity belongs is not the primary responsible system of the target hive database, and before the first detection unit 503 executes the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database.

[0160] The generating unit 506 is used to import the scanning parameters into the script file to generate a scanning script.

[0161] In the embodiment of the present invention, the scanning parameters at least include the name of the target hive database, the type of the target hive database and the path of the target hive database, which are not limited in the embodiment of the present invention.

[0162] In the embodiment of the present invention, because the public test library includes multiple hive databases, the management device of the public test library often manages more than one hive database. Therefore, further, as an optional implementation, if it is necessary to scan other hive databases of the public test library later, the generation unit 506 can change the scanning parameters and import the changed scanning parameters into the script file to generate a new scanning script.

[0163] By implementing this implementation, when it is necessary to scan other hive databases of the public test library, only the scanning parameters need to be changed without rewriting the scanning script, which can improve the generation efficiency of the scanning script.

[0164] It can be seen that with the implementation Figure 5 Compared to the common test library management device described, the implementation Figure 6 The management device of the public test library described uses the business table of the target hive database to determine whether the system to which the identity belongs matches the main responsible system indicated in the business table at the current moment according to the identity identifier. If they match, the system to which the identity belongs is the main responsible system of the target hive database, and the main responsible system of the target hive database can be accurately determined. In addition, by creating a script file and importing scanning parameters into the script file to generate a scanning script, the generation efficiency of the scanning script can be improved.

[0165] Embodiment 7

[0166] See also Figure 7 , Figure 7 It is a structural schematic diagram of another public test library management device disclosed in an embodiment of the present invention. Figure 7 The management device of the public test library shown is composed of Figure 6The management device of the public test library shown is optimized. Figure 6 Compared with the management device of the public test library shown, Figure 7 The management device of the public test library shown may further include: a second acquisition unit 507, a determination unit 508, a reply unit 509, a sending unit 510, a binding unit 511, a second detection unit 512 and a release unit 513, wherein:

[0167] The second acquisition unit 507 is used to acquire the log file of the target hive database after the first detection unit 503 detects that the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, and the adjustment unit 504 adjusts the permission of the system to which the above-mentioned identity identification belongs to the viewing permission so that the system to which the identity identification belongs cannot modify the data of the target hive database.

[0168] The determination unit 508 is used to determine the target update record of the system table of the target hive database according to the log file.

[0169] In the embodiment of the present invention, the target update record is an update record of a system table of the target hive database after the system to which the above-mentioned identity belongs uses the target hive database.

[0170] The recovery unit 509 is used to restore the system table of the target hive database to a compliant state according to the target update record.

[0171] In the embodiment of the present invention, the compliance status is the status before the db_sid key field and / or the region_sid key field is generated in the target update record.

[0172] In the embodiment of the present invention, each time data in the system table of the target hive database is updated, the log file of the target hive database will have a record. Therefore, the determination unit 508 can determine the target update record of the system table of the target hive database according to the log file, wherein the target update record is an update record of the system table of the target hive database after the system to which the above-mentioned identity belongs uses the target hive database, and then the recovery unit 509 recovers the system table of the target hive database to the state before the db_sid key field and / or the region_sid key field are generated according to the target update record.

[0173] The sending unit 510 is used to send unauthorized information to the system to which the above-mentioned identity belongs after the recovery unit 509 restores the system table of the target hive database to a compliant state according to the target update record, so as to warn the user who operates the system to which the identity belongs of unauthorized use of the target hive database.

[0174] As an optional implementation, after the sending unit 510 sends the unauthorized information to the system to which the identity belongs, the following steps may also be performed:

[0175] Mark and record the system to which the identity belongs;

[0176] Detect whether the number of times the system to which the identity belongs is recorded exceeds a preset number;

[0177] If it exceeds, an alarm signal is sent to the terminal used by relevant managers so that they can focus on handling it.

[0178] In the embodiment of the present invention, the preset number of times can be the number of times set by the developer after a large number of experimental results, and the embodiment of the present invention is not limited. In the embodiment of the present invention, if it is detected that the number of times the system to which the identity belongs is recorded exceeds the preset number of times, it indicates that the system to which the identity belongs has been used unauthorized multiple times. In order to ensure the data security of the public test library, the sending unit 510 can send an alarm signal to the terminal used by the relevant management personnel, so that the relevant management personnel can focus on handling it.

[0179] This implementation method is implemented by detecting whether the number of times the system to which the identity identification belongs is recorded exceeds the preset number. If so, it indicates that the system to which the identity identification belongs has been used unauthorized multiple times. The sending unit 510 can send an alarm signal to the terminal used by the relevant management personnel so that the relevant management personnel can focus on handling it, thereby preventing data leakage in the public test library and ensuring the data security of the public test library.

[0180] The binding unit 511 is used to use an exclusive lock to bind the primary responsible system and the target hive database after the judging subunit 5022 determines that the system to which the above-mentioned identity belongs matches the primary responsible system indicated at the current moment in the business table, and the second determining subunit 5024 determines that the system to which the identity belongs is the primary responsible system of the target hive database, so that other systems except the primary responsible system cannot modify the data of the target hive database.

[0181] In the embodiment of the present invention, the exclusive lock is a lock that prevents other systems except the main responsible system from modifying the data in the system table of the target hive database.

[0182] The second detection unit 512 is used to detect whether an end instruction is received after the binding unit 511 uses an exclusive lock to bind the main responsible system and the target hive database so that other systems except the main responsible system cannot modify the data in the target hive database.

[0183] In the embodiment of the present invention, the end instruction is used to instruct the main responsible system to end the use of the target hive database.

[0184] The release unit 513 is configured to release the exclusive lock when the second detection unit 512 detects that the end instruction has been received, so as to restore the target hive database to an idle state.

[0185] It can be seen that with the implementation Figure 6 Compared to the common test library management device described, the implementation Figure 7 The management device of the described public test library can restore the system table of the target hive database to a compliant state according to the target update record, and can restore the system table of the target hive database to normal, so that the main responsible system of the target hive database can be used normally. In addition, sending unauthorized information to the system to which the identity belongs can timely warn the user who operates the system to which the identity belongs, so that the user can suspend the use of the target hive database. In addition, using an exclusive lock to bind the main responsible system and the target hive database can prevent other systems except the main responsible system from modifying the data of the target hive database, thereby ensuring the normal use of the main responsible system. In addition, when the end instruction is received, the exclusive lock is released, so that the target hive database can be restored to an idle state, ensuring normal use in the next stage.

[0186] The present invention also provides an electronic device, the electronic device comprising:

[0187] processor;

[0188] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by a processor, a method for managing a public test library as shown above is implemented.

[0189] The electronic device may be Figure 1 The device 100 is shown.

[0190] In an exemplary embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for managing a public test library as shown above is implemented.

[0191] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be performed without departing from its scope. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for managing a public test library, wherein the public test library includes multiple hive databases, characterized in that: The method comprises: When it is detected that the target hive database is used, obtaining the identity of the system using the target hive database; wherein the target hive database is any one of the multiple hive databases; According to the identity identifier, determine whether the system to which the identity identifier belongs is the primary responsible system of the target hive database; If the system to which the identity belongs is not the primary responsible system of the target hive database, execute a scanning script to detect whether there is a db_sid key field and / or a region_sid key field in the system table of the target hive database; If the db_sid key field and / or region_sid key field exist in the system table of the target hive database, adjust the permission of the system to which the identity identifier belongs to view permission so that the system to which the identity identifier belongs cannot modify the data of the target hive database; if the db_sid key field and / or region_sid key field exist in the system table of the target hive database, it indicates that the system to which the identity identifier belongs affects the normal use of the target hive database by the primary responsible system of the target hive database.

2. The method according to claim 1, characterized in that: The determining, based on the identity identifier, whether the system to which the identity identifier belongs is the primary responsible system of the target hive database includes: Obtaining a business table of the target hive database; the business table is used to indicate the primary responsible system of the target hive database at the current moment; According to the identity identifier, determining whether the system to which the identity identifier belongs matches the primary responsible system indicated at the current moment in the service table; If the system to which the identity identifier belongs matches the primary responsible system indicated in the business table at the current moment, determining that the system to which the identity identifier belongs is the primary responsible system of the target hive database; If the system to which the identity identifier belongs does not match the primary responsible system indicated in the business table at the current moment, it is determined that the system to which the identity identifier belongs is not the primary responsible system of the target hive database.

3. The method according to claim 2, characterized in that After determining that the system to which the identity belongs is not the primary responsible system of the target hive database if the system to which the identity belongs does not match the primary responsible system indicated in the business table at the current moment, and before executing the scanning script to detect whether the db_sid key field and / or the region_sid key field exists in the system table of the target hive database, the method further includes: Create a script file; Importing scanning parameters into the script file to generate the scanning script; wherein the scanning parameters at least include the name of the target hive database, the type of the target hive database and the path of the target hive database.

4. The method according to claim 3, characterized in that After the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, the permission of the system to which the identity belongs is adjusted to a viewing permission so that the system to which the identity belongs cannot modify the data of the target hive database, the method further includes: Obtain the log file of the target hive database; Determine, according to the log file, a target update record of a system table of the target hive database; the target update record is an update record of the system table of the target hive database after the system to which the identity belongs uses the target hive database; According to the target update record, the system table of the target hive database is restored to a compliant state; the compliant state is the state before the db_sid key field and / or the region_sid key field is generated in the target update record.

5. The method according to claim 4, characterized in that After restoring the system table of the target hive database to a compliant state according to the target update record, the method further includes: Send unauthorized information to the system to which the identity belongs, so as to warn the user who operates the system to which the identity belongs of unauthorized use of the target hive database.

6. The method according to any one of claims 2 to 5, characterized in that: If the system to which the identity identifier belongs matches the primary responsible system indicated in the business table at the current moment, after determining that the system to which the identity identifier belongs is the primary responsible system of the target hive database, the method further includes: The main responsible system and the target hive database are bound by using an exclusive lock, so that other systems except the main responsible system cannot modify the data in the target hive database.

7. The method according to claim 6, characterized in that After the exclusive lock is used to bind the main responsible system and the target hive database so that other systems except the main responsible system cannot modify the data in the target hive database, the method further includes: Detecting whether an end instruction is received; the end instruction is used to instruct the main responsible system to end the use of the target hive database; If the end instruction is received, the exclusive lock is released to restore the target hive database to an idle state.

8. A management device for a public test library, the public test library comprising a plurality of hive databases, characterized in that: The device comprises: A first acquisition unit is configured to acquire an identity of a system using a target hive database when it is detected that the target hive database is used; wherein the target hive database is any one of the multiple hive databases; A judging unit, configured to judge, based on the identity identifier, whether the system to which the identity identifier belongs is the primary responsible system of the target hive database; A first detection unit is used to execute a scanning script to detect whether a db_sid key field and / or a region_sid key field exists in a system table of the target hive database when the judgment unit determines that the system to which the identity belongs is not the primary responsible system of the target hive database; The adjustment unit is used to adjust the permission of the system to which the identity identifier belongs to be a viewing permission when the first detection unit detects that a db_sid key field and / or a region_sid key field exist in the system table of the target hive database, so that the system to which the identity identifier belongs cannot modify the data of the target hive database; if the db_sid key field and / or the region_sid key field exist in the system table of the target hive database, it indicates that the system to which the identity identifier belongs affects the normal use of the target hive database by the main responsible system of the target hive database.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: It stores a computer program, and the computer program enables a computer to execute the public test library management method according to any one of claims 1 to 7.