CN111124208A - Text sending method and system based on sending button - Google Patents

Text sending method and system based on sending button Download PDF

Info

Publication number
CN111124208A
CN111124208A CN201911351513.6A CN201911351513A CN111124208A CN 111124208 A CN111124208 A CN 111124208A CN 201911351513 A CN201911351513 A CN 201911351513A CN 111124208 A CN111124208 A CN 111124208A
Authority
CN
China
Prior art keywords
button
text
sending
preset
information
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
Application number
CN201911351513.6A
Other languages
Chinese (zh)
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.)
Hunan Sany Intelligent Control Equipment Co Ltd
Sany Heavy Industry Co Ltd
Original Assignee
Hunan Sany Intelligent Control Equipment 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 Hunan Sany Intelligent Control Equipment Co Ltd filed Critical Hunan Sany Intelligent Control Equipment Co Ltd
Priority to CN201911351513.6A priority Critical patent/CN111124208A/en
Publication of CN111124208A publication Critical patent/CN111124208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a text sending method and a system based on a sending button, which are applied to a server or a client and comprise the following steps: acquiring at least one preset text message to be sent; generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button for sending the corresponding preset text message; and transmitting at least one preset text message to the target host based on the activation state of the at least one text transmission button. The invention solves the technical problems of complex sending process and easy error of a plurality of texts with fixed contents in the prior art.

Description

Text sending method and system based on sending button
Technical Field
The invention relates to the technical field of network communication, in particular to a text sending method and a text sending system based on a sending button.
Background
When fixed content needs to be sent to a host device over a network, the fixed content to be sent typically needs to be hard-coded into a program; or fixed content to be transmitted is taken as a parameter of the executable file and then the program is run. If the fixed content to be sent is one of the texts of a plurality of fixed contents, the sent content needs to be manually selected and the program or the command line parameters of the executable file need to be modified, and the traditional method has complex process, is inconvenient and is easy to make mistakes.
Disclosure of Invention
In view of the above, the present invention provides a text sending method and system based on a send button to alleviate the technical problems of the prior art that the sending process of texts with a plurality of fixed contents is complicated and error-prone.
In a first aspect, an embodiment of the present invention provides a text sending method based on a send button, which is applied to a server or a client, and includes: acquiring at least one preset text message to be sent; generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button for sending the corresponding preset text message; and transmitting the at least one preset text message to the target host based on the activation state of the at least one text transmission button.
Further, sending the at least one preset text message to the target host based on the activation status of the at least one text sending button comprises: determining an activated text send button among the at least one text send button; determining preset text information corresponding to the activated text sending button to obtain target text information; and sending preset text information corresponding to the activated text sending button to the target host.
Further, generating a corresponding text transmission button for each preset text message includes: acquiring button information corresponding to each preset text message; and generating a corresponding text sending button for each preset text message based on the button information, wherein one piece of button information corresponds to one text sending button.
Further, determining the preset text information corresponding to the activated text sending button, and obtaining the target text information includes: determining button information corresponding to the activated text sending button in the button information to obtain target button information; and determining preset text information corresponding to the target button information in the at least one preset text information to obtain target text information.
Further, generating a corresponding text transmission button for each preset text message based on the button information includes: generating a user interface based on the button information; and creating the at least one text-send button in the user interface.
Further, before transmitting the at least one preset text message to the target host based on the activation status of the at least one text transmission button, the method further comprises: and establishing a network communication protocol between the server and the target host, and sending the at least one preset text message to the target host after establishing the network communication protocol.
In a second aspect, an embodiment of the present invention further provides a text sending system based on a send button, which is applied to a server or a client, and includes: the system comprises an acquisition module, a generation module and a sending module, wherein the acquisition module is used for acquiring at least one preset text message to be sent;
the generating module is used for generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button used for sending the corresponding preset text message;
the sending module is used for sending the at least one preset text message to the target host based on the activation state of the at least one text sending button.
Further, the system further comprises: and the communication module is used for establishing a network communication protocol between the server and the target host, and sending the at least one preset text message to the target host after the network communication protocol is established.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable medium having non-volatile program code executable by a processor, where the program code causes the processor to execute the method according to the first aspect.
The embodiment of the invention has the following beneficial effects: according to the embodiment of the invention, the at least one preset text message to be sent is acquired, the corresponding text sending button is generated for each preset text message, and the at least one preset text message is sent to the target host based on the activation state of the at least one text sending button, so that a user can send the corresponding preset text message to the target host by activating the text sending button, the sending process is simple, and the accuracy of the sent content is improved because the user does not need to modify the sending program in advance before sending each time. Through the process, the technical problems that the sending process of the texts with a plurality of fixed contents is complex and error is easy in the prior art can be effectively solved.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a text sending method based on a send button according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a text sending system based on a send button according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another text sending system based on a sending button according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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.
The first embodiment is as follows:
fig. 1 is a flowchart of a text sending method based on a send button according to an embodiment of the present invention, which is applied to a server or a client. As shown in fig. 1, the method specifically includes the following steps:
step S102, at least one preset text message to be sent is obtained.
And step S104, generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button for sending the corresponding preset text message.
And step S106, sending at least one preset text message to the target host based on the activation state of at least one text sending button.
Specifically, an activated text sending button is determined in at least one text sending button;
determining preset text information corresponding to the activated text sending button to obtain target text information;
and sending preset text information corresponding to the activated text sending button to the target host.
The embodiment of the invention provides a text sending method based on sending buttons, which is characterized in that at least one preset text message to be sent is acquired, then a corresponding text sending button is generated for each preset text message, and finally at least one preset text message is sent to a target host based on the activation state of at least one text sending button, so that a user can send the corresponding preset text message to the target host by activating the text sending button. Through the process, the technical problems that the sending process of the texts with a plurality of fixed contents is complex and error is easy in the prior art can be effectively solved.
Optionally, in an embodiment of the present invention, step S104 includes the following steps:
step S1041, obtaining button information corresponding to each preset text information;
step S1042, generating a corresponding text sending button for each preset text message based on the button information, where one button information corresponds to one text sending button.
Specifically, a user interface is generated based on the button information; and creating at least one text send button in the user interface.
In an optional implementation manner of the embodiment of the present invention, the preset text information may be obtained by parsing the configuration file.
Specifically, at least one preset text message and button information to be sent are edited into a configuration file, wherein the button information includes names of buttons. For example, the configuration file has the format: the name of the button + one or more spaces + a predetermined text message to be sent after the button is activated. The preset text information is included by English double quotation marks, and if the preset text information has the double quotation marks, escape characters such as 'abd \ shd' are needed.
Optionally, each preset text information and the button information corresponding to the preset text information are edited in the same line in the configuration file.
Preferably, the configuration file does not have empty rows, or if the program reads the configuration file, empty rows are filtered out. For example, one example of profile content is as follows:
Pbtn1“abcde”
Pbtn2“abcdef”
Pbtn3“abcdefg”
Pbtn4“abcdefgh”
Pbtn5“abcdefghi”
Pbtn6“abcdefghij”
Pbtn7“abcdefghijk”
and then, acquiring at least one preset text message to be sent in a mode of analyzing the configuration file through a software program, and generating a corresponding text sending button in a mode of analyzing the configuration file through the software program.
Specifically, the writing program analyzes the configuration file by line, and automatically generates a text sending button according to the following method: the first column of the configuration file is the name of the generated button, and every N buttons form a line in a software User Interface (UI for short); adding N buttons per row on the UI into a landscape layout; finally, the buttons less than N are in a row and are added into a transverse layout; finally, all the horizontal layouts are added to one vertical layout, which allows the size of the text-send button to automatically scale with the size of the UI. When the configuration file is analyzed, the contents of the second column need to be stored in an array, so that the corresponding preset text information to be sent can be found when a subsequent text sending button is activated.
In the method provided in the embodiment of the present invention, before step S106, the method further includes:
and establishing a network communication protocol between the server and the target host, and sending at least one preset text message to the target host after establishing the network communication protocol.
Optionally, at least one of the following network communication protocol connections is implemented in the program: TCP Client communication protocol, TCP Server communication protocol, UDP Client communication protocol and UDP Server communication protocol.
Optionally, in this embodiment of the present invention, determining the preset text information corresponding to the activated text sending button to obtain the target text information includes the following steps:
determining button information corresponding to the activated text sending button in the button information to obtain target button information;
and determining preset text information corresponding to the target button information in the at least one preset text information to obtain the target text information.
For example, the processing function corresponding to each text sending button when being clicked (or activated) is set as the same function, and in the processing function, it is first to identify which text sending button is clicked (or activated), and then to send the preset text information of the second column corresponding to the text sending button to the target host computer by using the communication method implemented above.
As can be seen from the above description, in the text sending method based on the sending button provided in the embodiment of the present invention, when several fixed network messages or text messages (whose contents may also need to be changed at any time) need to be sent in a scene (one of the fixed network messages or text messages is sent each time), only the configuration file needs to be changed, and the software program does not need to be changed, and the corresponding preset text messages can be sent out by activating the generated text sending button, so that the debugging efficiency can be greatly improved. For example, when a single unit is debugged before an Automated Guided Vehicle (AGV) and a scheduling system are jointly debugged, several instructions sent by the scheduling system may be stored in a configuration file, and each instruction is named as a name of an automatically generated text sending button, so that the execution condition of the AGV on the instruction can be debugged without accessing an actual scheduling system.
Example two:
fig. 2 is a schematic diagram of a text sending system based on a sending button, which is applied to a server or a client according to an embodiment of the present invention. As shown in fig. 2, the system includes: the device comprises an acquisition module 10, a generation module 20 and a sending module 30.
Specifically, the obtaining module 10 is configured to obtain at least one preset text message to be sent.
The generating module 20 is configured to generate a corresponding text sending button for each preset text message to obtain at least one text sending button, where the text sending button is a button used for sending the corresponding preset text message.
Specifically, the generating module 20 is further configured to: acquiring button information corresponding to each preset text message; and generating a corresponding text sending button for each preset text message based on the button information, wherein one piece of button information corresponds to one text sending button.
Specifically, a user interface is generated based on the button information; and creating at least one text send button in the user interface.
And a sending module 30, configured to send at least one preset text message to the target host based on the activation status of the at least one text sending button.
Specifically, the sending module 30 is configured to: determining an activated text send button among the at least one text send button;
determining preset text information corresponding to the activated text sending button to obtain target text information; specifically, button information corresponding to the activated text sending button is determined in the button information, and target button information is obtained; determining preset text information corresponding to the target button information in at least one preset text information to obtain target text information;
and sending preset text information corresponding to the activated text sending button to the target host.
In the text sending system based on the sending button provided by the embodiment of the invention, the acquisition module is used for acquiring at least one preset text message to be sent, the generation module is used for generating a corresponding text sending button for each preset text message, and the sending module is used for sending the at least one preset text message to the target host based on the activation state of the at least one text sending button, so that a user can send the corresponding preset text message to the target host by activating the text sending button. Through the process, the technical problems that the sending process of the texts with a plurality of fixed contents is complex and error is easy in the prior art can be effectively solved.
Optionally, fig. 3 is a schematic diagram of another text sending system based on a send button according to an embodiment of the present invention, and as shown in fig. 3, the system further includes: and the communication module 40 is configured to establish a network communication protocol between the server and the target host, and send at least one preset text message to the target host after establishing the network communication protocol.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the steps of the method in the first embodiment are implemented.
The embodiment of the invention also provides a computer readable medium with a non-volatile program code executable by a processor, wherein the program code causes the processor to execute the method in the first embodiment.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A text sending method based on a sending button is applied to a server or a client and comprises the following steps:
acquiring at least one preset text message to be sent;
generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button for sending the corresponding preset text message;
and transmitting the at least one preset text message to the target host based on the activation state of the at least one text transmission button.
2. The method of claim 1, wherein sending the at least one preset text message to the target host based on the activation status of the at least one text-send button comprises:
determining an activated text send button among the at least one text send button;
determining preset text information corresponding to the activated text sending button to obtain target text information;
and sending preset text information corresponding to the activated text sending button to the target host.
3. The method of claim 2, wherein generating a corresponding text send button for each preset text message comprises:
acquiring button information corresponding to each preset text message;
and generating a corresponding text sending button for each preset text message based on the button information, wherein one piece of button information corresponds to one text sending button.
4. The method of claim 3, wherein determining the preset text information corresponding to the activated text sending button to obtain the target text information comprises:
determining button information corresponding to the activated text sending button in the button information to obtain target button information;
and determining preset text information corresponding to the target button information in the at least one preset text information to obtain target text information.
5. The method of claim 3, wherein generating a corresponding text transmission button for each preset text message based on the button information comprises:
generating a user interface based on the button information; and creating the at least one text-send button in the user interface.
6. The method of claim 1, wherein before sending the at least one preset text message to the target host based on the activation status of the at least one text send button, the method further comprises:
and establishing a network communication protocol between the server and the target host, and sending the at least one preset text message to the target host after establishing the network communication protocol.
7. A text transmission system based on a transmission button, applied to a server or a client, comprising: an acquisition module, a generation module and a sending module, wherein,
the acquisition module is used for acquiring at least one preset text message to be sent;
the generating module is used for generating a corresponding text sending button for each preset text message to obtain at least one text sending button, wherein the text sending button is a button used for sending the corresponding preset text message;
the sending module is used for sending the at least one preset text message to the target host based on the activation state of the at least one text sending button.
8. The system of claim 7, further comprising: and the communication module is used for establishing a network communication protocol between the server and the target host, and sending the at least one preset text message to the target host after the network communication protocol is established.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of the preceding claims 1 to 6 are implemented when the computer program is executed by the processor.
10. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1-6.
CN201911351513.6A 2019-12-24 2019-12-24 Text sending method and system based on sending button Pending CN111124208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911351513.6A CN111124208A (en) 2019-12-24 2019-12-24 Text sending method and system based on sending button

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911351513.6A CN111124208A (en) 2019-12-24 2019-12-24 Text sending method and system based on sending button

Publications (1)

Publication Number Publication Date
CN111124208A true CN111124208A (en) 2020-05-08

Family

ID=70502162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911351513.6A Pending CN111124208A (en) 2019-12-24 2019-12-24 Text sending method and system based on sending button

Country Status (1)

Country Link
CN (1) CN111124208A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970662A (en) * 2014-05-22 2014-08-06 于秀山 Method and system for obtaining boundary value input through GUI software
CN105117339A (en) * 2015-08-27 2015-12-02 广州市百果园网络科技有限公司 Method and apparatus for debugging native command debugging program by utilizing plugin
CN107066244A (en) * 2016-12-12 2017-08-18 广州神马移动信息科技有限公司 The generation method and device of a kind of mobile terminal application interface
CN107992305A (en) * 2017-12-29 2018-05-04 广州酷狗计算机科技有限公司 The layout method and device of function of application button
CN108089857A (en) * 2017-12-05 2018-05-29 广东雅达电子股份有限公司 A kind of industry web monitors the generation method of the page in real time
CN109086110A (en) * 2018-07-03 2018-12-25 深圳鼎盛电脑科技有限公司 A kind of display methods of business information, device, terminal and storage medium
CN109710753A (en) * 2018-12-29 2019-05-03 北京金山安全软件有限公司 Method and device for generating shortcut information based on personalized theme and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970662A (en) * 2014-05-22 2014-08-06 于秀山 Method and system for obtaining boundary value input through GUI software
CN105117339A (en) * 2015-08-27 2015-12-02 广州市百果园网络科技有限公司 Method and apparatus for debugging native command debugging program by utilizing plugin
CN107066244A (en) * 2016-12-12 2017-08-18 广州神马移动信息科技有限公司 The generation method and device of a kind of mobile terminal application interface
CN108089857A (en) * 2017-12-05 2018-05-29 广东雅达电子股份有限公司 A kind of industry web monitors the generation method of the page in real time
CN107992305A (en) * 2017-12-29 2018-05-04 广州酷狗计算机科技有限公司 The layout method and device of function of application button
CN109086110A (en) * 2018-07-03 2018-12-25 深圳鼎盛电脑科技有限公司 A kind of display methods of business information, device, terminal and storage medium
CN109710753A (en) * 2018-12-29 2019-05-03 北京金山安全软件有限公司 Method and device for generating shortcut information based on personalized theme and electronic equipment

Similar Documents

Publication Publication Date Title
EP3011442B1 (en) Method and apparatus for customized software development kit (sdk) generation
CN107508720B (en) Automatic testing method and device
US10958615B2 (en) Communication message consolidation with content difference formatting
CN110008195B (en) Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)
CN105739963A (en) Method and device for generating webpage
CN111222070A (en) Data processing method, device, equipment and storage medium
JP6093449B2 (en) Homepage forming method, peripheral device, and homepage forming system
CN108632361B (en) Webpage online method, server, system and storage medium
CN110727429B (en) Front-end page generation method, device and equipment
CN108170409B (en) Development method and system of WEB front-end control
CN112612452A (en) API platform implementation method, device, equipment and storage medium
CN112269746A (en) Automatic testing method and related equipment
CN111723019A (en) Interface debugging method and system
CN106708717B (en) A kind of exploitation adjustment method and device
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN111124208A (en) Text sending method and system based on sending button
CN110377888B (en) HTML-based manuscript auditing editor real-time trace marking method and device
CN113516729A (en) Chart drawing method and device and computer readable storage medium
CN109413115B (en) Protocol text analysis method and system
CN116756456A (en) Webpage end word segmentation method and device, storage medium and terminal
CN110874278A (en) Embedding method of external system, workflow system, device and storage medium
CN110472171A (en) Method, plug-in system, equipment and storage medium based on plug-in unit uploading pictures
CN113971251A (en) Webpage output method, system and computer readable storage medium
US20140351688A1 (en) Image Forming Apparatus and Method for Adding Webpage Language Without Updating Controller Firmware
CN112686017A (en) Mail report management method, system, device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication