CN117312619A - Character string processing method, device, computer equipment and storage medium - Google Patents

Character string processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117312619A
CN117312619A CN202311239259.7A CN202311239259A CN117312619A CN 117312619 A CN117312619 A CN 117312619A CN 202311239259 A CN202311239259 A CN 202311239259A CN 117312619 A CN117312619 A CN 117312619A
Authority
CN
China
Prior art keywords
character string
character
candidate
character strings
strings
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
CN202311239259.7A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311239259.7A priority Critical patent/CN117312619A/en
Publication of CN117312619A publication Critical patent/CN117312619A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Machine Translation (AREA)

Abstract

The disclosure relates to the technical field of big data processing, and particularly discloses a character string processing method, a character string processing device, a character string processing computer device, a character string storage medium and a character string processing program product. The method is applied to a text development application program and comprises the following steps: determining a plurality of candidate first character strings in response to an input operation of the first character strings, wherein the plurality of candidate first character strings are determined based on the first character strings; determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category; performing format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings; and responding to the selection operation of the candidate second character strings, and determining the candidate second character strings corresponding to the selection operation as the second character strings corresponding to the first character strings. The method can improve the coding efficiency and accuracy.

Description

Character string processing method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of big data processing technologies, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for processing a character string.
Background
A developer may write code using development software to generate program text to implement the corresponding functionality. Based on different development software and different types of program texts, the different program texts with the same function have larger form difference, and the program texts have poorer readability, so that difficulties are brought to subsequent use, modification and adjustment.
Typically, code written by the developer may be formatted to unify the program text. After a developer inputs some specific types of character strings, the corresponding character strings in a unified format are created according to the semantics of the character strings, so that the character strings in the generated program text are more convenient to understand. However, each time a specific type of character string is input, a developer is required to manually add the corresponding character string in a uniform format, a lot of time is required to be consumed, the coding efficiency is low, and the accuracy of the added character string cannot be ensured.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a processing method, apparatus, computer device, computer-readable storage medium, and computer program product for character strings that can improve coding efficiency and accuracy.
In a first aspect, the present application provides a method for processing a character string, where the method is applied to a text development application program, and includes:
determining a plurality of candidate first character strings in response to an input operation of the first character strings, wherein the candidate first character strings are determined based on the first character strings;
determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category;
performing format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings;
and responding to the selection operation of the candidate second character strings, and determining the candidate second character strings corresponding to the selection operation as the second character strings corresponding to the first character strings.
In one embodiment, the determining a plurality of candidate first strings in response to the input operation of the first strings includes:
responding to initial input operation of a character string, and acquiring the character string corresponding to the initial input operation;
under the condition that the character string category of the character string meets a preset condition, determining the character string as a first character string;
And determining a plurality of candidate first character strings according to the first character strings.
In one embodiment, the language class of the candidate first character string is a first language class, and determining, based on semantic information of the candidate first character strings, an initial second character string matched with each candidate first character string to obtain a plurality of initial second character strings includes:
determining a preset database, wherein the preset database comprises character strings of a first language class and corresponding character strings of a second language class;
and determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings, and obtaining a plurality of initial second character strings.
In one embodiment, the determining manner of the preset database further includes:
acquiring a history character string in history input data, wherein the history character string comprises a history first character string of the first language category and a history second character string of the second language category;
and establishing an association relationship between the historical first character string and the historical second character string based on the semantic correspondence between the first language category and the second language category to obtain a preset database.
In one embodiment, the method further comprises:
and under the condition that the first character string is not in the preset database, storing the association relation between the first character string and the second character string into the preset database to obtain an updated preset database.
In one embodiment, the method further comprises:
responding to an installation instruction of a character string conversion plugin, and acquiring a plugin file corresponding to the character string conversion plugin;
and installing the plug-in file into the text development application program and running the plug-in file.
In one embodiment, the method for generating the add-on file includes:
generating an initial plug-in project in response to a generation instruction of the character string conversion plug-in;
acquiring configuration parameters corresponding to the character string conversion plug-in, wherein the configuration parameters are associated with a first language category, a second language category and a preset format;
adjusting the initial plug-in engineering according to the configuration parameters to obtain a character string conversion plug-in engineering;
and generating a plug-in file corresponding to the character string conversion plug-in project.
In a second aspect, the present application further provides a device for processing a character string, where the device is applied to a text development application program, and includes:
The first determining module is used for responding to the input operation of the first character strings and determining a plurality of candidate first character strings, wherein the candidate first character strings are determined based on the first character strings;
the second determining module is used for determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category;
the conversion module is used for carrying out format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings;
and the third determining module is used for responding to the selection operation of the candidate second character strings and determining that the candidate second character strings corresponding to the selection operation are the second character strings corresponding to the first character strings.
In one embodiment, the first determining module includes:
the first acquisition sub-module is used for responding to the initial input operation of the character string and acquiring the character string corresponding to the initial input operation;
the first determining submodule is used for determining that the character string is a first character string under the condition that the character string category of the character string meets a preset condition;
And the second determining submodule is used for determining a plurality of candidate first character strings according to the first character strings.
In one embodiment, the language class of the candidate first character string is a first language class, and the second determining module includes:
a third determining sub-module, configured to determine a preset database, where the preset database includes a character string of a first language class and a corresponding character string of a second language class;
and the fourth determining submodule is used for determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings to obtain a plurality of initial second character strings.
In one embodiment, the determining module of the preset database further includes:
an obtaining unit, configured to obtain a history string in history input data, where the history string includes a history first string of the first language class and a history second string of the second language class;
the establishing unit is used for establishing an association relation between the historical first character string and the historical second character string based on the semantic correspondence relation between the first language category and the second language category to obtain a preset database.
In one embodiment, the apparatus further comprises:
and the updating module is used for storing the association relation between the first character string and the second character string into the preset database under the condition that the first character string is not in the preset database, so as to obtain an updated preset database.
In one embodiment, the apparatus further comprises:
the second acquisition submodule is used for responding to an installation instruction of the character string conversion plugin and acquiring a plugin file corresponding to the character string conversion plugin;
and the installation module is used for installing the plug-in file into the text development application program and running the plug-in file.
In one embodiment, the plug-in file generating module includes:
the first generation sub-module is used for responding to a generation instruction of the character string conversion plug-in and generating an initial plug-in project;
the third obtaining submodule is used for obtaining configuration parameters corresponding to the character string conversion plug-in, and the configuration parameters are associated with a first language category, a second language category and a preset format;
the adjustment module is used for adjusting the initial plug-in engineering according to the configuration parameters to obtain a character string conversion plug-in engineering;
And the second generation sub-module is used for generating plug-in files corresponding to the character string conversion plug-in engineering.
In a third aspect, embodiments of the present disclosure also provide a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments of the present disclosure when the computer program is executed.
In a fourth aspect, embodiments of the present disclosure also provide a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments of the present disclosure.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method according to any of the embodiments of the present disclosure.
The processing method, the processing device, the computer equipment, the storage medium and the computer program product of the character strings are applied to a text development application program, when a user generates a program text through the text development application program, the user responds to input operation of a first character string, determines a plurality of candidate first character strings according to the first character string, obtains a plurality of matched initial second character strings with different language types based on semantic information, converts the format of the initial second character strings to obtain a plurality of candidate second character strings, and determines a second character string corresponding to the first character string according to selection operation; according to the embodiment of the disclosure, after the user inputs the first character string, the candidate second character string in the target format is automatically obtained after the first character string is completed and translated and format converted based on semantic information, then the required English character string is determined based on selection operation, the user does not need to manually translate and format convert based on the input first character string, the corresponding second character string can be automatically generated, the character string input efficiency is improved, the problem of inaccuracy of the second character string caused by user translation errors or format conversion errors and the like is avoided, the character string input accuracy is effectively improved, and the method is applicable to more application scenes; in the embodiment, based on the first character string, the method and the device can automatically complement, and generate a plurality of candidate second character strings for users to select, so that the workload of the users is further reduced, the efficiency and the accuracy of automatically generating the second character strings are improved, and the experience of the users is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is an application environment diagram of a method for processing a character string in one embodiment;
FIG. 2 is a flow chart illustrating a method for processing a character string according to an embodiment;
FIG. 3 is a flow chart illustrating a method for processing a character string according to an embodiment;
FIG. 4 is a flow chart illustrating a method for processing a character string according to an embodiment;
FIG. 5 is a flow chart illustrating a method for processing a character string according to an embodiment;
FIG. 6 is a flow chart illustrating a method for determining a preset database according to an embodiment;
FIG. 7 is a flow diagram of a method of installing a plug-in file in one embodiment;
FIG. 8 is a flow diagram of a manner in which plug-in files are generated in one embodiment;
FIG. 9 is a flow diagram of a method of plug-in generation and installation in one embodiment;
FIG. 10 is a block diagram of a device for processing a character string in one embodiment;
FIG. 11 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The data acquisition, storage, use, processing and the like in the technical scheme meet the relevant regulations of national laws and regulations.
The processing method of the character string provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a method for processing a character string is provided, and an example in which the method is applied to the terminal in fig. 1 is described, and the method is applied to a text development application program, including:
step S210, a plurality of candidate first character strings are determined in response to the input operation of the first character strings, wherein the candidate first character strings are determined based on the first character strings;
the embodiment of the disclosure is applied to a text development application program, wherein a user can write and generate a program text by using the text development application program so as to realize corresponding functions, and the user can write the program text by inputting a character string. In one example, the text development application may include, but is not limited to, intelliJ IDEA, and the program text may include, but is not limited to, POJO (abbreviation for Plain Ordinary Java Object) files. A plurality of candidate first strings are determined in response to an input operation of the first strings. Specifically, when the user inputs the first string, a plurality of candidate first strings may be determined according to the first string input by the user, where an association relationship exists between the plurality of candidate first strings and the first string, in one example, the first strings may be automatically complemented by the first string to obtain a plurality of candidate first strings corresponding to a plurality of different complement modes, for example, the first string is "processing", and the corresponding plurality of candidate first strings may include, but are not limited to, "processing", "processing task number", and the like, and may be specifically determined according to an actual application scenario. In one example, the method for completing the first string may include, but is not limited to, obtaining a plurality of candidate first strings by matching a preset first character database, outputting a plurality of candidate first strings by a string completion model, and the like, where the string completion model may be obtained by training based on a correspondence between a string sample and a completed string label.
Step S220, determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category;
in the embodiment of the disclosure, based on semantic information of candidate first character strings, determining initial second character strings matched with each candidate first character string to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category. Specifically, different language types may be determined according to the actual application scenario, for example, when a character string of a second language type needs to be automatically generated according to a character string of a first language type, the first language type and the second language type may be set as preset language types, and according to semantic information of the candidate first character string, an initial second character string of the second language type is matched for the candidate first character string. In this embodiment, the candidate first strings and the initial second strings are in one-to-one correspondence, and in one example, the initial second strings may be output through a preset translation model, where the preset translation model may perform conversion and output of the language types of the strings.
Step S230, performing format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings;
in the embodiment of the disclosure, format conversion is performed on a plurality of initial second character strings to obtain a plurality of candidate second character strings, wherein the format conversion is used for converting the initial second character strings into character strings with preset formats to obtain the candidate second character strings, the preset formats are determined according to actual application scenes, and the preset formats are determined according to the formats of the character strings required to be automatically generated in the actual application scenes, so that the character strings with uniform formats can be automatically generated according to user input operation. In one example, the preset format may be set to be a hump naming format, the plurality of initial second strings are english strings, and the candidate second strings obtained through format conversion are english strings in the hump naming format.
Step S240, in response to a selection operation on the candidate second strings, determining that the candidate second strings corresponding to the selection operation are second strings corresponding to the first strings.
In the embodiment of the disclosure, in response to a selection operation on the candidate second character strings, it is determined that the candidate second character string corresponding to the selection operation is the second character string corresponding to the first character string. In general, after obtaining a plurality of candidate second strings, the plurality of candidate second strings may be displayed on a display interface for a user to select, according to a string required in an actual application scenario, a target string from the plurality of candidate second strings, that is, the target string is determined as a second string corresponding to the first string.
The embodiment of the disclosure is applied to a text development application program, when a user generates a program text through the text development application program, a plurality of candidate first character strings are determined according to the first character strings in response to input operation of the first character strings, a plurality of matched initial second character strings with different language types are obtained based on semantic information, after format conversion is carried out on the initial second character strings, a plurality of candidate second character strings are obtained, and a second character string corresponding to the first character strings is determined according to selection operation; according to the embodiment of the disclosure, after the user inputs the first character string, the candidate second character string in the target format is automatically obtained after the first character string is completed and translated and format converted based on semantic information, then the required English character string is determined based on selection operation, the user does not need to manually translate and format convert based on the input first character string, the corresponding second character string can be automatically generated, the character string input efficiency is improved, the problem of inaccuracy of the second character string caused by user translation errors or format conversion errors and the like is avoided, the character string input accuracy is effectively improved, and the method is applicable to more application scenes; in the embodiment, based on the first character string, the method and the device can automatically complement, and generate a plurality of candidate second character strings for users to select, so that the workload of the users is further reduced, the efficiency and the accuracy of automatically generating the second character strings are improved, and the experience of the users is improved.
In one embodiment, as shown in fig. 3, the determining a plurality of candidate first strings in response to the input operation of the first strings includes:
step S211, responding to initial input operation of a character string, and acquiring the character string corresponding to the initial input operation;
step S212, determining the character string as a first character string under the condition that the character string category of the character string meets the preset condition;
step S213, determining a plurality of candidate first character strings according to the first character strings.
In the embodiment of the disclosure, when a first character string is acquired, a character string corresponding to an initial input operation is acquired in response to the initial input operation of the character string, the character string is judged, the character string is determined to be the first character string under the condition that the character string category of the character string meets a preset condition, and a plurality of candidate first character strings are determined according to the first character string. The character string category and the preset condition can be obtained according to the actual application scene, and the character string which needs to be automatically generated and converted, namely the first character string, can be determined from the character strings input by the user according to the actual application requirement through the setting of the character string category and the preset condition. For example, when a corresponding character string of a preset format needs to be automatically generated according to a chinese character string input by a user, the character string category at this time may be obtained by dividing according to a language category, and the preset condition may be set such that the character string category is a chinese category. In one example, a listener may be created to listen for an input operation and to sort the string corresponding to the input operation. In one example, when the character string category of the character string does not meet the preset condition, it may be considered that the character string corresponding to the input operation at this time does not need to be processed according to the processing method described in the embodiment, the conversion processing is not performed on the character string at this time, and the character string of the subsequent input operation is continuously acquired to perform the judgment.
Fig. 4 is a flow chart of a processing method of a character string in an embodiment, and referring to fig. 4, the method in this embodiment may be used to automatically generate an english character string named by hump method according to a chinese character string. Specifically, the monitor monitors input operation, when the monitor monitors Chinese character strings, acquires the content of the input Chinese character strings, translates and converts the format according to semantic information of the Chinese character strings to obtain English character strings named by hump method, and generates corresponding English character strings named by hump method below the Chinese character strings in response to clicking operation. In one example, a plurality of candidate english strings may be generated, and in response to a selection operation, the english string corresponding to the selection operation is determined and automatically generated below the chinese string.
According to the embodiment of the disclosure, the character string corresponding to the input operation is judged, and the first character string is determined under the condition that the character string category of the character string meets the preset condition, so that the time for automatically generating the character string can be accurately determined according to the actual application scene, the corresponding character string is determined, subsequent translation and format conversion are facilitated, the efficiency and accuracy of character string conversion generation are improved, the workload of data processing is reduced, the experience of a user is further improved, and the method is suitable for more application scenes.
In one embodiment, as shown in fig. 5, the language class of the candidate first strings is a first language class, and determining, based on semantic information of the candidate first strings, an initial second string that matches each of the candidate first strings, to obtain a plurality of initial second strings includes:
step S221, determining a preset database, wherein the preset database comprises character strings of a first language class and corresponding character strings of a second language class;
step S222, determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings, and obtaining a plurality of initial second character strings.
In the embodiment of the disclosure, when an initial second character string is determined, a preset database is determined, where the preset database includes a first language type character string and a second language type character string, and according to a semantic relationship between different language types, there is a corresponding relationship between the first language type character string and the second language type character string in the preset database, for example, the first language type character string "task" corresponds to the second language type character string "process", the first language type character string "task" corresponds to the second language type character string "task", and so on. Based on the semantic information of the candidate first character strings, initial second character strings matched with the candidate first character strings can be determined from a preset database, and a plurality of initial second character strings are obtained, wherein one candidate first character string can correspond to one or a plurality of initial second character strings. In one example, the character strings stored in the preset database may be character strings in a preset format, or may be plain character strings without a format, which may be specifically determined according to an actual application scenario.
According to the embodiment of the disclosure, the initial second character string matched with the candidate first character string is determined from the preset database according to the association relation between the first language class and the second language class, so that the matching of the character strings is realized, the accuracy and the efficiency of acquiring the initial second character string are improved, the accuracy of the subsequent candidate second character string is ensured, and the data processing workload is reduced; corresponding character strings are determined based on association relations among language categories in a preset database, so that the language categories can be converted in a targeted manner, and the method is suitable for more application scenes.
In one embodiment, as shown in fig. 6, the determining manner of the preset database further includes:
step S610, obtaining a history character string in history input data, wherein the history character string comprises a history first character string of the first language class and a history second character string of the second language class;
step S620, based on the semantic correspondence between the first language category and the second language category, establishing an association between the historical first character string and the historical second character string, thereby obtaining a preset database.
In the embodiment of the disclosure, the preset database can be further determined according to the historical input data. And acquiring a history character string in the history input data, wherein the history character string comprises a history first character string of a first language category and a history second character string of a second language category, and establishing an association relationship between the history first character string and the history second character string based on a semantic correspondence between the first language category and the second language category to obtain a preset database. In one example, the history input data may be determined according to the history data corresponding to the corresponding program text in the specific scenario where the processing method of the character string in the present embodiment is applied, including, but not limited to, the history input data when the user writes the program text using the text development application.
According to the embodiment of the disclosure, the preset database is determined based on the historical input data and the semantic correspondence between the first language category and the second language category, and different preset databases can be determined under different application scenes, so that the preset database can adapt to the character string semantics under a specific application scene, the accuracy of the initial second character string is further improved, the accuracy of the subsequent candidate second character string is ensured, the method and the device are suitable for more application scenes, and the experience of a user is improved.
In one embodiment, the method further comprises:
and under the condition that the first character string is not in the preset database, storing the association relation between the first character string and the second character string into the preset database to obtain an updated preset database.
In the embodiment of the disclosure, when the first character string is not in the preset database, the association relationship between the first character string and the second character string is stored in the preset database, and the preset database is updated to obtain an updated preset database. In an example, the association relationship between the candidate first character string and the corresponding initial second character string may also be stored in a preset database, and may specifically be determined according to an actual application scenario. In one example, when the corresponding formats are stored in the preset database, the corresponding formats can be stored in the preset database together, or the first character string and the second character string can be converted into character strings without formats and stored in the database, so that only the semantic relation between the first character string and the second character string is saved. In an example, the first character string and the second character string may be further checked by using a preset translation model according to an actual application scenario, and the association relationship between the checked first character string and the checked second character string is stored in a preset database.
According to the embodiment of the disclosure, after the second character string corresponding to the first character string is determined, if the first character string is not in the preset database, the association relation between the first character string and the second character string is stored in the preset database, and a new preset database is obtained after updating, so that updating and perfecting of data in the preset database are realized.
In one embodiment, as shown in fig. 7, the method further comprises:
step S710, obtaining a plug-in file corresponding to a character string conversion plug-in response to an installation instruction of the character string conversion plug-in;
and step S720, installing the plug-in file into the text development application program and running the plug-in file.
In the embodiment of the disclosure, in response to an installation instruction of a character string conversion plug-in, a plug-in file corresponding to the character string conversion plug-in is obtained, and the obtained plug-in file is installed in a text development application program and operated. In one example, a plurality of different types of character string conversion plugins may be included, and corresponding plugin files are obtained according to the character string conversion plugins corresponding to the installation instructions. In one example, the add-in file may be stored in a preset local storage area, such as a folder of a local disk; in another example, a plug-in file may be published in a plug-in marketplace, and in response to an installation instruction of a string conversion plug-in, a corresponding plug-in file is obtained from the plug-in marketplace and installation is performed. The source and the acquisition mode of the plug-in file can be obtained according to the actual application scene setting.
According to the embodiment of the disclosure, the corresponding plug-in file is obtained and installed according to the installation instruction of the character string conversion plug-in, so that the text development application program can realize the processing process of the character string by using the character string conversion plug-in, the workload of processing the character string is reduced, the method can be applied to more application scenes based on the form of the plug-in file, the implementation mode is simple, the operability is strong, and the experience of a user is improved.
In one embodiment, as shown in fig. 8, the method for generating the plug-in file includes:
step S810, generating an initial plug-in project in response to a generation instruction of the character string conversion plug-in;
step S820, obtaining configuration parameters corresponding to the character string conversion plug-in, wherein the configuration parameters are associated with a first language category, a second language category and a preset format;
step S830, the initial plug-in engineering is adjusted according to the configuration parameters, and a character string conversion plug-in engineering is obtained;
step S840, generating a plug-in file corresponding to the character string conversion plug-in project.
In the embodiment of the disclosure, the plug-in file can be generated according to the actual application scene. Specifically, in response to a generation instruction of the string conversion plug-in, an initial plug-in project is generated, and in one example, an initial fixed parameter may be included in the initial plug-in project. The method comprises the steps of obtaining configuration parameters corresponding to a character string conversion plug-in, wherein the configuration parameters are associated with a first language type, a second language type and a preset format, and the character string conversion plug-in is used for converting a character string of the first language type into a character string of the second language type with the preset format, so that different language types and preset formats correspond to different configuration parameters, and the corresponding relation between the configuration parameters, the language types and the preset format can be obtained by setting in advance or can be determined by compiling according to actual application scenes. In one example, the configuration parameters may be determined for a configuration parameter input operation based on a user. And adjusting the initial plug-in engineering according to the acquired configuration parameters to obtain the character string conversion plug-in engineering. And generating a corresponding plug-in file according to the obtained character string conversion plug-in engineering for subsequent installation. In one example, the format of the add-in file may be determined according to an actual application scenario, for example, the add-in file may be a jar package.
According to the embodiment of the disclosure, when the character string conversion plug-in is generated, corresponding configuration parameters are configured according to the first language type and the second language type of the corresponding character string to be generated and the preset format, and initial plug-in engineering is adjusted according to the configuration parameters to obtain the corresponding plug-in file, so that the plug-in file can be generated based on different character string conversion application scenes, the adjustment of the configuration parameters is adopted, the implementation mode is simple, the method is suitable for more application scenes, the accuracy and the efficiency of character string generation and conversion are ensured, and the experience of a user is improved.
Fig. 9 is a flowchart of a method for generating and installing a plug-in file according to an exemplary embodiment, and referring to fig. 9, a plug-in project is created, and basic information is filled in according to initial parameters configured by an application scenario, so as to obtain an initial plug-in project. In one example, the information of the plug-in may be filled in to obtain the initial plug-in engineering by configuring plug in. Writing and configuring plug-ins, and obtaining character string conversion plug-ins after running and debugging; and packaging the character string conversion plug-in to obtain the plug-in file. And installing and using the plug-in according to the user instruction, thereby realizing the function of the character string processing method in the embodiment. In one example, when determining configuration parameters, an Action class is created, a java class inheriting AnAction is generated by default, the class rewrites an actionPerformance method, the method is called when the Action of a plugin is clicked, logic in the class is core content, functions to be realized are that an input Chinese character string is automatically generated into an English field named by a hump method, and initial letters are lowercase.
In one embodiment, after the plug-in is configured by the developer in intelllij IDEA, if the POJO file is created, the system automatically prompts the english field named according to hump method only by inputting the chinese meaning of the attribute. After inputting the Chinese character string of the attribute, the system calls the translation interface to obtain the corresponding English character string from the corpus, the corpus automatically stores translated contents, and when the repeated or highly similar character string exists, the corpus searches the saved translation to obtain the closest translation. By the method, the English field named according to the hump method can be automatically generated according to the Chinese meaning of the attribute, the degree of automation is improved, the development time of developers is saved, and the development efficiency is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a character string processing device for realizing the above related character string processing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the processing device for one or more character strings provided below may refer to the limitation of the processing method for a character string hereinabove, and will not be described herein.
In an exemplary embodiment, as shown in fig. 10, there is provided a processing apparatus 1000 for a character string, the apparatus being applied to a text development application, including:
a first determining module 1010, configured to determine a plurality of candidate first strings in response to an input operation of the first strings, where the plurality of candidate first strings are determined based on the first strings;
a second determining module 1020, configured to determine, based on semantic information of the candidate first strings, an initial second string that matches each of the candidate first strings, to obtain a plurality of initial second strings, where the candidate first strings and the initial second strings have different language types;
A conversion module 1030, configured to perform format conversion on the plurality of initial second strings to obtain a plurality of candidate second strings;
and the third determining module 1040 is configured to determine, in response to a selection operation of the candidate second strings, that the candidate second string corresponding to the selection operation is the second string corresponding to the first string.
In one embodiment, the first determining module includes:
the first acquisition sub-module is used for responding to the initial input operation of the character string and acquiring the character string corresponding to the initial input operation;
the first determining submodule is used for determining that the character string is a first character string under the condition that the character string category of the character string meets a preset condition;
and the second determining submodule is used for determining a plurality of candidate first character strings according to the first character strings.
In one embodiment, the language class of the candidate first character string is a first language class, and the second determining module includes:
a third determining sub-module, configured to determine a preset database, where the preset database includes a character string of a first language class and a corresponding character string of a second language class;
and the fourth determining submodule is used for determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings to obtain a plurality of initial second character strings.
In one embodiment, the determining module of the preset database further includes:
an obtaining unit, configured to obtain a history string in history input data, where the history string includes a history first string of the first language class and a history second string of the second language class;
the establishing unit is used for establishing an association relation between the historical first character string and the historical second character string based on the semantic correspondence relation between the first language category and the second language category to obtain a preset database.
In one embodiment, the apparatus further comprises:
and the updating module is used for storing the association relation between the first character string and the second character string into the preset database under the condition that the first character string is not in the preset database, so as to obtain an updated preset database.
In one embodiment, the apparatus further comprises:
the second acquisition submodule is used for responding to an installation instruction of the character string conversion plugin and acquiring a plugin file corresponding to the character string conversion plugin;
and the installation module is used for installing the plug-in file into the text development application program and running the plug-in file.
In one embodiment, the plug-in file generating module includes:
the first generation sub-module is used for responding to a generation instruction of the character string conversion plug-in and generating an initial plug-in project;
the third obtaining submodule is used for obtaining configuration parameters corresponding to the character string conversion plug-in, and the configuration parameters are associated with a first language category, a second language category and a preset format;
the adjustment module is used for adjusting the initial plug-in engineering according to the configuration parameters to obtain a character string conversion plug-in engineering;
and the second generation sub-module is used for generating plug-in files corresponding to the character string conversion plug-in engineering.
The respective modules in the processing device of the character string may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In an exemplary embodiment, a computer device, which may be a terminal, is provided, and an internal structure thereof may be as shown in fig. 11. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of processing a character string. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, user input operation information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (17)

1. A method for processing a character string, the method being applied to a text development application program, comprising:
determining a plurality of candidate first character strings in response to an input operation of the first character strings, wherein the candidate first character strings are determined based on the first character strings;
determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category;
Performing format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings;
and responding to the selection operation of the candidate second character strings, and determining the candidate second character strings corresponding to the selection operation as the second character strings corresponding to the first character strings.
2. The method of claim 1, wherein the determining a plurality of candidate first strings in response to the input operation of the first strings comprises:
responding to initial input operation of a character string, and acquiring the character string corresponding to the initial input operation;
under the condition that the character string category of the character string meets a preset condition, determining the character string as a first character string;
and determining a plurality of candidate first character strings according to the first character strings.
3. The method of claim 1, wherein the language class of the candidate first strings is a first language class, wherein the determining an initial second string matching each of the candidate first strings based on semantic information of the candidate first strings to obtain a plurality of initial second strings comprises:
determining a preset database, wherein the preset database comprises character strings of a first language class and corresponding character strings of a second language class;
And determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings, and obtaining a plurality of initial second character strings.
4. A method according to claim 3, wherein the determining means of the preset database further comprises:
acquiring a history character string in history input data, wherein the history character string comprises a history first character string of the first language category and a history second character string of the second language category;
and establishing an association relationship between the historical first character string and the historical second character string based on the semantic correspondence between the first language category and the second language category to obtain a preset database.
5. A method according to claim 3, characterized in that the method further comprises:
and under the condition that the first character string is not in the preset database, storing the association relation between the first character string and the second character string into the preset database to obtain an updated preset database.
6. The method according to claim 1, wherein the method further comprises:
Responding to an installation instruction of a character string conversion plugin, and acquiring a plugin file corresponding to the character string conversion plugin;
and installing the plug-in file into the text development application program and running the plug-in file.
7. The method according to claim 6, wherein the generating manner of the add-on file includes:
generating an initial plug-in project in response to a generation instruction of the character string conversion plug-in;
acquiring configuration parameters corresponding to the character string conversion plug-in, wherein the configuration parameters are associated with a first language category, a second language category and a preset format;
adjusting the initial plug-in engineering according to the configuration parameters to obtain a character string conversion plug-in engineering;
and generating a plug-in file corresponding to the character string conversion plug-in project.
8. A device for processing a character string, the device being applied to a text development application, comprising:
the first determining module is used for responding to the input operation of the first character strings and determining a plurality of candidate first character strings, wherein the candidate first character strings are determined based on the first character strings;
the second determining module is used for determining initial second character strings matched with each candidate first character string based on semantic information of the candidate first character strings to obtain a plurality of initial second character strings, wherein the candidate first character strings and the initial second character strings are different in language category;
The conversion module is used for carrying out format conversion on the plurality of initial second character strings to obtain a plurality of candidate second character strings;
and the third determining module is used for responding to the selection operation of the candidate second character strings and determining that the candidate second character strings corresponding to the selection operation are the second character strings corresponding to the first character strings.
9. The apparatus of claim 8, wherein the first determining module comprises:
the first acquisition sub-module is used for responding to the initial input operation of the character string and acquiring the character string corresponding to the initial input operation;
the first determining submodule is used for determining that the character string is a first character string under the condition that the character string category of the character string meets a preset condition;
and the second determining submodule is used for determining a plurality of candidate first character strings according to the first character strings.
10. The apparatus of claim 8, wherein the language class of the candidate first string is a first language class, and wherein the second determining module comprises:
a third determining sub-module, configured to determine a preset database, where the preset database includes a character string of a first language class and a corresponding character string of a second language class;
And the fourth determining submodule is used for determining initial second character strings matched with each candidate first character string from the preset database according to semantic information of the candidate first character strings to obtain a plurality of initial second character strings.
11. The apparatus of claim 10, wherein the means for determining the preset database further comprises:
an obtaining unit, configured to obtain a history string in history input data, where the history string includes a history first string of the first language class and a history second string of the second language class;
the establishing unit is used for establishing an association relation between the historical first character string and the historical second character string based on the semantic correspondence relation between the first language category and the second language category to obtain a preset database.
12. The apparatus of claim 10, wherein the apparatus further comprises:
and the updating module is used for storing the association relation between the first character string and the second character string into the preset database under the condition that the first character string is not in the preset database, so as to obtain an updated preset database.
13. The apparatus of claim 8, wherein the apparatus further comprises:
the second acquisition submodule is used for responding to an installation instruction of the character string conversion plugin and acquiring a plugin file corresponding to the character string conversion plugin;
and the installation module is used for installing the plug-in file into the text development application program and running the plug-in file.
14. The apparatus of claim 13, wherein the plug-in file generation module comprises:
the first generation sub-module is used for responding to a generation instruction of the character string conversion plug-in and generating an initial plug-in project;
the third obtaining submodule is used for obtaining configuration parameters corresponding to the character string conversion plug-in, and the configuration parameters are associated with a first language category, a second language category and a preset format;
the adjustment module is used for adjusting the initial plug-in engineering according to the configuration parameters to obtain a character string conversion plug-in engineering;
and the second generation sub-module is used for generating plug-in files corresponding to the character string conversion plug-in engineering.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
17. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311239259.7A 2023-09-22 2023-09-22 Character string processing method, device, computer equipment and storage medium Pending CN117312619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311239259.7A CN117312619A (en) 2023-09-22 2023-09-22 Character string processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311239259.7A CN117312619A (en) 2023-09-22 2023-09-22 Character string processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117312619A true CN117312619A (en) 2023-12-29

Family

ID=89284217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311239259.7A Pending CN117312619A (en) 2023-09-22 2023-09-22 Character string processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117312619A (en)

Similar Documents

Publication Publication Date Title
CN106980504B (en) Application program development method and tool and equipment thereof
US9507480B1 (en) Interface optimization application
AU2016302371A1 (en) Building and managing data-processing attributes for modeled data sources
CN110968601A (en) Data query processing method and device
CN106648569B (en) Target serialization realization method and device
CN112860247B (en) Custom generation method, device, equipment and medium of model component
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN112114787A (en) Report generation method and device and storage medium
CN116028028A (en) Request function generation method, device, equipment and storage medium
KR20140116438A (en) Graphical representation of an order of operations
CN113495730A (en) Resource package generation and analysis method and device
CN114371845A (en) Form generation method and device
US20180314683A1 (en) Method and device for processing natural language
US20220284371A1 (en) Method, device and medium for a business function page
CN115629763A (en) Target code generation method and NPU instruction display method and device
CN117312619A (en) Character string processing method, device, computer equipment and storage medium
WO2022220982A1 (en) Database query execution on multiple databases
CN115145559A (en) Configuration management method, device and equipment based on Flutter
CN111400623B (en) Method and device for searching information
CN113885841A (en) Script generation method and device, electronic equipment and readable medium
CN115686506A (en) Data display method and device, electronic equipment and storage medium
CN112965699B (en) Front-end page generation method, device, computer system and readable storage medium
CN114428823B (en) Data linkage method, device, equipment and medium based on multidimensional variable expression
JP7481056B2 (en) Operation support device, system, method and program
CN114327435A (en) Technical document generation method and device and computer readable 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