CN114756298B - Program instance management method and device, computer storage medium and electronic equipment - Google Patents

Program instance management method and device, computer storage medium and electronic equipment Download PDF

Info

Publication number
CN114756298B
CN114756298B CN202210420509.6A CN202210420509A CN114756298B CN 114756298 B CN114756298 B CN 114756298B CN 202210420509 A CN202210420509 A CN 202210420509A CN 114756298 B CN114756298 B CN 114756298B
Authority
CN
China
Prior art keywords
program
instance
file
target
program instance
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
CN202210420509.6A
Other languages
Chinese (zh)
Other versions
CN114756298A (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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information Technology 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 Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202210420509.6A priority Critical patent/CN114756298B/en
Publication of CN114756298A publication Critical patent/CN114756298A/en
Application granted granted Critical
Publication of CN114756298B publication Critical patent/CN114756298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure belongs to the technical field of computers, and relates to a program instance management method and device, a computer storage medium and electronic equipment. The method comprises the following steps: if a starting instruction corresponding to the target program is acquired, creating a program instance file with an association mapping relation with the target program in the disk file; and determining the instance information of the program instance corresponding to the target program, and storing the instance information into a program instance file so as to realize the management of the program instance through the program instance file. In the method, the program instance file with the association mapping relation with the target program is created in the disk file, and the program instance file is used for subsequent management of the program instance, so that the situation that the management of the program instance is required to depend on a third party management program in the prior art is avoided, the complexity of the management of the program instance is reduced, and the efficiency of the management of the program instance is improved.

Description

Program instance management method and device, computer storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a program instance management method, a program instance management apparatus, a computer readable storage medium, and an electronic device.
Background
With the development of computer technology, many types of programs are available for users, and during the process of running the programs, a large number of program instances storing instance information are generated, so that it is important to manage the program instances.
In the related art, the management of program instances is completely dependent on a third party hypervisor, and each program instance must communicate with the hypervisor to implement the management of the program instance, which obviously increases the complexity of the hypervisor instance and reduces the efficiency of the hypervisor instance.
In view of the foregoing, there is a need in the art for developing a new program instance management method and apparatus.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a program instance management method, a program instance management apparatus, a computer-readable storage medium, and an electronic device, and further, at least to some extent, to overcome the problems of high complexity and low efficiency of program instance management caused by the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of an embodiment of the present invention, there is provided a program instance management method, the method including: if a starting instruction corresponding to a target program is acquired, creating a program instance file with an association mapping relation with the target program in a disk file; and determining the instance information of the program instance corresponding to the target program, and storing the instance information into the program instance file so as to realize the management of the program instance through the program instance file.
In an exemplary embodiment of the present invention, the creating a program instance file having an association mapping relationship with the target program in a disk file includes: and determining an identifier corresponding to the target program, and creating a program instance file with an association mapping relation with the target program in a disk file according to the identifier.
In an exemplary embodiment of the present invention, after the creating, in the disk file, a program instance file having an association mapping relationship with the target program, the method further includes: creating a target object with a single mapping relation with the program instance file by using the identification; and the life cycle of the target object is the same as that of the process corresponding to the target program.
In an exemplary embodiment of the present invention, the determining the instance information of the program instance corresponding to the target program, and storing the instance information in the program instance file includes: determining all program instance files with the association mapping relation with the target program from the disk file; determining the target objects respectively having the single mapping relation with all the program instance files; if the target object with the single mapping relation with the program instance file exists, determining instance information of a program instance corresponding to the target program, and storing the instance information into the program instance file; and deleting the program instance file if the target object with the single mapping relation with the program instance file does not exist.
In an exemplary embodiment of the present invention, the managing the program instance through the program instance file includes: if a restarting instruction corresponding to the target program is acquired, acquiring all program instance files with the association mapping relation with the target program from the disk file; judging whether the target object with the single mapping relation with the program instance file exists or not to obtain a judging result, and screening all the program instance files according to the judging result to obtain a target program instance file; and judging the number of the object program instance files to obtain a number judgment result, and executing the object program according to the number judgment result.
In an exemplary embodiment of the present invention, the executing the target program according to the number determination result includes: if the number judgment result is that the target program instance file does not exist, creating the program instance file with the association relation with the target program in the disk file so as to store instance information in the program instance file; if the number judgment result is that one target program instance file exists, establishing communication between the background program instance and the target program instance; the background program instance is evoked when the restarting instruction is acquired, and the target program instance corresponds to the target program instance file; transmitting an instruction for executing the target program to the target program instance by utilizing the background program instance so as to execute the target program; and if the number judgment result is that a plurality of target program instance files exist, displaying the instance information corresponding to the plurality of target program instance files.
In an exemplary embodiment of the present invention, the managing the program instance through the program instance file includes: and if a change instruction corresponding to the target program is acquired, changing the instance information of the program instance corresponding to the target program.
In an exemplary embodiment of the present invention, the managing the program instance through the program instance file includes: and if a normal exit instruction corresponding to the target program is acquired, deleting the program instance file corresponding to the target program in the disk file.
According to a second aspect of the embodiment of the present invention, there is provided a program instance management apparatus including: the creation module is configured to create a program instance file with an association mapping relation with the target program in a disk file if a starting instruction corresponding to the target program is acquired; and the management module is configured to determine the instance information of the program instance corresponding to the target program and store the instance information into the program instance file so as to realize the management of the program instance through the program instance file.
According to a third aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory has stored thereon computer readable instructions which, when executed by the processor, implement the program instance management method of any of the above-described exemplary embodiments.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the program instance management method in any of the above-described exemplary embodiments.
As can be seen from the above technical solutions, the program instance management method, the program instance management device, the computer storage medium and the electronic device according to the exemplary embodiments of the present invention have at least the following advantages and positive effects:
In the method and the device provided by the exemplary embodiment of the disclosure, the program instance file with the association mapping relation with the target program is created in the disk file, and the program instance file is used for subsequent management of the program instance, so that the condition that the management of the program instance must depend on a third party management program in the prior art is avoided, the complexity of the management of the program instance is reduced, and the efficiency of the management of the program instance is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 schematically illustrates a flow diagram of a program instance management method in an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flowchart of storing instance information into a program instance file in a program instance management method in an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flowchart of implementing program instance management through a program instance file in a program instance management method in an embodiment of the disclosure;
FIG. 4 schematically illustrates a flowchart of an execution target program in a program instance management method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of a program instance management method under an application scenario in an embodiment of the disclosure;
FIG. 6 schematically illustrates a schematic configuration of a program instance management apparatus in an embodiment of the present disclosure;
FIG. 7 schematically illustrates an electronic device for a program instance management method in an embodiment of the disclosure;
Fig. 8 schematically illustrates a computer-readable storage medium for a program instance management method in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. in addition to the listed elements/components/etc.; the terms "first" and "second" and the like are used merely as labels, and are not intended to limit the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
In view of the problems in the related art, the present disclosure proposes a program instance management method. FIG. 1 is a flow chart of a program instance management method, as shown in FIG. 1, the program instance management method at least includes the following steps:
S110, if a starting instruction corresponding to the target program is acquired, creating a program instance file with an association mapping relation with the target program in the disk file.
Step S120, determining instance information of a program instance corresponding to the target program, and storing the instance information into a program instance file so as to realize management of the program instance through the program instance file.
In the method and the device provided by the exemplary embodiment of the disclosure, the program instance file with the association mapping relation with the target program is created in the disk file, and the program instance file is used for subsequent management of the program instance, so that the condition that the management of the program instance must depend on a third party management program in the prior art is avoided, the complexity of the management of the program instance is reduced, and the efficiency of the management of the program instance is improved.
The steps of the program instance management method are described in detail below.
In step S110, if a start instruction corresponding to the target program is acquired, a program instance file having an association mapping relation with the target program is created in the disk file.
In an exemplary embodiment of the present disclosure, a target program refers to a program that a user needs to start, for example, a user may install chat software on a terminal according to needs, after the chat software is installed successfully, all files under a corresponding installation directory are chat programs, and a start entry exists in a plurality of chat programs, where the start entry is the target program, when the user touches the target program, the terminal receives a start instruction about the target program, and at this time, a program instance is generated to store instance information.
It should be noted that, one target program may correspond to a plurality of program instances, specifically, a user may log in to a chat program using a plurality of chat accounts, and then a plurality of program instances corresponding to the target program exist, where the plurality of program instances may store instance information corresponding to the plurality of chat accounts respectively.
The disk file refers to a file existing in a computer, and the association mapping relationship refers to a corresponding relationship between a target program and a program instance file, which is worth noting that the program instance file may be directly created in the disk file, or the program instance file may be created in a specific sub-file of the disk file, for example, the program instance file may be created in an x sub-file of a D disk file, which is not particularly limited in the present exemplary embodiment.
For example, the user clicks the start entry in the chat program, that is, the user clicks the target program for starting the chat, and then obtains the start instruction corresponding to the target program, so as to create the program instance file a with the association mapping relation with the target program in the computer D disk file.
In an alternative embodiment, creating a program instance file with an association mapping relation with the target program in the disk file includes: and determining an identifier corresponding to the target program, and creating a program instance file with an association mapping relation with the target program in the disk file according to the identifier.
The identifier may be a character string used in creating the program instance file, where the character string corresponds to the target program and has a unique corresponding relationship with the target program, and the program instance file created by using the identifier is a program instance file having an association mapping relationship with the target program.
Specifically, the identifier may be a unique identifier (a randomly generated non-repeating character string), or may be a combination of a creation time of a process generated when the target program is started and a process number, which is not particularly limited in the present exemplary embodiment.
Based on this, the concrete naming of the program instance file may take the form of instance_file_id, where instance_file represents that the file is a program instance file and id refers to an identifier.
For example, the identifier may be a unique identifier, based on which, the identifier corresponding to the target program is determined to be xxxxx, and according to the identifier, a program instance file a having an association mapping relationship with the target program may be created in a D disk file of the computer.
In the present exemplary embodiment, on the one hand, the program instance file is created by using the identifier corresponding to the target program, so that it is ensured that the program instance file and the target program have an association mapping relationship; on the other hand, the program instance file is created in the disk file, so that the situation that the program instance must be realized by a third party management program in the subsequent process of managing the program instance is avoided, the complexity of the management program instance is reduced, and the efficiency of the management program instance is improved.
In an alternative embodiment, after creating the program instance file with the association mapping relation with the target program in the disk file, the method further includes: creating a target object with a single mapping relation with the program instance file by using the identifier; wherein the life cycle of the target object and the process corresponding to the target program is the same.
The target object refers to an object having the same life cycle as a process corresponding to the target program, specifically, the target object may be a global object, and is created by using a related function in a programming language, which is worth noting that a program instance may be abnormally exited, which may cause a program instance file corresponding to the program instance to remain in a disk file, thereby causing a large amount of occupation of the disk file.
Based on this, in order to solve the above-described problem, it is necessary to create a target object having a single mapping relation with the program instance file, and in the subsequent determination of whether the program instance file is a file remaining in the disk file, it is possible to determine whether the program instance corresponding to the program instance file has been abnormally exited by determining whether the target object exists.
For example, using the identifier xxxxxxx, a target object www having a single mapping relationship with the program instance file a is created, where it is worth noting that the target object www and the process corresponding to the target program have the same life cycle.
In this exemplary embodiment, by creating the target object having a single mapping relationship with the program instance file, the occurrence of the situation that the program instance file remains in the disk file when the program instance has been abnormally exited is avoided, and in addition, the occurrence of errors and confusion in the subsequent process of managing the program instance file is avoided.
In step S120, instance information of a program instance corresponding to the target program is determined, and the instance information is stored in a program instance file, so that management of the program instance is achieved through the program instance file.
In an exemplary embodiment of the present disclosure, the instance information refers to information describing the program instance, specifically, the program instance information may be a process number corresponding to a process running the target program, the program instance information may also be an open communication pipe for connection with other program instances to use, the program instance information may also include a name of the target object to determine whether the target object exists, the program instance information may also be information of a user, for example, in a chat program, the program instance information may be account information of a user login account.
After determining the instance information corresponding to the program instance, the instance information may be stored in the program instance files, and then the program instance may be managed by the program instance files storing the instance information.
For example, determining instance information corresponding to a target program may be as follows, { pid: xxx; uid: yyy; ipc, zzz; the content in }, where }, is instance information, where instance information is usually some key-like value pairs, pid indicates a process number corresponding to a process running the target program, xxx indicates a specific value of the process number, uid indicates information of a user, yyyy indicates a specific value of user information, for example, may be an account nickname of the user, ipc indicates an open communication pipe, zzz is identification information of an open channel, and exist_key is a key corresponding to whether the target object exists or not, and www is used to indicate whether the target object exists or not.
The example information is stored in the corresponding program instance file, so that the corresponding program instance can be managed through the program instance file.
In an alternative embodiment, fig. 2 is a schematic flow chart of storing instance information in a program instance file in a program instance management method, and as shown in fig. 2, the method at least includes the following steps: in step S210, all program instance files having an association mapping relationship with the target program are determined from the disk files, and target objects having a single mapping relationship with all program instance files respectively are determined.
However, before the instance information is stored in the program instance file, it is required to determine whether the program instance file is a file remaining in the disk file after the program instance is abnormally exited, and further, it is required to acquire all program instance files having an association mapping relationship with the target program, and it is required to determine the target objects having a single mapping relationship with the 4 program instance files, respectively, if it is determined that the 4 program instance files have an association mapping relationship with the target program.
For example, all program instance files having an association mapping relationship with the target program S are determined from the disk files, specifically, all program instance files include a program instance file_file_xx1, a program instance file_file_xx2, and a program instance file_file_xx3, and target objects having a single mapping relationship with the program instance file_file_xx1, target objects having a single mapping relationship with the program instance file_file_xx2, and target objects having a single mapping relationship with the program instance file_file_xx3 are determined respectively.
In step S220, if there is a target object having a single mapping relationship with the program instance file, the instance information of the program instance corresponding to the target program is determined, and the instance information is stored in the program instance file.
If there is a target object with a single mapping relation with the program instance file, it is proved that the program instance file is not a file remaining in the disk file, and at this time, the instance information may be stored in the program instance file.
For example, there is a target object a having a single mapping relationship with the program instance file instance_file_xx1, at which point instance information may be stored into the program instance file instance_file_xx1.
In step S230, if there is no target object having a single mapping relationship with the program instance file, the program instance file is deleted.
Since the life cycle of the target object and the process corresponding to the target program is the same, the target object is not existed along with the exit of the target program no matter the target program is normally exited or abnormally exited, and further, when the target object with a single mapping relation with the program instance file does not exist, the target program is proved to be exited at the moment, therefore, the program instance file corresponding to the target program, which is remained in the disk file, needs to be deleted.
For example, there is no target object having a single mapping relationship with the program instance file instance_filexx2 and with the program instance file instance_filexx3, at which time the program instance file instance_filexx2 and the program instance file instance_filexx3 are deleted from the disk file.
In the present exemplary embodiment, before storing the instance information in the program instance file, the determination is made as to whether there is a target object having a single mapping relationship with the program instance file, so that the logic of storing the instance information in the program instance file is perfected, and the situation that when there is no target object having a single mapping relationship with the program instance file, the instance information is still stored in the program instance file is avoided.
In an alternative embodiment, the management of the program instance through the program instance file includes: and if a change instruction corresponding to the target program is acquired, changing the instance information of the program instance corresponding to the target program.
The change instruction refers to an instruction for changing the instance information, for example, in a chat program, there is a function of logging out or logging in other accounts, when a user touches a logging out control or a control corresponding to a function of logging in other accounts, a change instruction corresponding to a target program in the chat program is obtained, new instance information is carried in the change instruction, and then the stored instance information is changed according to the new instance information.
For example, the instance information of the program instance corresponding to the target program stored in the disk file is { pid: xxx; uid: yyy; ipc, zzz; if at this time, when a user touches a control corresponding to the function of logging in other accounts, a change instruction is acquired, other account information carried in the change instruction is zzz, and then a value yyy corresponding to the uid in the instance information is changed to zzz.
In this exemplary embodiment, if the change instruction corresponding to the target program is obtained, the instance information can be changed, which avoids the need of implementing by means of a third party management program in the process of changing the instance information in the prior art, reduces the complexity of changing the instance information, and further improves the efficiency of changing the instance information.
In an alternative embodiment, the management of the program instance through the program instance file includes: if a normal exit instruction corresponding to the target program is acquired, deleting the program instance file corresponding to the target program in the disk file.
The normal exit instruction refers to an instruction for exiting the target program normally, for example, if the running target program is a chat program, the normal exit instruction may be an instruction obtained after the user touches the exit chat window.
When a normal exit instruction is received, the program instance file corresponding to the target program stored in the disk file needs to be deleted, so that the program instance file is prevented from remaining in the disk file under the normal exit condition.
For example, if the running target program is a chat program, after the control for exiting the chat window is touched, a normal exiting command may be obtained, and at this time, the program instance file instance_file_xx4 corresponding to the target program stored in the disk file is deleted.
In this exemplary embodiment, when the normal exit instruction is acquired, the program instance file corresponding to the target program is deleted in the disk file, so that the residue of the program instance file in the disk file is avoided under the normal exit condition, unnecessary memory occupation is reduced, and in addition, the accuracy of the subsequent management program instance file is improved.
In an alternative embodiment, fig. 3 is a schematic flow chart of implementing management of a program instance by a program instance file in a program instance management method, and as shown in fig. 3, the method at least includes the following steps: in step S310, if a restart instruction corresponding to the target program is acquired, all program instance files having an association mapping relationship with the target program are acquired from the disk file.
The restart instruction refers to an instruction sent when the target program is restarted, for example, if the target program is a chat program, the user may restart the chat program after starting the chat program for the first time, and then obtain the restart instruction, and after obtaining the restart instruction, obtain all program instance files corresponding to the chat program from the disk file D, where the program instance files include a program instance file instance_file_xx5, a program instance file instance_file_file_xx6, a program instance file instance_file_xx7, and a program instance file instance_file_xx8.
In step S320, it is determined whether there is a target object having a single mapping relationship with the program instance file to obtain a determination result, and all the program instance files are filtered according to the determination result to obtain the target program instance file.
After all program instance files corresponding to the target program are acquired, whether the target object with a single mapping relation with the program instance files exists or not needs to be judged, so that the acquired program instance files are screened according to a judging result, and program instance files remained in the disk files are screened.
For example, it is determined whether the target object corresponding to the program instance file instance_filexx5 } is present or not to obtain the determination result a1, it is determined whether the target object corresponding to the program instance file instance_filexx6 } is present or not to obtain the determination result a2, it is determined whether the target object corresponding to the program instance file instance_filexx7 } is present or not to obtain the determination result a3, it is determined whether the target object corresponding to the program instance file instance_filexx8 } is present or not to obtain the determination result a4, and the program instance file instance_filexx5, the program instance file instance_filexx6 } and the program instance file instance_filexx8 } are screened according to the determination result a1, the determination result a2, the determination result a3 and the determination result a 4.
In step S330, the number of the object program instance files is determined to obtain a number determination result, and the object program is executed according to the number determination result.
The number judgment result refers to a result obtained after the number of the object program instance files is judged, and the object program is correspondingly executed according to the number judgment result.
For example, the program instance file is instance_file_xx5 } obtained by filtering the program instance file instance_file_xx5 }, the program instance file instance_file_xx6 }, the program instance file instance_file_xx7 } and the program instance file instance_file_xx8 }, and the program instance file instance_file_xx5 } is the target program instance file.
And judging the number of the object program instance files, wherein the number judgment result is that one object program instance file exists, and further executing the object program correspondingly according to the number judgment result.
In the present exemplary embodiment, when a restart instruction is acquired, on the one hand, program instance files are screened according to a judgment result, so that the influence of program instance files remained in disk files on an execution target program is avoided; on the other hand, according to the number judgment result, the target program is executed, and the logic of executing the target program is perfected.
In an alternative embodiment, fig. 4 is a schematic flow chart of a program instance management method for executing a target program, and as shown in fig. 4, the method at least includes the following steps: in step S410, if the number of the program instance files is determined to be not present, a program instance file having an association relationship with the target program is created in the disk file, so as to store instance information in the program instance file.
When the number judgment result shows that the target program instance file does not exist, it is proved that the program instance file corresponding to the target program is not created in the disk file at the moment, so that the program instance file related to the target program needs to be created in the disk file, and then the instance information is stored in the program instance file.
For example, if the number of program instance files corresponding to the target program a do not exist as a result of the number determination, a program instance file instance_file_xx7 having an association relationship with the target program a is created in the D disk file, so as to store instance information in the program instance file instance_file_xx7.
In step S420, if the number of the target program instance files exist as a result of the number determination, establishing communication between the background program instance and the target program instance; the background program instance is evoked when a restarting instruction is acquired, and the target program instance corresponds to a target program instance file.
If the number of the object program instance files exist as a result of the judgment, the instance information can be stored in the object program instance files, and when the instance information is stored in the object program instance files, communication between the background program instance and the object program needs to be established, and specifically, the process of establishing communication can be realized by utilizing a communication channel in the instance information stored in the object program instance files.
The background program instance refers to a program instance corresponding to a program which cannot be perceived by a user when a restart instruction is acquired, but the computer is actually running, and the target program instance refers to a program instance corresponding to a target program instance file.
For example, when the target program is a chat program, if the number determination result is that there is one target program instance file instance_file_xx8, then the communication channel in the target program instance file instance_file_xx8 is utilized to establish the communication between the target program instance corresponding to the target program instance file and the background program instance.
In step S430, an instruction to execute the target program is sent to the target program instance using the background program instance to execute the target program.
After communication between the background program instance and the target program instance is established, the background program instance sends an instruction for executing the target program to the target program instance, and at the moment, the target program is executed after the instruction for executing the target program is acquired.
For example, the target program is a chat program, after communication between the background program instance and the target program instance is established, the background program instance sends an instruction for executing the chat program to the target program instance, at this time, the chat program is executed, and a corresponding chat window is displayed in the computer.
In step S440, if the number of object program instance files exist, instance information corresponding to the object program instance files is displayed.
And if the number judgment result shows that a plurality of target program instance files exist, displaying instance information corresponding to the plurality of target program instance files.
For example, if the number of the target program is that there are multiple target program instance files, specifically, the target program instance files include instance_file_xx9 } and target program instance file instance_file_xx10 } and it is proved that there are two chat accounts that have been logged in at this time, and chat information corresponding to the chat accounts is stored in the two target program instance files, so that account information xxx in instance information corresponding to the target program instance file instance_file_xx9 } is displayed, and account information ccc in instance information corresponding to the target program instance file instance_file_xx10 } is also displayed, so that a user can select which account information to use, and after the user selects the account information, a chat window corresponding to the account information is opened.
In the present exemplary embodiment, according to the number judgment result, the corresponding execution target program perfects the execution logic of the target program.
In the method and the device provided by the exemplary embodiment of the disclosure, the program instance file with the association mapping relation with the target program is created in the disk file, and the program instance file is used for subsequent management of the program instance, so that the condition that the management of the program instance must depend on a third party management program in the prior art is avoided, the complexity of the management of the program instance is reduced, and the efficiency of the management of the program instance is improved.
The program instance management method in the embodiment of the present disclosure is described in detail below in connection with an application scenario.
Fig. 5 schematically illustrates a flow chart of a program instance management method under an application scenario, where, as illustrated in fig. 5, step S510 is a chat control in a touch browser page, step S520 is a call of a background program instance, step S530 is a process of obtaining all program instance files having an association mapping relationship with a chat program from a disk file, step S540 is a process of determining whether there is a target object having a single mapping relationship with the program instance files to obtain a determination result, step S550 is a process of screening the program instance files according to the determination result to obtain target program instance files, step S560 is a process of determining the number of target program instance files to obtain a number determination result, and step S570 is a process of displaying instance information corresponding to two target program instance files if the number determination result is that there are two target program instance files.
In addition, in an exemplary embodiment of the present disclosure, a program instance management apparatus is also provided. Fig. 6 shows a schematic structural diagram of a program instance management apparatus, and as shown in fig. 6, the program instance management apparatus 600 may include: a creation module 610 and a management module 620.
Wherein:
The creation module 610 is configured to create a program instance file with an association mapping relation with the target program in the disk file if a start instruction corresponding to the target program is acquired; the management module 620 is configured to determine instance information of a program instance corresponding to the target program, and store the instance information in a program instance file, so as to implement management of the program instance through the program instance file.
The details of the above-mentioned program instance management apparatus 600 are described in detail in the corresponding program instance management method, and thus are not described herein.
It should be noted that although several modules or units of the program instance management apparatus 600 are mentioned in the above detailed description, such partitioning is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
An electronic device 700 according to such an embodiment of the invention is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, the electronic device 700 is embodied in the form of a general purpose computing device. Components of electronic device 700 may include, but are not limited to: the at least one processing unit 710, the at least one storage unit 720, a bus 730 connecting the different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
Wherein the storage unit stores program code that is executable by the processing unit 710 such that the processing unit 710 performs steps according to various exemplary embodiments of the present invention described in the above-mentioned "exemplary methods" section of the present specification.
The memory unit 720 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 721 and/or cache memory 722, and may further include Read Only Memory (ROM) 723.
The storage unit 720 may also include a program/usage tool 724 having a set (at least one) of program modules 725, such program modules 725 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which may include the reality of a network environment, or some combination thereof.
Bus 730 may be a bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 may also communicate with one or more external devices 770 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and/or any device (e.g., router, modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 750. Also, electronic device 700 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 760. As shown, network adapter 760 communicates with other modules of electronic device 700 over bus 730. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 700, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 8, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A program instance management method, the method comprising:
if a starting instruction corresponding to a target program is acquired, creating a program instance file with an association mapping relation with the target program in a disk file;
Determining all program instance files with the association mapping relation with the target program from the disk files, and determining target objects with single mapping relation with all program instance files respectively; wherein, the life cycle of the target object and the process corresponding to the target program is the same; the target object is used for determining whether the program instance corresponding to the program instance file is already exited by exception;
if the target object with the single mapping relation with the program instance file exists, determining instance information of a program instance corresponding to the target program, and storing the instance information into the program instance file;
and deleting the program instance file if the target object with the single mapping relation with the program instance file does not exist.
2. The program instance management method according to claim 1, wherein creating a program instance file having an association mapping relation with the target program in a disk file comprises:
and determining an identifier corresponding to the target program, and creating a program instance file with an association mapping relation with the target program in a disk file according to the identifier.
3. The program instance management method according to claim 2, wherein after creating the program instance file having the association map relation with the target program in the disk file, the method further comprises:
and creating a target object with a single mapping relation with the program instance file by using the identification.
4. A program instance management method according to claim 3, characterized in that the method further comprises:
If a restarting instruction corresponding to the target program is acquired, acquiring all program instance files with the association mapping relation with the target program from the disk file;
Judging whether the target object with the single mapping relation with the program instance file exists or not to obtain a judging result, and screening all the program instance files according to the judging result to obtain a target program instance file;
And judging the number of the object program instance files to obtain a number judgment result, and executing the object program according to the number judgment result.
5. The program instance management method according to claim 4, wherein the executing the target program according to the number judgment result comprises:
If the number judgment result is that the target program instance file does not exist, creating the program instance file with the association mapping relation with the target program in the disk file so as to store instance information in the program instance file;
if the number judgment result is that one target program instance file exists, establishing communication between a background program instance and the target program instance; the background program instance is evoked when the restarting instruction is acquired, and the target program instance corresponds to the target program instance file;
transmitting an instruction for executing the target program to the target program instance by utilizing the background program instance so as to execute the target program;
and if the number judgment result is that a plurality of target program instance files exist, displaying the instance information corresponding to the plurality of target program instance files.
6. A program instance management method according to any one of claims 1-3, characterized in that the method further comprises:
and if a change instruction corresponding to the target program is acquired, changing the instance information of the program instance corresponding to the target program.
7. A program instance management method according to any one of claims 1-3, characterized in that the method further comprises:
and if a normal exit instruction corresponding to the target program is acquired, deleting the program instance file corresponding to the target program in the disk file.
8. A program instance management apparatus, comprising:
The creation module is configured to create a program instance file with an association mapping relation with the target program in a disk file if a starting instruction corresponding to the target program is acquired;
the management module is configured to determine all program instance files with the association mapping relation with the target program from the disk files and determine target objects with single mapping relation with all program instance files respectively; wherein, the life cycle of the target object and the process corresponding to the target program is the same; the target object is used for determining whether the program instance corresponding to the program instance file is already exited by exception; if the target object with the single mapping relation with the program instance file exists, determining instance information of a program instance corresponding to the target program, and storing the instance information into the program instance file; and deleting the program instance file if the target object with the single mapping relation with the program instance file does not exist.
9. An electronic device, comprising:
a processor;
A memory for storing executable instructions of the processor;
wherein the processor is configured to perform the program instance management method of any of claims 1-7 via execution of the executable instructions.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the program instance management method of any one of claims 1-7.
CN202210420509.6A 2022-04-20 2022-04-20 Program instance management method and device, computer storage medium and electronic equipment Active CN114756298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210420509.6A CN114756298B (en) 2022-04-20 2022-04-20 Program instance management method and device, computer storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210420509.6A CN114756298B (en) 2022-04-20 2022-04-20 Program instance management method and device, computer storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114756298A CN114756298A (en) 2022-07-15
CN114756298B true CN114756298B (en) 2024-06-04

Family

ID=82330443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210420509.6A Active CN114756298B (en) 2022-04-20 2022-04-20 Program instance management method and device, computer storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114756298B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005012077A (en) * 2003-06-20 2005-01-13 Fuji Mach Mfg Co Ltd Device for assisting substrate work machine
CN102855152A (en) * 2012-09-10 2013-01-02 青岛海信传媒网络技术有限公司 Method and system for upgrading resource files in application programs
CN107273401A (en) * 2017-04-21 2017-10-20 捷开通讯(深圳)有限公司 Management method, mobile device and the storage device of application data file
CN108874569A (en) * 2018-05-31 2018-11-23 北京三快在线科技有限公司 The method, apparatus and electronic equipment of event response and file generated
CN110262848A (en) * 2019-06-05 2019-09-20 阿里巴巴集团控股有限公司 The method and apparatus of loading application programs example in application development framework
CN112269655A (en) * 2020-10-15 2021-01-26 北京百度网讯科技有限公司 Memory mapping file cleaning method and device, electronic equipment and storage medium
CN112379948A (en) * 2020-12-02 2021-02-19 腾讯科技(深圳)有限公司 Program configuration management method and device, storage medium and electronic equipment
WO2021169623A1 (en) * 2020-02-29 2021-09-02 苏州浪潮智能科技有限公司 Service processing method and apparatus, and electronic device and storage medium
CN113778546A (en) * 2021-03-19 2021-12-10 北京沃东天骏信息技术有限公司 Method and device for gray scale optimization
CN113778477A (en) * 2020-07-17 2021-12-10 北京沃东天骏信息技术有限公司 File processing method and device, computer readable storage medium and electronic device
CN114035915A (en) * 2021-11-01 2022-02-11 上海中通吉网络技术有限公司 Scheduling task management method and system
CN114048463A (en) * 2021-11-10 2022-02-15 北京沃东天骏信息技术有限公司 Program operation checking method and device, storage medium and electronic equipment
CN114168951A (en) * 2022-02-11 2022-03-11 阿里云计算有限公司 Abnormality detection method and apparatus
CN114237743A (en) * 2021-12-14 2022-03-25 广州博冠信息科技有限公司 Interface loading method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8745759B2 (en) * 2011-01-31 2014-06-03 Bank Of America Corporation Associated with abnormal application-specific activity monitoring in a computing network

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005012077A (en) * 2003-06-20 2005-01-13 Fuji Mach Mfg Co Ltd Device for assisting substrate work machine
CN102855152A (en) * 2012-09-10 2013-01-02 青岛海信传媒网络技术有限公司 Method and system for upgrading resource files in application programs
CN107273401A (en) * 2017-04-21 2017-10-20 捷开通讯(深圳)有限公司 Management method, mobile device and the storage device of application data file
CN108874569A (en) * 2018-05-31 2018-11-23 北京三快在线科技有限公司 The method, apparatus and electronic equipment of event response and file generated
CN110262848A (en) * 2019-06-05 2019-09-20 阿里巴巴集团控股有限公司 The method and apparatus of loading application programs example in application development framework
WO2021169623A1 (en) * 2020-02-29 2021-09-02 苏州浪潮智能科技有限公司 Service processing method and apparatus, and electronic device and storage medium
CN113778477A (en) * 2020-07-17 2021-12-10 北京沃东天骏信息技术有限公司 File processing method and device, computer readable storage medium and electronic device
CN112269655A (en) * 2020-10-15 2021-01-26 北京百度网讯科技有限公司 Memory mapping file cleaning method and device, electronic equipment and storage medium
CN112379948A (en) * 2020-12-02 2021-02-19 腾讯科技(深圳)有限公司 Program configuration management method and device, storage medium and electronic equipment
CN113778546A (en) * 2021-03-19 2021-12-10 北京沃东天骏信息技术有限公司 Method and device for gray scale optimization
CN114035915A (en) * 2021-11-01 2022-02-11 上海中通吉网络技术有限公司 Scheduling task management method and system
CN114048463A (en) * 2021-11-10 2022-02-15 北京沃东天骏信息技术有限公司 Program operation checking method and device, storage medium and electronic equipment
CN114237743A (en) * 2021-12-14 2022-03-25 广州博冠信息科技有限公司 Interface loading method and device, electronic equipment and storage medium
CN114168951A (en) * 2022-02-11 2022-03-11 阿里云计算有限公司 Abnormality detection method and apparatus

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Information system log visualization to monitor anomalous user activity based on time;Jeremy Joseph Hanniel et al;《2014 International Conference on Data and Software Engineering (ICODSE)》;20150319;1-6 *
基于MVCC的NoSQL事务机制的研究和实现;李任;《中国优秀硕士学位论文全文数据库信息科技辑》;20191215(第12期);I138-291 *
基于SOA的工作流引擎的研究与实现;吴雷;《中国优秀硕士学位论文全文数据库信息科技辑》;20070515(第5期);I138-382 *

Also Published As

Publication number Publication date
CN114756298A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US9021468B1 (en) Bundling extension installation with web browser installation
US9304808B2 (en) Updating a workflow when a user reaches an impasse in the workflow
US8924920B2 (en) Providing a software appliance based on a role
US7660799B2 (en) Remote desktop system
US6915486B2 (en) Customizing a graphical user interface of a host application
US20120072898A1 (en) On-premise deployment of virtual desktop service servers
CN112187799B (en) Resource access policy generation method and device, storage medium and electronic equipment
CN110011875B (en) Dial testing method, device, equipment and computer readable storage medium
CN113760306B (en) Method and device for installing software, electronic equipment and storage medium
CN105024913A (en) Method, apparatus and system of instant messaging conversation
CN111538922B (en) Link jump method, application client, device and storage medium
CN111935092B (en) Information interaction method and device based on third-party application and electronic equipment
CN114756298B (en) Program instance management method and device, computer storage medium and electronic equipment
US20090077243A1 (en) Conversation recovery method
US8103863B2 (en) Workflow management to automatically load a blank hardware system with an operating system, products, and service
US7509339B2 (en) System and method of implementing personalized alerts utilizing a user registry in instant messenger
CN112583891B (en) Interface document acquisition method and device and server
CN111784174B (en) Method and device for managing risk policy based on user portrait and electronic equipment
CN112182561B (en) Rear door detection method and device, electronic equipment and medium
CN111475819B (en) Method and device for identifying abnormal terminal equipment, storage medium and electronic equipment
US7664755B2 (en) User prompt for loading sound in a computer resource
CN113612756B (en) Shared login method and device, computer readable storage medium and electronic equipment
KR102666647B1 (en) Method for automating cloud building
CN110764792B (en) Application program installation method, device, equipment and storage medium
CN117406920A (en) Data processing method, device, equipment and storage medium

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