Text input methods and devices, storage media and electronic devices

By acquiring users' handwritten font styles and converting them into target handwritten font content, the problem of easily forged conversation profile information in social software is solved, achieving secure and reliable conversation display and improving the security and authenticity of communication.

CN116954463BActive Publication Date: 2026-11-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210386363.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2026-11-17
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

Conversation profiles in existing social media apps are easily forged, resulting in low conversation security.

Method used

By acquiring the user's handwriting font style, converting it into target handwriting font content, and displaying it in the conversation interaction area, a unique style of conversation text display is provided to prevent conversation text from being forged.

Benefits of technology

It enhances the security of conversation text, prevents conversation content from being tampered with, provides personalized conversation display styles, and strengthens the security and authenticity of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116954463B_ABST
    Figure CN116954463B_ABST
Patent Text Reader

Abstract

This invention discloses a text input method, apparatus, storage medium, and electronic device. The method includes: acquiring the current font content; acquiring a target handwritten font corresponding to a target object; sharing the target handwritten font content corresponding to the current font content in response to an operation performed on a session sharing control, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; and displaying the target handwritten font content in a session interaction area. This invention solves the technical problem of low session security in existing text input methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically, to a text input method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] With the development of mobile internet, internet users are increasingly accustomed to communicating through social media apps. Nowadays, in many social media apps, people typically communicate via voice or text. The content exchanged between the two parties generally uses the system's default font. The conversation profile information generated during these conversations is often stored on the social media app's client, making it easy for other users to forge this information.

[0003] In other words, the text input methods provided in related technologies suffer from low session security due to the ease with which session profile information can be forged.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a text input method and apparatus, a storage medium and an electronic device, to at least solve the technical problem of low session security in existing text input methods.

[0006] According to one aspect of the present invention, a text input method is provided, comprising: acquiring current font content; acquiring a target handwritten font corresponding to a target object; sharing the target handwritten font content corresponding to the current font content in response to an operation performed on a session sharing control, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; and displaying the target handwritten font content in a session interaction area.

[0007] According to another aspect of the present invention, a text input method is provided, comprising: acquiring current font content sent by a first client; determining a target handwritten font corresponding to a target object; converting the current font content according to the target handwritten font to obtain target handwritten font content; and pushing the target handwritten font content to the first client and a second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

[0008] According to another aspect of the present invention, a text input device is also provided, comprising: a first acquisition unit for acquiring current font content input; a second acquisition unit for acquiring a target handwritten font corresponding to a target object; a sharing unit for sharing the target handwritten font content corresponding to the current font content in response to an operation performed on a session sharing control, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; and a display unit for displaying the target handwritten font content in a session interaction area.

[0009] According to another aspect of the present invention, a text input device is also provided, comprising: an acquisition unit for acquiring current font content sent by a first client; a determination unit for determining a target handwritten font corresponding to a target object; a conversion unit for converting the current font content according to the target handwritten font to obtain target handwritten font content; and a push unit for pushing the target handwritten font content to the first client and a second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

[0010] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the above-described text input method at runtime.

[0011] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the text input method as described above.

[0012] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the above-described text input method through the computer program.

[0013] In this embodiment of the invention, the following steps are taken: First, the current font content is obtained. Second, a target handwritten font corresponding to the target object is obtained. Third, in response to an operation performed on the conversation sharing control, the target handwritten font content corresponding to the current font content is shared. The target handwritten font content is obtained by converting the current font content according to the target handwritten font. Fourth, the target handwritten font content is displayed in the conversation interaction area. This transforms the user's handwritten text into conversation text with a style consistent with the user's handwritten text, thus providing the user with a personalized conversation text display style. This solves the technical problem of low conversation security in existing text input methods. Attached Figure Description

[0014] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0015] Figure 1 This is a schematic diagram of the hardware environment for an optional text input method according to an embodiment of the present invention;

[0016] Figure 2 This is a flowchart of an optional text input method according to an embodiment of the present invention;

[0017] Figure 3 This is a schematic diagram of an optional text input method according to an embodiment of the present invention;

[0018] Figure 4 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0019] Figure 5 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0020] Figure 6 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0021] Figure 7 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0022] Figure 8 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0023] Figure 9 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0024] Figure 10 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0025] Figure 11 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0026] Figure 12 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0027] Figure 13 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0028] Figure 14 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0029] Figure 15 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0030] Figure 16 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0031] Figure 17 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0032] Figure 18 This is a schematic diagram of another optional text input method according to an embodiment of the present invention;

[0033] Figure 19 This is a flowchart of another optional text input method according to an embodiment of the present invention;

[0034] Figure 20 This is a schematic diagram of the structure of an optional text input device according to an embodiment of the present invention;

[0035] Figure 21 This is a schematic diagram of the structure of another optional text input device according to an embodiment of the present invention;

[0036] Figure 22 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention;

[0037] Figure 23 This is a schematic diagram of the structure of another optional electronic device according to an embodiment of the present invention. Detailed Implementation

[0038] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0040] It is understood that in the specific implementation of this application, data related to the handwritten text images and handwritten font style information of the target object are involved. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the authorization or consent of the target object, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0041] It should be noted that, in the specific implementation of this application, the above-mentioned operation method can refer to operations such as transfer, extraction, and recharge of virtual resources performed through the platform; the above-mentioned target identifier is an identifier object on the virtual platform used to identify the operator of the above-mentioned behavior, and can be used to determine the operator who actually performs the above-mentioned operation.

[0042] The following explains the technical terms that appear in this application:

[0043] Electronic data refers to objective information, including text, graphic symbols, numbers, and letters, formed using electronic technologies such as computer applications, communication, and modern management techniques.

[0044] SVG (Scalable Vector Graphics) is a font format that improves upon vector graphics. It is smaller in size than vector graphics and is suitable for use on mobile devices.

[0045] Generative Adversarial Networks (GANs) are deep learning models and one of the most promising unsupervised learning methods on complex distributions in recent years. The model produces reasonably good outputs through a game-like learning process between (at least) two modules in its framework: a generative model and a discriminative model.

[0046] VGG19 (Visual Geometry Group Network) is an extremely deep, large-scale image recognition convolutional network. The first few layers use only 3×3 convolutional kernels to increase network depth, and max pooling is used to progressively reduce the number of neurons in each layer. The last three layers consist of two fully connected layers with 4096 neurons each and a softmax layer. VGG19 has a total of 19 layers.

[0047] Downsampling / upsampling: In this article, it can be simply understood as shrinking / enlarging the image.

[0048] Residual Networks: Residual networks are deep convolutional networks proposed in 2015. Upon their introduction, they won the ImageNet awards in image classification, detection, and localization. Residual networks are easy to optimize and their accuracy can be improved by significantly increasing their depth.

[0049] Hash: It is the process of transforming input data of arbitrary length into a fixed-length output through a hash algorithm. This output is called the hash value.

[0050] According to one aspect of the present invention, a text input method is provided. As an optional implementation, the above-described text input method can be applied to, but is not limited to, [examples of other methods]. Figure 1 The text input system shown consists of server 102 and terminal device 104. For example... Figure 1As shown, server 102 is connected to terminal device 104 via network 110. This network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks enabling wireless communication. The terminal device can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, in-vehicle devices, etc. The terminal device can have a client installed, such as an instant messaging application client, an audio / video application client, a shopping application client, etc. The terminal device also includes a display, a processor, and a memory. The processor can preprocess the acquired current font content, for example, converting the acquired target image displaying handwritten text into a predefined format for uploading to the server for handwritten font style recognition. The memory stores the handwritten font styles returned by the server. Server 102 can be a single server, a server cluster consisting of multiple servers, or a cloud server. The server includes a database and a processing engine.

[0051] According to one aspect of the present invention, the above-described text input system may further perform the following steps: the terminal device 104 performs steps S102 to S104 to obtain the input current font content; obtains the target handwritten font corresponding to the target object; then performs step S106, the terminal device 104 sends the current font content to the server 102 through the network 110; the server 102 performs step S108 to convert the current font content according to the target handwritten font to obtain the current font content; then performs step S110 to return the current font content to the terminal device 104 through the network 110; the terminal device 104 performs steps S112 to S114 to share the target handwritten font content corresponding to the current font content in response to the operation performed on the session sharing control; and displays the target handwritten font content in the session interaction area.

[0052] In this embodiment of the invention, the current font content is obtained; the target handwritten font corresponding to the target object is obtained; in response to the operation performed on the conversation sharing control, the target handwritten font content corresponding to the current font content is shared, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; the target handwritten font content is displayed in the conversation interaction area, thereby converting the conversation text to be sent by the user into conversation text with the same style as the user's handwritten text, thus providing the user with a personalized conversation text display style, avoiding the user's conversation text from being forged, improving the security of the conversation text, and thus solving the technical problem of low conversation security in existing text input methods.

[0053] The above is merely an example, and no limitation is made in this embodiment.

[0054] It should be noted that existing legal provisions regarding the use of original session files as electronic evidence are as follows: In order to address the difficulty in identifying electronic evidence and to unify the standards for the application of law, Article 14 of the newly revised "Provisions of the Supreme People's Court on Several Issues Concerning Evidence in Civil Litigation" stipulates that original electronic data under instant messaging can be used as valid electronic evidence.

[0055] However, the above methods suffer from drawbacks because user conversation logs are stored on the client-side, making them prone to loss and difficult to back up. Furthermore, in many important scenarios, users only save conversation logs via screenshots, making it difficult to require both parties to produce the original logs in case of legal disputes. Additionally, in public opinion incidents arising from screenshot sharing, such as the public disclosure of conversation logs between a public figure and a third party, the public figure lacks the ability to effectively refute such claims.

[0056] Existing methods of using third-party personalized signatures on mobile terminals as electronic evidence include: for behaviors involving virtual resource transactions in user text communication, the validity of the evidence can be proven by signing electronic receipts or contracts through a third-party program.

[0057] However, in the above methods, the user experience is poor when redirected to a third-party platform to sign an agreement. For example... Figure 3 As shown, in chats involving small amounts of money lending, communication about a specific matter or person, users often avoid signing legally binding documents based on personal relationships. Furthermore, handwritten signatures on mobile devices offer a poor user experience, lower recognition accuracy compared to offline handwriting analysis, and are also more expensive.

[0058] As an optional implementation method, such as Figure 2 As shown, the above text input method includes the following steps:

[0059] S202, Get the current font content of the input;

[0060] It is understood that the steps described above for obtaining the current font content can be implemented on the target terminal. Specifically, the current font content can be the text content entered by the target object in the input box through the instant messaging client; in another optional way, the font content can also be the image content entered by the target object in the input box of the client, the image including the text to be sent; in yet another optional way, the font content can also be the voice content sent by the target object through the client's voice. The specific form of the current font content is not limited here.

[0061] S204, Obtain the target handwritten font corresponding to the target object;

[0062] It should be noted that the target object mentioned above can be a user logged in on the current client, or it can be a user different from the user logged in on the current client. The target handwritten font mentioned above is a pre-stored handwritten font that matches the target object. It can be understood that the target handwritten font in this embodiment can be used for feature recognition of the target object. For example, for the first object, a matching handwritten font A can be pre-stored in the client, and for the second object, a matching handwritten font B can be pre-stored in the same client;

[0063] Furthermore, before obtaining the target handwritten font corresponding to the target object, the current target object's authentication information can be obtained, and the target handwritten font matching the authentication information can be provided to the target object for selection and acquisition. It should be noted that when the above embodiments of this application are applied to specific products or technologies, authorization or consent from the target object is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0064] S206, in response to the operation performed on the session sharing control, share the target handwritten font content corresponding to the current font content, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font;

[0065] In this embodiment, if the target handwritten font corresponding to the target object is obtained, the currently obtained font content can be converted into target handwritten font content that matches the target handwritten font.

[0066] It is understood that the target handwritten font content can be either text or image content. For example, if the target handwritten font content is text, the characters in the target font content are the same as the characters in the currently acquired font content, and the font style of the target handwritten font content matches the font style of the target handwritten font. If the target handwritten font content is an image, the characters in the target handwritten font image content are the same as the characters in the currently acquired font content, and the font style of the target handwritten font image content matches the font style of the target handwritten font. No restrictions are placed on the specific form of the target handwritten content.

[0067] In a specific way, such as Figure 3 As shown, one way to display the target handwritten font corresponding to the target object is to display the input content of the target object in the target handwritten font style. For example... Figure 3 In the current input text, if the input text is "I will definitely pay next month", the system retrieves the selection operation for the handwritten text created on "2021-11-23" and then displays the selected text created on "2021-11-23" with a bold border. If the system retrieves the selection operation for the target handwritten text in the candidate box, it determines the target handwritten text corresponding to the target object. Then, as follows... Figure 3 As shown, the content to be entered for the current target object is "I will definitely pay next month". In the selection area of ​​the conversation window, the font created with a bold border "2021-11-23" is displayed, and the currently entered text content "I will definitely pay next month" is displayed as a candidate in this font style.

[0068] S208, Display the target handwritten font content in the conversation interaction area.

[0069] The following combination Figure 3 , Figure 4 , Figure 5 A specific embodiment of the above-described implementation of this application will be described.

[0070] like Figure 3 As shown, the target object and the conversation object communicate in a conversation window. A "+" control is displayed at the bottom of the conversation window, along with "Scan Handwritten Font," indicating that a new handwritten style font can be added using this control. The right side of the "+" control displays the handwritten style font created and added on "2021-11-23." If the conversation window retrieves the target object's current font content, "I will definitely repay next month," the retrieved target handwritten font corresponding to the target object is displayed at the bottom of the conversation window, effectively converting "I will definitely repay next month" into the target handwritten font content to be shared. For example... Figure 4 As shown, when a touch operation is detected on the session sharing control 401 by the target object, in response to the operation performed on the session sharing control 601, the handwritten text "I will definitely pay you back next month" is displayed in the interactive area of ​​the session window.

[0071] like Figure 5 As shown, in another optional implementation, the target object selected the handwritten font created on "2021-11-23" before the session began. It can be observed that during the dialogue between the target object and the session object, the target object's text content is displayed as conversational text matching the target object's handwritten font style. Furthermore, the text content of the loan request submitted by the target object to the session object carries the characteristics of the target object's handwritten font style.

[0072] In this embodiment of the invention, the current font content is obtained; the target handwritten font corresponding to the target object is obtained; in response to the operation performed on the conversation sharing control, the target handwritten font content corresponding to the current font content is shared, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; the target handwritten font content is displayed in the conversation interaction area, thereby converting the conversation text to be sent by the target object into conversation text with the same style as the target object's handwritten text, thus providing the target object with a unique style of conversation text display, making it difficult for the target object's conversation text to be forged, improving the conversation security of the target object, and solving the technical problem of low conversation security in existing text input methods.

[0073] As an optional implementation, obtaining the target handwritten font corresponding to the target object includes:

[0074] S1, display at least one handwritten font style control in the session configuration area corresponding to the session interaction area, wherein each handwritten font style control corresponds to a handwritten font configured for the target object;

[0075] S2, in response to an operation performed on a target font style control in at least one handwritten font style control, obtains the target handwritten font.

[0076] Specifically, in a display method for a target handwriting-style control, such as Figure 6 As shown, the current client pre-stores different fonts created from multiple target objects, and identifies and displays the target object that created that font, along with the corresponding handwritten content, under each font. For example... Figure 6In the current target object, the content to be entered is "I will definitely pay next month". In the selection area of ​​the conversation window, two fonts, "Xiao Wang created" and "Lao Wang created", are displayed, and the handwritten text "I will definitely pay next month" is displayed as candidate text in two different handwritten font styles.

[0077] In another way of displaying the target handwriting style control, such as Figure 7 As shown, if multiple target objects with different fonts are pre-stored in the current client, and the current target object inputs "I will definitely pay next month", the text content of "Xiao Wang font" and "Lao Wang font" will be displayed in different handwritten font styles in the selection area of ​​the session window.

[0078] Understandably, based on the two display methods mentioned above, if the selection operation of one of the multiple handwritten fonts in the selected area is detected, the selected handwritten font can be determined as the target handwritten font.

[0079] Through the above-described embodiments of this application, at least one handwritten font style control is displayed in the session configuration area corresponding to the session interaction area, wherein each handwritten font style control corresponds to a handwritten font configured for the target object; in response to the operation performed on the target font style control in the at least one handwritten font style control, the target handwritten font is obtained, thereby enabling different fonts to be pre-stored for different objects, thereby realizing quick conversion between different handwritten fonts and improving the efficiency of session communication.

[0080] As an optional implementation, after displaying the target handwritten font content in the session interaction area, the method further includes: in response to an operation performed on a reference font style control in at least one handwritten font style control, switching the target handwritten font to the handwritten font indicated by the reference font style control.

[0081] The following combination Figure 8 , Figure 9 The above methods will be explained. For example... Figure 8 As shown, the font candidate area displays the reference font style controls "Old Wang Font" and "Little Wang Font". When "Little Wang Font" is selected, if the text content "I'm a little short on cash lately, can I borrow 10,000 yuan to tide me over?" has been sent, the first target handwritten font content displayed in the conversation interaction area is the text content "I'm a little short on cash lately, can I borrow 10,000 yuan to tide me over?" which matches the font style of "Little Wang Font". At the same time, the border of the "Little Wang Font" control is displayed in bold.

[0082] Then as Figure 9As shown, if a selection operation on the font style control "Lao Wang Font" is detected before sending the text "Thank you, thank you!", the border of the "Lao Wang Font" control is displayed in bold on the interface. If an operation on the conversation sharing control is detected, the target handwritten font content matching the handwriting style of the "Lao Wang Font" control is displayed in the conversation interaction area.

[0083] The method described in this application achieves the technical effect of quickly switching between multiple fonts and improving the display efficiency of fonts in conversational communication by responding to an operation performed on a reference font style control in at least one handwritten font style control, thereby switching the target handwritten font to the handwritten font indicated by the reference font style control.

[0084] As an optional implementation, obtaining the target handwritten font corresponding to the target object includes:

[0085] S1, in response to the camera being turned on, scans the reference handwritten text provided by the target object;

[0086] S2, identify and obtain the target handwritten font from the scanned reference handwritten text.

[0087] It should be noted that the steps described above for scanning the reference handwritten text provided by the target object can be implemented on the target terminal. On the target terminal, the target object can be prompted to input an image displaying the handwritten text via text prompts or dialog box prompts. The method for scanning the reference handwritten text can be to utilize the target terminal's camera component, capturing an image as the target image. It should be noted that the handwritten text can be a paragraph or sentence chosen and written by the target object based on a text selection prompt provided by the target terminal; or it can be text written by the target object according to the prompts provided by the target terminal. It should be further explained that the handwritten text mentioned above refers to text content handwritten by the target object, distinct from machine-generated or printed text.

[0088] As an alternative approach, when a scanned image of the reference handwritten text is obtained, the content in the image can first be subjected to feature recognition to determine that the content in the image is text content. Then, the extracted text content is compared with the features of machine fonts and printed fonts to determine that the text content in the image is the handwritten text content of the target object. Finally, the scanned image after feature recognition and font recognition is used as the target image for obtaining the target handwritten font.

[0089] Upon first obtaining the target image used to identify the target handwritten font, the target image can be uploaded to the server for further handwritten font style recognition to accurately determine the font style of the handwritten text displayed in the target image. Specific identification information of the target object is then added to the identified font style to achieve the formation of unalterable text display content based on the identified font.

[0090] Furthermore, as an alternative approach, after the server performs initial font style recognition based on the uploaded target image, a font package with the identified handwritten font style can be placed on the client side. In subsequent use, the font can be converted with one click by selecting the handwritten font on the client side, without having to frequently upload target images for recognition.

[0091] Understandably, if the handwritten font recognition is successful, a pop-up window can be displayed to indicate that the handwritten font style recognition of the current target object is complete.

[0092] In one specific implementation, such as Figure 10 As shown, when a touch operation is received on the "Scan Handwritten Font" control, a target image displaying handwritten text is obtained. The target image is then recognized on the server to identify the corresponding target handwritten font style, as follows: Figure 10 As shown, the message "Handwritten font created successfully!" is displayed in the chat window, and the handwritten font style "Created on 2011-11-23" is displayed at the bottom of the chat window.

[0093] Through the above-described embodiments of this application, in response to the camera activation operation, reference handwritten text provided by the target object is scanned; the target handwritten font is identified and obtained from the scanned reference handwritten text, thereby achieving the technical effect of identifying a handwritten font that matches the handwriting style of the target object based on the handwritten text of the target object.

[0094] As an optional implementation, after identifying and obtaining the target handwritten font from the scanned reference handwritten text, the method further includes:

[0095] S1, display an add prompt pop-up window, in which an add confirmation control for the target handwritten font is displayed;

[0096] S2, in response to the operation performed on adding the confirmation control, displays a target font style control that matches the target handwritten font in the session configuration area corresponding to the session interaction area.

[0097] like Figure 11As shown, when the target handwritten font style corresponding to the target object is identified from the reference handwritten text provided by the target object, a pop-up notification is displayed to indicate that the currently created handwritten font has been successfully created. Figure 11 As shown, the pop-up window displays the message "Handwritten font created successfully!" and a preview of the currently created handwritten font, indicating the creation date as "2021-11-23". The pop-up also displays previously created handwritten fonts, distinguished from the currently created font by their creation date "2021-11-16". Each created handwritten font has a "Confirm" control, which, in response to an action on the "Confirm" control, confirms that the corresponding handwritten font will be applied to the current conversation text. Assuming in... Figure 11 In the pop-up window shown, a touch operation was detected on the "Confirm" control corresponding to the handwritten text of "Created on 2021-11-23". The interface displays as follows: Figure 12 As shown, the border of the handwritten font style "Created on 2021-11-23" is displayed in bold to indicate that the currently selected handwritten font is the one in the bold border.

[0098] Through the above-described embodiments of this application, by displaying an add prompt pop-up window, wherein the add prompt pop-up window displays an add confirmation control for the target handwritten font; in response to the operation performed on the add confirmation control, a target font style control matching the target handwritten font is displayed in the session configuration area corresponding to the session interaction area, thereby realizing the addition of a handwritten font matching the handwriting style of the target object according to the handwritten text of the target object, and thus providing the user with a personalized session text display style, thereby solving the technical problem of low session security in existing text input methods.

[0099] As an optional implementation, the above-described method of identifying and obtaining the target handwritten font from scanned reference handwritten text includes:

[0100] S1, perform character recognition on the target area where the reference handwritten text is located to obtain the handwritten text characters, and crop out the character images corresponding to each handwritten text character from the target area;

[0101] S2, send the character image to the server so that the server can use the character image to learn from the handwritten text and obtain the handwritten font.

[0102] Assumption Figure 13 The image shows a target image containing reference handwritten text. Doodle symbols and horizontal lines indicating non-text content are also shown in the image. Figure 13In the case of the picture shown, the picture may be scanned to determine the target area where the target handwritten text is located. It can be understood that, for Figure 13 the target picture in, the target area shown can be obtained by cropping Figure 14 .

[0103] As an optional manner, in the case that the Figure 13 shown picture is obtained, preliminary image recognition may be performed to circle each part included in the figure, such as a text part, a doodle part, and a blank part. Further, a selection operation of a user is received to accurately determine the target area where the text part is located.

[0104] Further, in the case that the target area is obtained, character recognition is performed on the handwritten text in the target area to determine the handwritten text character corresponding to each character. For example, the Figure 14 character "ren" (person) in is recognized as the corresponding handwritten text character "ren" (person). Further, a character picture corresponding to each handwritten text character is cropped from the above target area.

[0105] Further, the above character pictures and the corresponding handwritten text characters are sent to a server, and in the server, a font generation network is trained through the above character pictures and the corresponding handwritten text characters.

[0106] In a specific manner, the font picture uploaded by the user is first scanned, the font area content of the user is obtained through cropping and rotation, the text boxes of all characters are further obtained through text recognition, and the characters are cropped out from the picture, so as to obtain square pictures of individual characters in the user's handwritten font for subsequent training.

[0107] Through the above embodiments of the present application, character recognition is performed on the target area where the reference handwritten text is located to obtain handwritten text characters, and character pictures respectively corresponding to each handwritten text character are cropped from the target area; the character pictures are sent to the server, so that the server learns the reference handwritten text by using the character pictures to obtain a handwritten font, thereby generating a unique and tamper-proof font picture according to the font generation network, which solves the technical problem that the display style of the existing text input manner is easy to be forged.

[0108] As an optional embodiment, after the above sending the character pictures to the server, the method further includes: acquiring a font data packet sent by the server and matched with the target handwritten font, where the font data packet is font conversion data obtained by the server through learning and matched with the target handwritten font.

[0109] It is understood that in this embodiment, after the target handwritten font style is first obtained by character image recognition in the server, the font data package of the target handwritten font style is sent to the client, so that the client can further generate unalterable handwritten font content by combining the data file in the font data package in the subsequent font generation process.

[0110] Through the above-described embodiments of this application, by obtaining the font data packet sent by the server that matches the target font generation network, the client can directly retrieve the font style of the corresponding text in the font data packet when it obtains the input text content, and obtain the tamper-proof handwritten font content through further anti-counterfeiting processing. This avoids the need to interact with the server to obtain the handwritten font content every time text is sent, and improves the generation efficiency of tamper-proof handwritten font content.

[0111] As an optional method, sending character images to a server so that the server can learn from the handwritten text using the character images to obtain a handwritten font includes:

[0112] The server trains an initial font generation network using character images to obtain a target font generation network. The content encoder in the target font generation network is used to extract character content features from the character images, the style encoder is used to extract character style features from the character images, and the character generator in the target font generation network is used to generate a handwritten font corresponding to the reference handwritten text using the character content features and character style features. The character generator is equipped with a spatial adaptive inverse regularization layer.

[0113] It's important to note that the core of personalized handwritten font generation lies in font style transfer. By using two different fonts as training data, a deep neural network is trained. The trained model can convert input Chinese characters into other font styles. Deep learning-based Generative Adversarial Networks (GANs) can generate detailed character images with small-scale training data by alternately optimizing the discriminant and generative networks. Currently, various GAN-based generative models exist, such as Conditional Generative Adversarial Networks and Cyclic Consistency Generative Adversarial Networks. This invention adopts a GAN-based network model, the model structure of which is shown below. Figure 15 As shown, the model mainly consists of three parts: a content encoder, a style encoder, and a character generator.

[0114] In one specific manner, the structure of the aforementioned target font generation network is as follows: Figure 15As shown, it mainly consists of three parts: a content encoder, a style encoder, and a character generator. The content encoder adopts the typical encoder-decoder structure of U-Net. The encoding layer uses pooling layers for step-by-step downsampling, and the decoding layer uses deconvolution for step-by-step upsampling. Skip connections are added to fuse feature maps at corresponding positions in the two processes, so that the decoder can obtain more high-resolution information when upsampling, and thus more completely recover the detailed information in the original image to represent the fine Chinese character font structure information.

[0115] In style encoders, although deep neural networks such as ResNet have high accuracy in classification models, their robustness is not as good as the earlier VGG network model. Therefore, style features can be extracted by the VGG19 network to obtain the final one-dimensional style vector.

[0116] Figure 15 The generator shown uses a conventional approach: concatenating content information with an image of the original style before feeding it into the generator. However, this can lead to the loss of semantic information in the font after passing through a regularization layer. Therefore, a regularization method that considers spatial semantic information, Spatially-adaptive denormalization (SPADE), is used. By replacing the ordinary normalization layer in the generator with the SPADE module, the loss of semantic information in the font can be effectively prevented, and character images that are more consistent with the structure of the content characters can be generated.

[0117] The above model can generate font images in the user's handwriting style based on a small amount of handwritten text, which can be considered equivalent to assuming that the generated font images are the user's actual handwriting. See below. Figure 16 As shown, Figure 16 Image (a) shows the user's actual handwriting. Figure 16 Figure (b) shows the text content to be input by the user. Figure 16 Image (c) in the image is a character image generated using the user's handwriting style.

[0118] Through the above-described embodiments of this application, the server uses character images to train an initialized font generation network to obtain a target font generation network, thereby generating user-handwritten character images through the trained font generation network, thus solving the technical problem that the displayed font style is easily forged in existing text input methods.

[0119] As an optional implementation, the above-described response to an operation performed on the session sharing control, sharing the target handwritten font content corresponding to the current font content, includes:

[0120] S1, in response to the operation performed on the session sharing control, extracts the content characters from the current font content;

[0121] S2, obtain the candidate content characters after converting the content characters according to the target handwritten font;

[0122] S3, obtain the anti-counterfeiting identifier that matches the current object account that inputs the current font content;

[0123] S4. Adjust the display style of the candidate content characters using anti-counterfeiting marks to obtain the target handwritten font content.

[0124] Continue with Figure 12 Let's take an example to illustrate the above method. When the input box detects that the input text is "I will definitely pay next month", the characters "I will definitely pay next month" are extracted and preliminarily transformed according to the target handwritten font style to obtain candidate characters. It can be understood that the display style of the candidate characters already includes the relevant features of the target handwritten font style.

[0125] Furthermore, after obtaining the anti-counterfeiting mark that matches the current user account that inputs "I will definitely pay next month", the above candidate content characters are further adjusted to obtain the final handwritten font content to be sent.

[0126] In this embodiment, the anti-counterfeiting information matching the current user account may include, but is not limited to, the time the current conversation text was sent, the time the current conversation text was entered, the account identifier information of the current user account, the account identifier information of the current conversation object account, and the verification identity information of the current user account. In an optional approach, the content of the above information can be processed using a hash algorithm to convert it into a corresponding data string, and then the data string can be further converted into a transparent image file. The converted image file is then overlaid with the image file corresponding to the candidate content characters to determine the generated handwritten font content.

[0127] Through the above-described embodiments of this application, in response to the operation performed on the session sharing control, the content characters in the current font content are extracted; candidate content characters are obtained after the content characters are converted according to the target handwritten font; an anti-counterfeiting mark matching the current object account that inputs the current font content is obtained; the display style of the candidate content characters is adjusted using the anti-counterfeiting mark to obtain the target handwritten font content, thereby solving the technical problem that existing text input styles are easy to counterfeit.

[0128] As an optional implementation, the candidate content characters obtained by converting the content characters according to the target handwritten font include: obtaining a character vector image sent by the server that matches the candidate content characters.

[0129] It is understandable that in this embodiment, when a user performs a handwritten font style recognition operation for the first time, the obtained current font content can be sent to the server, and the server will perform a conversion operation to obtain the handwritten font content to be sent.

[0130] It's important to note that after sending the current font content to the server, the server returns a vector image of the characters that match the handwritten font content. Understandably, the server directly sends the image to prevent the sent text content from being tampered with. Furthermore, because vector images can be scaled on mobile devices without affecting the clarity of the character images, the server can send vector images to allow the client to send tamper-proof handwritten font content through the session window.

[0131] Because individual font files sent through social media are large and easily cracked when stored on the client side, it's possible to retrieve SVG font graphics from the server and send handwritten text within the chat window each time conversation text is sent. SVG fonts are vector graphics, allowing for infinite scaling and easy rendering on mobile devices.

[0132] Through the above-described embodiments of this application, the current font content is sent to the server so that the server can convert the current font content into handwritten font content; the character vector image that matches the handwritten font content sent by the server is obtained, so that the text content sent each time is converted and generated by the server, resulting in a unique and tamper-proof image corresponding to the handwritten font content, and then the conversation is conducted through the converted character vector image, thus solving the technical problem that the text input style of the existing method is easily forged.

[0133] As an optional implementation, the above-mentioned method of adjusting the display style of candidate content characters using anti-counterfeiting marks to obtain target handwritten font content includes:

[0134] S1, adjust the display style parameters using anti-counterfeiting marks, wherein the display style parameters include at least one of the following: character spacing ratio, character display angle, character size, and character thickness;

[0135] S2, adjust the character vector image of the candidate content character according to the adjusted display style morphology parameters to obtain the target handwritten font content.

[0136] When anti-counterfeiting information matching the current user account is acquired, no less than one piece of information among the sending time of the current session text, the input time of the current session text, the account identification information of the current user account, the account identification information of the current session object account, the verification identity information of the current user account, etc. may be converted into a data string through a hash algorithm, that is, the corresponding anti-counterfeiting identifier is obtained.

[0137] Optionally, acquiring the anti-counterfeiting identifier matching the current object account that inputs the current font content includes:

[0138] performing a hash operation on the unique identifier of the current object account and the input time of the current font content to obtain a hash value; taking the hash value as the anti-counterfeiting identifier; or

[0139] acquiring a verification identifier allocated in real time by the server for the current object account; taking the verification identifier as the anti-counterfeiting identifier.

[0140] It can be understood that, in this embodiment, there are also two ways to acquire the anti-counterfeiting identifier. In one way, the unique identifier of the current object account and the occurrence time of the current input event are acquired for hash calculation to obtain the anti-counterfeiting identifier, or the anti-counterfeiting verification identifier sent by the server may be directly acquired as the anti-counterfeiting identifier, and the specific way of acquiring the anti-counterfeiting identifier is not limited herein.

[0141] As shown Figure 12 assume that the account identifier "100100100" of the current user account and the current time information "202111232020" (indicating that the sending time of the current session is 20:20 on November 23, 2021) are spliced to obtain the string "100100100202111232020", and when the data string obtained by processing the string "100100100202111232020" through the hash algorithm is "20221", it may be determined according to the data string "20221" that the adjustment percentages of the character spacing of the text "I will definitely pay you back next month" are 2%, 0%, 2%, 2%, and 1% respectively. Further, in the case where the candidate content characters "I will definitely pay you back next month" are generated according to the target handwritten font style, the character spacing between the character "I" and "will" is further reduced by 2%, the character spacing between the character "will" and "definitely" remains unchanged, the character spacing between the character "definitely" and "pay" is reduced by 2%, the character spacing between the character "pay" and "you" is reduced by 2%, the character spacing between the character "you" and "back" is reduced by 2%, and the character spacing between the character "back" and "next" is reduced by 1%, so as to obtain the handwritten font content.

[0142] In another optional implementation, if the anti-counterfeiting identifier matching the current user account is "20221", the character spacing adjustment pixels of "I will definitely pay next month" can be determined according to "20221" as 2pt, 0pt, 2pt, 2pt, 1pt, that is, the character spacing between the above six characters is reduced by 2pt, 0pt, 2pt, 2pt, 1pt respectively to obtain the handwritten font content.

[0143] In another optional implementation, if the anti-counterfeiting identifier matching the current user account is "202211", the display angle adjustment percentages of each of the six characters included in "I will definitely pay next month" can be determined based on "202211" as 2%, 0%, 2%, 2%, 1%, and 1%. That is, based on the candidate content characters, the display angles of the above six characters are adjusted by 2%, 0%, 2%, 2%, 1%, and 1% respectively to obtain the handwritten font content.

[0144] In another optional implementation, if the anti-counterfeiting identifier matching the current user account is "202211", the display size adjustment percentage of each of the six characters included in "I will definitely pay next month" can be determined based on "202211" as 2%, 0%, 2%, 2%, 1%, and 1%. That is, based on the candidate content characters, the display size of the above six characters is adjusted (increased or reduced) by 2%, 0%, 2%, 2%, 1%, and 1% respectively to obtain the handwritten font content.

[0145] In another optional implementation, if the anti-counterfeiting identifier matching the current user account is "202211", the display thickness adjustment percentage of each of the six characters included in "I will definitely pay next month" can be determined based on "202211" as 2%, 0%, 2%, 2%, 1%, and 1%. That is, based on the candidate content characters, the display thickness of the above six characters is adjusted (increased or reduced) by 2%, 0%, 2%, 2%, 1%, and 1% respectively to obtain the handwritten font content.

[0146] It is understood that the above implementation methods are all illustrative and do not limit the specific adjustment methods.

[0147] As a preferred implementation, the morphology of the characters can be adjusted using convolutional kernels. Since the spacing distribution of handwritten characters varies from user to user in real-world scenarios, to achieve a more realistic handwriting effect, a character detection model can be used to obtain the positional information of each character, further retrieving statistical features such as spacing ratio, angle, and size. Furthermore, to prevent font forgery or the creation of fake session profile information by inputting the same characters later, object features such as unique identifiers (IDs) and input time (which can be different time dimensions such as month, day, and hour) are hashed to obtain hash values. These hash values ​​can then be used to further fine-tune the spacing ratio, angle, and size of the characters. Optionally, different character image morphological transformation parameters can be mapped to the hash values, resulting in effects such as... Figure 17 As shown, this is the result of using different convolution kernels to perform different character morphological transformations. The font uses different degrees of morphological transformations such as erosion and dilation to represent the stroke depth of the characters.

[0148] Through the above-described embodiments of this application, by adjusting at least one of the following morphological parameters of the candidate content characters using anti-counterfeiting marks, handwritten font content is obtained: character spacing ratio, character display angle, character size, and character thickness. This adds tamper-proof anti-counterfeiting information to the displayed conversation text content, thereby solving the technical problem of easy counterfeiting in existing text display methods.

[0149] As an optional implementation, after displaying the target handwritten font content in the session interaction area, the method further includes:

[0150] S1, Get content verification request;

[0151] S2, in response to the content verification request, retrieve the verification content of the target object stored in the server, wherein the verification content includes verification characters generated according to the target handwritten font;

[0152] S3, perform pixel-by-pixel comparison between the content characters of the target handwritten font and the verification characters;

[0153] S4. If the comparison result indicates that the pixel difference value is greater than the target threshold, the target handwritten font content is determined to be forged content.

[0154] It is understood that the font styles obtained through the above embodiments of this application are difficult to tamper with or forge. Suppose that in one scenario, a second user sends a conversation message mimicking the target user's tone using their own client to forge the target user's conversation content. Since the second user cannot obtain the target user's exclusive font, they can only input forged text content using the system's default font. Therefore, by simply comparing the font style image of the forged conversation message from the second user with the target user's font style image, the font difference between the second user's and the target user's text can be immediately distinguished, and the second user's text content can be identified as forged text. Suppose that in a second scenario, the second user obtains an image of the target user's handwritten text through improper means and identifies the target user's exclusive font through handwritten text image recognition. However, in the process of forging the target user's text content, the second user will secretly add the second user's user identifier and text input time information into the output text content, and adjust the display mode of the second user's handwritten font based on the second user's user identifier and text input time information. Therefore, even if the second user obtains the target user's exclusive font, the actual output handwritten font style cannot completely match the target user's output handwritten font style. Thus, pixel comparison can be used to determine that the text content output by the second user is forged text content.

[0155] like Figure 18 As shown, when users dispute the content of conversation profile information, pixel-level comparison can be achieved by overlaying an image of the font corresponding to the conversation profile information with an image of the user's handwriting that has been officially verified. If the pixel difference exceeds a certain threshold, it can be quickly determined that the fonts are not the same. It can identify subtle differences in different parts of the font, as well as the overall shape, spacing, rotation angle, thickness, etc. Assuming... Figure 18 Figure (a) shows the font style output by the second user. Figure 18 Image (b) shows the font style output by the target user. After adjustment, the two images are directly superimposed for pixel comparison. It can be observed that the superimposed images show... Figure 18 Figure (c) clearly shows the difference between the two font styles, which allows us to determine... Figure 18 Image (a) in the image is a forged font style.

[0156] Through the above embodiments of this application, a method for detecting forged text is provided by obtaining a session text verification request; in response to the session text verification request, obtaining the verification text of the target object stored in the server, wherein the verification text includes verification characters generated according to the target handwritten font style; comparing the text characters of the handwritten font content with the verification characters pixel by pixel; and determining that the handwritten font content is forged text when the comparison result indicates that the pixel difference value is greater than the target threshold. This solves the technical problem that text obtained by existing text input methods is easy to forge.

[0157] The following combination Figure 19 The following flowchart illustrates the complete process of the text input method provided in this application:

[0158] It should be noted that in the specific embodiments of this application, data such as handwritten text images and user identification information are involved. When the above embodiments of this application are applied to specific products or technologies, the corresponding authorization or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0159] S1902, Scan user's handwritten text;

[0160] Specifically, assuming Figure 13 This is an image obtained from a user showing handwritten text, with doodle symbols in non-text areas and horizontal lines indicating non-text content.

[0161] S1904, character recognition area;

[0162] After obtaining Figure 13 In the case of the image shown, the image can be scanned to determine the target area where the target handwritten text is located. For example... Figure 14 As shown, for Figure 13 The image shown can be obtained by cropping. Figure 14 The target area is shown. Understandably, after identifying the character region, the characters are cropped from the image to obtain square images of individual characters in the user's handwritten font for subsequent training.

[0163] S1906, generate custom font images;

[0164] It should be noted that before generating custom font images, the model used to generate them needs to be trained. The core of personalized handwritten font generation is the problem of font style transfer. By using two different fonts as training data, a deep neural network is trained. The trained model can convert input Chinese characters into other font styles. Deep learning-based Generative Adversarial Networks (GANs) can generate detailed character images with small-scale training data by alternately optimizing the discriminant and generative networks. Currently, there are various GAN-based generative models, such as Conditional Generative Adversarial Networks and Cyclic Consistency Generative Adversarial Networks. This invention adopts a GAN-based network model, the model structure of which is shown below. Figure 15 As shown, the model mainly consists of three parts: a content encoder, a style encoder, and a character generator.

[0165] Get the user's handwritten text image input Figure 15 The aforementioned network model is used to obtain the handwritten font style corresponding to the user's handwritten text image. Based on the handwritten font style obtained from the network model, combined with the text content to be input, such as... Figure 16 As shown, Figure 16 Image (a) shows the user's handwritten font style. Figure 16 Figure (b) shows the text to be input, which is then used to generate the following: Figure 16 The candidate content characters to be sent are shown in Figure (c).

[0166] S1908, Adjust character features;

[0167] Specifically, the font images generated by the generator by default have consistent spacing, angles, sizes, and thicknesses. However, in real-world scenarios, the spacing distribution of handwritten characters varies from user to user. To achieve a more realistic handwriting effect, a character detection model can be used to obtain the positional information of each character, further refining statistical features such as spacing ratio, angle, and size. Furthermore, to prevent font forgery or the creation of fake session profile information by inputting the same characters later, object features such as unique identifiers (IDs) and input time (which can be different time dimensions such as month, day, and hour) are hashed to obtain hash values. These hash values ​​can then be used to fine-tune the character spacing ratios, angles, and sizes. Optionally, different morphological transformation parameters for character images can be mapped to the hash values, resulting in effects such as... Figure 17 As shown, the results of different character morphological transformations using different convolution kernels are illustrated. The font employs morphological transformations of varying degrees, such as erosion and dilation, to represent the stroke depth of the characters. Finally, by incorporating character spacing ratios, angles, sizes, and morphological transformation parameters obtained from user and temporal features, a unique and difficult-to-forge user-specific handwriting font can be generated.

[0168] S1910, generate SVG font;

[0169] It should be noted that in social media software, sending font files individually is quite large, and font files stored on the client side are easily cracked. Therefore, the generated fonts are sent via SVG font graphics from the server. SVG fonts are vector graphics that can be infinitely scaled and are easy to render on mobile devices.

[0170] S1912, rendering font.

[0171] When the server sends an SVG font to the client, the client renders the font style based on the SVG font.

[0172] Through the above-described embodiments of this application, the current font content is obtained; the target handwritten font corresponding to the target object is obtained; in response to the operation performed on the conversation sharing control, the target handwritten font content corresponding to the current font content is shared, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font; the target handwritten font content is displayed in the conversation interaction area, thereby converting the conversation text to be sent by the user into conversation text with the same style as the user's handwritten text, and thus providing the user with a conversation text display style with a unique style, thereby solving the technical problem of low conversation security in existing text input methods.

[0173] In the above embodiments of this application, personalized fonts are generated based on the user's handwriting, enhancing the user's personalized expression capabilities and making text communication more contextualized. Simultaneously, for text communication in important scenarios, the immutability of the fonts is ensured through user and time characteristics, making user conversation archive information a better form of electronic evidence and improving the ability to disprove public events triggered by conversation archive information. The pixel-level comparison of images also makes handwriting identification more convenient and faster than offline methods.

[0174] As an optional text input method, the following steps are included:

[0175] S1, Get the current font content sent by the first client;

[0176] S2, determine the target handwritten font corresponding to the target object;

[0177] S3: Convert the current font content according to the target handwritten font to obtain the target handwritten font content;

[0178] S4, push the target handwritten font content to the first client and the second client, wherein the account used by the second client and the account used by the first client are in the same session group.

[0179] It is understood that, in this embodiment, the above method can be applied to a server. Upon obtaining the current font content, the server can, in conjunction with a determined target handwritten font, convert the current font content sent by the first client into unalterable and unforgeable handwritten font content, and push the handwritten font content to both the first and second clients. This allows both the first and second clients to simultaneously display a second font that matches the target font style.

[0180] Through the above-described embodiments of this application, by converting the handwritten font content into immutable handwritten font content when the first client sends the current font content, and then pushing the handwritten font content to the first client and the second client, the security of the session content is improved, and the technical problem of low session security caused by the easy forgery of font styles obtained by existing text input methods is solved.

[0181] As an optional implementation, the above-mentioned determination of the target handwritten font corresponding to the target object includes:

[0182] S1, determine the target font style control selected by the first client;

[0183] S2, determine the handwritten font corresponding to the target font style control as the target handwritten font.

[0184] Through the above embodiments of this application, by obtaining the target font style control selected by the first client to determine the corresponding handwritten font, the convenience of confirming the target handwritten font is improved.

[0185] As an optional implementation, the above-mentioned determination of the target handwritten font corresponding to the target object includes:

[0186] S1, obtain the character image sent by the first client, wherein the character image is the image corresponding to each handwritten text character, the handwritten text character is the character obtained by the first client after recognizing the reference handwritten text in the target area scanned by the camera, and the reference handwritten text is provided by the target object;

[0187] S2 uses character images to learn from reference handwritten text to obtain the target handwritten font.

[0188] Through the above-described embodiments of this application, the technical effect of learning handwritten fonts from images including handwritten characters is achieved, thereby improving the security of conversational text.

[0189] As an optional implementation, the above method further includes: training an initialized font generation network using character images to obtain a target font generation network, wherein the content encoder in the target font generation network is used to extract character content features from the character images, the style encoder in the target font generation network is used to extract character style features from the character images, and the character generator in the target font generation network is used to generate a handwritten font corresponding to the reference handwritten text using the character content features and the character style features, and the character generator is provided with a spatial adaptive retroregulation layer.

[0190] In one specific manner, the structure of the aforementioned target font generation network is as follows: Figure 15 As shown, it mainly consists of three parts: a content encoder, a style encoder, and a character generator. The content encoder adopts the typical encoder-decoder structure of U-Net. The encoding layer uses pooling layers for step-by-step downsampling, and the decoding layer uses deconvolution for step-by-step upsampling. Skip connections are added to fuse feature maps at corresponding positions in the two processes, so that the decoder can obtain more high-resolution information when upsampling, and thus more completely recover the detailed information in the original image to represent the fine Chinese character font structure information.

[0191] In style encoders, although deep neural networks such as ResNet have high accuracy in classification models, their robustness is not as good as the earlier VGG network model. Therefore, style features can be extracted by the VGG19 network to obtain the final one-dimensional style vector.

[0192] like Figure 15 The generator shown uses a conventional approach: concatenating content information with an image of the original style before feeding it into the generator. However, this can lead to the loss of semantic information in the font after passing through a regularization layer. Therefore, a regularization method that considers spatial semantic information, Spatially-adaptive denormalization (SPADE), is used. By replacing the ordinary normalization layer in the generator with the SPADE module, the loss of semantic information in the font can be effectively prevented, and character images that are more consistent with the structure of the content characters can be generated.

[0193] The above model can generate font images in the user's handwriting style based on a small amount of handwritten text, which can be considered equivalent to assuming that the generated font images are the user's actual handwriting. See below. Figure 16 As shown, Figure 16 Image (a) shows the user's actual handwriting. Figure 16 Figure (b) shows the text content to be input by the user. Figure 16Image (c) in the image is a character image generated using the user's handwriting style.

[0194] Through the above-described embodiments of this application, the server uses character images to train an initialized font generation network to obtain a target font generation network, thereby generating user-handwritten character images through the trained font generation network, thus solving the technical problem that the displayed font style is easily forged in existing text input methods.

[0195] As an optional implementation, the above-mentioned conversion of the current font content according to the target handwritten font to obtain the target handwritten font content includes: converting the current font content according to the target handwritten font to obtain candidate handwritten font content, wherein the candidate handwritten font content is adjusted according to the anti-counterfeiting mark to obtain the target handwritten font content.

[0196] It is understood that, in this embodiment, the step of converting the current font content according to the target handwritten font can be implemented on the server side. The current font content is converted based on the determined target handwritten content, and the converted candidate handwritten font content is adjusted based on anti-counterfeiting identifiers to obtain target handwritten font content that is difficult to forge. After the server pushes this difficult-to-forge target handwritten font content to the first and second clients, the technical effect of improving session security can be achieved.

[0197] As an optional implementation, the above-mentioned pushing of the target handwritten font content to the first client and the second client includes:

[0198] S1, send the character vector images matching each candidate character in the candidate handwritten font content to the first client. The first client will use the anti-counterfeiting mark matching the account used by the first client to adjust the display style of the character vector images to obtain the target handwritten font content.

[0199] S2, receive the target handwritten font content sent by the first client;

[0200] S3, send the target handwritten font content to the second client.

[0201] Understandably, in this embodiment, after the server performs a conversion operation to obtain candidate content characters, it sends the corresponding character vector images to the first client to add anti-counterfeiting labels. In other words, in this embodiment, the specific anti-counterfeiting label can be determined based on the first client. For example, it can combine the account identifier information matched by the first client with the text input time information as anti-counterfeiting information, and determine the anti-counterfeiting label based on this information. After the server receives the target handwritten font content with added anti-counterfeiting labels from the first client, it then pushes the target handwritten font content to the second client.

[0202] Through the above-described embodiments of this application, character vector images matching each candidate character in the candidate handwritten font content are sent to a first client. The first client adjusts the display style of the character vector images using an anti-counterfeiting identifier that matches the account used by the first client to obtain the target handwritten font content. The first client receives the target handwritten font content sent by the first client and sends the target handwritten font content to a second client. This method adds a client-specific anti-counterfeiting identifier to the client, making it impossible for other clients to replicate or forge the relevant anti-counterfeiting identifier. Thus, the handwritten font content with the added anti-counterfeiting identifier is used as the conversation text, achieving the technical effect of improving conversation security.

[0203] As an optional implementation, the above-mentioned conversion of the current font content according to the target handwritten font to obtain the target handwritten font content includes:

[0204] S1, convert the current font content according to the target handwritten font to obtain candidate handwritten font content;

[0205] S2, obtain the anti-counterfeiting identifier that matches the account used by the first client;

[0206] S3, using anti-counterfeiting marks to adjust the display style of the character vector images that match each candidate character in the candidate handwritten font content, to obtain the target handwritten font content;

[0207] S4 pushes the target handwritten font content to the first client and the second client.

[0208] It is understood that in this embodiment, after the candidate content characters are obtained through conversion on the server side, the anti-counterfeiting label is added directly on the server side. That is, in this embodiment, the specific anti-counterfeiting label can be determined by the server. For example, it can combine the account identifier information matched by the first client with the text input time information as anti-counterfeiting information, and determine the anti-counterfeiting label based on this information. Alternatively, the anti-counterfeiting label assigned to the first client can be determined according to the anti-counterfeiting label generation rules determined by the server side. After the target handwritten font content with added anti-counterfeiting labels is generated on the server side, the target handwritten font content is simultaneously pushed to both the first and second clients.

[0209] Through the above-described embodiments of this application, the current font content is converted according to the target handwritten font to obtain candidate handwritten font content; an anti-counterfeiting mark matching the account used by the first client is obtained; the display style of the character vector image matching each candidate character in the candidate handwritten font content is adjusted using the anti-counterfeiting mark to obtain the target handwritten font content; and the target handwritten font content is pushed to the first client and the second client. This method adds a client-related specific anti-counterfeiting mark on the server side, making it impossible for other clients to replicate or forge the relevant anti-counterfeiting mark. Thus, the handwritten font content with the added anti-counterfeiting mark is pushed as conversation text to the first client and the second client, thereby achieving the technical effect of improving conversation security.

[0210] As an optional implementation, after pushing the target handwritten font content to the first client and the second client, the method further includes:

[0211] S1, Get content verification request;

[0212] S2, in response to the content verification request, obtain the verification content of the target object, wherein the verification content includes verification characters generated according to the target handwritten font;

[0213] S3, perform pixel-by-pixel comparison between the content characters of the target handwritten font and the verification characters;

[0214] S4. If the comparison result indicates that the pixel difference value is greater than the target threshold, the target handwritten font content is determined to be forged content.

[0215] It is understood that the font styles obtained through the above embodiments of this application are difficult to tamper with or forge. Suppose that in one scenario, a second user sends a conversation message mimicking the target user's tone using their own client to forge the target user's conversation content. Since the second user cannot obtain the target user's exclusive font, they can only input forged text content using the system's default font. Therefore, by simply comparing the font style image of the forged conversation message from the second user with the target user's font style image, the font difference between the second user's and the target user's text can be immediately distinguished, and the second user's text content can be identified as forged text. Suppose that in a second scenario, the second user obtains an image of the target user's handwritten text through improper means and identifies the target user's exclusive font through handwritten text image recognition. However, in the process of forging the target user's text content, the second user will secretly add the second user's user identifier and text input time information into the output text content, and adjust the display mode of the second user's handwritten font based on the second user's user identifier and text input time information. Therefore, even if the second user obtains the target user's exclusive font, the actual output handwritten font style cannot completely match the target user's output handwritten font style. Thus, pixel comparison can be used to determine that the text content output by the second user is forged text content.

[0216] like Figure 18 As shown, when users dispute the content of conversation profile information, pixel-level comparison can be achieved by overlaying an image of the font corresponding to the conversation profile information with an image of the user's handwriting that has been officially verified. If the pixel difference exceeds a certain threshold, it can be quickly determined that the fonts are not the same. It can identify subtle differences in different parts of the font, as well as the overall shape, spacing, rotation angle, thickness, etc. Assuming... Figure 18 Figure (a) shows the font style output by the second user. Figure 18 Image (b) shows the font style output by the target user. After adjustment, the two images are directly superimposed for pixel comparison. It can be observed that the superimposed images show... Figure 18 Figure (c) clearly shows the difference between the two font styles, which allows us to determine... Figure 18 Image (a) in the image is a forged font style.

[0217] Through the above embodiments of this application, a method for detecting forged text is provided by obtaining a session text verification request; in response to the session text verification request, obtaining the verification text of the target object stored in the server, wherein the verification text includes verification characters generated according to the target handwritten font style; comparing the text characters of the handwritten font content with the verification characters pixel by pixel; and determining that the handwritten font content is forged text when the comparison result indicates that the pixel difference value is greater than the target threshold. This solves the technical problem that text obtained by existing text input methods is easy to forge.

[0218] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0219] According to another aspect of the present invention, a text input device for implementing the above-described text input method is also provided, which can be applied to a client. For example... Figure 20 As shown, the device includes:

[0220] The first acquisition unit 2002 is used to acquire the current font content input;

[0221] The second acquisition unit 2004 is used to acquire the target handwritten font corresponding to the target object;

[0222] The sharing unit 2006 is used to share the target handwritten font content corresponding to the current font content in response to the operation performed on the session sharing control. The target handwritten font content is obtained by converting the current font content according to the target handwritten font.

[0223] Display unit 2008 is used to display target handwritten font content in the conversation interaction area.

[0224] Optionally, in this embodiment, the implementation of each of the above-mentioned unit modules can be referred to the above-mentioned method embodiments, which will not be repeated here.

[0225] According to another aspect of the present invention, a text input device is also provided for implementing the above-described text input method in a server. For example... Figure 21 As shown, the device includes:

[0226] The acquisition unit 2102 is used to acquire the current font content sent by the first client;

[0227] The determining unit 2104 is used to determine the target handwritten font corresponding to the target object;

[0228] The conversion unit 2106 is used to convert the current font content according to the target handwritten font to obtain the target handwritten font content;

[0229] The push unit 2108 is used to push the target handwritten font content to the first client and the second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

[0230] Optionally, in this embodiment, the implementation of each of the above-mentioned unit modules can be referred to the above-mentioned method embodiments, which will not be repeated here.

[0231] Optionally, in this embodiment, the implementation of each of the above-mentioned unit modules can be referred to the above-mentioned method embodiments, which will not be repeated here.

[0232] According to another aspect of the present invention, an electronic device for implementing the above-described text input method is also provided. This electronic device may be... Figure 22 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 22 As shown, the electronic device includes a memory 2202 and a processor 2204. The memory 2202 stores a computer program, and the processor 2204 is configured to execute the steps of any of the above method embodiments through the computer program.

[0233] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0234] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0235] S1, Get the current font content of the input;

[0236] S2, obtain the target handwritten font corresponding to the target object;

[0237] S3, in response to the operation performed on the session sharing control, shares the target handwritten font content corresponding to the current font content, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font;

[0238] S4 displays the target handwritten font content within the conversation interaction area.

[0239] Optionally, in this embodiment, the processor may also be configured to perform the following steps via a computer program:

[0240] S1, Get the current font content sent by the first client;

[0241] S2, determine the target handwritten font corresponding to the target object;

[0242] S3, convert the current font content according to the target handwritten font to obtain the target handwritten font content;

[0243] S4, push the target handwritten font content to the first client and the second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

[0244] Alternatively, as those skilled in the art will understand, Figure 22 The structure shown is for illustrative purposes only. Electronic devices can also be in-vehicle terminals, smartphones (such as Android phones, iOS phones, etc.), tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 22 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 22 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 22 The different configurations shown.

[0245] The memory 2202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the text input method and device in this embodiment of the invention. The processor 2204 executes various functional applications and data processing by running the software programs and modules stored in the memory 2202, thereby realizing the aforementioned text input method. The memory 2202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 2202 may further include memory remotely located relative to the processor 2204, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 2202 may be used, but is not limited to, to store information such as various elements in the viewing angle screen and text input information. As an example, such as... Figure 22 As shown, the memory 2202 may include, but is not limited to, the first acquisition unit 2002, the second acquisition unit 2004, the sharing unit 2006, and the display unit 2008 of the text input device. Furthermore, it may include, but is not limited to, other module units of the text input device, which will not be elaborated upon in this example.

[0246] Optionally, the transmission device 2206 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 2206 includes a Network Interface Controller (NIC), which can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 2206 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0247] In addition, the above-mentioned electronic device also includes a display 2208 and a connection bus 2210 for connecting the various module components in the above-mentioned electronic device.

[0248] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0249] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in embodiments of this application.

[0250] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0251] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the above-described text input method.

[0252] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0253] S1, Get the current font content of the input;

[0254] S2, obtain the target handwritten font corresponding to the target object;

[0255] S3, in response to the operation performed on the session sharing control, shares the target handwritten font content corresponding to the current font content, wherein the target handwritten font content is obtained by converting the current font content according to the target handwritten font;

[0256] S4 displays the target handwritten font content within the conversation interaction area.

[0257] Optionally, in this embodiment, the computer-readable storage medium may also be configured to store a computer program for performing the following steps:

[0258] S1, Get the current font content sent by the first client;

[0259] S2, determine the target handwritten font corresponding to the target object;

[0260] S3, convert the current font content according to the target handwritten font to obtain the target handwritten font content;

[0261] S4, push the target handwritten font content to the first client and the second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

[0262] According to another aspect of the present invention, an electronic device for implementing the above-described text input method is also provided. This electronic device may be... Figure 23 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 23 As shown, the electronic device includes a memory 2302 and a processor 2304. The memory 2302 stores a computer program, and the processor 2304 is configured to execute the steps in any of the above method embodiments via the computer program.

[0263] Alternatively, as those skilled in the art will understand, Figure 23 The structure shown is for illustrative purposes only. Electronic devices can also be in-vehicle terminals, smartphones (such as Android phones, iOS phones, etc.), tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 23 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 23 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 23 The different configurations shown.

[0264] The memory 2302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the text input method and device in this embodiment of the invention. The processor 2304 executes various functional applications and data processing by running the software programs and modules stored in the memory 2302, thereby realizing the aforementioned text input method. The memory 2302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 2302 may further include memory remotely located relative to the processor 2304, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 2302 may be used, but is not limited to, to store information such as various elements in the viewing angle screen and text input information. As an example, such as... Figure 23 As shown, the memory 2302 may include, but is not limited to, the acquisition unit 2102, determination unit 2104, conversion unit 2106, and push unit 2108 of the text input device. Furthermore, it may include, but is not limited to, other module units of the text input device, which will not be elaborated upon in this example.

[0265] Optionally, the transmission device 2306 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 2306 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 2306 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0266] In addition, the aforementioned electronic device also includes a display 2308 and a connection bus 2310 for connecting various module components in the aforementioned electronic device.

[0267] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0268] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0269] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0270] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0271] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0272] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0273] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A text input method, characterized in that, include: Get the current font content of the input; Obtain the target handwritten font corresponding to the target object, and convert the current font content into candidate content characters of the target handwritten font; Obtain anti-counterfeiting information that matches the current user account; The morphological adjustment parameters of the characters in the candidate content are determined based on the anti-counterfeiting information; Adjust the characters in the candidate content characters according to the morphological adjustment parameters to obtain the target handwritten font content; In response to an operation performed on the session sharing control, the target handwritten font content corresponding to the current font content is shared; The target handwritten font content is displayed in the conversation interaction area.

2. The method according to claim 1, characterized in that, The process of obtaining the target handwritten font corresponding to the target object includes: At least one handwritten font style control is displayed in the session configuration area corresponding to the session interaction area, wherein each handwritten font style control corresponds to a handwritten font configured for the target object; In response to an operation performed on a target font style control in the at least one handwritten font style control, the target handwritten font is obtained.

3. The method according to claim 2, characterized in that, After displaying the target handwritten font content within the interactive conversation area, the method further includes: In response to an operation performed on a reference font style control in the at least one handwritten font style control, the target handwritten font is switched to the handwritten font indicated by the reference font style control.

4. The method according to claim 1, characterized in that, The process of obtaining the target handwritten font corresponding to the target object includes: In response to the camera being turned on, the reference handwritten text provided by the target object is scanned; The target handwritten font is identified and obtained from the scanned reference handwritten text.

5. The method according to claim 4, characterized in that, After identifying and obtaining the target handwritten font from the scanned reference handwritten text, the method further includes: A pop-up window prompting you to add the target handwritten font is displayed. In response to the operation performed on the added confirmation control, a target font style control matching the target handwritten font is displayed in the session configuration area corresponding to the session interaction area.

6. The method according to claim 4, characterized in that, The step of identifying and obtaining the target handwritten font from the scanned reference handwritten text includes: Character recognition is performed on the target area where the reference handwritten text is located to obtain the handwritten text characters, and character images corresponding to each of the handwritten text characters are cropped from the target area. The character image is sent to the server so that the server can use the character image to learn the reference handwritten text and obtain a handwritten font.

7. The method according to claim 6, characterized in that, After sending the character image to the server, the process also includes: Obtain the font data packet sent by the server that matches the target handwritten font, wherein the font data packet is font conversion data that the server has learned to match the target handwritten font.

8. The method according to claim 6, characterized in that, The step of sending the character image to the server so that the server can use the character image to learn the reference handwritten text and obtain a handwritten font includes: The server uses the character image to train an initialized font generation network to obtain a target font generation network. The content encoder in the target font generation network is used to extract the character content features of the character image, the style encoder in the target font generation network is used to extract the character style features of the character image, and the character generator in the target font generation network is used to generate the handwritten font corresponding to the reference handwritten text using the character content features and the character style features. The character generator is provided with a spatial adaptive retroregulation layer.

9. The method according to claim 1, characterized in that, The action of sharing the target handwritten font content corresponding to the current font content in response to the operation performed on the session sharing control includes: In response to an operation performed on the session sharing control, extract the content characters from the current font content; Obtain candidate content characters after converting the content characters according to the target handwritten font; Obtain the anti-counterfeiting identifier that matches the current object account that inputs the current font content; The display style of the candidate content characters is adjusted using the anti-counterfeiting mark to obtain the target handwritten font content.

10. The method according to claim 9, characterized in that, The candidate content characters obtained by converting the content characters according to the target handwritten font include: Obtain the character vector image sent by the server that matches the candidate content characters.

11. The method according to claim 10, characterized in that, The step of adjusting the display style of the candidate content characters using the anti-counterfeiting mark to obtain the target handwritten font content includes: The display style parameters are adjusted using the anti-counterfeiting mark, wherein the display style parameters include at least one of the following: character spacing ratio, character display angle, character size, and character thickness; According to the adjusted display style parameters, the character vector image of the candidate content character is adjusted to obtain the target handwritten font content.

12. The method according to claim 9, characterized in that, The method for obtaining the anti-counterfeiting identifier that matches the current object account that inputs the current font content includes: A hash value is obtained by hashing the unique identifier of the current object account and the input time of the current font content; the hash value is then used as the anti-counterfeiting identifier; or Obtain the verification identifier assigned by the server to the current object account in real time; use the verification identifier as the anti-counterfeiting identifier.

13. The method according to any one of claims 1 to 12, characterized in that, After displaying the target handwritten font content within the interactive conversation area, the method further includes: Get a content verification request; In response to the content verification request, the verification content of the target object stored in the server is obtained, wherein the verification content includes verification characters generated according to the target handwritten font; The content characters of the target handwritten font are compared pixel by pixel with the verification characters; If the comparison result indicates that the pixel difference value is greater than the target threshold, the target handwritten font content is determined to be forged content.

14. A text input method, characterized in that, include: Get the current font content sent by the first client; Determine the target handwritten font corresponding to the target object; The current font content is converted according to the target handwritten font to obtain candidate content characters; Obtain anti-counterfeiting information that matches the current user account; The morphological adjustment parameters of the characters in the candidate content are determined based on the anti-counterfeiting information; Adjust the characters in the candidate content characters according to the morphological adjustment parameters to obtain the target handwritten font content; The target handwritten font content is pushed to the first client and the second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

15. The method according to claim 14, characterized in that, The determination of the target handwritten font corresponding to the target object includes: Determine the target font style control selected by the first client; The handwritten font corresponding to the target font style control is determined as the target handwritten font.

16. The method according to claim 14, characterized in that, The determination of the target handwritten font corresponding to the target object includes: Obtain character images sent by the first client, wherein the character images are images corresponding to each handwritten text character, the handwritten text characters are characters obtained by the first client after recognizing reference handwritten text in the target area scanned by the camera, and the reference handwritten text is provided by the target object; The target handwritten font is obtained by learning the reference handwritten text using the character image.

17. The method according to claim 16, characterized in that, After obtaining the character image sent by the first client, the process also includes: The character image is used to train the initialized font generation network to obtain the target font generation network. The content encoder in the target font generation network is used to extract the character content features of the character image, the style encoder in the target font generation network is used to extract the character style features of the character image, and the character generator in the target font generation network is used to generate the handwritten font corresponding to the reference handwritten text using the character content features and the character style features. The character generator is provided with a spatial adaptive inverse regularization layer.

18. The method according to claim 14, characterized in that, The process of converting the current font content according to the target handwritten font to obtain the target handwritten font content includes: The current font content is converted according to the target handwritten font to obtain candidate handwritten font content, wherein the candidate handwritten font content is adjusted according to the anti-counterfeiting mark to obtain the target handwritten font content.

19. The method according to claim 18, characterized in that, Pushing the target handwritten font content to the first client and the second client includes: The character vector images matching each candidate character in the candidate handwritten font content are sent to the first client. The first client will adjust the display style of the character vector images using an anti-counterfeiting identifier that matches the account used by the first client to obtain the target handwritten font content. Receive the target handwritten font content sent by the first client; The target handwritten font content is sent to the second client.

20. The method according to claim 14, characterized in that, The process of converting the current font content according to the target handwritten font to obtain the target handwritten font content includes: The current font content is converted according to the target handwritten font to obtain candidate handwritten font content; Obtain the anti-counterfeiting identifier that matches the account used by the first client; The display style of the character vector image matching each candidate character in the candidate handwritten font content is adjusted using the anti-counterfeiting mark to obtain the target handwritten font content; The target handwritten font content is pushed to the first client and the second client.

21. The method according to any one of claims 14 to 20, characterized in that, After pushing the target handwritten font content to the first client and the second client, the method further includes: Get a content verification request; Obtain the verification content of the target object, wherein the verification content includes verification characters generated according to the target handwritten font; The content characters of the target handwritten font are compared pixel by pixel with the verification characters; If the comparison result indicates that the pixel difference value is greater than the target threshold, the target handwritten font content is determined to be forged content.

22. A text input device, characterized in that, include: The first acquisition unit is used to acquire the current font content of the input; The second acquisition unit is used to acquire the target handwritten font corresponding to the target object, convert the current font content into candidate content characters of the target handwritten font, and acquire anti-counterfeiting information matching the current user account; The shape adjustment parameters of the characters in the candidate content characters are determined according to the anti-counterfeiting information; the characters in the candidate content characters are adjusted according to the shape adjustment parameters to obtain the target handwritten font content; A sharing unit is used to share the target handwritten font content corresponding to the current font content in response to an operation performed on the session sharing control; The display unit is used to display the target handwritten font content in the session interaction area.

23. A text input device, characterized in that, include: The acquisition unit is used to acquire the current font content sent by the first client; The determining unit is used to determine the target handwritten font corresponding to the target object; The conversion unit is used to convert the current font content according to the target handwritten font to obtain candidate content characters; and to obtain anti-counterfeiting information that matches the current user account. The shape adjustment parameters of the characters in the candidate content characters are determined according to the anti-counterfeiting information; the characters in the candidate content characters are adjusted according to the shape adjustment parameters to obtain the target handwritten font content; The push unit is used to push the target handwritten font content to the first client and the second client, wherein the account used by the second client and the account used by the first client are session accounts in the same session group.

24. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 13 or 14 to 21.

25. A computer program product comprising a computer program / instructions, characterized in that, When executed by a processor, the computer program / instructions implement the steps of the method described in any one of claims 1 to 13 or 14 to 21.

26. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 13 or 14 to 21 through the computer program.

Citation Information

Patent Citations

  • Method and system for generating and incorporating a signature in a document

    US20200301979A1

  • Personalized font display method and related product

    WO2020124457A1