CN113515608A - Intelligent working method and system - Google Patents
Intelligent working method and system Download PDFInfo
- Publication number
- CN113515608A CN113515608A CN202110661154.5A CN202110661154A CN113515608A CN 113515608 A CN113515608 A CN 113515608A CN 202110661154 A CN202110661154 A CN 202110661154A CN 113515608 A CN113515608 A CN 113515608A
- Authority
- CN
- China
- Prior art keywords
- instruction
- registration center
- hubot
- interface
- service
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000003993 interaction Effects 0.000 claims abstract description 43
- 238000013515 script Methods 0.000 claims abstract description 36
- 238000013507 mapping Methods 0.000 claims description 13
- 230000005540 biological transmission Effects 0.000 claims description 5
- 230000006870 function Effects 0.000 description 22
- 238000013508 migration Methods 0.000 description 4
- 230000005012 migration Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000002184 metal Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011017 operating method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the invention provides an intelligent working method and an intelligent working system, which comprise the following steps: sending an instruction to a Hubot when a user interacts with the Hubot of the open source chat robot through a user interaction end; hubot receives an instruction sent by a user interaction end, and analyzes an interface of a registration center carried by the instruction through a script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center; the registration center obtains corresponding parameter values from the database according to the service parameters carried by the received instruction and returns the parameter values to the Hubot; hubot analyzes the returned parameter value and requests a service address from the registration center according to the parameter value; and receiving the service address returned by the registration center, acquiring a corresponding service forming request result according to the service address, and returning the request result to the user interaction end to simplify the instruction for interaction, thereby reducing the code repetition rate.
Description
Technical Field
The invention relates to the field of network interaction, in particular to an intelligent working method and an intelligent working system.
Background
Hubot is a Github open source chat robot, the most important function of Hubot is that the script of Hubot can be added, after the script is successfully added, the Hubot inputs an instruction in a chat room, automatically executes the corresponding service and returns. The add script sample is as follows: if the service corresponding to the instruction hello is executing a python hello. Meanwhile, the machine of the hubot needs to install the python environment and the dependent packages. And after the content is completed, the restart service is effective. Adding a service http:// ip: port/path, wherein the corresponding instruction is server1, associating the instruction with the service by adding a new code in the Hubot script file, and associating the instruction with the service by adding a plurality of similar methods when a plurality of similar services need to be added. In the process of implementing the invention, the applicant finds that at least the following problems exist in the prior art: similar functions are multiple, similar scripts are too many, and the code repetition rate is high.
Disclosure of Invention
The embodiment of the invention provides an intelligent working method and system, which have the advantages of simplifying instructions and reducing code repetition rate.
To achieve the above object, in one aspect, an embodiment of the present invention provides an intelligent operating method, including:
when a user interacts with a Hubot of an open source chat robot through a user interaction end, the user interaction end sends an instruction carrying service parameters and an interface of a registration center to the Hubot, and the instruction is used for acquiring corresponding services;
the Hubot receives an instruction sent by a user interaction end, analyzes an interface of a registration center carried by the instruction through a script, and associates the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center;
the registration center obtains corresponding parameter values from the database according to service parameters carried by the received instruction, and returns the parameter values to the Hubot through an interface called by the Hubot; the database is used for storing instructions and service fields corresponding to the instructions, and the service fields comprise service parameters and parameter values thereof;
hubot analyzes the returned parameter value and requests a service address from the registration center according to the parameter value; and receiving the service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal.
In another aspect, an embodiment of the present invention provides an intelligent work system, including:
the system comprises a user interaction end, a Hubot and a registration center, wherein the user interaction end is used for sending an instruction carrying service parameters and an interface of the registration center to the Hubot when a user interacts with the Hubot through the user interaction end, and the instruction is used for acquiring corresponding services;
the Hubot is used for receiving an instruction sent by a user interaction end, analyzing an interface of a registration center carried by the instruction through a script, and associating the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center; analyzing the parameter value returned by the registration center, and requesting a service address from the registration center according to the parameter value; receiving a service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal;
the registration center is used for acquiring corresponding parameter values from the database according to the service parameters carried by the received instruction and returning the parameter values to the Hubot through an interface called by the Hubot;
and the database is used for storing the instruction and a service field corresponding to the instruction, and the service field comprises service parameters and parameter values thereof.
The technical scheme has the following beneficial effects: the instructions used for interaction are simplified, and the code repetition rate is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an intelligent method of operation of an embodiment of the present invention;
FIG. 2 is a block diagram of an intelligent work system of an embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, in combination with the embodiment of the present invention, there is provided an intelligent working method, including:
s101: when a user interacts with a Hubot of an open source chat robot through a user interaction end, the user interaction end sends an instruction carrying service parameters and an interface of a registration center to the Hubot, and the instruction is used for acquiring corresponding services;
s102: the Hubot receives an instruction sent by a user interaction end, analyzes an interface of a registration center carried by the instruction through a script, and associates the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center;
s103: the registration center obtains corresponding parameter values from the database according to service parameters carried by the received instruction, and returns the parameter values to the Hubot through an interface called by the Hubot; the database is used for storing instructions and service fields corresponding to the instructions, and the service fields comprise service parameters and parameter values thereof;
s104: hubot analyzes the returned parameter value and requests a service address from the registration center according to the parameter value; and receiving the service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal.
Preferably, the method further comprises the following steps:
s105: when the interface carried by the instruction does not exist in the registration center, the Hubot adds the interface carried by the instruction to the registration center by calling the add interface; the interface added in the registration center is an interface adopting an http transmission protocol; and the number of the first and second groups,
s106: after the registration center adds the interface carried by the instruction, the Hubot establishes a script for associating the interface carried by the instruction with the instruction.
Preferably, in step 104, the Hubot requests a service address from the registration center according to the parameter value, including:
hubot requests a service address from the registration center by carrying parameter values in a get/host mode.
Preferably, the user interaction terminal is chat software, or the user interaction terminal is realized in a command line mode.
Preferably, the first and second electrodes are formed of a metal,
the registry records services and mapping relations between instructions expressed in a key-value pair form and corresponding service addresses and parameter values of service parameters, wherein the key of the key-value pair is the instruction, and the value of the key-value pair is the service address corresponding to the instruction and the parameter value of the service parameter corresponding to the instruction;
in step 104, after the Hubot analyzes the returned parameter value and requests the service address from the registry according to the parameter value, the method includes:
the registration center searches the key value pair according to the parameter value when the Hubot requests the service address from the registration center, and sends the service address in the searched mapping relation to the Hubot according to the mapping relation between the instruction represented by the searched key value pair and the corresponding service address.
As shown in fig. 2, in connection with an embodiment of the present invention, there is provided an intelligent work system, including:
the user interaction terminal 21 is used for sending an instruction carrying service parameters and an interface of a registration center to the Hubot when a user interacts with the Hubot through the user interaction terminal 21, and the instruction is used for acquiring corresponding services;
the Hubot22 is used for receiving an instruction sent by a user interaction end, analyzing an interface of a registration center carried by the instruction through a script, and associating the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center; analyzing the parameter value returned by the registration center, and requesting a service address from the registration center according to the parameter value; receiving a service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal;
the registration center 23 is configured to obtain a corresponding parameter value from the database according to the service parameter carried by the received instruction, and return the parameter value to the Hubot through the interface called by the Hubot;
and the database 24 is used for storing the instructions and service fields corresponding to the instructions, wherein the service fields comprise service parameters and parameter values thereof.
Preferably, said Hubot comprises:
the interface adding subunit 221, configured to add, when the interface carried by the instruction does not exist in the registration center, the interface carried by the instruction to the registration center by calling an add interface; the interface added in the registration center is an interface adopting an http transmission protocol; and after adding the interface carried by the instruction in the registration center, establishing a script for associating the interface carried by the instruction with the instruction.
Preferably, the Hubot is specifically configured to request a service address from a registry by carrying a parameter value in a get/host manner.
Preferably, the user interaction terminal 21 is chat software, or the user interaction terminal is implemented by a command line.
Preferably, the first and second electrodes are formed of a metal,
the registry 23 is further configured to record services and mapping relationships between instructions represented in a key-value pair form and corresponding service addresses and parameter values of service parameters, where a key of the key-value pair is an instruction, and a value of the key-value pair is a service address corresponding to the instruction and a parameter value of a service parameter corresponding to the instruction;
the registry 23 is further configured to search the key value pair according to the parameter value when the Hubot requests the service address from the registry, and send the service address in the searched mapping relationship to the Hubot according to the mapping relationship between the instruction represented by the searched key value pair and the corresponding service address.
The beneficial effects obtained by the invention are as follows:
the quick access mode that n interfaces are required to be added is assumed, only n sadd interfaces are required to be called, n scripts with similar functions are not required to be written, code redundancy is reduced, Hubot service is not required to be restarted, and the method takes effect immediately. The problems that when a new function is added to the hubot or the existing function is modified, the service is frequently restarted due to the change of the script file, and similar codes need to be added for the service with similar functions, such as different instructions corresponding to different http requests, different instructions corresponding to different memo information, and the like, and the code repetition rate is high are solved.
After the new function is served, the language environment depending on deployment is solved, and the deployment and the migration can be carried out at will. The method avoids 'for executing services of specific languages, such as executing python scripts, a machine where the Hubot is located needs to have a python environment, if the Hubot is deployed for a docker, the python environment needs to be added into a docker file, so that strong dependence on the execution environment is caused, and the workload of deployment and migration of the Hubot services is increased'.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to specific application examples, and reference may be made to the foregoing related descriptions for technical details that are not described in the implementation process.
Abbreviations and key terms of the present invention are defined as follows:
ChatOps: the intelligent working mode is a novel intelligent working mode, and a help team utilizes a ChatBot (chat robot) to connect members with various auxiliary tools. In the chat room, the team members key in the commands, the chat robot automatically connects background services, and the whole work is expanded just like calling an intelligent assistant simply and naturally, so that the work is faster and better.
Hubot: the Github open source chat robot can be used for a company online chat room to receive instructions and complete some automatic work, such as automatic deployment, monitoring, translation and the like, and most importantly, own scripts can be added, and the Github open source chat robot can be conveniently butted with own compiled functions or own systems by means of a Hubot framework. Interaction with Hubot may be performed in a command line manner; meanwhile, the method can also be integrated with chat software, interact with Hubot in the chat software, input instructions in a chat room, analyze the instructions by the Hubot and return results to a terminal user. Hubot supports a variety of chat software: chat, Slack, Bearychat, hiphat, enterprise Wechat, and the like.
Chat: the chat system is one of the most abundant Slack (chat software) open source substitutes, has strong functions, and supports group chat, direct communication, private chat, desktop notification, link preview, file uploading, voice and video chat and the like. Chat and Hubot are selected for interaction in the system.
The most important function of Hubot is that the Hubot can add own script, and after the script is successfully added, an instruction is input in a chat room, and the corresponding service is automatically executed and returned. The add script sample is as follows:
if the service corresponding to the instruction hello is executing a python hello. Meanwhile, the machine of the hubot needs to install the python environment and the dependent packages. And after the content is completed, the restart service is effective.
Adding a service http:// ip: port/path, wherein the corresponding instruction is server1, associating the instruction with the service by adding a new code in the Hubot script file, and associating the instruction with the service by adding a plurality of similar methods when a plurality of similar services need to be added.
The invention relates to a registration center-based ChatOps, which aims to solve the problems of simplification of newly added instructions, reduction of code repetition rate, frequent service restart caused by information change and reduction of execution environment dependence. By introducing a registration center and a service mode, code redundancy can be effectively reduced, frequent service restart is avoided, the problems of environment dependence and the like are solved, and the technology has originality in the ChatOps field.
Fig. 3 is a schematic diagram of the present invention, and the technical scheme of the present invention includes: hubot (Github open source chat robot), socket.
The registration center: the registry is equivalent to an address book in the system, records the mapping relation between the command, namely the command, the service address and the parameter value of the service parameter, and is embodied in a key value pair mode, the command is a key in the database, and the url and the parameter value of the associated interface are searched according to the key. In the system, the service is registered, and when the Hubot calls the instruction, the service address corresponding to the instruction is found and returned. The registry provides APIs such as add, update, delete and get for registration of services, updating, deleting and obtaining of service information; the help interface is responsible for returning descriptions corresponding to all instructions, for example, the instruction help description information is return help world, and the function is the same as the help function in the hubot.
Chat (chat software): chatting with hubot through socket, and taking charge of front-end interaction.
Hubot: hubot adds scripts interacting with the registry, such as an instruction sadd calls the registry add interface, an instruction sget calls the registry get interface, and an instruction help calls the registry help interface.
A database: is a repository that organizes, stores and manages data according to a data structure. The data collection is organized, shared and uniformly managed and stored in the computer for a long time. The system database uses MySQL for storing instructions and corresponding service fields; the service field includes service parameters and their parameter values.
Http Server: the newly added functions are served as much as possible, namely, an http interface (an interface of an http transmission protocol) is provided, and a specific function is executed through an access interface, so that the dependence on the environment is reduced.
The technical solution of the present invention is illustrated as follows:
now an interface is connected through hubothttp://10.10.10.1:8080/kpiAdded to the registry, the user invokes the service via instruction kpi.
Chat user chat room input instruction: saddhttp://10.10.10.1:8080/kpi kpi get tianrui kpi interface。
Hubot has associated instruction sadd with registry add interface, calls add interface, and has a parameter url ═http:// 10.10.10.1:8080/kpi&key=kpi&method=get&author=tianrui&And des-kpi interface is sent to the registration center.
And the add interface of the registration center stores the information in the mysql database. Wherein, the information is: url ═http://10.10.10.1:8080/kpi&key=kpi&method=get&author=tianrui&des=kpi interface。
The user invokes the kpi interface, and the socket chat room inputs the instruction: sget kpi.
The hub instruction sget is associated with a registry get interface, and calls the get interface with a key kpi parameter.
And the registry get interface searches the corresponding url and method from the mysql database through the key and returns the url and method to the hubot.
The hub analyzes the returned result (returned parameter value), and after judging that the returned parameter value is correct, the returned result is { "url": http://10.10.1: 80080/kpi', "method": get "}, and the hub requests the service address in a get/host mode: url ═http://10.10.10.1:8080/kpiAnd returning the request result to the socket.
Chat inputs help, the hub instructs the help to be associated with the help interface of the registration center, and the help interface is called.
And the registry hellp interface queries the database key and the corresponding des, and returns the key to the hubot, and the hubot returns to the socket.
The invention has the following beneficial effects:
assuming a quick access mode needing to add n interfaces, only n sadd interfaces need to be called, and n scripts with similar functions do not need to be written (the method for adding the scripts refers to the script adding sample), so that code redundancy is reduced, a Hubot service does not need to be restarted, and the Hubot service takes effect immediately. The problems that when a new function is added to the hubot or the existing function is modified, the service is frequently restarted due to the change of the script file, and similar codes need to be added for the service with similar functions, such as different instructions corresponding to different http requests, different instructions corresponding to different memo information, and the like, and the code repetition rate is high are solved.
After the new function is served, the language environment depending on deployment is solved, and the deployment and the migration can be carried out at will. The method avoids 'for executing services of specific languages, such as executing python scripts, a machine where the Hubot is located needs to have a python environment, if the Hubot is deployed for a docker, the python environment needs to be added into a docker file, so that strong dependence on the execution environment is caused, and the workload of deployment and migration of the Hubot services is increased'.
It should be understood that the specific order or hierarchy of steps in the processes disclosed is an example of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. To those skilled in the art; various modifications to these embodiments will be readily apparent, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. An intelligent working method, comprising:
when a user interacts with a Hubot of an open source chat robot through a user interaction end, the user interaction end sends an instruction carrying service parameters and an interface of a registration center to the Hubot, and the instruction is used for acquiring corresponding services;
the Hubot receives an instruction sent by a user interaction end, analyzes an interface of a registration center carried by the instruction through a script, and associates the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center;
the registration center obtains corresponding parameter values from the database according to service parameters carried by the received instruction, and returns the parameter values to the Hubot through an interface called by the Hubot; the database is used for storing instructions and service fields corresponding to the instructions, and the service fields comprise service parameters and parameter values thereof;
hubot analyzes the returned parameter value and requests a service address from the registration center according to the parameter value; and receiving the service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal.
2. The intelligent work method according to claim 1, further comprising:
when the interface carried by the instruction does not exist in the registration center, the Hubot adds the interface carried by the instruction to the registration center by calling the add interface; the interface added in the registration center is an interface adopting an http transmission protocol; and the number of the first and second groups,
after the registration center adds the interface carried by the instruction, the Hubot establishes a script for associating the interface carried by the instruction with the instruction.
3. The intelligent work method according to claim 1, wherein said Hubot requests a service address from a registry according to the parameter value, comprising:
hubot requests a service address from the registration center by carrying parameter values in a get/host mode.
4. The intelligent work method according to claim 1, characterized in that the user interaction side is chat software, or the user interaction side is implemented by means of a command line.
5. The intelligent working method according to claim 1, wherein the registry records services and mapping relations between instructions represented in the form of key-value pairs and corresponding service addresses and parameter values of service parameters, wherein the key of the key-value pair is an instruction, and the values of the key-value pair are the service address corresponding to the instruction and the parameter values of the service parameters corresponding to the instruction;
after the Hubot analyzes the returned parameter value and requests the service address from the registration center according to the parameter value, the method comprises the following steps:
the registration center searches the key value pair according to the parameter value when the Hubot requests the service address from the registration center, and sends the service address in the searched mapping relation to the Hubot according to the mapping relation between the instruction represented by the searched key value pair and the corresponding service address.
6. An intelligent work system, comprising:
the system comprises a user interaction end, a Hubot and a registration center, wherein the user interaction end is used for sending an instruction carrying service parameters and an interface of the registration center to the Hubot when a user interacts with the Hubot through the user interaction end, and the instruction is used for acquiring corresponding services;
the Hubot is used for receiving an instruction sent by a user interaction end, analyzing an interface of a registration center carried by the instruction through a script, and associating the instruction with the interface of the registration center through the script; calling the analyzed interface of the registration center, and transmitting the service parameters carried by the instruction to the registration center while calling the interface of the registration center; analyzing the parameter value returned by the registration center, and requesting a service address from the registration center according to the parameter value; receiving a service address returned by the registration center, acquiring a corresponding service according to the service address to form a request result, and returning the request result to the user interaction terminal;
the registration center is used for acquiring corresponding parameter values from the database according to the service parameters carried by the received instruction and returning the parameter values to the Hubot through an interface called by the Hubot;
and the database is used for storing the instruction and a service field corresponding to the instruction, and the service field comprises service parameters and parameter values thereof.
7. The intelligent work system according to claim 6, wherein the Hubot comprises:
the interface adding subunit is used for adding the interface carried by the instruction to the registration center by calling the add interface when the interface carried by the instruction does not exist in the registration center; the interface added in the registration center is an interface adopting an http transmission protocol; and after adding the interface carried by the instruction in the registration center, establishing a script for associating the interface carried by the instruction with the instruction.
8. The intelligent work system according to claim 6,
the Hubot is specifically used for requesting a service address from a registration center by carrying a parameter value in a get/host mode.
9. The intelligent work system according to claim 6, wherein the user interaction terminal is chat software, or the user interaction terminal is implemented by a command line.
10. The intelligent work system according to claim 6,
the registry is further used for recording services and mapping relations between instructions expressed in a key-value pair form and corresponding service addresses and parameter values of service parameters, wherein the key of the key-value pair is an instruction, and the values of the key-value pair are the service addresses corresponding to the instruction and the parameter values of the service parameters corresponding to the instruction;
the registration center is further configured to search the key value pair according to the parameter value when the Hubot requests the service address from the registration center, and send the service address in the searched mapping relationship to the Hubot according to the mapping relationship between the instruction represented by the searched key value pair and the corresponding service address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110661154.5A CN113515608A (en) | 2021-06-15 | 2021-06-15 | Intelligent working method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110661154.5A CN113515608A (en) | 2021-06-15 | 2021-06-15 | Intelligent working method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113515608A true CN113515608A (en) | 2021-10-19 |
Family
ID=78065901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110661154.5A Pending CN113515608A (en) | 2021-06-15 | 2021-06-15 | Intelligent working method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113515608A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105376225A (en) * | 2015-11-02 | 2016-03-02 | 亚信科技(南京)有限公司 | Software-as-a-service method and device |
CN109327503A (en) * | 2018-08-27 | 2019-02-12 | 珠海格力电器股份有限公司 | Information management system and method, service router |
CN109582725A (en) * | 2018-12-07 | 2019-04-05 | 上海金融期货信息技术有限公司 | A kind of intellectual analysis application system based on micro services framework |
CN110018962A (en) * | 2019-04-11 | 2019-07-16 | 重庆猪八戒知识产权服务有限公司 | Service adjustment method and system based on distributed service framework and registration center |
CN111245901A (en) * | 2019-12-31 | 2020-06-05 | 的卢技术有限公司 | Distributed service registration discovery method and system supporting service parameter issuing |
-
2021
- 2021-06-15 CN CN202110661154.5A patent/CN113515608A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105376225A (en) * | 2015-11-02 | 2016-03-02 | 亚信科技(南京)有限公司 | Software-as-a-service method and device |
CN109327503A (en) * | 2018-08-27 | 2019-02-12 | 珠海格力电器股份有限公司 | Information management system and method, service router |
CN109582725A (en) * | 2018-12-07 | 2019-04-05 | 上海金融期货信息技术有限公司 | A kind of intellectual analysis application system based on micro services framework |
CN110018962A (en) * | 2019-04-11 | 2019-07-16 | 重庆猪八戒知识产权服务有限公司 | Service adjustment method and system based on distributed service framework and registration center |
CN111245901A (en) * | 2019-12-31 | 2020-06-05 | 的卢技术有限公司 | Distributed service registration discovery method and system supporting service parameter issuing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4463661B2 (en) | Computer system, computer, database access method and database system | |
US9594845B2 (en) | Automating web tasks based on web browsing histories and user actions | |
CN110519329B (en) | Method, device and readable medium for concurrently processing samba protocol request | |
US20220138184A1 (en) | Object resolution among account-level namespaces for database platforms | |
US20230205503A1 (en) | Method for dynamically integrating application programs, and software system and machine using the same | |
WO2021120763A1 (en) | Network card binding method and apparatus for multi-network card server, and electronic device and storage medium | |
US20210365438A1 (en) | Namespace-based system-user access of database platforms | |
CN111324619A (en) | Object updating method, device, equipment and storage medium in micro service system | |
WO2022026973A1 (en) | Account-level namespaces for database platforms | |
CN112491609B (en) | Business service-based system application architecture discovery method and system | |
CN112073212B (en) | Parameter configuration method, device, terminal equipment and storage medium | |
CN111984849A (en) | Information query method, device, equipment and medium | |
US11016821B2 (en) | Resegmenting chunks of data for efficient load balancing across indexers | |
CN1963821A (en) | Method, system and apparatus to realize accessing to database | |
CN115329170A (en) | Webpage crawling method, device, equipment and storage medium | |
CN115499489A (en) | Method, device, equipment and readable medium for managing sub-network in link | |
CN113515608A (en) | Intelligent working method and system | |
WO2020220272A1 (en) | Method and system for changing resource state, terminal, and storage medium | |
CN111488157A (en) | Server installation system and method | |
CN115499421B (en) | Micro-service architecture mode system based on three-layer architecture | |
CN111897887B (en) | Parameter configuration method, device, system, electronic equipment and storage medium | |
CN109710569B (en) | File online browsing method | |
WO2021078176A1 (en) | Storage process running method and apparatus, database system, and storage medium | |
CN114070705A (en) | Device network management method, medium and device based on command line | |
CN114090514A (en) | Log retrieval method and device for distributed system |
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 |