CN106406844B - Method and device for realizing public number menu of communication interaction platform - Google Patents

Method and device for realizing public number menu of communication interaction platform Download PDF

Info

Publication number
CN106406844B
CN106406844B CN201510481450.1A CN201510481450A CN106406844B CN 106406844 B CN106406844 B CN 106406844B CN 201510481450 A CN201510481450 A CN 201510481450A CN 106406844 B CN106406844 B CN 106406844B
Authority
CN
China
Prior art keywords
menu
logic processing
configuration table
code
public number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510481450.1A
Other languages
Chinese (zh)
Other versions
CN106406844A (en
Inventor
吴世友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510481450.1A priority Critical patent/CN106406844B/en
Publication of CN106406844A publication Critical patent/CN106406844A/en
Application granted granted Critical
Publication of CN106406844B publication Critical patent/CN106406844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for realizing a public number menu of a communication interaction platform, which comprises the following steps: receiving menu options or menu keywords of a public number of a communication interaction platform sent by a client; searching a menu configuration table matched with menu options or menu keywords in a preset public menu configuration file; when the menu configuration table comprises logic processing fields, calling and executing logic processing codes matched with the logic processing fields in the menu configuration table to obtain a logic processing response result; and returning the logic processing response result to the client for display. The invention also discloses a device for realizing the public number menu of the communication interaction platform. The logic processing code for processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, the code redundancy caused by repeated codes is avoided, only the menu configuration tables need to be modified during modification, the logic processing code cannot be influenced, the code maintenance is facilitated, and the code stability is ensured.

Description

Method and device for realizing public number menu of communication interaction platform
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for realizing a public number menu of a communication interaction platform.
Background
With the rapid development of the intelligent terminal technology and the internet technology, the application of the communication interaction platform on the intelligent terminal is more and more extensive. In the communication interaction platform, besides an account number for providing information interaction for an individual user, a public account number, namely a public number, can be provided for some service providers. The service provider sends promotion information to the individual user through the public number or provides service for the individual user, and the problem of the user which is put forward at present is solved. Generally, interaction between a personal account and a public number is realized through menu selection, a user opens an interaction window with the public number on an interaction interface of the user, menu selection items are displayed in the interaction window, the user clicks the menu selection items required by the user, and the public number displays corresponding response in the interaction window according to the menu selected by the user. In the process of developing the public number menu, logic required by the menu is usually directly hard-coded in the whole program code, when a certain public number menu needs to be newly added, the whole program code needs to be copied, so that code redundancy is caused, the workload is large, and other menus can be influenced in the process of modifying the public number menu, and code maintenance is not facilitated.
Disclosure of Invention
The embodiment of the invention provides a method and a device for realizing a public number menu of a communication interaction platform, which ensures that the code reuse degree of the public number menu is high and is beneficial to code maintenance.
The embodiment of the invention provides a method for realizing a public number menu of a communication interaction platform, which comprises the following steps:
receiving menu options or menu keywords of a public number of a communication interaction platform sent by a client;
searching a menu configuration table matched with the menu options or the menu keywords in a preset menu configuration file of the public number;
when the menu configuration table comprises logic processing fields, calling and executing logic processing codes matched with the logic processing fields in the menu configuration table to obtain a logic processing response result;
and returning the logic processing response result to the client for display.
The embodiment of the invention also provides a device for realizing the public number menu of the communication interaction platform, which comprises the following steps:
the receiving and sending module is used for receiving the menu options or menu keywords of the public number of the communication interaction platform sent by the client;
the matching module is used for searching a menu configuration table matched with the menu options or the menu keywords in a preset menu configuration file of the public number;
the response module is used for calling and executing the logic processing codes matched with all the logic processing fields in the menu configuration table when the menu configuration table comprises the logic processing fields to obtain a logic processing response result;
the receiving and sending module is further used for returning the logic processing response result to the client for displaying.
The communication interaction platform of the embodiment of the invention sets a menu configuration table aiming at the menu options of the public number in advance, and sets a logic processing field in the menu configuration table, which is specially used for calling logic processing codes, so that the logic processing codes of various logics are realized not to be directly written into the code program of each menu option, but the logic processing codes are called through the menu configuration table, thereby avoiding code redundancy caused by repeated codes, the logic processing codes for processing the same logic can be called by a plurality of menu configuration tables, the code reusability is high, and simultaneously, when the menu options need to be added, modified or deleted, only the menu configuration table corresponding to the menu options needs to be added, modified or deleted, the influence on each logic processing code can be avoided, the code maintenance is facilitated, and the code stability is ensured.
Drawings
FIG. 1 is a bus diagram of a server where a device for implementing a public number menu of a communication interaction platform is located in an embodiment of the present invention;
FIG. 2 is a flowchart of a method for implementing a public number menu of a communication interaction platform according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention;
FIG. 4 is a flowchart of a third embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention;
FIG. 5 is a flowchart illustrating a fourth embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention;
FIG. 6 is a flowchart of a fifth embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention;
FIG. 7 is a block diagram of a first embodiment of an apparatus for implementing a public number menu of a communication interaction platform according to the present invention;
FIG. 8 is a block diagram illustrating a second embodiment of an apparatus for implementing a public number menu of a communication interaction platform according to the present invention;
fig. 9 is a schematic block diagram of an apparatus for implementing a public number menu of a communication interaction platform according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The device for realizing the public number menu of the communication interaction platform can be arranged in a server of the communication interaction platform. Referring to fig. 1, fig. 1 is a bus diagram of a server where a device for implementing a public number menu of a communication interaction platform is located in an embodiment of the present invention. The terminal may include: at least one processor 101, e.g., a CPU, at least one network interface 104, a user interface 103, a memory 105, at least one communication bus 102. Wherein the communication bus 102 is used for enabling connection communication between these components. The user interface 103 may include a Display (Display), a Keyboard (Keyboard), a standard wired interface, and a standard wireless interface. The network interface 104 may include a standard wired interface, a wireless interface (e.g., a WIFI interface). The memory 105 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 105 may also be at least one storage device located remotely from the aforementioned processor 101. The memory 105, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a public number menu program that implements a communication interaction platform.
In the server of the device for implementing the public number menu of the communication interaction platform shown in fig. 1, the network interface 104 is mainly used for connecting other servers or terminals and performing data communication with other servers or terminals; the user interface 103 is mainly used for receiving user instructions and interacting with users; and the processor 101 may be configured to call the public number menu program stored in the memory 105 for implementing the communication interaction platform, and perform the following operations:
receiving a menu option or a menu keyword of a public number of a communication interaction platform sent by a client through a network interface 104;
searching a menu configuration table matched with menu options or menu keywords in a preset public menu configuration file;
when the menu configuration table comprises logic processing fields, calling and executing logic processing codes matched with the logic processing fields in the menu configuration table to obtain a logic processing response result;
and returning the logic processing response result to the client for display through the network interface 104.
In one embodiment, the processor 101 invoking the public number menu program implementing the communication interaction platform stored in the memory 105 may further perform the following operations:
when the menu configuration table comprises logic processing fields, searching a code module matched with each logic processing field according to each logic processing field in the menu configuration table; a logic processing field in the menu configuration table corresponds to a code module;
and calling the searched code module, executing the logic processing code in the code module, and obtaining a logic processing response result.
In one embodiment, the processor 101 invoking the public number menu program implementing the communication interaction platform stored in the memory 105 may further perform the following operations:
acquiring the content of each non-logic processing field in a menu configuration table;
the contents of the acquired non-logical processing fields are returned to the client for display through the network interface 104.
In one embodiment, the processor 101 invoking the public number menu program implementing the communication interaction platform stored in the memory 105 may further perform the following operations:
packaging logic processing codes for realizing the same logic into a code module;
receiving code module identification information entered into a logical processing field of the menu configuration table through a user interface 103;
and associating the code module with which the code module identification information is matched with the logical processing field.
In one embodiment, the processor 101 invoking the public number menu program implementing the communication interaction platform stored in the memory 105 may further perform the following operations:
receiving newly added menu options of the entered public number through the user interface 103, and acquiring menu keywords of the newly added menu options;
and generating a menu configuration table in the menu configuration file of the public number, and enabling the identification information of the menu configuration table to correspond to the newly added menu option of the public number and the menu keyword of the newly added menu option.
In the embodiment of the device for implementing the public number menu of the communication interaction platform and the server thereof described in fig. 1, a menu configuration table is set in advance for the menu options of the public number, and a logic processing field is set in the menu configuration table, which is specially used for calling logic processing codes, thus, the logic processing code for realizing various logics is not directly written into the code program of each menu option, but calls the logic processing code through the menu configuration table, thereby avoiding the code redundancy caused by repeated codes, the logic processing code processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, meanwhile, when menu options are required to be added, modified or deleted, only the menu configuration table corresponding to the menu options is required to be added, modified or deleted, the method has no influence on each logic processing code, is beneficial to code maintenance and ensures the stability of the code.
As shown in fig. 2, fig. 2 is a flowchart of a method for implementing a public number menu of a communication interaction platform according to a first embodiment of the present invention. The method for realizing the public number menu of the communication interaction platform comprises the following steps:
step S10, receiving a menu option or a menu keyword of a public number of the communication interaction platform sent by the client;
the embodiment adopts a method for realizing the public number menu of the communication interaction platform by the server of the communication interaction platform. The user can install an application client of the communication interaction platform on the intelligent terminal of the user in advance, or directly open a web page of the communication interaction platform through a browser. The present embodiment will collectively refer to the application client and the web page as a client. A user logs in a user account of the communication interaction platform through a client, and when the service of a service provider needs to be obtained, such as consultation, ticket buying, order placing and the like, an interaction window of a public number of the service provider can be opened on the client. At least one menu option is displayed at the appointed position of the interactive window, or an input box is displayed, and the user can click the menu option corresponding to the required service, or directly input the menu keyword corresponding to the required service in the input box. And the client sends the menu options or menu keywords aiming at the public number input by the user to the server and waits for the server to return a response.
Step S20, searching a menu configuration table matched with menu options or menu keywords in a preset public number menu configuration file;
the method comprises the steps that a plurality of menu configuration files are preset in a server, each menu configuration file corresponds to a public number, the menu configuration files comprise a plurality of menu configuration tables, each menu configuration table corresponds to one menu option, and at least one menu keyword can be extracted from the content of one menu option, so that the menu configuration tables corresponding to the menu options and the menu keywords also have matching corresponding relations. The server searches a corresponding menu configuration file according to the public number information sent by the client, and then searches a matched menu configuration table in the menu configuration file according to the menu option or the menu keyword sent by the client.
Step S30, when the menu configuration table includes logic processing fields, the logic processing code matched with each logic processing field in the menu configuration table is called and executed, and a logic processing response result is obtained;
a plurality of fields, such as a name field, a type field, a content field, etc., are included in the menu configuration table. In order to call logic processing codes, such as parameter checking codes, security authority checking codes, service processing codes and the like, logic processing fields special for calling the logic processing codes are also included in the menu configuration table. Logic processing codes for realizing various logics can be stored in a code library in advance, when a certain logic needs to be realized in a certain menu configuration table, a logic processing field is written in the menu configuration table, and key information of the logic processing field is matched with identification information of the logic processing codes of the logic needing to be realized. When the server processes each field in the menu configuration table, if the menu configuration table includes a logic processing field, the server finds a corresponding logic processing code according to the key information of the logic processing field, and invokes the logic processing code to execute relevant logic, for example, invokes a parameter verification code to perform parameter reliability verification, invokes a security permission check code to verify the security of the current account, invokes a service processing code to perform corresponding service logic processing, and the like.
And step S40, returning the logic processing response result to the client for display.
And after calling the logic processing code to complete corresponding logic processing, the server outputs a logic processing response result and returns the logic processing response result to the client through the network. After receiving the logic processing response result, the client searches the corresponding interactive window according to the public number information carried in the response result, and displays the obtained logic processing response result in the interactive window.
The communication interaction platform of the embodiment sets a menu configuration table in advance for the menu options of the public number, and sets a logic processing field in the menu configuration table, which is specially used for calling logic processing codes, so that the logic processing codes of various logics are realized not to be directly written into the code program of each menu option, but the logic processing codes are called through the menu configuration table, thereby avoiding code redundancy caused by repeated codes, the logic processing codes for processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, and meanwhile, when the menu options need to be added, modified or deleted, only the menu configuration table corresponding to the menu options needs to be added, modified or deleted, the influence on each logic processing code can be avoided, the code maintenance is facilitated, and the code stability is ensured.
As shown in fig. 3, fig. 3 is a flowchart of a method for implementing a public number menu of a communication interaction platform according to a second embodiment of the present invention. This embodiment includes the steps of the embodiment shown in fig. 2, wherein step S30 includes:
step S31, when the menu configuration table includes logic processing fields, according to each logic processing field in the menu configuration table, searching a code module matched with each logic processing field;
and step S32, calling the searched code module, executing the logic processing code in the code module, and obtaining a logic processing response result.
In this embodiment, in order to facilitate calling of the logic processing code, the logic processing code implementing the same logic is packaged into a code module, and the identification information of the code module is the identification information of the logic processing code in the code module. When a certain logic needs to be realized, a logic processing field is written in the menu configuration table, the logic processing field corresponds to a code module of the logic to be realized, and the key information of the logic processing field is matched with the identification information of the corresponding code module.
When the server processes the logic processing field in the menu configuration table, the server finds the corresponding code module according to the key information of the logic processing field, and the code module comprises a logic processing code for realizing the corresponding logic. The server calls the logic processing code in the searched code module, executes the relevant logic, outputs a logic processing response result, and returns the logic processing response result to the client through the network.
In the embodiment, a code modularization mode is adopted, logic processing codes for realizing the same logic are packaged into one code module, so that the server can conveniently call the logic processing codes through a menu configuration table, code redundancy is avoided, and the logic processing codes are respectively modified aiming at different code modules when the codes are maintained, thereby being beneficial to code maintenance.
As shown in fig. 4, fig. 4 is a flowchart of a method for implementing a public number menu of a communication interaction platform according to a third embodiment of the present invention. The present embodiment includes the steps of the embodiment shown in fig. 2, and after step S20, the method further includes:
step S51, obtaining the content of each non-logic processing field in the menu configuration table;
and step S52, returning the acquired contents of the non-logical processing fields to the client for display.
The menu configuration table of the present embodiment may further include non-logical processing fields, such as name, ID, type, text content, picture link, text link, title, and the like. The menu configuration table may include both the non-logical processing field and the logical processing field, or may include only one of them. For example, the response result of the menu option only needs to output simple words and pictures, and when complex service logic does not need to be executed, the logic processing field is not set in the menu configuration table, only the non-logic processing field is set, and if more complex logic needs to be processed, the logic processing code is called. When the server processes the non-logic processing field, the server directly outputs the content of the non-logic processing field to the client side for displaying without calling a logic processing code, so that the menu response is quicker. Meanwhile, because the non-logic processing field is processed by a simple program, the content of the non-logic processing field is added, modified or deleted very conveniently, and errors are not easy to occur.
As shown in fig. 5, fig. 5 is a flowchart of a fourth embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention. In the method for implementing the public number menu of the communication interaction platform provided by this embodiment, the menu configuration table and the code module in the menu configuration file are associated by the following steps:
step S61, packaging the logic processing code realizing the same logic into a code module;
step S62, receiving code module identification information recorded in the logic processing field of the menu configuration table;
step S63, associating the code module matching the code module identification information with the logical processing field.
In this embodiment, the communication interaction platform stores logic processing codes for implementing various logics into the code base in advance, and encapsulates the logic processing codes for implementing the same logic into one code module. When a certain menu option in the public number needs to realize a certain logic, a developer inputs identification information of a code module for realizing the logic in a logic processing field of a menu configuration table corresponding to the menu option, and key information of the logic processing field is matched with the input code module identification information. The server obtains code module identification information according to the key information of the logic processing field, searches the corresponding code module according to the code module identification information, and associates the code module with the logic processing field, so that the subsequent calling of the code module is facilitated. In the embodiment, a code modularization mode is adopted, the logic processing codes for realizing the same logic are packaged into one code module, and the code module is associated with the logic processing field in the menu configuration table, so that the server can conveniently call the logic processing codes through the menu configuration table, code redundancy is avoided, and the logic processing codes are respectively modified aiming at different code modules when the codes are maintained, thereby being beneficial to code maintenance.
As shown in fig. 6, fig. 6 is a flowchart of a fifth embodiment of a method for implementing a public number menu of a communication interaction platform according to the present invention. The present embodiment includes the steps of the embodiment shown in fig. 5, and further includes, before step S62:
step S64, receiving newly added menu options of the recorded public number, and acquiring menu keywords of the newly added menu options;
step S65, a menu configuration table is generated in the menu configuration file of the public number, and the identification information of the menu configuration table is corresponding to the newly added menu option of the public number and the menu keyword of the newly added menu option.
The embodiment provides an implementation scheme of a newly added menu configuration table. When a menu option needs to be newly added in an interactive window of the public number, a developer inputs the information of the public number and the newly added menu option. And the server calls a drawing tool program to draw the interactive window of the public number according to the information of the newly added menu option, and a menu option is newly added in the interactive window. And meanwhile, the server searches a corresponding menu configuration file according to the recorded public number and generates a new menu configuration table in the menu configuration file. And matching and corresponding the identification information of the newly generated menu configuration table with the newly added menu options by the server, so that the server can find the matched menu configuration table according to the menu options after the user selects the menu options. In addition, the server also extracts at least one menu keyword from the menu options, and matches and corresponds the menu keyword with the identification information of the newly generated menu configuration table, so that the server can also find the matched menu configuration table according to the menu keyword after the user inputs the menu keyword. After the menu configuration table is newly established, a developer inputs the content of the logic processing field in the menu configuration table, and the server associates the logic processing code with the logic processing field, so that the logic processing code is conveniently called subsequently. In the embodiment, a menu configuration file is set for the public number, a menu configuration table in the menu configuration file is associated with menu options of the public number, when a server responds to a certain menu option, the relevant logic processing codes are called through the menu configuration table to realize relevant logics, the logic processing codes for processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, code redundancy caused by repeated codes is avoided, and when the menu option is newly added, modified or deleted, only the menu configuration table corresponding to the menu option needs to be newly added, modified or deleted, so that each logic processing code cannot be influenced, code maintenance is facilitated, and code stability is ensured.
Fig. 7 is a schematic block diagram of an apparatus for implementing a public number menu of a communication interaction platform according to a first embodiment of the present invention. The device for realizing the public number menu of the communication interaction platform provided by the embodiment comprises:
the receiving and sending module 110 is configured to receive a menu option or a menu keyword of a public number of the communication interaction platform sent by the client;
the matching module 120 is configured to search a menu configuration table matched with menu options or menu keywords in a preset public menu configuration file;
a response module 130, configured to, when the menu configuration table includes logic processing fields, invoke and execute logic processing codes matched with the logic processing fields in the menu configuration table, and obtain a logic processing response result;
the transceiver module 110 is further configured to return the logic processing response result to the client for display.
The device for realizing the public number menu of the communication interaction platform is arranged on a server of the communication interaction platform. The user can install an application client of the communication interaction platform on the intelligent terminal of the user in advance, or directly open a web page of the communication interaction platform through a browser. The present embodiment will collectively refer to the application client and the web page as a client. A user logs in a user account of the communication interaction platform through a client, and when the service of a service provider needs to be obtained, such as consultation, ticket buying, order placing and the like, an interaction window of a public number of the service provider can be opened on the client. At least one menu option is displayed at the appointed position of the interactive window, or an input box is displayed, and the user can click the menu option corresponding to the required service, or directly input the menu keyword corresponding to the required service in the input box. And the client sends the menu options or menu keywords aiming at the public number input by the user to the server and waits for the server to return a response.
The method comprises the steps that a plurality of menu configuration files are preset in a server, each menu configuration file corresponds to a public number, the menu configuration files comprise a plurality of menu configuration tables, each menu configuration table corresponds to one menu option, and at least one menu keyword can be extracted from the content of one menu option, so that the menu configuration tables corresponding to the menu options and the menu keywords also have matching corresponding relations. The server searches a corresponding menu configuration file according to the public number information sent by the client, and then searches a matched menu configuration table in the menu configuration file according to the menu option or the menu keyword sent by the client.
A plurality of fields, such as a name field, a type field, a content field, etc., are included in the menu configuration table. In order to call logic processing codes, such as parameter checking codes, security authority checking codes, service processing codes and the like, logic processing fields special for calling the logic processing codes are also included in the menu configuration table. Logic processing codes for realizing various logics can be stored in a code library in advance, when a certain logic needs to be realized in a certain menu configuration table, a logic processing field is written in the menu configuration table, and key information of the logic processing field is matched with identification information of the logic processing codes of the logic needing to be realized. When the server processes each field in the menu configuration table, if the menu configuration table includes a logic processing field, the server finds a corresponding logic processing code according to the key information of the logic processing field, and invokes the logic processing code to execute relevant logic, for example, invokes a parameter verification code to perform parameter reliability verification, invokes a security permission check code to verify the security of the current account, invokes a service processing code to perform corresponding service logic processing, and the like.
And after calling the logic processing code to complete corresponding logic processing, the server outputs a logic processing response result and returns the logic processing response result to the client through the network. After receiving the logic processing response result, the client searches the corresponding interactive window according to the public number information carried in the response result, and displays the obtained logic processing response result in the interactive window.
The communication interaction platform of the embodiment sets a menu configuration table in advance for the menu options of the public number, and sets a logic processing field in the menu configuration table, which is specially used for calling logic processing codes, so that the logic processing codes of various logics are realized not to be directly written into the code program of each menu option, but the logic processing codes are called through the menu configuration table, thereby avoiding code redundancy caused by repeated codes, the logic processing codes for processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, and meanwhile, when the menu options need to be added, modified or deleted, only the menu configuration table corresponding to the menu options needs to be added, modified or deleted, the influence on each logic processing code can be avoided, the code maintenance is facilitated, and the code stability is ensured.
Further, the response module 130 is further configured to:
when the menu configuration table comprises logic processing fields, searching a code module matched with each logic processing field according to each logic processing field in the menu configuration table; a logic processing field in the menu configuration table corresponds to a code module;
and calling the searched code module, executing the logic processing code in the code module, and obtaining a logic processing response result.
In this embodiment, in order to facilitate calling of the logic processing code, the logic processing code implementing the same logic is packaged into a code module, and the identification information of the code module is the identification information of the logic processing code in the code module. When a certain logic needs to be realized, a logic processing field is written in the menu configuration table, the logic processing field corresponds to a code module of the logic to be realized, and the key information of the logic processing field is matched with the identification information of the corresponding code module.
When the server processes the logic processing field in the menu configuration table, the server finds the corresponding code module according to the key information of the logic processing field, and the code module comprises a logic processing code for realizing the corresponding logic. The server calls the logic processing code in the searched code module, executes the relevant logic, outputs a logic processing response result, and returns the logic processing response result to the client through the network.
Further, the response module 130 is further configured to obtain contents of each non-logical processing field in the menu configuration table;
the transceiver module 110 is further configured to return the obtained content of the non-logical processing field to the client for display.
The menu configuration table of the present embodiment may further include non-logical processing fields, such as name, ID, type, text content, picture link, text link, title, and the like. The menu configuration table may include both the non-logical processing field and the logical processing field, or may include only one of them. For example, the response result of the menu option only needs to output simple words and pictures, and when complex service logic does not need to be executed, the logic processing field is not set in the menu configuration table, only the non-logic processing field is set, and if more complex logic needs to be processed, the logic processing code is called. When the server processes the non-logic processing field, the server directly outputs the content of the non-logic processing field to the client side for displaying without calling a logic processing code, so that the menu response is quicker. Meanwhile, because the non-logic processing field is processed by a simple program, the content of the non-logic processing field is added, modified or deleted very conveniently, and errors are not easy to occur.
Fig. 8 is a schematic block diagram of an apparatus for implementing a public number menu of a communication interaction platform according to a second embodiment of the present invention. This embodiment includes the modules of the embodiment shown in fig. 7, and further includes:
a packaging module 140, configured to package logic processing codes that implement the same logic into one code module;
the entry module 150 is used for receiving code module identification information entered into a logic processing field of the menu configuration table;
and the association module 160 is used for associating the code module matched with the code module identification information with the logic processing field.
In this embodiment, the communication interaction platform stores logic processing codes for implementing various logics into the code base in advance, and encapsulates the logic processing codes for implementing the same logic into one code module. When a certain menu option in the public number needs to realize a certain logic, a developer inputs identification information of a code module for realizing the logic in a logic processing field of a menu configuration table corresponding to the menu option, and key information of the logic processing field is matched with the input code module identification information. The server obtains code module identification information according to the key information of the logic processing field, searches the corresponding code module according to the code module identification information, and associates the code module with the logic processing field, so that the subsequent calling of the code module is facilitated. In the embodiment, a code modularization mode is adopted, the logic processing codes for realizing the same logic are packaged into one code module, and the code module is associated with the logic processing field in the menu configuration table, so that the server can conveniently call the logic processing codes through the menu configuration table, code redundancy is avoided, and the logic processing codes are respectively modified aiming at different code modules when the codes are maintained, thereby being beneficial to code maintenance.
Fig. 9 is a schematic block diagram of a device for implementing a public number menu of a communication interaction platform according to a third embodiment of the present invention. This embodiment includes the modules of the embodiment shown in fig. 8, and further includes a generation module 170;
the entry module 150 is further configured to receive a newly added menu option of the entered public number, and obtain a menu keyword of the newly added menu option;
the generating module 170 is configured to generate a menu configuration table in the menu configuration file of the public number, and correspond the identification information of the menu configuration table to the newly added menu option of the public number and the menu keyword of the newly added menu option.
The embodiment provides an implementation scheme of a newly added menu configuration table. When a menu option needs to be newly added in an interactive window of the public number, a developer inputs the information of the public number and the newly added menu option. And the server calls a drawing tool program to draw the interactive window of the public number according to the information of the newly added menu option, and a menu option is newly added in the interactive window. And meanwhile, the server searches a corresponding menu configuration file according to the recorded public number and generates a new menu configuration table in the menu configuration file. And matching and corresponding the identification information of the newly generated menu configuration table with the newly added menu options by the server, so that the server can find the matched menu configuration table according to the menu options after the user selects the menu options. In addition, the server also extracts at least one menu keyword from the menu options, and matches and corresponds the menu keyword with the identification information of the newly generated menu configuration table, so that the server can also find the matched menu configuration table according to the menu keyword after the user inputs the menu keyword. After the menu configuration table is newly established, a developer inputs the content of the logic processing field in the menu configuration table, and the server associates the logic processing code with the logic processing field, so that the logic processing code is conveniently called subsequently. In the embodiment, a menu configuration file is set for the public number, a menu configuration table in the menu configuration file is associated with menu options of the public number, when a server responds to a certain menu option, the relevant logic processing codes are called through the menu configuration table to realize relevant logics, the logic processing codes for processing the same logic can be called by a plurality of menu configuration tables, the code reuse degree is high, code redundancy caused by repeated codes is avoided, and when the menu option is newly added, modified or deleted, only the menu configuration table corresponding to the menu option needs to be newly added, modified or deleted, so that each logic processing code cannot be influenced, code maintenance is facilitated, and code stability is ensured.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A method for realizing a public number menu of a communication interaction platform is characterized by comprising the following steps:
receiving menu options or menu keywords of a public number of a communication interaction platform sent by a client;
searching a menu configuration table matched with the menu options or the menu keywords in a preset menu configuration file of the public number;
when the menu configuration table comprises logic processing fields, searching a code module matched with each logic processing field according to each logic processing field in the menu configuration table; a logic processing field in the menu configuration table corresponds to one code module;
calling the searched code module, executing a logic processing code in the code module, and obtaining a logic processing response result;
returning the logic processing response result to the client for display;
under the condition of a newly added menu option, receiving the entered newly added menu option of the public number, acquiring a menu keyword of the newly added menu option, generating a new menu configuration table in a menu configuration file of the public number, enabling identification information of the new menu configuration table to correspond to the newly added menu option of the public number and the menu keyword of the newly added menu option, and associating the menu configuration table in the menu configuration file with the code module by using the following operations: packaging logic processing codes for realizing the same logic into a code module; receiving code module identification information which is input into a logic processing field of the menu configuration table; and associating the code module matched with the code module identification information with the logic processing field.
2. The method for implementing the public number menu of the communication interactive platform according to claim 1, wherein the step of searching the menu configuration table matched with the menu option or the menu keyword in the preset menu configuration file of the public number further comprises:
acquiring the content of each non-logic processing field in the menu configuration table;
and returning the acquired contents of the non-logical processing fields to the client for display.
3. A device for realizing a public number menu of a communication interaction platform is characterized by comprising:
the receiving and sending module is used for receiving the menu options or menu keywords of the public number of the communication interaction platform sent by the client;
the matching module is used for searching a menu configuration table matched with the menu options or the menu keywords in a preset menu configuration file of the public number;
the response module is used for searching a code module matched with each logic processing field according to each logic processing field in the menu configuration table when the menu configuration table comprises the logic processing field; a logic processing field in the menu configuration table corresponds to one code module;
calling the searched code module, executing a logic processing code in the code module, and obtaining a logic processing response result;
the receiving and sending module is further used for returning the logic processing response result to the client for displaying;
wherein the apparatus further comprises: the packaging module is used for packaging the logic processing codes for realizing the same logic into a code module; the entry module is used for receiving code module identification information entered into a logic processing field of the menu configuration table; the system comprises a logic processing field, an association module, a generation module and an entry module, wherein the logic processing field is used for storing a logic processing field, the association module is used for associating a code module matched with code module identification information with the logic processing field, the generation module is used for generating a menu configuration table in a menu configuration file of a public number under the condition that the entry module receives a newly added menu option, the identification information of the menu configuration table corresponds to the newly added menu option of the public number and a menu keyword of the newly added menu option, and the entry module is also used for receiving the entered newly added menu option of the public number and acquiring the menu keyword of the newly added menu option.
4. The apparatus for implementing a public number menu of a communication interaction platform according to claim 3, wherein the response module is further configured to obtain the content of each non-logical processing field in the menu configuration table;
and the transceiver module is also used for returning the acquired contents of the non-logic processing fields to the client for display.
5. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to carry out the method of any one of claims 1 to 2 when executed.
6. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 2.
CN201510481450.1A 2015-08-03 2015-08-03 Method and device for realizing public number menu of communication interaction platform Active CN106406844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510481450.1A CN106406844B (en) 2015-08-03 2015-08-03 Method and device for realizing public number menu of communication interaction platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510481450.1A CN106406844B (en) 2015-08-03 2015-08-03 Method and device for realizing public number menu of communication interaction platform

Publications (2)

Publication Number Publication Date
CN106406844A CN106406844A (en) 2017-02-15
CN106406844B true CN106406844B (en) 2020-12-01

Family

ID=58007975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510481450.1A Active CN106406844B (en) 2015-08-03 2015-08-03 Method and device for realizing public number menu of communication interaction platform

Country Status (1)

Country Link
CN (1) CN106406844B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154894B (en) * 2017-05-10 2021-03-23 腾讯科技(深圳)有限公司 Instant messaging information processing method, device, system and storage medium
CN109189502A (en) * 2018-09-17 2019-01-11 网易(杭州)网络有限公司 A kind of message treatment method and relevant device based on instant messaging public platform
CN109377427A (en) * 2018-10-23 2019-02-22 长沙佩拉教育咨询有限公司 The intelligent quick exchange method of education administration system
CN109783491B (en) * 2018-12-29 2021-02-23 北京云联设科技有限公司 Material product information interaction system used in graphic tool and cloud data
CN109814915B (en) * 2018-12-29 2022-07-22 天津字节跳动科技有限公司 Parameter configuration method, device, medium and electronic equipment based on lua
CN110597812B (en) * 2019-09-09 2022-04-15 上海钧正网络科技有限公司 Menu configuration method, device, terminal and readable storage medium
CN111402872B (en) * 2020-02-11 2023-12-19 升智信息科技(南京)有限公司 Voice data processing method and device for intelligent voice dialogue system
CN113031835A (en) * 2021-03-23 2021-06-25 京东数字科技控股股份有限公司 Menu data processing method and device
CN112989206B (en) * 2021-04-22 2021-08-17 畅捷通信息技术股份有限公司 Automatic assembly method, device and medium for finance and tax public number service control
CN114546113A (en) * 2022-02-15 2022-05-27 深圳Tcl新技术有限公司 Menu operation method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641586A (en) * 2004-01-02 2005-07-20 华为技术有限公司 Method for realizing application interface integration and business integration
CN1818905A (en) * 2006-03-09 2006-08-16 董崇军 Method for searching menu
CN101047896A (en) * 2007-04-11 2007-10-03 华为技术有限公司 Value-added service allocation method and value-added service system based on package
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN102567026A (en) * 2011-12-28 2012-07-11 用友软件股份有限公司 Mobile application constructing system and method
CN103425482A (en) * 2012-05-17 2013-12-04 索尼公司 Customization of menus
CN104077133A (en) * 2014-06-24 2014-10-01 中国地质大学(北京) Configuration type menu generating method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7908294B2 (en) * 2006-01-26 2011-03-15 Oracle International Corporation Interoperable management of application servers

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641586A (en) * 2004-01-02 2005-07-20 华为技术有限公司 Method for realizing application interface integration and business integration
CN1818905A (en) * 2006-03-09 2006-08-16 董崇军 Method for searching menu
CN101047896A (en) * 2007-04-11 2007-10-03 华为技术有限公司 Value-added service allocation method and value-added service system based on package
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN102567026A (en) * 2011-12-28 2012-07-11 用友软件股份有限公司 Mobile application constructing system and method
CN103425482A (en) * 2012-05-17 2013-12-04 索尼公司 Customization of menus
CN104077133A (en) * 2014-06-24 2014-10-01 中国地质大学(北京) Configuration type menu generating method

Also Published As

Publication number Publication date
CN106406844A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN106406844B (en) Method and device for realizing public number menu of communication interaction platform
CN102393857B (en) Method and system for local call based on web page
US10572566B2 (en) Image quality independent searching of screenshots of web content
CN111414407A (en) Data query method and device of database, computer equipment and storage medium
US10331441B2 (en) Source code mapping through context specific key word indexes and fingerprinting
US9262311B1 (en) Network page test system and methods
CN103324470A (en) Web system generation method and device
CN109428877B (en) Method and device for accessing service system through user equipment
CN109710220B (en) Relational database query method, relational database query device, relational database query equipment and storage medium
CN111651468A (en) Data updating method and device based on SQL analysis, electronic equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
CN110941779A (en) Page loading method and device, storage medium and electronic equipment
CN113268245A (en) Code analysis method, device and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN110018835B (en) YANG model configuration data processing method and device, terminal device and storage medium
CN110990008A (en) Method, device, storage medium and electronic equipment for updating page
US20140074814A1 (en) Method and apparatus for switching search engine to repeat search
CN103957234A (en) Method for sending download files in browser and browser device
CN108959294B (en) Method and device for accessing search engine
CN111680288A (en) Command execution method, device and equipment for container and storage medium
EP2711838A1 (en) Documentation parser
CN111679828A (en) Data processing method and device, electronic equipment and storage medium
CN111488286B (en) Method and device for independently developing Android modules
US8200713B2 (en) Database exploration for building wireless component applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant