CN109787862B - Detection method, device, electronic equipment and the storage medium of invalid resource - Google Patents

Detection method, device, electronic equipment and the storage medium of invalid resource Download PDF

Info

Publication number
CN109787862B
CN109787862B CN201910046218.3A CN201910046218A CN109787862B CN 109787862 B CN109787862 B CN 109787862B CN 201910046218 A CN201910046218 A CN 201910046218A CN 109787862 B CN109787862 B CN 109787862B
Authority
CN
China
Prior art keywords
resource
detected
record
invalid
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910046218.3A
Other languages
Chinese (zh)
Other versions
CN109787862A (en
Inventor
许广彬
许刚
谭瑞忠
郭晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huayun data holding group Co., Ltd
Original Assignee
Wuxi Huayun Data Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Huayun Data Technology Service Co Ltd filed Critical Wuxi Huayun Data Technology Service Co Ltd
Priority to CN201910046218.3A priority Critical patent/CN109787862B/en
Publication of CN109787862A publication Critical patent/CN109787862A/en
Application granted granted Critical
Publication of CN109787862B publication Critical patent/CN109787862B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application provides detection method, device, electronic equipment and the storage medium of a kind of invalid resource, comprising: obtains the invalid resource that user terminal is sent and detects request;The invalid resource detection request is responded, the first record of a resource to be detected is obtained from operating system, first record includes: the first resource mark and first state of the resource to be detected;It determines whether to obtain the second record corresponding with first resource mark from the corresponding relationship of pre-stored resource identification and record in cloud platform;When to be, determine whether second state corresponding with the resource to be detected in the first state and second record is identical;When to be no, determine that the resource to be detected is invalid resource.After the request of invalid response resources measurement, for a resource to be detected, the first state of the resource to be detected and the second state are compared, determine whether the resource is invalid resource, and raising efficiency, the process is without artificial participation, save the cost.

Description

Detection method, device, electronic equipment and the storage medium of invalid resource
Technical field
This application involves field of cloud computer technology, in particular to a kind of detection method of invalid resource, device, electricity Sub- equipment and storage medium.
Background technique
(hereinafter referred to as " cloud platform ", is deployed in inside data center private clound cloud platform management system, is used for data Be supplied to user after the virtualization of central hardware ability) daily O&M operation in because cloud platform itself, associated with cloud platform Other support systems (including cloud platform runs relevant other first floor systems, such as operating system, for the distribution of storage management File system, for centralized log system of log management etc., hereinafter referred to as " operating system ") mostly use distributed structure/architecture Realize, therefore often there is invalid resource in cloud platform or operating system, wherein invalid resource i.e.: cloud platform has A money Source, and there is no A resource in operating system, or have A resource in operation system, and there is no A resource in cloud platform.
Detection method traditional, for invalid resource needs not often by the mode of manual inspection according to business It regularly executes, it is low that manual inspection mode often leads to working efficiency, at high cost.
Apply for content
In consideration of it, a kind of detection method for being designed to provide invalid resource of the embodiment of the present application, device, electronic equipment And storage medium, to shorten the detection duration of invalid resource, and reduce cost of labor.
In a first aspect, the embodiment of the present application provides a kind of detection method of invalid resource, which comprises obtain user The invalid resource that terminal is sent detects request;The invalid resource detection request is responded, it is to be detected that one is obtained from operating system First record of resource, wherein include: the first resource mark and the first shape of the resource to be detected in first record State;It determines whether from the corresponding relationship of pre-stored resource identification and record in cloud platform, obtains and first money Corresponding second record of source mark;When to be, determine the first state and it is described second record in it is described to be detected Whether corresponding second state of resource is identical;When to be no, determine that the resource to be detected is invalid resource.
During above-mentioned realization, after the invalid resource detection request that response user terminal is sent, for same to be checked Resource is surveyed, passes through the second of the second record that will be obtained in the first state and cloud platform of the obtain in operating system first record State compares, and then determines whether the resource is invalid resource, promotes the determination efficiency of invalid resource, simultaneously as should Process is participated in without artificial, then effectively save the cost.
Based in a first aspect, obtaining the first note of a resource to be detected from operating system in a kind of possible design After record, the method also includes: based on first record, determine the first kind information of the resource to be detected;It determines It can be obtained and the first resource mark from the corresponding relationship of pre-stored resource identification and record in the cloud platform Know the second record of the corresponding resource to be detected, comprising: determine whether the pre-stored type from the cloud platform In the corresponding relationship of information and record storage position, obtain and first kind information corresponding second record storage position; When to be, it is based on second record storage position, from the pre-stored resource identification and record in the cloud platform In corresponding relationship, the second record that the corresponding resource to be detected is identified with the first resource is obtained;When to be no, determine There is no second records corresponding with first resource mark in the cloud platform.
During above-mentioned realization, since resource to be detected may there are many types, every class resource to be detected to be possible to Multiple resources, therefore, firstly, the first kind information based on resource to be detected, obtains corresponding with the first kind information Second record storage position reduces the seeking scope of the second record, then, based on second record storage position and the first money Source mark can be rapidly obtained the second record of the resource to be detected, improve search efficiency.
Based in a first aspect, in a kind of possible design, after determining that the resource to be detected is invalid resource, institute State method further include: determining that the first state is to be in deletion success status or creation for characterizing the resource to be detected When status of fail, the resource to be detected in the cloud platform is deleted.
During above-mentioned realization, after determining that the resource to be detected is invalid resource, by analyzing first state Information and the second state information, determine that the resource to be detected is present in cloud platform, be still present in and belong to operating system, When determining the first state is to be in deletion success status or creation status of fail for characterizing the resource to be detected, energy It is enough accurately to delete the resource to be detected.
Based in a first aspect, in a kind of possible design, after determining that the resource to be detected is invalid resource, institute State method further include: determining that second state is to be in deletion success status or creation for characterizing the resource to be detected When status of fail, the resource to be detected in the operating system is deleted.
During above-mentioned realization, after determining that the resource to be detected is invalid resource, by analyzing first state Information and the second state information, determine that the resource to be detected is present in cloud platform, be still present in and belong to operating system, When determining second state is to be in deletion success status or creation status of fail for characterizing the resource to be detected, after And accurately the resource to be detected can be deleted.
Based in a first aspect, determining whether the pre-stored resource mark from cloud platform in a kind of possible design After obtaining the second record corresponding with first resource mark in the corresponding relationship of knowledge and record, the method also includes: When to be no, generate and send for characterizing the first prompt information that can not determine the resource to be detected as invalid resource to institute State user terminal.
During above-mentioned realization, the second record corresponding with first resource mark is not got in cloud platform When, it generates and sends for characterizing the first prompt information that can not determine the resource to be detected as invalid resource to the user Terminal reduces error rate, promotes user experience to prompt user to make further detection to the resource to be detected.
Based in a first aspect, in a kind of possible design, the response invalid resource detection request is from operation The first record of a resource to be detected is obtained in system, comprising: respond the invalid resource detection request, determining in operating system is It is no that there are resources to be detected;When to be, the first record in the operating system with the presence or absence of the resource to be detected is determined; When to be, first record is obtained from the operating system.
During above-mentioned realization, since any resource to be detected may be not present in operating system, it is thus necessary to determine that It then when there is resource to be detected in an operating system, is determined in operating system in operating system with the presence or absence of resource to be detected With the presence or absence of the first record of resource to be detected, finally, when having the first record in for operating system, from the operating system Obtain first record.In this way, when resource to be detected can be not present in an operating system, or there are to be checked Resource is surveyed, but there is no the first record of resource to be detected, without further being searched and being detected, is improved efficiency.
Based in a first aspect, responding the invalid resource detection request in a kind of possible design, determining operation system After whether there is the resource to be detected in system, the method also includes: when to be no, generate and send current for characterizing There is no the second prompt informations of the resource to be detected to give the user terminal;Or whether deposited in determining the operating system After the first record of the resource to be detected, the method also includes: when to be no, generating and sending can not for characterization Determine third prompt information that the resource to be detected is invalid resource to the user terminal.
During above-mentioned realization, since any resource to be detected may be not present in operating system, or there are to be detected Resource, but there is no when the first record of resource to be detected, send corresponding prompt information to user terminal, to prompt user, Promote user experience.
Second aspect, the embodiment of the present application provide a kind of detection device of invalid resource, and described device includes: request Unit, for obtaining the invalid resource detection request of user terminal transmission;First acquisition unit, for responding the invalid resource Detection request obtains the first record of a resource to be detected from operating system, wherein includes: described in first record The first resource of resource to be detected identifies and first state;Determination unit, for determining whether being stored in advance from cloud platform Resource identification and record corresponding relationship in obtain it is corresponding with first resource mark second record;First determines list Member, for when to be, determine the first state and it is described second record in the resource corresponding second to be detected Whether state is identical;Second determination unit, for when to be no, determining that the resource to be detected is invalid resource.
Based on second aspect, in a kind of possible design, described device further include: type determining units, for being based on First record, determines the first kind information of the resource to be detected;The determination unit is also used to, and is determined whether from institute It states in the pre-stored type information in cloud platform and the corresponding relationship of record storage position, obtains and believe with the first kind Cease corresponding second record storage position;And when to be, it is based on second record storage position, is determined whether from described In the corresponding relationship of pre-stored resource identification and record in cloud platform, institute corresponding with first resource mark is obtained State the second record of resource to be detected;And when to be no, determine that there is no identify with the first resource in the cloud platform Corresponding second record.
Based on second aspect, in a kind of possible design, described device further include: first deletes unit, for true It, will be described when the fixed first state is for characterizing the resource to be detected in deletion success status or creation status of fail The resource to be detected in cloud platform is deleted.
Based on second aspect, in a kind of possible design, described device further include: second deletes unit, for true It, will be described when fixed second state is for characterizing the resource to be detected in deletion success status or creation status of fail The resource to be detected in operating system is deleted.
Based on second aspect, in a kind of possible design, described device further include: the first prompt unit, for for When no, generate and send for characterizing the first prompt information that can not determine the resource to be detected as invalid resource to the use Family terminal.
Based on second aspect, in a kind of possible design, the first acquisition unit, comprising: first determines subelement, For responding the invalid resource detection request, determine in operating system with the presence or absence of resource to be detected;Second determines subelement, For when to be, determining the first record in the operating system with the presence or absence of the resource to be detected;First obtains son list Member, for when to be, obtaining first record from the operating system.
The third aspect, the embodiment of the present application provides a kind of electronic equipment, including processor and is connected to the processor Memory, computer program is stored in the memory, when the computer program is executed by the processor, so that institute It states electronic equipment and executes method described in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of storage medium, are stored with computer program in the storage medium, When the computer program is run on computers, so that the computer executes method described in first aspect.
Other feature and advantage of the application will be illustrated in subsequent specification, also, partly be become from specification It is clear that by implementing the embodiment of the present application understanding.The purpose of the application and other advantages can be by written theorys Specifically noted structure is achieved and obtained in bright book, claims and attached drawing.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the structural schematic diagram of electronic equipment provided by the embodiments of the present application;
Fig. 2 is the flow diagram for the invalid resource detection method that the application first embodiment provides;
Fig. 3 is the structural schematic diagram for the invalid resource detection device that the application second embodiment provides.
Icon: 100- electronic equipment;110- memory;120- storage control;130- processor;140- Peripheral Interface; 150- input-output unit;160- audio unit;170- display unit;The detection device of 400- invalid resource;410- request obtains Take unit;420- first acquisition unit;430- determination unit;The first determination unit of 440-;The second determination unit of 450-.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile the application's In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
The embodiment of the present application provides the structural schematic diagram of a kind of electronic equipment 100, and the electronic equipment 100 can be individual Computer (personal computer, PC), tablet computer, smart phone, personal digital assistant (personal digital Assistant, PDA) etc..
As shown in Figure 1, the electronic equipment 100 may include: the detection device 400 of invalid resource, memory 110, deposit Store up controller 120, processor 130, Peripheral Interface 140, input-output unit 150, audio unit 160, display unit 170.
The memory 110, storage control 120, processor 130, input-output unit 150, audio unit 160 and Each element of display unit 170 is directly or indirectly electrically connected between each other, to realize the transmission or interaction of data.For example, this A little elements can be realized by one or more communication bus or signal wire be electrically connected between each other.The detection device of invalid resource Client can be stored in the memory 110 or is solidificated in including at least one in the form of software or firmware (firmware) Software function module in the operating device (operating system, OS) of equipment.The processor 130 is for executing storage The executable module stored in device 110, such as the software function module that includes of detection device 400 or computer journey of invalid resource Sequence.
Wherein, memory 110 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Wherein, memory 110 is for storing program, and the processor 130 executes described program after receiving and executing instruction, aforementioned Method performed by the electronic equipment 100 for the flow definition that the embodiment of the present application any embodiment discloses can be applied to processor In 130, or realized by processor 130.
Processor 130 may be a kind of IC chip, the processing capacity with signal.Above-mentioned processor 130 can To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), specific integrated circuit (ASIC), Field programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard Part component.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present application.General processor It can be microprocessor or the processor be also possible to any conventional processor etc..
Various input/output devices are couple processor 130 and memory 110 by the Peripheral Interface 140.Some In embodiment, Peripheral Interface 140, processor 130 and storage control 120 can be realized in one single chip.Other one In a little examples, they can be realized by independent chip respectively.
Input-output unit 150 is used to be supplied to the interaction that user input data realizes user and electronic equipment 100.It is described Input-output unit 150 may be, but not limited to, mouse and keyboard etc..
Audio unit 160 provides a user audio interface, may include one or more microphones, one or more raises Sound device and voicefrequency circuit.
Display unit 170 provides an interactive interface (such as user interface) between electronic equipment 100 and user Or it is referred to for display image data to user.In the present embodiment, the display unit 170 can be liquid crystal display or touching Control display.It can be the touching of the capacitance type touch control screen or resistance-type of support single-point and multi-point touch operation if touch control display Control screen etc..Single-point and multi-point touch operation is supported to refer to that touch control display can sense on the touch control display one or more The touch control operation generated simultaneously at a position, and the touch control operation that this is sensed transfers to processor 130 to be calculated and handled.
First embodiment
Referring to figure 2., Fig. 2 is a kind of flow chart of the detection method for invalid resource that the application first embodiment provides, The method is applied to electronic equipment 100 as shown in Figure 1, process shown in Fig. 2 will be described in detail below, the side Method includes:
S100: it obtains the invalid resource that user terminal is sent and detects request.
Wherein, in the present embodiment, resource is specifically included that including cloud host, cloud hard disk, the virtual flow-line based on cloud host The resources such as device/load balancer/database, in other embodiments, resource may be other, in the actual implementation process, For user when needing to detect to cloud platform and with the invalid resource in the associated operating system of the cloud platform, user passes through electricity The input-output unit 150 of sub- equipment 100 inputs invalid resource detection request, wherein include in invalid resource detection request to The title of the cloud platform of detection and title with the associated operating system of the cloud platform, and completion icon is clicked, described in sending Processor 130 of the invalid resource detection request into electronic equipment 100.As an implementation, user passes through electronic equipment The application program (Application, APP) or function pages, user for logging in invalid resource detection are only needed in APP or page function It is manually entered or selects in corresponding function prompt frame in face to need the title of the cloud platform detected and be closed with the cloud platform The title of the operating system of connection, and completion icon is clicked, to send the invalid resource detection request into electronic equipment 100 Processor 130.
S200: responding the invalid resource detection request, and the first record of a resource to be detected is obtained from operating system, It wherein, include: the first resource mark and first state of the resource to be detected in first record.
After getting the invalid money detection request, based on invalid resource detection request, the operation for needing to detect is obtained The title of system, for example, it is desired to A operating system is detected, then the first record of resource to be detected is obtained from A operating system, Wherein, the quantity of the record of resource to be detected can be one, two, three, five etc., the quantity of the record of resource to be detected With no restriction, it is to be understood that the record of resource to be detected each in operating system is detected one by one, wherein described It include: the first resource mark and first state of the resource to be detected in first record, it is to be understood that in operating system Each of resource to be detected have a resource identification, the resource identification of each resource to be detected is different, wherein first resource Mark can be indicated with letter and/or number and/or/symbol, for example, first resource, which identifies, can individually use digital representation, first Resource identification can indicate individually with letter, first resource can independent symbolically, first resource mark can use number It being indicated with letter, first resource mark can be indicated with numbers and symbols, and first resource mark can be indicated with letter and symbol, First resource mark can be indicated with letter, numbers and symbols;Wherein, it is locating at present to characterize the resource to be detected for first state State, when the resource to be detected is successfully created, the first state of the resource to be detected is described to be checked for characterizing It surveys resource and is in the successful state of creation, when the resource to be detected is created unsuccessfully, the first shape of the resource to be detected State is the state for being in creation failure for characterizing the resource to be detected, when the resource to be detected is deleted successfully, institute The first state for stating resource to be detected is to be in the successful state of creation for characterizing the resource to be detected.As a kind of implementation Mode, when resource to be detected is created, first record further include: the title and wound of the founder of the resource to be detected Build the time, resource to be detected be deleted when, it is described first record further include: the title of the deletion person of the resource to be detected and Erasing time.
As an implementation, S200 includes:
S210: the invalid resource detection request is responded, is determined in operating system with the presence or absence of resource to be detected.
After getting the invalid money detection request, based on invalid resource detection request, the operation for needing to detect is obtained The title of system, (for example, it is desired to detecting A operating system) carry out resource lookup to A operating system, and determining in A operating system is It is no that there are resources to be detected.It is understood that being characterized in A operating system when resource to be detected being not present in A operating system There is no any resources.There are when resource to be detected in A operating system, the quantity for characterizing resource in A operating system is at least One.
S220: when to be, the first record in the operating system with the presence or absence of the resource to be detected is determined.
There are when resource to be detected in the operating system, for example, the quantity of resource to be detected is two, two to be checked It surveys resource and is respectively as follows: A1 resource and B1 resource, as an implementation, for A1 resource, resource-based mark or resource Title, in an operating system search A1 resource record, in the present embodiment, resource-based mark, in an operating system The record of A1 resource is searched, the first record in operating system with the presence or absence of A1 resource is then determined, for B1 resource, is operating The record of B1 resource is searched in system, then determines the first record in operating system with the presence or absence of B1 resource.It is understood that It is successively to determine in operating system with the presence or absence of the record of A1 resource and the record of B1 resource.Wherein, the record of resource can be deposited In resource record file, the record of resource also be can store in the database for storage, in the present embodiment, the record storage of resource It hereof, as an implementation, can be by the record storage of different types of resource in different files, to improve Record search efficiency, for example, the record storage of cloud host resource, in the first file, the record storage of cloud hard disk resources is second In file.
As an implementation, after S210, the method also includes:
When to be no, generate and send that there is currently no the second prompt informations of the resource to be detected to institute for characterizing State user terminal;Or after S220, the method also includes:
When to be no, generating and sending can not determine that the third that the resource to be detected is invalid resource prompts for characterizing Information gives the user terminal.
When resource to be detected being not present in the operating system, it is to be understood that be not present in the operating system Any resource generates and sends for characterizing the second prompt information electron equipment there is currently no the resource to be detected 100, and shown on the display unit of electronic equipment 100 170, wherein the second prompt information can be indicated with written form.
There are when resource to be detected in the operating system, for example, there are A resource and B resource in the operating system, It successively determines the first record in the operating system with the presence or absence of the first record of A resource and B resource, is determining operating system In there is no when the first record of A resource to be detected, generating and sending can not determine A resource for the of invalid resource for characterize Three prompt information electron equipment 100, and shown on the display unit of electronic equipment 100 170.Wherein, third prompt letter Breath can be indicated with written form.
S230: when to be, first record is obtained from the operating system.
Based on the resource identification of B resource, the record of B resource is searched from the resource record file of the operating system, It determines in the operating system there are when the first record of B resource, B money is obtained from the resource record file of the operating system First record in source.
As an implementation, after S200, the method also includes:
Based on first record, the first kind information of the resource to be detected is determined.
Include the type information of the resource to be detected in first record, determined from first record it is described to Detect the first kind information of resource, wherein in the present embodiment, the type of resource to be detected can be cloud Host Type, cloud Hard disk type, the virtual router type based on cloud host, the load balancer type based on cloud host and be based on cloud host One of type of database type.
S300: determining whether from the corresponding relationship of pre-stored resource identification and record in cloud platform, obtain with The first resource mark corresponding second records.
As an implementation, it after the first resource mark for getting resource to be detected, is identified based on first resource, It is searched from the corresponding relationship of pre-stored resource identification and record in cloud platform corresponding with first resource mark Second record then determines whether to obtain the second record corresponding with first resource mark from the cloud platform, in institute When stating in cloud platform in the presence of with the first resource the corresponding described second record of mark, second record is obtained, wherein provide Source mark and the corresponding relationship of record can store in the form of a file, and the corresponding relationship of resource identification and record can also be deposited directly Storage is in the database.
As an implementation, S300 includes:
It determines whether from the corresponding relationship of pre-stored type information and record storage position in the cloud platform, It obtains and first kind information corresponding second record storage position.
Wherein, in the present embodiment, type information and the corresponding relationship of record storage position store in the form of a file, class The corresponding relationship of type information and record storage position is stored in type file, in other embodiments, type information and record The corresponding relationship of storage location also can store in the database, in the first kind information for getting the resource to be detected Afterwards, from the type file in the cloud platform, search with first kind information corresponding second record storage position, after And determine whether from the cloud platform obtain with first kind information corresponding second record storage position, in the cloud When there is the second record storage position corresponding with the first kind information in platform, second record storage position is obtained It sets.
When to be, it is based on second record storage position, from the pre-stored resource identification in the cloud platform In the corresponding relationship of record, the second record that the corresponding resource to be detected is identified with the first resource is obtained.
Wherein, the corresponding relationship of resource identification and record stores in the form of a file, exists and institute in the cloud platform When stating the corresponding second record storage position of first kind information, firstly, obtaining second record storage position, then, base In second record storage position, the file of storage second record is obtained from cloud platform, finally, being based on described first Resource identification obtains from the file of second record and identifies the of the corresponding resource to be detected with the first resource Two records.
When to be no, determine that there is no second records corresponding with first resource mark in the cloud platform.
When the second record storage position corresponding with the first kind information being not present in the cloud platform, institute is determined It states and second record corresponding with first resource mark is not present in cloud platform.
During above-mentioned realization, since resource to be detected may there are many types, every class resource to be detected to be possible to Multiple resources, therefore, firstly, the first kind information based on resource to be detected, obtains corresponding with the first kind information Second record storage position reduces the seeking scope of the second record, then, based on second record storage position and the first money Source mark can be rapidly obtained the second record of the resource to be detected, improve search efficiency.
As an implementation, after S300, the method also includes:
When to be no, generate and send for characterizing the first prompt that can not determine that the resource to be detected is invalid resource Information gives the user terminal.
In the corresponding relationship for determining the pre-stored resource identification and record in cloud platform, it is not present and described first When resource identification corresponding second records, generating and sending can not determine that the resource to be detected is invalid resource for characterizing First prompt information electron equipment 100, and shown on the display unit of electronic equipment 100 170, wherein the first prompt Information is indicated with written form.
S400: it when to be, determines corresponding with the resource to be detected in the first state and second record The second state it is whether identical.
In the corresponding relationship for determining the pre-stored resource identification and record in cloud platform, exist and first money When the corresponding second record of mark of source, second record is obtained, and is determined in the first state and second record Whether second state corresponding with the resource to be detected is identical.
S500: when to be no, determine that the resource to be detected is invalid resource.
In the first state and the second state difference, determine that the resource to be detected is invalid resource.Example 1, The first state corresponding with the resource to be detected in first record is create successfully, and described second records Second state corresponding with the resource to be detected when being creation failure, determine that the resource to be detected is invalid money Source.Example 2, the first state corresponding with the resource to be detected in first record is to delete successfully, described the Second state corresponding with the resource to be detected in two records is when deleting failure, to determine that the resource to be detected is Invalid resource.
As an implementation, when the first state is identical as second state, the money to be detected is determined Source is efficient resource.Example 3, the first state corresponding with the resource to be detected in first record be creation at Function, second state corresponding with the resource to be detected in second record be when create successfully, described in determination to Detection resource is efficient resource.
During above-mentioned realization, after the invalid resource detection request that response user terminal is sent, for same to be checked Resource is surveyed, passes through the second of the second record that will be obtained in the first state and cloud platform of the obtain in operating system first record State compares, and then determines whether the resource is invalid resource, promotes the determination efficiency of invalid resource, simultaneously as should Process is participated in without artificial, then effectively save the cost.
As an implementation, after S500, the method also includes:
Determining that the first state is to fail for characterizing the resource to be detected and being in delete success status or create When state, the resource to be detected in the cloud platform is deleted.
When determining the resource to be detected is invalid resource, and when needing to delete the invalid resource, it is thus necessary to determine that institute It states invalid resource and is in cloud platform or operating system, therefore, need to be carried out based on the first state and second state true It is fixed, determining that the first state is to be in deletion success status or creation status of fail for characterizing the resource to be detected When, it, can when second state is to be in deletion status of fail or creation success status for characterizing the resource to be detected With understanding, the resource to be detected is present in the cloud platform, therefore, by the resource to be detected in the cloud platform It deletes.
As an implementation, after S500, the method also includes:
Determining that second state is to fail for characterizing the resource to be detected and being in delete success status or create When state, the resource to be detected in the operating system is deleted.
When determining the resource to be detected is invalid resource, and when needing to delete the invalid resource, it is thus necessary to determine that institute It states invalid resource and is in cloud platform or operating system, therefore, need to be carried out based on the first state and second state true It is fixed, determining that second state is to be in deletion success status or creation status of fail for characterizing the resource to be detected When, it, can when the first state is to be in deletion status of fail or creation success status for characterizing the resource to be detected With understanding, the resource to be detected is present in the operating system, therefore, will be described to be detected in the operating system Resource is deleted.
Second embodiment
Referring to figure 3., Fig. 3 is a kind of knot of the detection device 400 for invalid resource that the application second embodiment provides Structure block diagram.Described device is stored in electronic equipment 100 as described in Figure 1, will explain below structural block diagram shown in Fig. 3 It states, shown device includes:
Request unit 410, for obtaining the invalid resource detection request of user terminal transmission.
It is to be detected to obtain one for responding the invalid resource detection request from operating system for first acquisition unit 420 First record of resource, wherein include: the first resource mark and the first shape of the resource to be detected in first record State.
Determination unit 430, for determining whether the pass corresponding with record of the pre-stored resource identification from cloud platform In system, the second record corresponding with first resource mark is obtained.
First determination unit 440, for when to be, determine the first state and it is described second record in it is described Whether corresponding second state of resource to be detected is identical.
Second determination unit 450, for when to be no, determining that the resource to be detected is invalid resource.
As an implementation, described device further include: type determining units, for being recorded based on described first, really The first kind information of the fixed resource to be detected;Determination unit 430 is also used to, and is determined whether preparatory from the cloud platform In the type information of storage and the corresponding relationship of record storage position, the second record corresponding with the first kind information is obtained Storage location;And when to be, it is based on second record storage position, determines whether depositing from the cloud platform in advance In the resource identification of storage and the corresponding relationship of record, obtains and identify the of the corresponding resource to be detected with the first resource Two records;And when to be no, determine that there is no second notes corresponding with first resource mark in the cloud platform Record.
As an implementation, described device further include: first deletes unit, for determining that the first state is For characterize the resource to be detected be in delete success status or creation status of fail when, by described in the cloud platform to Resource is detected to delete.
As an implementation, described device further include: second deletes unit, for determining that second state is When being in deletion success status or creation status of fail for characterizing the resource to be detected, described in the operating system Resource to be detected is deleted.
As an implementation, described device further include: the first prompt unit, for generating and sending when to be no For characterizing the first prompt information that can not determine the resource to be detected as invalid resource to the user terminal.
As an implementation, the first acquisition unit 420, comprising: first determines subelement, described for responding Invalid resource detection request, determines in operating system with the presence or absence of resource to be detected;Second determines subelement, for being yes When, determine the first record in the operating system with the presence or absence of the resource to be detected;First obtain subelement, for for When being, first record is obtained from the operating system.
The present embodiment realizes the process of respective function to each functional unit of the detection of invalid resource, refers to above-mentioned Fig. 2 Content described in illustrated embodiment, details are not described herein again.
In addition, it is stored with computer program in the storage medium the embodiment of the present application also provides a kind of storage medium, When the computer program is run on computers, so that the computer executes any one of the application embodiment and is provided Invalid resource detection method.
In conclusion the detection method for the invalid resource that each embodiment of the application proposes, device, electronic equipment and storage are situated between Matter, which comprises obtain the invalid resource that user terminal is sent and detect request;The invalid resource detection request is responded, The first record of a resource to be detected is obtained from operating system, wherein include: the resource to be detected in first record First resource mark and first state;Determine whether the pre-stored resource identification pass corresponding with record from cloud platform The second record corresponding with first resource mark is obtained in system;When to be, the first state and described second are determined Whether second state corresponding with the resource to be detected in record is identical;When to be no, determine that the resource to be detected is Invalid resource.During above-mentioned realization, after the invalid resource detection request that response user terminal is sent, for same to be checked Resource is surveyed, passes through the second of the second record that will be obtained in the first state and cloud platform of the obtain in operating system first record State compares, and then determines whether the resource is invalid resource, promotes the determination efficiency of invalid resource, simultaneously as should Process is participated in without artificial, then effectively save the cost.
In embodiment provided herein, it should be understood that disclosed device and method, it can also be by other Mode realize.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are shown According to device, the architectural framework in the cards of method and computer program product, function of multiple embodiments of the application And operation.In this regard, each box in flowchart or block diagram can represent one of a module, section or code Point, a part of the module, section or code includes one or more for implementing the specified logical function executable Instruction.It should also be noted that function marked in the box can also be attached to be different from some implementations as replacement The sequence marked in figure occurs.For example, two continuous boxes can actually be basically executed in parallel, they sometimes may be used To execute in the opposite order, this depends on the function involved.It is also noted that each of block diagram and or flow chart The combination of box in box and block diagram and or flow chart can be based on the defined function of execution or the dedicated of movement The device of hardware is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.

Claims (10)

1. a kind of detection method of invalid resource, which is characterized in that the described method includes:
It obtains the invalid resource that user terminal is sent and detects request;
The invalid resource detection request is responded, the first record of a resource to be detected is obtained from operating system, wherein described It include: the first resource mark and first state of the resource to be detected in first record;Wherein, the operating system is and this The associated system of cloud platform;
It determines whether from the corresponding relationship of pre-stored resource identification and record in cloud platform, obtains and first money Corresponding second record of source mark;
When to be, second state corresponding with the resource to be detected in the first state and second record is determined It is whether identical;
When to be no, determine that the resource to be detected is invalid resource.
2. the method according to claim 1, wherein obtaining the first note of a resource to be detected from operating system After record, the method also includes:
Based on first record, the first kind information of the resource to be detected is determined;
It determines whether from the corresponding relationship of pre-stored resource identification and record in the cloud platform, obtains and described the Second record of the corresponding resource to be detected of one resource identification, comprising:
It determines whether to obtain from the corresponding relationship of pre-stored type information and record storage position in the cloud platform With first kind information corresponding second record storage position;
When to be, it is based on second record storage position, from the pre-stored resource identification and note in the cloud platform In the corresponding relationship of record, the second record that the corresponding resource to be detected is identified with the first resource is obtained;
When to be no, determine that there is no second records corresponding with first resource mark in the cloud platform.
3. method according to claim 1 or 2, which is characterized in that determine the resource to be detected be invalid resource it Afterwards, the method also includes:
Determining that the first state is to be in deletion success status or creation status of fail for characterizing the resource to be detected When, the resource to be detected in the cloud platform is deleted.
4. method according to claim 1 or 2, which is characterized in that determine the resource to be detected be invalid resource it Afterwards, the method also includes:
Determining that second state is to be in deletion success status or creation status of fail for characterizing the resource to be detected When, the resource to be detected in the operating system is deleted.
5. the method according to claim 1, wherein determining whether the pre-stored resource mark from cloud platform In the corresponding relationship of knowledge and record, after obtaining the second record corresponding with first resource mark, the method also includes:
When to be no, generating and sending can not determine that the resource to be detected is the first prompt information of invalid resource for characterizing To the user terminal.
6. the method according to claim 1, wherein the response invalid resource detection is requested, from operation The first record of a resource to be detected is obtained in system, comprising:
The invalid resource detection request is responded, is determined in operating system with the presence or absence of resource to be detected;
When to be, the first record in the operating system with the presence or absence of the resource to be detected is determined;
When to be, first record is obtained from the operating system.
7. according to the method described in claim 6, it is characterized in that, determining operation responding the invalid resource detection request After whether there is the resource to be detected in system, the method also includes:
When to be no, generate and send that there is currently no the second prompt informations of the resource to be detected to the use for characterizing Family terminal;Or
After first with the presence or absence of the resource to be detected in determining the operating system records, the method also includes: When to be no, generate and send for characterizing the third prompt information that can not determine the resource to be detected as invalid resource to institute State user terminal.
8. a kind of detection device of invalid resource, which is characterized in that described device includes:
Request unit, for obtaining the invalid resource detection request of user terminal transmission;
First acquisition unit obtains a resource to be detected for responding the invalid resource detection request from operating system First record, wherein include: the first resource mark and first state of the resource to be detected in first record;Wherein, The operating system be and the associated system of the cloud platform;
Determination unit is obtained from the corresponding relationship of pre-stored resource identification and record in cloud platform for determining whether Take the second record corresponding with first resource mark;
First determination unit, for when to be, determine the first state and it is described second record in it is described to be detected Whether corresponding second state of resource is identical;
Second determination unit, for when to be no, determining that the resource to be detected is invalid resource.
9. a kind of electronic equipment, which is characterized in that including processor and the memory being connected to the processor, the storage Computer program is stored in device, when the computer program is executed by the processor, so that the electronic equipment right of execution Benefit requires method described in any one of 1-7.
10. a kind of storage medium, which is characterized in that computer program is stored in the storage medium, when the computer journey When sequence is run on computers, so that the computer executes the method as described in any one of claim 1-7.
CN201910046218.3A 2019-01-17 2019-01-17 Detection method, device, electronic equipment and the storage medium of invalid resource Active CN109787862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910046218.3A CN109787862B (en) 2019-01-17 2019-01-17 Detection method, device, electronic equipment and the storage medium of invalid resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910046218.3A CN109787862B (en) 2019-01-17 2019-01-17 Detection method, device, electronic equipment and the storage medium of invalid resource

Publications (2)

Publication Number Publication Date
CN109787862A CN109787862A (en) 2019-05-21
CN109787862B true CN109787862B (en) 2019-09-13

Family

ID=66501559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910046218.3A Active CN109787862B (en) 2019-01-17 2019-01-17 Detection method, device, electronic equipment and the storage medium of invalid resource

Country Status (1)

Country Link
CN (1) CN109787862B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908984B (en) * 2019-10-31 2022-06-10 北京浪潮数据技术有限公司 Data processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413142A (en) * 2011-11-30 2012-04-11 华中科技大学 Active defense method based on cloud platform
CN106161566A (en) * 2015-04-24 2016-11-23 中兴通讯股份有限公司 A kind of cloud computation data center access management method and cloud computation data center
CN107749887A (en) * 2017-10-25 2018-03-02 暴风集团股份有限公司 A kind of CDN resource allocations, localization method and device and CDN system
US9953036B2 (en) * 2013-01-09 2018-04-24 Box, Inc. File system monitoring in a system which incrementally updates clients with events that occurred in a cloud-based collaboration platform
CN108459910A (en) * 2018-03-02 2018-08-28 上海云轴信息科技有限公司 A kind of method and apparatus for deleting resource

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130218837A1 (en) * 2012-02-16 2013-08-22 Verizon Patent And Licensing Inc. Cloud data synchronization with local data
US10630772B2 (en) * 2014-09-10 2020-04-21 Panzura, Inc. Maintaining global namespace consistency for a distributed filesystem

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413142A (en) * 2011-11-30 2012-04-11 华中科技大学 Active defense method based on cloud platform
US9953036B2 (en) * 2013-01-09 2018-04-24 Box, Inc. File system monitoring in a system which incrementally updates clients with events that occurred in a cloud-based collaboration platform
CN106161566A (en) * 2015-04-24 2016-11-23 中兴通讯股份有限公司 A kind of cloud computation data center access management method and cloud computation data center
CN107749887A (en) * 2017-10-25 2018-03-02 暴风集团股份有限公司 A kind of CDN resource allocations, localization method and device and CDN system
CN108459910A (en) * 2018-03-02 2018-08-28 上海云轴信息科技有限公司 A kind of method and apparatus for deleting resource

Also Published As

Publication number Publication date
CN109787862A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
US11709591B2 (en) Flowchart-style diagramming tool to build automated workflows
US9590880B2 (en) Dynamic collection analysis and reporting of telemetry data
US9053004B2 (en) Virtual data storage service with sparse provisioning
RU2419854C2 (en) Template based service management
JP6828014B2 (en) A computer implementation performed by a local computing device communicatively connected to one or more signing devices.
CN108304250A (en) Method and apparatus for the node for determining operation machine learning task
CN106126410B (en) The reminding method and device of code conflicts
WO2017124795A1 (en) Contact group processing method, apparatus, and mobile terminal
US20080244233A1 (en) Machine cluster topology representation for automated testing
CN110515830A (en) Operation trace method for visualizing, device, equipment and storage medium
US20150261523A1 (en) System and methods for declaration-based extension management for multi-tenant environments
CN110956269A (en) Data model generation method, device, equipment and computer storage medium
CN108431768A (en) Using the controlled deployment of feature
CN113312072A (en) Configuration file updating method and device, electronic equipment and medium
CN106663041A (en) Recovering usability of cloud based service from system failure
CN110334059A (en) Method and apparatus for handling file
CN109543891A (en) Method for building up, equipment and the computer readable storage medium of capacity prediction model
CN110019263A (en) Information storage means and device
CN109787862B (en) Detection method, device, electronic equipment and the storage medium of invalid resource
CN111400179A (en) Method and device for terminal application program interaction, computer equipment and storage medium
CN109614549B (en) Method and apparatus for pushed information
CN109614271A (en) Control method, device, equipment and the storage medium of multiple company-data consistency
CN111753203A (en) Card number recommendation method, device, equipment and medium
CN106683705A (en) EMMC test method and eMMC test system
CN109144864A (en) Method and device for test window

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 214000, science and software park, Binhu District, Jiangsu, Wuxi 6

Patentee after: Huayun data holding group Co., Ltd

Address before: 214000, science and software park, Binhu District, Jiangsu, Wuxi 6

Patentee before: WUXI CHINAC DATA TECHNICAL SERVICE Co.,Ltd.

CP01 Change in the name or title of a patent holder