WO2019196239A1 - 一种线程接口的管理方法、终端设备及计算机可读存储介质 - Google Patents

一种线程接口的管理方法、终端设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2019196239A1
WO2019196239A1 PCT/CN2018/096265 CN2018096265W WO2019196239A1 WO 2019196239 A1 WO2019196239 A1 WO 2019196239A1 CN 2018096265 W CN2018096265 W CN 2018096265W WO 2019196239 A1 WO2019196239 A1 WO 2019196239A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
clustering
interfaces
thread
parameter
Prior art date
Application number
PCT/CN2018/096265
Other languages
English (en)
French (fr)
Inventor
赖云辉
龙觉刚
孙成
叶俊锋
罗先贤
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019196239A1 publication Critical patent/WO2019196239A1/zh

Links

Images

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application belongs to the field of computer technology, and in particular, to a thread interface management method, a terminal device, and a computer readable storage medium.
  • the existing thread interface technology generates a large number of redundant in-use interfaces.
  • the thread file of each thread that uses the interface needs to be modified, and the interface management efficiency is low. And the information redundancy is large.
  • the embodiment of the present application provides a thread interface management method and a terminal device to solve the existing thread interface management method, the interface management efficiency is low, and the information redundancy is large.
  • a first aspect of the embodiments of the present application provides a method for managing a thread interface, including:
  • the cluster interface call link is used to invoke a service call by using the cluster interface
  • the clustering interface corresponding to the in-use interface; the clustering interface calling link includes the clustering interface identifier.
  • the interface parameters of the in-use interface of each thread are obtained, and the in-use interface matching the interface parameters is clustered into the same cluster interface, and an interface identifier is configured for each cluster interface, and a cluster is created.
  • the interface invokes the service, and then modifies the thread file of each thread, and replaces the content of the in-thread interface with the cluster interface to call the connection in the thread file.
  • the service call and the call can be invoked through the cluster interface. Replace the clustering interface corresponding to the in-use interface.
  • FIG. 1 is a flowchart of an implementation of a thread interface management method according to a first embodiment of the present application
  • FIG. 2 is a flowchart of a specific implementation method of a thread interface management method S102 according to a second embodiment of the present application;
  • FIG. 3 is a flowchart of a specific implementation method of a thread interface management method S1023 according to a third embodiment of the present application;
  • FIG. 4 is a flowchart of a specific implementation method of a thread interface management method according to a fourth embodiment of the present application.
  • FIG. 5 is a flowchart of a specific implementation method of a thread interface management method according to a fourth embodiment of the present application.
  • FIG. 6 is a structural block diagram of a terminal device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a terminal device according to another embodiment of the present application.
  • the execution body of the process is a terminal device.
  • the terminal device includes, but is not limited to, a terminal device such as a notebook computer, a computer, a server, a tablet computer, and a smart phone.
  • FIG. 1 is a flowchart showing an implementation of a thread interface management method according to a first embodiment of the present application, which is described in detail as follows:
  • the thread may be a native thread that is provided by the terminal device system, such as a view drawing thread and a module.
  • the initialization thread, etc. may also be a thread of an application installed in the terminal device.
  • the terminal device runs an application
  • the program file of the application is read, and the parameter is set based on the relevant thread in the program file.
  • the application contains multiple functions, you can create two or more threads to implement different functions of the application. Therefore, in S101, the number of threads included in the terminal device is first counted, including the running thread and the thread that has been run.
  • the manner of obtaining the thread that has been run may be: reading the program file of each installed application, and simulating running the above program file to confirm the number of threads to be started when the program file is run. Then, the thread parameters of each thread that needs to be started are collected.
  • the terminal device may also perform log record of the terminal device, where the log record includes a thread identifier that creates the log record, so that by reading each log record, the thread identifier of all threads that have been run may be counted. And each thread is obtained based on the thread identification query.
  • the interface parameters of the in-use interface included in each thread are determined.
  • the interface used includes but is not limited to: a thread input interface, an output interface, a return parameter interface, and the like.
  • the input interface is specifically an import interface for inputting an input signal required by the thread;
  • the output interface is specifically an export interface for outputting a signal after executing the thread;
  • the return parameter interface is specifically: an intermediate variable generated by the thread during the running process and other The interface through which threads or modules interact.
  • the intermediate variables that are obtained by the different threads are output to other threads through the return parameter interface, and the processing result is re-imported into the node through the return parameter interface.
  • Running in a thread, that is, the return parameter interface is not only used to output intermediate variables to other threads or modules, but also to receive parameters returned by other threads or modules after processing intermediate variables, that is, a bidirectional interface.
  • the terminal device after determining the in-use interface included in each thread, acquires the interface parameter of the interface, where the interface parameter may include the following information: interface type, interface description information, interface operation parameters, and the like. .
  • a clustering operation is performed on all the in-use interfaces based on the interface parameters to obtain a plurality of clustering interfaces, and a clustering interface identifier is configured for each of the clustering interfaces.
  • the interface parameters of the in-use interfaces are matched, and if there are two or more interface parameters of the in-use interface, the interface parameters match each other.
  • the function of the above-mentioned in-use interface is the same, and can be identified as the same type of interface, so clustering operations are performed on two or more active interfaces whose interface parameters match each other, and the in-use interface is clustered.
  • the interface parameter is used as the interface parameter of the created cluster interface.
  • the interface parameter includes an interface name
  • the foregoing matching the interface parameters is: performing clustering operation on the interface with the same interface name, and using the interface name of the in-use interface before clustering as the clustering
  • the interface name of the obtained cluster interface Since the interface name of the interface in use is only valid in the thread, that is, the interfaces between different threads do not affect each other, even if the interface name is duplicated, the interface recognition will not be abnormal.
  • the interface name of an in-use interface of different threads is the same, that is, the functions performed by the interface in the class are consistent, and thus the identification condition of the clustering operation can be used based on whether the interface names are consistent.
  • the in-use interface is added to the interface to be clustered, and the to-be-cluster list interface records The interface identifier of the unmatched in-use interface, the thread ID of the thread in which it is located, and the interface parameters.
  • the clustering operation is performed, and the matched in-use interface is to be executed. Delete from the cluster interface list.
  • the terminal device configures a clustering interface identifier for each clustering interface, that is, the interface name of the clustering interface, so that when the clustering interface is subsequently invoked, the clustering interface may be identified by the clustering interface. Distinguish between different interfaces.
  • a clustering interface calling service is created based on each of the clustering interfaces.
  • a cluster interface calling service is created to manage the cluster interface created above.
  • the clustering interface needs to be applied to different threads, that is, multiple threads need to share the same clustering interface. Therefore, the clustering interface cannot be integrated into a fixed thread, so that other operations will not work properly.
  • the terminal device creates a clustering interface calling service. When each thread needs to call the clustering interface, it needs to invoke the service through the clustering interface to authorize and invoke.
  • the clustering interface calling service generates a clustering interface calling list, where the clustering interface calling list records each clustering interface identifier and the current calling situation. That is, if a thread invokes a clustering interface, the thread identifier of the thread is recorded in the list unit corresponding to the clustering interface, so that the terminal device can call the list through the clustering interface, and manage each clustering interface at any time. The situation of illegal calling is found, and the management efficiency of the clustering interface is improved.
  • the thread performing the clustering operation includes not only the threads included in the application installed in the terminal device, but also the startup and running related threads of the basic modules of the terminal device. Therefore, in order to ensure that the terminal device can be started normally, when the device is started, the clustering interface call service is first initialized and started, so that the subsequent booting operation needs to use the clustering interface, and can be called normally. That is, the clustering interface invokes the service with the highest priority.
  • the administrator of the terminal device can adjust the interface parameter of the clustering interface by calling the service in the clustering interface. Since all threads call the service to invoke the related interface through the clustering interface, the in-service pair is invoked through the calling The interface parameters of the clustering interface are modified, which is equivalent to modifying all the threads that call the clustering interface, thereby improving the efficiency of parameter adjustment, and it is not necessary to modify the thread files of each thread one by one.
  • the terminal device configures a clustering interface calling link corresponding to the clustering interface identifier according to each clustering interface identifier.
  • the thread may connect to the cluster interface calling service based on the clustering interface calling link, and invoke the clustering interface identifier included in the link through the clustering interface, query the corresponding clustering interface, and receive and/or send related data. .
  • the terminal device queries the storage location of the thread file corresponding to the thread according to the thread identifier of the thread, and extracts the thread file of the thread, and counts the in-use interface originally included in the thread file, and is based on each Use the interface parameters of the interface to query the clustering interface corresponding to the in-use interface, so as to obtain the cluster interface call link that needs to be replaced.
  • the terminal device records the thread file with the content identified by the interface of the interface, and replaces it with the cluster interface call link of the cluster interface corresponding to the in-use interface.
  • the specific implementation process of calling the clustering interface is as follows: when the terminal device runs the thread file, if the clustering interface call link is identified, a call request is sent to the clustering interface calling service, and the calling request carries the aggregation The class interface calls the cluster interface identifier contained in the link. Then, the terminal device queries whether the cluster interface exists according to the cluster interface identifier included in the call request, and determines the legality of the call of the thread. If the cluster interface is identified, the thread has the cluster interface. Permissions, the thread can call the cluster interface through the cluster interface call service.
  • the method for identifying the validity of the thread call is specifically: before the clustering operation is performed on the interface, the terminal device records the thread identifier of each in-use interface, and therefore, the cluster interface management established after the clustering operation In the list, in addition to the interface parameters of each cluster interface, the thread identifier to which each in-use interface of the cluster belongs is also registered in the management list. If the thread identifier of the thread that initiates the call request is within the registered thread identifier corresponding to the cluster interface, it is identified that the thread has the right to invoke the cluster interface, and is recognized as legal.
  • the management method of the thread interface obtains the interface parameters of the in-use interface of each thread, and clusters the interface parameters matching the interface parameters into the same cluster interface, and for each
  • the clustering interface configures an interface identifier, and creates a clustering interface to invoke the service, and then modifies the thread file of each thread, and replaces the content of the in-thread interface with the cluster interface to call the connection in the thread file, and performs subsequent execution.
  • the clustering interface can be invoked through the clustering interface to call the clustering interface corresponding to the replaced in-use interface.
  • FIG. 2 is a flowchart showing a specific implementation of a method for managing a thread interface S102 according to the second embodiment of the present application.
  • S102 includes S1021 to S1023, and the details are as follows:
  • each of the in-use interfaces is divided into a plurality of interface groups based on an interface type included in the interface parameter; and the interface types of all the in-use interfaces in the interface group are the same.
  • the interface parameters of the in-use interface include: an interface type and interface description information.
  • the interface type can be divided based on different division modes of the terminal device.
  • the in-use interface may be divided into: an output interface, an input interface, and an interactive interface based on a data transmission manner; the data content may be divided based on the transmitted data content: a clock signal interface, an audio signal interface, a video signal interface, an image processing interface, and the like.
  • the interface description information in the interface parameter is mainly composed of characters describing the function and/or attribute of the interface. Through the interface description information, it can be further determined whether the functions and/or running attributes of any two in-use interfaces are the same, thereby judging Whether to perform clustering operations.
  • the terminal device first divides all the in-use interfaces according to the interface type of each in-use interface, and obtains multiple interface groups to be clustered, and the interface types of each in-use interface in each interface group are The same, but the various in-use interfaces for clustering operations must belong to the same interface type. Therefore, in order to reduce the number of matching operations of the clustering operation, the terminal device first divides the interface into different interface groups according to the interface type. In the subsequent operation of cluster matching and identification, only the matching between the in-use interfaces in the interface group is calculated. Degree can be.
  • the terminal device adopts the same division rule when setting the interface type of each interface, that is, the interface A is divided based on the data transmission mode.
  • the interface B is also based on the data transmission mode, and will not be divided by the transmitted data content, thereby ensuring the accuracy and uniformity of the interface component group.
  • semantic analysis is performed on the interface description information of each of the in-use interfaces in the interface group by using a semantic analysis algorithm to obtain interface keywords of each of the in-use interfaces.
  • the terminal device performs semantic elements on the interface description information of each in-use interface through a preset semantic analysis algorithm, thereby determining the specific meaning of the interface description information, and extracting the interface keyword in the specific meaning.
  • the implementation process of the semantic analysis algorithm may be: taking any character in the interface description information as a center, acquiring a neighboring character near the character, and performing a character string combining the character with the adjacent character and the preset keyword table. Matching, determining the specific meaning of the character to be expressed. If there is a keyword matching the string in the keyword table, the keyword is used as an interface keyword included in the interface description information, and the matching character is successfully matched. The string is deleted from the interface description information, and the following characters are used as the center to continue matching; if each keyword in the keyword table does not match the string, the character is identified as an unintentional character, and the character is extracted from the interface description information. Deleted.
  • the terminal device establishes a correspondence table between the interface and the keyword for each in-use interface, and stores an interface keyword corresponding to each in-use interface. Specifically, the terminal device sorts each interface keyword in the correspondence table according to the sequence number of the obtained interface keyword in the keyword table, thereby ensuring that when the matching degree between the two in-use interfaces is calculated, The interface keywords of the same location are mutually corresponding, thereby improving the accuracy of the recognition and avoiding the misidentification of the keyword recognition. It should be noted that if there is no keyword of a certain serial number in the keyword table in the interface description information of the interface, the keyword of the serial number is empty.
  • clustering operations are performed on each of the in-use interfaces according to the similarity between the interface keywords of the in-use interfaces in the interface group, to obtain the clustering interface.
  • the similarity between the in-use interfaces in the interface group is calculated through the interface keywords specifically included in each of the in-use interfaces, and Based on the calculated similarity, it is judged whether clustering operations need to be performed between different interfaces.
  • all the in-use interfaces in an interface group can be clustered into the same cluster interface.
  • the functions and operating parameters of all the in-use interfaces of the interface type are the same; of course, one interface
  • the in-use interface in the group can also be clustered into two or more clustering interfaces.
  • the interface type of the in-use interface is the same, but the specific operating parameters have certain differences and do not belong to the same function.
  • the interfaces are therefore clustered into different clustering interfaces, thereby improving the clustering degree of the interface and satisfying the individualization requirements of different threads.
  • different in-use interfaces are divided into multiple interface groups by using interface types, and clustering operations are performed on each in-use interface in the interface group, thereby reducing the number of cluster identification judgments and improving The efficiency and accuracy of clustering operations.
  • FIG. 3 is a flowchart showing a specific implementation of a method for managing a thread interface S1023 according to the third embodiment of the present application.
  • a thread interface management method S1023 provided in this embodiment further includes S301 and S302, which are specifically described as follows:
  • the interface keywords of any of the in-use interfaces in the interface group and the interface keywords of the remaining in-use interfaces in the interface group are respectively introduced into a similarity calculation model, and each of the in-use interfaces is respectively determined.
  • the similarity between the two; the similarity calculation model is specifically:
  • the terminal device combines all the in-use interfaces in the interface group, and calculates the similarity between the two through the difference degree between the interface keywords included in the combined in-use interface.
  • the higher similarity indicates that the functions of the two in-use interfaces and the operating parameters are relatively close; conversely, if the similarity is low, the difference between the functions or operating parameters between the two in-use interfaces is large. Unable to cluster to the same cluster interface. Therefore, the terminal device obtains the similarity between the arbitrary two in-use interfaces based on the difference between the respective interface keywords.
  • the terminal device converts the correspondence table based on the preset value, and displays each interface keyword by a numerical value, and the keyword with a similar meaning is less, and the difference between the converted values is less; For more keywords, the difference between the converted values is larger.
  • the terminal device can also be represented by 0 when the keywords are recognized to be the same; when the two interface keywords are different, it is represented by 1, thereby counting the difference between the keywords, and the keywords having the difference can be determined. Number, and based on the number, calculates the similarity between the two in-use interfaces.
  • the obtained interface between the interface and the keyword is not included in the key relationship.
  • the element corresponding to the number of the word is empty, so that the number of elements in the corresponding relation table is the same. Therefore, when calculating the difference between the i-th interface keywords, it can be ensured that the specific meanings of the two interface keywords are the same, and there is no abnormality in the similarity calculation due to the keyword misalignment.
  • clustering operations are performed on each in-use interface in the interface group to obtain the clustering interface; clustering is similarity between each in-use interface of the same clustering interface. Both are greater than the similarity threshold.
  • the terminal device after calculating the similarity between the in-use interfaces, performs a clustering operation on each in-use interface based on the similarity, wherein the recognition condition for performing the clustering operation is: performing a clustering operation
  • the similarity between the in-use interfaces is greater than the preset similarity threshold, for example, the similarity between the interface A and the inactive interface B is greater than the similarity threshold, and between the interface A and the inactive interface C.
  • the similarity is also greater than the similarity threshold.
  • the clustering operation of the in-use interfaces A, B, and C is required when the similarity between the interface B and the in-use interface C is greater than the similarity threshold. If the similarity between the interface B and the in-use interface C is less than the similarity threshold, it means that the functions or operating parameters of the two interfaces are different, and the clustering operation cannot be performed.
  • the degree of difference between the interface keywords is determined by the degree of difference of the interface keywords, and the clustering operation is performed on the in-use interface with the similarity greater than the preset similarity threshold, thereby improving the clustering.
  • the accuracy of the operation is determined by the degree of difference of the interface keywords, and the clustering operation is performed on the in-use interface with the similarity greater than the preset similarity threshold, thereby improving the clustering.
  • FIG. 4 is a flowchart showing a specific implementation of a method for managing a thread interface according to a fourth embodiment of the present application.
  • a thread interface management method provided by this embodiment further includes S401 to S404, which are specifically described as follows:
  • the terminal device may also cluster the thread included in the newly created thread to the existing clustering interface when receiving the thread creation instruction. In order to ensure that the interface in the terminal device maintains a high degree of aggregation.
  • a new function may be added, that is, a new thread is required to complete the related operation, in which case , a thread creation instruction is generated to register the thread.
  • the terminal device After receiving the thread creation instruction, the terminal device performs the related operation of S401.
  • the thread that completes the function can also be manually created. In this case, the terminal device also recognizes that the terminal device recognizes the received function. Thread creation instructions.
  • the thread creation instruction includes new interface parameters of each newly added interface.
  • the terminal device counts the number of new interfaces included in the newly added thread and the new interface parameters corresponding to each new interface.
  • the terminal device matches the newly added interface parameters with the interface parameters of each existing cluster interface, and determines which cluster interface the newly added interface included in the newly created thread needs to be clustered into. It should be noted that, in S102, when different in-use interfaces are clustered into a clustering interface, the interface parameters of the clustering interface are determined based on the interface parameters of the in-use interface, that is, each clustering interface also corresponds to one. Clustering parameters.
  • the manner of determining whether the interface parameters of the new interface match the interface parameters of the cluster interface may be in the manner of the foregoing embodiment, for example, determining whether the interface identifiers are consistent, or determining, by using the interface type, the interface group to which the new interface belongs. And the similarity between the newly added interface and each clustering interface is calculated by using the interface keyword corresponding to the interface description information. If the similarity is greater than the preset similarity threshold, the newly added interface is matched with the clustering interface.
  • the terminal device finds a clustering interface that matches the newly added interface parameter in the existing clustering interface, generating a clustering interface calling link based on the clustering interface identifier of the clustering interface, And generating a thread file of the newly added thread based on the clustering interface calling link and the thread creation instruction.
  • the cluster interface call service needs to create an additional aggregation for the interface required by the new thread.
  • the class interface, and the new interface parameter is used as the interface parameter of the newly added clustering interface, and a clustering interface identifier is configured for the newly added clustering interface; the clustering interface identifier based on the newly added clustering interface generates one
  • the clustering interface invokes the link, and generates a thread file of the newly added thread based on the clustering interface calling link and the thread creation instruction.
  • the clustering operation when receiving the newly added thread creation instruction, the clustering operation is performed on the interface required by the newly added thread, and the matching clustering interface is determined, and if yes, the clustering operation is performed; If it does not exist, a new clustering interface is created in the clustering interface calling service, so that the newly added thread also invokes the service through the clustering interface to perform the interface calling operation, which is convenient for the terminal device to manage each interface.
  • FIG. 5 is a flowchart of a specific implementation of a method for managing a thread interface according to a fifth embodiment of the present application. As shown in FIG. 5, with respect to the embodiment shown in FIG. 1, the method for managing a thread interface provided by this embodiment further includes: S501 and S502, which are specifically described as follows:
  • the method further includes:
  • the terminal device manages each cluster interface through an interface calling service, and the management includes adjustment operations such as adding, deleting, and modifying. Therefore, when receiving the interface parameter adjustment instruction, the terminal device acquires the adjustment interface identifier of the cluster interface that is required to be adjusted in the interface parameter adjustment instruction, and the adjustment parameter that needs to be adjusted and modified, based on the above two parameters, The class interface invokes the service to adjust operations on the executable interface.
  • a clustering interface matching the adjustment interface identifier is extracted from the clustering interface calling service, and an interface parameter of the clustering interface is modified based on the adjustment parameter.
  • the terminal device queries the clustering interface that matches the adjusted interface identifier, and modifies the interface parameters of the clustering interface according to the adjustment parameter.
  • the terminal device modifies the interface parameters of the clustering interface according to the adjustment parameter.
  • the terminal device initializes each thread that invokes the interface, so that the adjusted clustering interface can be used immediately to implement the modification. the goal of.
  • the interface parameter of the clustering interface is modified by calling the service through the clustering interface, so that all the threads that call the interface are uniformly modified, and the modification efficiency and the management efficiency of the interface are improved.
  • FIG. 6 is a structural block diagram of a terminal device according to an embodiment of the present application, where each unit included in the terminal device is used to execute each step in the embodiment corresponding to FIG. 1.
  • each unit included in the terminal device is used to execute each step in the embodiment corresponding to FIG. 1.
  • please refer to the related description in the embodiment corresponding to FIG. 1 and FIG. For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the terminal device includes:
  • the interface parameter obtaining unit 61 is configured to obtain interface parameters of the in-use interface included in each thread
  • the interface clustering execution unit 62 is configured to perform clustering operations on all the in-use interfaces based on the interface parameters to obtain a plurality of clustering interfaces, and configure a clustering interface identifier for each of the clustering interfaces;
  • Calling a service creation unit 63 configured to create a cluster interface call service based on each of the cluster interfaces
  • the thread file modification unit 64 is configured to extract a thread file of each thread, and replace the interface identifier of the in-use interface in the thread file with a cluster interface call link; the cluster interface call link is used to pass The clustering interface invokes a service to invoke a clustering interface corresponding to the in-use interface; the clustering interface calling link includes the clustering interface identifier.
  • the interface clustering execution unit 62 includes:
  • An interface group dividing unit configured to divide each of the in-use interfaces into multiple interface groups based on an interface type included in the interface parameter; and the interface types of all the in-use interfaces in the interface group are the same;
  • An interface keyword determining unit configured to perform semantic analysis on interface description information of each of the in-use interfaces in the interface group by using a semantic analysis algorithm, to obtain an interface keyword of each of the in-use interfaces;
  • the clustering interface creating unit is configured to perform a clustering operation on each of the in-use interfaces according to the similarity between the interface keywords of the in-use interfaces in the interface group, to obtain the clustering interface.
  • the clustering interface creation unit includes:
  • a similarity calculation unit configured to import interface keywords of any of the in-use interfaces in the interface group and interface keywords of the remaining active interfaces in the interface group into a similarity calculation model, and respectively determine each of the The similarity between the interfaces in use;
  • the similarity calculation model is specifically:
  • a similarity comparison unit configured to perform a clustering operation on each in-use interface in the interface group according to the similarity, to obtain the clustering interface; and clustering between the in-use interfaces of the same clustering interface The similarity is greater than the similarity threshold.
  • the terminal device further includes:
  • a thread creation instruction receiving unit configured to: if a thread creation instruction is received, extract a new interface parameter included in the thread creation instruction;
  • An interface parameter matching unit configured to determine whether the clustering interface that matches the newly added interface parameter exists
  • Adding a clustering interface creating unit if there is no clustering interface matching the new interface parameter, creating a new clustering interface in the clustering interface calling service based on the newly added interface parameter, And generating a new thread file according to the newly added clustering interface and the thread creation instruction.
  • the terminal device further includes:
  • the adjustment instruction receiving unit is configured to: if the interface parameter adjustment instruction is received, acquire the adjustment interface identifier and the adjustment parameter included in the interface parameter adjustment instruction;
  • an adjustment instruction execution unit configured to extract, from the cluster interface call service, a cluster interface that matches the adjustment interface identifier, and modify an interface parameter of the cluster interface based on the adjustment parameter.
  • the terminal device provided by the embodiment of the present application can also match the interface parameters and the in-use interfaces of different threads to the same cluster interface, which greatly reduces the number of interfaces included in the terminal device, and all cluster interfaces need to be Calling the service through the clustering interface makes it easy to manage all interfaces and improve interface management efficiency.
  • FIG. 7 is a schematic diagram of a terminal device according to another embodiment of the present application.
  • the terminal device 7 of this embodiment includes a processor 70, a memory 71, and computer readable instructions 72 stored in the memory 71 and executable on the processor 70, such as a thread interface. Management program.
  • the processor 70 executes the computer readable instructions 72, the steps in the foregoing management method embodiments of the respective thread interfaces are implemented, such as S101 to S104 shown in FIG. 1.
  • the processor 70 when executing the computer readable instructions 72, implements the functions of the various units in the various apparatus embodiments described above, such as the functions of the modules 61-64 shown in FIG.
  • the computer readable instructions 72 may be partitioned into one or more units, the one or more units being stored in the memory 71 and executed by the processor 70 to complete the application.
  • the one or more units may be a series of computer readable instruction instructions segments capable of performing a particular function for describing the execution of the computer readable instructions 72 in the terminal device 7.
  • the computer readable instructions 72 may be partitioned into an interface parameter acquisition unit, an interface cluster execution unit, a call service creation unit, and a thread file modification unit, each unit having a specific function as described above.
  • the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 70 and a memory 71. It will be understood by those skilled in the art that FIG. 7 is only an example of the terminal device 7, and does not constitute a limitation of the terminal device 7, and may include more or less components than those illustrated, or combine some components or different components.
  • the terminal device may further include an input/output device, a network access device, a bus, and the like.
  • the processor 70 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
  • the memory 71 may also be an external storage device of the terminal device 7, for example, a plug-in hard disk provided on the terminal device 7, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device.
  • the memory 71 is for storing the computer readable instructions and other programs and data required by the terminal device.
  • the memory 71 can also be used to temporarily store data that has been output or is about to be output.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种线程接口的管理方法、终端设备(7)及计算机可读存储介质,该方法包括:获取各个线程包含的在用接口的接口参数(S101);基于接口参数对所有在用接口进行聚类操作,得到多个聚类接口,并为各个聚类接口配置聚类接口标识(S102);基于各个聚类接口,创建聚类接口调用服务(S103);提取各个线程的线程文件,并将线程文件中在用接口的接口标识替换为聚类接口调用链接(S104)。该方法大幅减少了终端设备中包含的接口数量,并且所有聚类接口均需要通过聚类接口调用服务进行调用,从而便于对所有接口进行管理,提高了接口管理效率。

Description

一种线程接口的管理方法、终端设备及计算机可读存储介质
本申请申明享有2018年04月09日递交的申请号为201810309696.4、名称为“一种线程接口的管理方法、终端设备及计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请属于计算机技术领域,尤其涉及一种线程接口的管理方法、终端设备及计算机可读存储介质。
背景技术
随着终端设备的功能越来越强大,可提供的服务种类越来越多,该终端设备中用于响应服务、执行任务等操作的线程数量也随之增加。现有的线程管理技术,往往会为每个线程单独配置一个线程文件,并在该线程文件中创建多个接口,每个接口只在本线程中有效,因此,随着线程数量的不断增加,终端设备中在用接口的数量也会成倍增长。
虽然不同线程之间的业务逻辑各不相同,但大部分在用接口之间的接口参数是相同的。由此可以,现有的线程接口技术,会产生大量冗余的在用接口,当需要对某一接口进行修改时,需要对各个使用该接口的线程的线程文件进行修改,接口管理效率低,且信息冗余度较大。
技术问题
有鉴于此,本申请实施例提供了一种线程接口的管理方法及终端设备,以解决现有的线程接口的管理方法,接口管理效率低,信息冗余度较大的问题。
技术解决方案
本申请实施例的第一方面提供了一种线程接口的管理方法,包括:
获取各个线程包含的在用接口的接口参数;
基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
基于各个所述聚类接口,创建聚类接口调用服务;
提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
有益效果
本申请实施例通过获取各个线程的在用接口的接口参数,并将接口参数匹配的在用接口聚类为同一聚类接口,并且为每个聚类接口配置一个接口标识,以及创建一个聚类接口调用服务,继而对各个线程的线程文件进行修改,将线程文件中调用到在用接口的内容替换为聚类接口调用连接,在后续执行该线程时,可通过聚类接口调用服务调用与被替换的在用接口对应的聚类接口。与现有的聚类接口技术相比,由于将接口参数匹配且位于不同线程的在用接口聚类为同一聚类接口,大幅减少了终端设备中包含的接口数量,并且所有聚类接口均需要通过聚类接口调用服务进行调用,从而便于对所有接口进行管理,提高了接口管理效率。
附图说明
图1是本申请第一实施例提供的一种线程接口的管理方法的实现流程图;
图2是本申请第二实施例提供的一种线程接口的管理方法S102具体实现流程图;
图3是本申请第三实施例提供的一种线程接口的管理方法S1023具体实现流程图;
图4是本申请第四实施例提供的一种线程接口的管理方法具体实现流程图;
图5是本申请第四实施例提供的一种线程接口的管理方法具体实现流程图;
图6是本申请一实施例提供的一种终端设备的结构框图;
图7是本申请另一实施例提供的一种终端设备的示意图。
本发明的实施方式
在本申请实施例中,流程的执行主体为终端设备。该终端设备包括但不限于:笔记本电脑、计算机、服务器、平板电脑以及智能手机等终端设备。图1示出了本申请第一实施例提供的线程接口的管理方法的实现流程图,详述如下:
在S101中,获取各个线程包含的在用接口的接口参数。
在本实施例中,终端设备运行的过程中,会创建不同类型的线程用于实现不同的功能以及完成各类任务,上述线程可以为终端设备系统自带的原生线程,例如视图绘制线程、模块初始化线程等,还可以为安装于终端设备中的应用程序的线程,终端设备在运行某一应用程序时,会读取该应用程序的程序文件,并基于该程序文件中的相关线程设置参数,建立一条用于运行该应用程序的线程,当然,若该应用程序包含多个功能,则可以建立两条或以上的线程,分别实现该应用程序的不同功能。因此,在S101中,首先会统计该终端设备包含的线程个数,包括正在运行的线程以及曾经运行过的线程。
在本实施例中,获取曾经运行过的线程的方式可以为:读取各个已安装的应用程序的程序文件,并模拟运行上述程序文件,以确认运行该程序文件时所需启动的线程个数,继 而采集各个所需启动的线程的线程参数。可选地,终端设备还可以通过该终端设备的日志记录,该日志记录包含创建该日志记录的线程标识,从而通过读取各个日志记录,则可统计得到曾经运行过的所有线程的线程标识,并基于线程标识查询得到各个线程。
在本实施例中,在确定了终端设备中包含的线程后,会确定各个线程包含的在用接口的接口参数。需要说明的是,在用接口包括但不限于:线程的输入接口、输出接口、返回参数接口等不同类型的接口。其中,输入接口具体为运行该线程所需的输入信号的导入接口;输出接口具体为执行该线程后输出信号的导出接口;返回参数接口具体为:该线程在运行过程中产生的中间变量与其他线程或模块进行交互的接口。由于部分数据可能需要多个线程协同运作才能够完成,因此不同线程之间会将运行得到的中间变量通过返回参数接口输出给其他线程进行处理,并将处理结果通过该返回参数接口重新导入到该线程中进行运行,即该返回参数接口不仅用于将中间变量输出给其他线程或模块,还用于接收其他线程或模块对中间变量进行处理后返回的参数,即是一个双向接口。
在本实施例中,终端设备在确定了各个线程所包含的在用接口后,则获取该接口的接口参数,其中,该接口参数可以包含以下信息:接口类型、接口描述信息以及接口运行参数等。
在S102中,基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识。
在本实施例中,终端设备获取了不同线程的在用接口的接口参数后,会将各个在用接口的接口参数进行匹配,若存在两个或以上的在用接口的接口参数之间相互匹配,则表示上述在用接口的功能相同,可以识别为同一种类的接口,因此会对接口参数相互匹配的两个或以上的在用接口进行聚类操作,并将进行聚类的在用接口的接口参数作为创建的聚类接口的接口参数。通过上述聚类操作,可以将大部分实现相同功能的接口进行合并,从而减少终端设备中包含的接口个数,方便终端设备对接口进行管理。
可选地,该接口参数包括接口名称,上述对各个接口参数进行匹配具体为:将接口名称相同的在用接口进行聚类操作,并将聚类前的在用接口的接口名称作为聚类后得到的聚类接口的接口名称。由于在用接口的接口名只在该线程中有效,即不同线程之间的接口并不会相互影响,即便出现接口名称重复的情况,也不会导致接口识别异常。而不同线程的某一在用接口的接口名相同,即表示该类在用接口所完成的功能是一致的,因而可以基于接口名是否一致,来作为聚类操作的识别条件。
可选地,若某一在用接口的接口参数与其他各个在用接口的接口参数均不匹配,则将所述在用接口添加到待聚类接口列表内,该待聚类列表接口记载了未匹配的在用接口的接 口标识、所在的线程的线程标识以及接口参数。终端设备在后续的运行过程中,若识别新增线程内的接口与待聚类接口列表中任一在用接口的接口参数相匹配,则执行聚类操作,并将匹配的在用接口从待聚类接口列表中删除。
在本实施例中,终端设备会为每一个聚类得到的聚类接口配置一个聚类接口标识,即该聚类接口的接口名,以便后续调用该聚类接口时,可通过聚类接口标识分辨不同的接口。
在S103中,基于各个所述聚类接口,创建聚类接口调用服务。
在本实施例中,终端设备将所有线程的在用接口聚类为各个聚类接口后,会创建一个聚类接口调用服务,用于管理上述创建的聚类接口。由于执行聚类操作后,该聚类接口需要应用于不同的线程内,即多个线程需要共用同一个聚类接口。因此,该聚类接口无法集成于某一固定的线程的,这样操作将导致其他线程无法正常运行。为了解决聚类后聚类接口调用兼容性的问题,终端设备会创建一个聚类接口调用服务,当各个线程需要调用聚类接口时,需要通过该聚类接口调用服务进行授权并调用。
在本实施例中,该聚类接口调用服务会生成一个聚类接口调用列表,该聚类接口调用列表中记录有各个聚类接口标识以及当前的调用情况。即某一线程调用了聚类接口,则会将该线程的线程标识记录在该聚类接口对应的列表单元内,从而终端设备可以通过该聚类接口调用列表,随时管理各个聚类接口,即时发现非法调用的情况,提高了聚类接口的管理效率。
需要说明的是,由于进行聚类操作的线程不仅包含安装于终端设备的应用程序中包含的线程,也包括终端设备各个基础模块的启动以及运行相关的线程。因此,为了能够保证终端设备能够正常启动,在设备启动时,首先会初始化该聚类接口调用服务并启动,以便后续开机操作需要使用聚类接口时,能够正常调用。即聚类接口调用服务的启动优先级为最高优先级。
可选地,终端设备的管理员可以通过在聚类接口调用服务内对聚类接口的接口参数进行调整,由于所有线程均通过聚类接口调用服务调用相关的接口,因此通过该调用服务内对聚类接口的接口参数进行修改,相当于对所有调用该聚类接口的线程进行修改,从而提高了参数调整的效率,无需一一修改各个线程的线程文件。
在S104中,提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
在本实施例中,终端设备在创建了聚类接口调用服务后,会基于各个聚类接口标识,为不同的聚类接口配置与之对应的聚类接口调用链接。线程可以基于该聚类接口调用链接 与聚类接口调用服务进行连接,并通过该聚类接口调用链接中包含的聚类接口标识,查询到对应的聚类接口,接收和/或发送相关的数据。
在本实施例中,终端设备根据该线程的线程标识,查询该线程对应的线程文件的存储位置,并提取该线程的线程文件,统计该线程文件中原本包含的在用接口,并基于各个在用接口的接口参数,查询上述在用接口对应的聚类接口,从而得到所需替换的聚类接口调用链接。终端设备将线程文件记载有在用接口的接口标识的内容,均替换为与该在用接口对应的聚类接口的聚类接口调用链接。
具体地,调用聚类接口的具体实现过程如下:当终端设备运行线程文件时,若识别到聚类接口调用链接,则会向聚类接口调用服务发送一个调用请求,该调用请求中携带有聚类接口调用链接包含的聚类接口标识。然后终端设备会根据该调用请求中包含的聚类接口标识查询该聚类接口是否存在,并对该线程的调用合法性进行判别,若识别该聚类接口存在并该线程具备调用该聚类接口的权限,则线程可通过聚类接口调用服务调用该聚类接口。
可选地,识别线程调用合法性的方式具体为:对在用接口进行聚类操作前,终端设备会记录各个在用接口所属的线程标识,因此,聚类操作之后所建立的聚类接口管理列表中,除了包含各个聚类接口的接口参数外,还会将聚类的各个在用接口所属的线程标识也登记在该管理列表中。若发起调用请求的线程的线程标识在该聚类接口对应的已登记的线程标识内,则识别该线程具有调用该聚类接口的权限,识别为合法。
以上可以看出,本申请实施例提供的一种线程接口的管理方法通过获取各个线程的在用接口的接口参数,并将接口参数匹配的在用接口聚类为同一聚类接口,并且为每个聚类接口配置一个接口标识,以及创建一个聚类接口调用服务,继而对各个线程的线程文件进行修改,将线程文件中调用到在用接口的内容替换为聚类接口调用连接,在后续执行该线程时,可通过聚类接口调用服务调用与被替换的在用接口对应的聚类接口。与现有的聚类接口技术相比,由于将接口参数匹配且位于不同线程的在用接口聚类为同一聚类接口,大幅减少了终端设备中包含的接口数量,并且所有聚类接口均需要通过聚类接口调用服务进行调用,从而便于对所有接口进行管理,提高了接口管理效率。
图2示出了本申请第二实施例提供的一种线程接口的管理方法S102的具体实现流程图。参见图2所示,相对于图1所述实施例,本实施例提供的一种线程接口的管理方法中S102包括S1021~S1023,具体详述如下:
在S1021中,基于所述接口参数包含的接口类型,将各个所述在用接口划分为多个接口组;所述接口组内的所有在用接口的接口类型相同。
在本实施例中,在用接口的接口参数包括:接口类型以及接口描述信息。接口类型可 基于终端设备的不同划分方式进行划分。例如,可基于数据传输方式将在用接口划分为:输出接口、输入接口以及交互接口;可基于传输的数据内容进行划分:时钟信号接口、音频信号接口、视频信号接口、图像处理接口等。而接口参数中的接口描述信息中主要由描述该接口的功能和/或属性的字符构成,通过接口描述信息,可以进一步确定任意两个在用接口的功能和/或运行属性是否相同,从而判断是否进行聚类操作。
在本实施例中,终端设备首先根据各个在用接口的接口类型,将所有在用接口进行划分操作,得到多个待聚类的接口组,每个接口组中各个在用接口的接口类型均相同,而进行聚类操作的各个在用接口,必然属于同一接口类型。因此,为了减少聚类操作的匹配次数,终端设备首先将根据接口类型划分为不同的接口组,在后续进行聚类匹配识别的操作中,只需计算接口组内各个在用接口之间的匹配度即可。
需要说明的是,由于需要根据不同接口类型划分多个接口组,因此终端设备在设置各个接口的接口类型时,所采用的划分规则是一致的,即在用接口A是基于数据传输方式进行划分,则在用接口B也是基于数据传输方式进行划分,而不会采用传输的数据内容进行划分,从而保证接口组分组的准确性以及统一性。
在S1022中,通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词。
在本实施例中,终端设备会通过预设的语义分析算法,对各个在用接口的接口描述信息进行语义分子,从而确定接口描述信息的具体含义,并提取该具体含义中的接口关键词。
具体地,语义分析算法的实现过程可以为:以接口描述信息中任意一字符为中心,获取该字符附近的邻近字符,并将该字符与邻近字符组合的字符串与预设的关键词表进行匹配,确定该字符所需表达的具体含义,若关键词表中存在与该字符串匹配的关键词,则将该关键词作为该接口描述信息所包含的接口关键词,并将匹配成功的字符串从接口描述信息中删除,并以下一字符为中心继续进行匹配;若关键词表中各个关键词均与该字符串不匹配,则识别该字符为无实意字符,将该字符从接口描述信息中删除。
在本实施例中,终端设备会为每个在用接口建立一个接口与关键词的对应关系表,用于存储各个在用接口所对应的接口关键词。特别地,终端设备会基于识别得到的接口关键词在关键词表中的序号,对上述对应关系表中的各个接口关键词进行排序,从而保证计算两个在用接口之间的匹配度时,相同位置的接口关键词是相互对应的,从而提高识别的准确率,避免关键词识别错位。需要说明的是,若在用接口的接口描述信息中,不存在关键词表中某一序号的关键词,则该序号的关键词为空。
在S1023中,根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所 述在用接口进行聚类操作,得到所述聚类接口。
在本实施例中,在确定了各个在用接口的接口关键词后,则通过每个在用接口所具体包含的接口关键词,计算接口组内各个在用接口的之间的相似度,并基于计算得到的相似度判断不同在用接口之间是否需要进行聚类操作。
需要说明的是,一个接口组内所有在用接口可以聚类为同一个聚类接口,在该情况下,则表示该接口类型的所有在用接口的功能以及运行参数均相同;当然,一个接口组内的在用接口还可以聚类为两个或以上的聚类接口,在该情况下,则表示在用接口的接口类型相同,但具体的运行参数具有一定的差异,并不属于相同功能的接口,因此会聚类为不同的聚类接口,从而提高接口聚类度的同时,还能满足不同线程的个性化设置需求。
在本申请实施例中,通过接口类型将不同的在用接口划分为多个接口组,并在接口组内对各个在用接口进行聚类操作,从而减少了聚类识别判断的个数,提高了聚类操作的效率以及准确率。
图3示出了本申请第三实施例提供的一种线程接口的管理方法S1023的具体实现流程图。参见图3所示,相对于图2所述实施例,本实施例提供的一种线程接口的管理方法S1023还包括S301以及S302,具体详述如下:
在S301中,将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间的相似度;所述相似度计算模型具体为:
Figure PCTCN2018096265-appb-000001
其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数。
在本实施例中,终端设备会将接口组内所有在用接口两两组合,并通过组合的在用接口所包含的接口关键词之间的差异程度,计算两者之间的相似度,若该相似度较高,则表示两个在用接口的功能以及运行参数较为接近;反之,若相似度较低,则表示两个在用接口之间的功能或运行参数之间的差距较大,无法聚类为同一个聚类接口。因此,终端设备基于各个接口关键词之间的差值,得到该任意两个在用接口之间的相似度。
需要说明的是,终端设备会基于预设的数值转换对应表,将各个接口关键词通过一数值进行表示,词义较为接近的关键词,其转换后数值之间的差值较少;而词义差异较多的关键词,其转换后的数值之间的差值较大。当然,终端设备还可以当识别到关键词相同时, 用0表示;当两个接口关键词不同时,用1表示,从而统计各个关键词之间的差值,可以确定存在差异的关键词个数,并基于该个数计算两个在用接口之间的相似度。
正如上一实施例中所述,若在用接口的接口描述信息中并不包含关键词表中的某一关键词,则得到的在用接口与关键词对应关系表中,上述不包含的关键词对应序号的元素为空,从而保证在对应关系表中元素的个数是相同的。因此,当计算第i个接口关键词之间的差值时,可以保证上述两个接口关键词的具体含义是相同的,不会存在因关键词错位而导致相似度计算异常的情况发生。
在S302中,基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
在本实施例中,终端设备在计算各个在用接口之间的相似度后,则基于该相似度对各个在用接口进行聚类操作,其中执行聚类操作的识别条件为:进行聚类操作的在用接口之间的相似度均大于预设的相似度阈值,例如在用接口A和在用接口B之间的相似度大于相似度阈值,且在用接口A与在用接口C之间的相似度也大于相似度阈值,与此同时,则需要在用接口B与在用接口C之间的相似度也大于相似度阈值时,才能将在用接口A、B、C进行聚类操作;若在用接口B与在用接口C之间的相似度小于相似度阈值,则表示上述两个接口的功能或运行参数差异较大,无法进行聚类操作。
在本申请实施例中,通过接口关键词的差异程度确定两个在用接口之间的相似度,并将相似度大于预设相似度阈值的在用接口进行聚类操作,从而提高了聚类操作的准确率。
图4示出了本申请第四实施例提供的一种线程接口的管理方法的具体实现流程图。参见图4所示,相对于图1~图3所述实施例,本实施例提供的一种线程接口的管理方法还包括S401~S404,具体详述如下:
在S401中,若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数。
在本实施例中,终端设备除了可以对已经创建的线程进行接口聚类操作外,当接收到线程创建指令时,也可以对新建立的线程中包含的线程聚类到已有的聚类接口中,从而保证终端设备内的接口保持高聚合度的状态。
在本实施例中,终端设备在安装一个新的应用程序,或者对已安装的应用程序或系统进行更新操作时,可能会添加新的功能,即需要新的线程完成相关操作,在该情况下,会生成一个线程创建指令,以对该线程进行注册。终端设备在接收到该线程创建指令后,则会执行S401的相关操作。当然,除了上述获取线程创建指令的方法外,若用户需要在某一应用程序中添加自定义的功能时,也可以手动创建完成该功能的线程,在该情况下,终端设备也会识别接收到线程创建指令。
在本实施例中,该线程创建指令中包含各个新增接口的新增接口参数。终端设备会统计该新增线程中包含的新增接口的数量以及各个新增接口所对应的新增接口参数。
在S402中,判断是否存在与所述新增接口参数匹配的所述聚类接口。
在本实施例中,终端设备会把新增接口参数与各个已有的聚类接口的接口参数进行匹配,确定该新创建的线程包含的新增接口需要聚类到哪一个聚类接口中。需要说明的是,在S102中,将不同的在用接口聚类为聚类接口时,会基于上述在用接口的接口参数确定该聚类接口的接口参数,即每一个聚类接口也对应一个聚类参数。
在本实施例中,判断新增接口参数与聚类接口的接口参数是否匹配的方式可以采用上述实施例的方式,例如判断接口标识是否一致;或者采用接口类型判断新增接口所属的接口组,并通过接口描述信息对应的接口关键词,计算该新增接口与各个聚类接口之间的相似度,若相似度大于预设的相似度阈值,则识别新增接口与该聚类接口匹配。
在S403中,若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件。
在本实施例中,若终端设备在已有的聚类接口中查找到与该新增接口参数匹配的聚类接口,则基于该聚类接口的聚类接口标识生成一聚类接口调用链接,并基于该聚类接口调用链接以及线程创建指令,生成该新增线程的线程文件。
在S404中,若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
在本实施例中,若终端设备在已有的聚类接口均与该新增接口参数不匹配,则需要在聚类接口调用服务中,为该新增线程所需的接口创建一个新增聚类接口,并把该新增接口参数作为该新增聚类接口的接口参数,并为该新增聚类接口配置一个聚类接口标识;基于该新增聚类接口的聚类接口标识生成一聚类接口调用链接,并基于该聚类接口调用链接以及线程创建指令,生成该新增线程的线程文件。
在本申请实施例中,在接收到新增线程创建指令时,则对该新增线程所需的接口进行聚类操作,确定与之匹配的聚类接口,若存在,则进行聚类操作;若不存在,则在聚类接口调用服务中创建一个新增聚类接口,从而保证新增的线程也通过聚类接口调用服务进行接口调用操作,便于终端设备对各个接口的管理。
图5示出了本申请第五实施例提供的一种线程接口的管理方法的具体实现流程图。参见图5所示,相对于图1所述实施例,本实施例提供的一种线程接口的管理方法还包括:S501以及S502,具体详述如下:
进一步地,在基于各个所述聚类接口,创建聚类接口调用服务之后,还包括:
在S501中,若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数。
在本实施例中,终端设备通过接口调用服务对各个聚类接口进行管理,该管理包括新增、删除以及修改等调整操作。因此,当接收接口参数调整指令时,终端设备会获取该接口参数调整指令中指示所需调整的聚类接口的调整接口标识,以及所需进行调整修改的调整参数,基于上述两个参数,聚类接口调用服务在可执行接口调整操作。
在S502中,从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
在本实施例中,终端设备查询与该调整接口标识相匹配的聚类接口,并根据该调整参数对该聚类接口的接口参数进行修改。在对接口参数进行修改之前,若该聚类接口处于被调用的状态,则在修改完成后,终端设备会初始化调用该接口的各个线程,从而使得调整后的聚类接口能够即时使用,实现修改的目的。
在本申请实施例中,通过聚类接口调用服务修改聚类接口的接口参数,方便对所有调用该接口的线程进行统一修改,提高了修改效率以及接口的管理效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
图6示出了本申请一实施例提供的一种终端设备的结构框图,该终端设备包括的各单元用于执行图1对应的实施例中的各步骤。具体请参阅图1与图1所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。
参见图6,所述终端设备包括:
接口参数获取单元61,用于获取各个线程包含的在用接口的接口参数;
接口聚类执行单元62,用于基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
调用服务创建单元63,用于基于各个所述聚类接口,创建聚类接口调用服务;
线程文件修改单元64,用于提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
可选地,接口聚类执行单元62包括:
接口组划分单元,用于基于所述接口参数包含的接口类型,将各个所述在用接口划分 为多个接口组;所述接口组内的所有在用接口的接口类型相同;
接口关键词确定单元,用于通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词;
聚类接口创建单元,用于根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口。
可选地,聚类接口创建单元包括:
相似度计算单元,用于将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间的相似度;所述相似度计算模型具体为:
Figure PCTCN2018096265-appb-000002
其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数;
相似度比较单元,用于基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
可选地,终端设备还包括:
线程创建指令接收单元,用于若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数;
接口参数匹配单元,用于判断是否存在与所述新增接口参数匹配的所述聚类接口;
新增接口聚类单元,用于若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件;
新增聚类接口创建单元,用于若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
可选地,终端设备还包括:
调整指令接收单元,用于若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数;
调整指令执行单元,用于从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
因此,本申请实施例提供的终端设备同样可以将接口参数匹配且位于不同线程的在用接口聚类为同一聚类接口,大幅减少了终端设备中包含的接口数量,并且所有聚类接口均需要通过聚类接口调用服务进行调用,从而便于对所有接口进行管理,提高了接口管理效率。
图7是本申请另一实施例提供的一种终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70、存储器71以及存储在所述存储器71中并可在所述处理器70上运行的计算机可读指令72,例如线程接口的管理程序。所述处理器70执行所述计算机可读指令72时实现上述各个线程接口的管理方法实施例中的步骤,例如图1所示的S101至S104。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各单元的功能,例如图6所示模块61至64功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令72在所述终端设备7中的执行过程。例如,所述计算机可读指令72可以被分割成接口参数获取单元、接口聚类执行单元、调用服务创建单元以及线程文件修改单元,各单元具体功能如上所述。
所述终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机可读指令以及所述 终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种线程接口的管理方法,其特征在于,包括:
    获取各个线程包含的在用接口的接口参数;
    基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
    基于各个所述聚类接口,创建聚类接口调用服务;
    提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
  2. 根据权利要求1所述的管理方法,其特征在于,所述基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,包括:
    基于所述接口参数包含的接口类型,将各个所述在用接口划分为多个接口组;所述接口组内的所有在用接口的接口类型相同;
    通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词;
    根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口。
  3. 根据权利要求2所述的管理方法,其特征在于,所述根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口,包括:
    将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间的相似度;所述相似度计算模型具体为:
    Figure PCTCN2018096265-appb-100001
    其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数;
    基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
  4. 根据权利要求1-3任一项所述的管理方法,其特征在于,还包括:
    若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数;
    判断是否存在与所述新增接口参数匹配的所述聚类接口;
    若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件;
    若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
  5. 根据权利要求1所述的管理方法,其特征在于,还包括:
    若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数;
    从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
  6. 一种终端设备,其特征在于,包括:
    接口参数获取单元,用于获取各个线程包含的在用接口的接口参数;
    接口聚类执行单元,用于基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
    调用服务创建单元,用于基于各个所述聚类接口,创建聚类接口调用服务;
    线程文件修改单元,用于提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
  7. 根据权利要求6所述的终端设备,其特征在于,所述接口聚类执行单元包括:
    接口组划分单元,用于基于所述接口参数包含的接口类型,将各个所述在用接口划分为多个接口组;所述接口组内的所有在用接口的接口类型相同;
    接口关键词确定单元,用于通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词;
    聚类接口创建单元,用于根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口。
  8. 根据权利要求7所述的终端设备,其特征在于,所述聚类接口创建单元包括:
    相似度计算单元,用于将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间 的相似度;所述相似度计算模型具体为:
    Figure PCTCN2018096265-appb-100002
    其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数;
    相似度比较单元,用于基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
  9. 根据权利要求6-8任一项所述的终端设备,其特征在于,所述终端设备还包括:
    线程创建指令接收单元,用于若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数;
    接口参数匹配单元,用于判断是否存在与所述新增接口参数匹配的所述聚类接口;
    新增接口聚类单元,用于若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件;
    新增聚类接口创建单元,用于若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
  10. 根据权利要求6所述的终端设备,其特征在于,所述终端设备还包括:
    调整指令接收单元,用于若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数;
    调整指令执行单元,用于从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
  11. 一种终端设备,其特征在于,所述终端设备包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取各个线程包含的在用接口的接口参数;
    基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
    基于各个所述聚类接口,创建聚类接口调用服务;
    提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为 聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
  12. 根据权利要求11所述的终端设备,其特征在于,所述基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识,包括:
    基于所述接口参数包含的接口类型,将各个所述在用接口划分为多个接口组;所述接口组内的所有在用接口的接口类型相同;
    通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词;
    根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口。
  13. 根据权利要求12所述的终端设备,其特征在于,所述根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口,包括:
    将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间的相似度;所述相似度计算模型具体为:
    Figure PCTCN2018096265-appb-100003
    其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数;
    基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
  14. 根据权利要求11-13任一项所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数;
    判断是否存在与所述新增接口参数匹配的所述聚类接口;
    若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件;
    若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接 口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
  15. 根据权利要求11所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数;
    从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    获取各个线程包含的在用接口的接口参数;
    基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识;
    基于各个所述聚类接口,创建聚类接口调用服务;
    提取各个所述线程的线程文件,并将所述线程文件中所述在用接口的接口标识替换为聚类接口调用链接;所述聚类接口调用链接用于通过所述聚类接口调用服务调用该在用接口对应的聚类接口;所述聚类接口调用链接包含所述聚类接口标识。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述基于所述接口参数对所有所述在用接口进行聚类操作,得到多个聚类接口,并为各个所述聚类接口配置聚类接口标识,包括:
    基于所述接口参数包含的接口类型,将各个所述在用接口划分为多个接口组;所述接口组内的所有在用接口的接口类型相同;
    通过语义分析算法,分别对所述接口组内的各个所述在用接口的接口描述信息进行语义分析,得到各个所述在用接口的接口关键词;
    根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口。
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述根据所述接口组内各个在用接口的接口关键词之间的相似度,对各个所述在用接口进行聚类操作,得到所述聚类接口,包括:
    将所述接口组内任一所述在用接口的接口关键词分别与该接口组内其余的在用接口的接口关键词导入相似度计算模型,分别确定各个所述在用接口之间的相似度;所述相似度 计算模型具体为:
    Figure PCTCN2018096265-appb-100004
    其中,所述S为所述相似度;所述n为所述在用接口包含的接口关键词的个数;所述F i为所述在用接口的第i个接口关键词;所述A i为所述其他的在用接口第i个接口关键词;所述e为自然对数;
    基于所述相似度,对所述接口组内的各个在用接口进行聚类操作,得到所述聚类接口;聚类为同一聚类接口的各个在用接口之间的相似度均大于相似度阈值。
  19. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若接收到线程创建指令,则提取所述线程创建指令包含的新增接口参数;
    判断是否存在与所述新增接口参数匹配的所述聚类接口;
    若存在与所述新增接口参数匹配的聚类接口,则根据所述聚类接口以及所述线程创建指令,生成新增线程文件;
    若不存在与所述新增接口参数匹配的聚类接口,则基于所述新增接口参数,在聚类接口调用服务中创建一个新增聚类接口,并根据所述新增聚类接口以及所述线程创建指令,生成新增线程文件。
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若接收到接口参数调整指令,则获取所述接口参数调整指令包含的调整接口标识以及调整参数;
    从所述聚类接口调用服务中提取与所述调整接口标识匹配的聚类接口,并基于所述调整参数修改该聚类接口的接口参数。
PCT/CN2018/096265 2018-04-09 2018-07-19 一种线程接口的管理方法、终端设备及计算机可读存储介质 WO2019196239A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810309696.4 2018-04-09
CN201810309696.4A CN108762898B (zh) 2018-04-09 2018-04-09 一种线程接口的管理方法、终端设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019196239A1 true WO2019196239A1 (zh) 2019-10-17

Family

ID=63981428

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096265 WO2019196239A1 (zh) 2018-04-09 2018-07-19 一种线程接口的管理方法、终端设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN108762898B (zh)
WO (1) WO2019196239A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113374B (zh) * 2019-03-15 2022-03-25 平安科技(深圳)有限公司 流媒体服务器执行任务方法、装置及存储介质、终端设备
CN110515676A (zh) * 2019-07-11 2019-11-29 平安普惠企业管理有限公司 接口整合方法、装置、设备及存储介质
CN113535830A (zh) * 2020-04-21 2021-10-22 中移信息技术有限公司 接口自动扩展方法、装置、设备及存储介质
CN112905559B (zh) * 2021-02-01 2022-02-11 四川观想科技股份有限公司 一种多源异构数据采集系统及采集方法
CN115146187B (zh) * 2022-09-01 2022-11-18 闪捷信息科技有限公司 接口信息处理方法、存储介质和电子设备
CN116881880B (zh) * 2023-09-06 2023-11-14 智成时空(西安)创新科技有限公司 时空数据管理系统及时空数据服务化资源协同调度方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1772992A1 (en) * 2005-10-06 2007-04-11 Alcatel Lucent Apparatus and method for analysing packet data streams
CN102780580A (zh) * 2012-06-21 2012-11-14 东南大学 一种基于信任的组合服务优化方法
CN102891809A (zh) * 2012-09-25 2013-01-23 汉柏科技有限公司 多核网络设备报文按接口保序方法及系统
CN103678490A (zh) * 2013-11-14 2014-03-26 桂林电子科技大学 一种基于Hadoop平台的Deep Web查询接口聚类方法
CN104133876A (zh) * 2014-07-25 2014-11-05 浪潮电子信息产业股份有限公司 一种基于事务的增量式管理集群配置文件方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1264106C (zh) * 2002-03-30 2006-07-12 中兴通讯股份有限公司 一种统一访问数据库系统的方法
CN105045934A (zh) * 2015-09-09 2015-11-11 长春工程学院 一种处理大型地理栅格数据的并行聚类方法
CN107153789B (zh) * 2017-04-24 2019-08-13 西安电子科技大学 利用随机森林分类器实时检测安卓恶意软件的方法
CN107451224A (zh) * 2017-07-17 2017-12-08 广州特道信息科技有限公司 一种基于大数据并行计算的聚类方法及系统
CN107633007B (zh) * 2017-08-09 2021-09-28 五邑大学 一种基于层次化ap聚类的商品评论数据标签化系统和方法
CN107748739A (zh) * 2017-10-19 2018-03-02 上海大汉三通通信股份有限公司 一种短信文本模版的提取方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1772992A1 (en) * 2005-10-06 2007-04-11 Alcatel Lucent Apparatus and method for analysing packet data streams
CN102780580A (zh) * 2012-06-21 2012-11-14 东南大学 一种基于信任的组合服务优化方法
CN102891809A (zh) * 2012-09-25 2013-01-23 汉柏科技有限公司 多核网络设备报文按接口保序方法及系统
CN103678490A (zh) * 2013-11-14 2014-03-26 桂林电子科技大学 一种基于Hadoop平台的Deep Web查询接口聚类方法
CN104133876A (zh) * 2014-07-25 2014-11-05 浪潮电子信息产业股份有限公司 一种基于事务的增量式管理集群配置文件方法

Also Published As

Publication number Publication date
CN108762898B (zh) 2023-04-25
CN108762898A (zh) 2018-11-06

Similar Documents

Publication Publication Date Title
WO2019196239A1 (zh) 一种线程接口的管理方法、终端设备及计算机可读存储介质
US11481396B2 (en) Executing untrusted commands from a distributed execution model
US20200050612A1 (en) Supporting additional query languages through distributed execution of query engines
US10698897B2 (en) Executing a distributed execution model with untrusted commands
US20180018353A1 (en) Systems and Methods for Generating Schemas that Represent Multiple Data Sources
WO2018201887A1 (zh) 数据响应方法、装置、终端设备及介质
WO2021218144A1 (zh) 数据处理方法、装置、计算机设备及存储介质
WO2019161645A1 (zh) 基于Shell的数据表提取方法、终端、设备及存储介质
US20140207754A1 (en) Gathering Index Statistics Using Sampling
US20200097673A1 (en) Data privilage control method and system
WO2017128701A1 (zh) 存储数据的方法和装置
CN111651424B (zh) 一种数据处理方法、装置、数据节点及存储介质
US11163801B2 (en) Execution of queries in relational databases
CN112883088B (zh) 一种数据处理方法、装置、设备及存储介质
US9201937B2 (en) Rapid provisioning of information for business analytics
CN114157662B (zh) 一种云平台参数适配方法、装置、终端设备及储存介质
WO2020024458A1 (zh) 业务接口的管理方法及装置、存储介质、计算机设备
CN111081258A (zh) 一种声纹模型管理方法、系统、存储介质及装置
WO2020015098A1 (zh) 数据管理方法、终端设备及介质
CN114297236A (zh) 一种数据血缘分析方法、终端设备及存储介质
CN109284278B (zh) 基于数据分析技术的计算逻辑迁移方法及终端设备
CN114064712A (zh) 数据访问方法、装置、电子设备及计算机可读存储介质
CN111563250A (zh) 权限管理方法、装置、计算机设备和存储介质
WO2023082032A1 (zh) 一种云平台参数适配方法、装置、终端设备及储存介质
US20210216229A1 (en) Data lineage and data provenance enhancement

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18914822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.01.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18914822

Country of ref document: EP

Kind code of ref document: A1