Text information processing method and device, equipment and computer storage medium
By dividing and replacing sub-text images in web pages, the problem of insufficient security of sensitive text information on web pages in the existing technology is solved, and a higher information protection effect is achieved.
Patent Information
- Application Number
- CN202410513590.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2024-10-18
AI Technical Summary
Existing technology cannot effectively improve the security of sensitive text information on web pages, and crawler technology can still crack and identify sensitive text information, resulting in a high risk of information security leakage.
By obtaining text information in word units, using text dividing lines to divide it into multiple sub-areas, and drawing and replacing sub-text images, the risk of crawling and identification is reduced.
It improves the security of sensitive text information on web pages, reduces the risk of successful crawling and identification, and enhances the information protection effect.
Smart Images

Figure CN118799875A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information security, and in particular to a method, device, equipment and computer storage medium for text information processing. Background Art
[0002] At present, ordinary users can browse web pages through the Internet to obtain the content information they are interested in. However, some abnormal users use crawler technology to crawl sensitive text information in web pages and use it for abnormal purposes, causing great risks of information security leakage.
[0003] In the related art, the method of marking text information and shuffling the order or remapping the character encoding corresponding to the text information is usually adopted to prevent sensitive text information in the web page from being crawled. However, sensitive text information protected by related technologies is still easy to be cracked and identified, resulting in low security of sensitive text information on web pages. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, apparatus, device, computer storage medium and computer program product for processing text information, which can improve the security of sensitive text information on a web page.
[0005] In a first aspect, an embodiment of the present invention provides a method for processing text information, the method comprising:
[0006] Get the text information in the word unit, which is a collection of target words in the web page;
[0007] Using a text dividing line to divide the area corresponding to the text information, a plurality of sub-areas including sub-text information are obtained, wherein the sub-text information in the sub-areas is a part of the text information, and the sub-text information in the plurality of sub-areas are spliced to obtain the text information;
[0008] Draw sub-text images corresponding to the sub-text information in multiple sub-areas;
[0009] Replace the text information with multiple sub-text images to obtain the target information.
[0010] In an achievable implementation, the sub-region including the sub-text information includes a first divided region and a second divided region, the sub-text information includes first sub-text information and second sub-text information, and the region corresponding to the text information is divided by a text dividing line to obtain a plurality of sub-regions including the sub-text information, including:
[0011] Dividing the area corresponding to the text information by using the text dividing line to obtain a first divided area and a second divided area;
[0012] The text division line is translated along a first direction by a first distance to obtain a first target division line, where the first direction is the direction pointing to the first division area; the text division line is translated along a second direction by a first distance to obtain a second target division line, where the second direction is the direction pointing to the second division area;
[0013] The text information corresponding to the area included in the first target dividing line along the second direction is determined as the first sub-text information; and the text information corresponding to the area included in the second target dividing line along the first direction is determined as the second sub-text information.
[0014] In an achievable implementation, the subtext image includes a first subtext image and a second subtext image, and drawing the subtext images corresponding to the subtext information in the plurality of sub-regions includes:
[0015] The first sub-text information is printed on a preset first canvas to obtain a first sub-text image; the second sub-text information is printed on a preset second canvas to obtain a second sub-text image.
[0016] In an achievable implementation, before printing the first subtext information on a preset first canvas to obtain a first subtext image; and before printing the second subtext information on a preset second canvas to obtain a second subtext image, the method further includes:
[0017] A first canvas corresponding to the size of the area where the first subtext information is located is determined; and a second canvas corresponding to the size of the area where the second subtext information is located is determined.
[0018] In an achievable implementation, before replacing the text information with the multiple sub-text images to obtain the target information, the method further includes:
[0019] Detecting a first subtext image and a second subtext image;
[0020] When the first subtext image and the second subtext image are detected, the first subtext image and the second subtext image are used to replace the text information to obtain the target information.
[0021] In a second aspect, an embodiment of the present disclosure provides a device for processing text information, the device comprising:
[0022] The acquisition module is used to acquire text information in a word unit, where a word unit is a collection of target words in a web page;
[0023] A division module, the division module is used to divide the area corresponding to the text information by using the text division line to obtain multiple sub-areas including sub-text information, and the sub-text information in the multiple sub-areas is spliced to obtain the text information;
[0024] A drawing module, the drawing module is used to draw sub-text images corresponding to the sub-text information in the multiple sub-areas;
[0025] The replacement module is used to replace text information with multiple sub-text images to obtain target information.
[0026] In a third aspect, an embodiment of the present disclosure provides a device for processing text information, the device comprising a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement a method for processing text information as described in any one of the first aspects.
[0027] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method for text information processing as described in any one of the first aspects is implemented.
[0028] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed, implements a method for processing text information as described in any one of the first aspects.
[0029] The method, apparatus, device, computer storage medium and computer program product for text information processing provided by the embodiments of the present disclosure obtain text information in a word unit, divide the area corresponding to the text information by a text dividing line, divide the text information into a plurality of sub-text information, each sub-text information only includes a part of the text information, and obtain a plurality of sub-areas including sub-text information, that is, the sub-text information included in the obtained sub-areas is not complete text information. Then, sub-text images corresponding to the sub-text information in the plurality of sub-areas are drawn, and the plurality of sub-text images are used to replace the text information to obtain the target information. Since the sub-text information in the sub-text image is not the complete text information, based on this, the risk of the target information being crawled and successfully identified is reduced, and the security of the target information is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 It is a flowchart of a method for text information processing provided by an embodiment of the present disclosure;
[0032] Figure 2 is a schematic diagram of dividing text information provided by an embodiment of the present disclosure;
[0033] Figure 3It is a schematic diagram of a process of dividing areas corresponding to text information provided by an embodiment of the present disclosure;
[0034] Figure 4 This is a schematic diagram of obtaining text information division areas provided by an embodiment of the present disclosure;
[0035] Figure 5 is a schematic diagram of dividing text information provided by an embodiment of the present disclosure;
[0036] Figure 6 It is a schematic diagram of a process of obtaining a sub-text image by copying sub-text information provided by an embodiment of the present disclosure;
[0037] Figure 7 It is a schematic diagram of obtaining a sub-text image by rubbing sub-text information provided by an embodiment of the present disclosure;
[0038] Figure 8 is a schematic diagram of a process of detecting a sub-text image provided by an embodiment of the present disclosure;
[0039] Fig. 9 is a structural diagram of a text information processing device provided by an embodiment of the present disclosure;
[0040] Fig.10 It is a structural diagram of a text information processing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention, rather than to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0042] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0043] Before describing the technical solutions provided by the embodiments of the present disclosure, in order to facilitate understanding of the embodiments of the present disclosure, the present disclosure specifically describes the problems existing in the related technologies:
[0044] With the development of the information age, users can browse web pages to obtain content of their interest. Among them, web pages may display some sensitive text information, such as specific amounts or names of people, etc. Based on this phenomenon, some abnormal users use crawler technology to crawl a large amount of sensitive text information on web pages for subsequent abnormal behaviors, causing great risks of information security leakage.
[0045] In the related art, sensitive text information is usually marked, and then the order is shuffled to reduce the risk of sensitive text information leakage, or the character encoding corresponding to the sensitive text information is remapped to reduce the risk of sensitive text information leakage. However, for the first protection scheme of the related art, since the original information of the characters can be obtained, most of the sensitive text information can be obtained through the relevant algorithm even if the order of the sensitive text information is shuffled. For the second protection scheme of the related art, even if the character encoding corresponding to the sensitive text information is remapped, the crawler can analyze the vector coordinates of the font style, find the customized encoding rules of the sensitive text information, and then crack and obtain the original sensitive text information. In summary, the related art cannot effectively improve the security of sensitive text information on web pages.
[0046] In view of the above research findings of the inventors, the embodiments of the present disclosure provide a method, apparatus, device, computer storage medium and computer program product for processing text information, which can solve at least one of the above technical problems existing in the related art.
[0047] The technical concept of the disclosed embodiment is: obtaining text information in a word unit, wherein the word unit is a set of target words in a web page; the target word is a security-sensitive word, for example: Xiao Wang has N million yuan. By obtaining a set of security-sensitive words in a web page, it is convenient to centrally process sensitive words, while avoiding the additional resource consumption caused by processing all the text information of the entire web page. In order to improve the security of text information, sensitive words are centrally processed, and the area corresponding to the text information is divided by a text dividing line to obtain multiple sub-areas including sub-text information. Among them, the sub-text information of the sub-area is a part of the text information. Then, the sub-text information of the sub-area is printed using a canvas equal to the size of the sub-area, and sub-text images corresponding to the sub-text information in multiple sub-areas can be drawn. Among them, the sub-text information of the sub-text image is a part of the text information. After replacing the initial text information with multiple sub-text images, it is used as the target information. Even if the target information, i.e., multiple sub-text images, is crawled by a crawler, the crawler can only obtain the sub-text information of the sub-text image, and it is difficult to restore the semantics of the initial text information, thereby improving the security of the text information.
[0048] In order to solve the problems in the prior art, the embodiments of the present disclosure provide a method, device, equipment, computer storage medium and computer program product for processing text information. The method for processing text information provided by the embodiments of the present disclosure is first introduced below.
[0049] Figure 1 FIG. 1 is a flow chart showing a method for processing text information provided by an embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps S110-S140.
[0050] S110: Acquire text information in word units.
[0051] Among them, the word unit is a collection of target words in the web page.
[0052] Generally, a word unit is a word set obtained by wrapping text information in a web page in a unit form. In the embodiment of the present disclosure, a word unit is a word set obtained by wrapping sensitive words related to information security in text information in a web page, such as the daily turnover of website O is P million yuan. In the embodiment of the present disclosure, the target word is a sensitive word; the text information is the sensitive word in the word unit.
[0053] In one embodiment, the Document Object Model (DOM) may be used to wrap sensitive words in text information in a unit form to obtain word units.
[0054] The number of characters in the text information is not fixed, and can be one, two, or more.
[0055] S120: Using text division lines to divide the area corresponding to the text information to obtain a plurality of sub-areas including sub-text information, and concatenating the sub-text information in the plurality of sub-areas to obtain text information.
[0056] In the embodiment of the present disclosure, the area corresponding to the text information can be divided by a preset text dividing line, and the text information can be divided into a plurality of sub-text information, where the sub-text information is a part of the text information, and a plurality of sub-areas including the sub-text information can be obtained after the division. The sub-text information in the plurality of sub-areas can be spliced to obtain the text information.
[0057] In one example, if Figure 2 As shown, the text information is a word "good", and the text dividing line E divides the word "good" into two sub-text information, one of which is "female" and the other is "son".
[0058] The preset text dividing line may be a line of various styles, which does not actually exist. In some examples, the text dividing line may be a longitudinal center line, a transverse center line or a diagonal line of the area corresponding to the text information.
[0059] S130: Draw sub-text images corresponding to the sub-text information in the multiple sub-areas.
[0060] The canvas can be generated by using a preset method to print the sub-text information of the sub-region into a corresponding sub-text image. The sub-text image contains the sub-text information, which is a part of the text information.
[0061] In one embodiment, the Hyper Text Markup Language (HTML) can be used to <canvas>The element generates a canvas of the same size as the multiple sub-areas, and prints the sub-text information in the multiple sub-areas on the corresponding canvas to draw the corresponding sub-text pictures.
[0062] S140: Replace the text information with multiple sub-text images to obtain target information.
[0063] Among them, a preset replacement method can be used to replace the text information with multiple sub-text images to obtain the target information. The display effect of the target information on the web page is the same as the display effect of the text information on the web page.
[0064] In one embodiment, after obtaining a plurality of sub-text images, the DOM may be used to replace the text information in the DOM with the plurality of sub-text images as the target information.
[0065] The disclosed embodiment obtains text information in a word unit, divides the area corresponding to the text information by a text dividing line, and obtains a plurality of sub-areas including sub-text information. The sub-text information included in the obtained sub-areas is not complete text information. Then, corresponding sub-text images are drawn according to the sub-text information in the plurality of sub-areas, and the plurality of sub-text images are used to replace the text information to obtain the target information. Since the sub-text information in the sub-text image is not complete text information, based on this, the risk of the target information being crawled and successfully identified is reduced, and the security of the target information is improved.
[0066] In one embodiment, Figure 3 As shown, step S120 includes S121-S123.
[0067] S121: Divide the area corresponding to the text information by using the text dividing line to obtain a first divided area and a second divided area.
[0068] The text dividing line may be a longitudinal center line, a transverse center line or a diagonal line of an area corresponding to each word in the text information. The text information may be one word, two words or multiple words. The first divided area and the second divided area respectively contain partial information of the text information after being divided.
[0069] In one embodiment, a preset text division line, such as a horizontal center line, may be used to divide the area corresponding to each character in the text information to obtain a first divided area and a second divided area.
[0070] In one example, if Figure 4 As shown, the text information is a word "Chang", and the area corresponding to the word "Chang" is divided by the text dividing line H to obtain a first divided area H1 and a second divided area H2.
[0071] S122: translating the text dividing line along a first direction by a first distance to obtain a first target dividing line, where the first direction is the direction pointing to the first divided area; translating the text dividing line along a second direction by a first distance to obtain a second target dividing line, where the second direction is the direction pointing to the second divided area.
[0072] Among them, the text dividing line can be a line of various styles, and the line does not actually exist. In some embodiments, the text dividing line can be a longitudinal center line, a transverse center line or a diagonal line of the area corresponding to the text information. The first direction can be perpendicular to the text dividing line, and the second direction can be perpendicular to the text dividing line. The first distance value can be, for example, 0.5 cm, 0.3 cm. In the embodiment of the present disclosure, the value of the first distance can be set according to demand.
[0073] In one embodiment, the text division line of the area corresponding to each word in the text information, such as the longitudinal center line, can be translated along the first direction by a first distance, such as 1 cm, to obtain a first target division line. The text division line of the area corresponding to each word in the text information, such as the longitudinal center line, can be translated along the second direction by a first distance, such as 1 cm, to obtain a second target division line.
[0074] In one example, if Figure 5 As shown, "Liu" is text information, and L is the longitudinal center line of the text. L is translated in the left direction by a distance of X to obtain the first target dividing line L1, and L is translated in the right direction by a distance of X to obtain the second target dividing line L2.
[0075] S123: Determine text information corresponding to an area included in the first target dividing line along the second direction as first sub-text information; determine text information corresponding to an area included in the second target dividing line along the first direction as second sub-text information.
[0076] The first subtext information is a part of the text information, and the second subtext information is a part of the text information. The first subtext information and the second subtext information can be combined to obtain the text information. The first direction points to the direction of the first divided area, and can be perpendicular to the text dividing line. The second direction points to the direction of the second divided area, and can be perpendicular to the text dividing line.
[0077] In one embodiment, the first target dividing line and the second target dividing line can be determined by translating the text dividing line, such as the longitudinal center line, by a first distance, and then the text information corresponding to the area included in the second direction of the first target dividing line is determined as the first sub-text information. The text information corresponding to the area included in the first direction of the second target dividing line is determined as the second sub-text information.
[0078] In one example, if Figure 5 As shown in the figure, the step process of using a text division line to divide the area corresponding to text information and obtaining multiple sub-areas including sub-text information can be as follows: Among them, "Liu" is the text information, and L is the vertical center line of the text. Use L to divide the area where "Liu" is located to obtain two divided areas. Translate L a distance of X to the left to obtain the first target division line L1, and translate L a distance of X to the right to obtain the second target division line L2. Determine the information corresponding to the area included by L1 to the right as the first sub-text information, and determine the information corresponding to the area included by L2 to the left as the second sub-text information.
[0079] In the embodiments of the present disclosure, using a text division line to divide the area corresponding to text information can obtain a first divided area and a second divided area. By translating the text division line along the first divided area and the second divided area by a first distance respectively, a first target division line and a second target division line can be obtained respectively. By using the first target division line, the second target division line, the first divided area, and the second divided area, the first sub-text information and the second sub-text information for drawing sub-text pictures can be obtained.
[0080] In one embodiment, as Figure 6 shown, step S130 may further include S131 and S132.
[0081] S131: Transfer the first sub-text information onto a preset first canvas to obtain a first sub-text picture.
[0082] S132: Transfer the second sub-text information onto a preset second canvas to obtain a second sub-text picture.
[0083] Among them, the number of sub-text information corresponds to the number of canvases. The first sub-text information is a part of the text information, and the second sub-text information is a part of the text information. The combination of the first sub-text information and the second sub-text information can obtain the text information. The first canvas and the second canvas can be in various ways, such as HTML's <canvas>Element generation.
[0084] In one embodiment, after obtaining the first subtext information and the second subtext information, the HTML <canvas>The element generates a first canvas and a second canvas. The first sub - text information is printed on the first canvas. The second sub - text information can be printed on the second canvas.
[0085] In one example, as Figure 7 shown, "浏" is the text information, Z is the vertical center line of the character, Z1 is the first target dividing line obtained by translating Z by a distance K to the left direction, and Z2 is the second target dividing line obtained by translating Z by a distance K to the right direction. The information corresponding to the area included by Z1 along the right direction is determined as the first sub - text information, that is, "刘", and the information corresponding to the area included by Z2 along the left direction is determined as the second sub - text information, that is, "汶". The second sub - text information is printed on the second canvas to obtain a second sub - text picture including the second sub - text information "汶". The first sub - text information is printed on the first canvas to obtain a first sub - text picture including the first sub - text information "刘".
[0086] In the embodiments of the present disclosure, by printing the first sub - text information on the preset first canvas, a first sub - text picture for composing the target information can be obtained. By printing the second sub - text information on the preset second canvas, a second sub - text picture for composing the target information can be obtained.
[0087] In one embodiment, before printing the first sub - text information on the preset first canvas to obtain a first sub - text picture and printing the second sub - text information on the preset second canvas to obtain a second sub - text picture, the method further includes step S210:
[0088] S210: Determine a first canvas corresponding to the area size where the first sub - text information is located; determine a second canvas corresponding to the area size where the second sub - text information is located.
[0089] In one embodiment, the <canvas>The element generates a first canvas corresponding to the size of the area where the first subtext information is located. You can use HTML <canvas>The element generates a second canvas corresponding to the size of the area where the second sub-text information is located.
[0090] In the disclosed embodiment, by determining a first canvas corresponding to the size of the area where the first subtext information is located and determining a second canvas corresponding to the size of the area where the second subtext information is located, the size of the canvas can be matched with the size of the area where the subtext information is located.
[0091] In one embodiment, Figure 8 As shown, before replacing the text information with the multiple sub-text images to obtain the target information, the method further includes step S310 and step S320.
[0092] S310: Detect a first subtext image and a second subtext image.
[0093] S320: When the first subtext image and the second subtext image are detected, the first subtext image and the second subtext image are used to replace the text information to obtain target information.
[0094] The first subtext image and the second subtext image may be detected by a program in the terminal.
[0095] In one embodiment, the relevant program code can be used to detect whether the first subtext image and the second subtext image exist. If the first subtext image and the second subtext image are detected, the first subtext image and the second subtext image can be used to replace the text information in the DOM to obtain the target information.
[0096] The disclosed embodiment obtains target information by detecting a first sub-text image and a second sub-text image, and replacing text information with the first sub-text image and the second sub-text image, thereby reducing the risk of the target information being crawled and successfully identified and improving the security of the target information.
[0097] like Fig. 9 As shown, the embodiment of the present disclosure further provides a text information processing device 800, and the text information processing device 800 includes:
[0098] The acquisition module 801 is used to acquire text information in a word unit, where a word unit is a collection of target words in a web page;
[0099] A division module 802 is used to divide the area corresponding to the text information by using a text division line to obtain a plurality of sub-areas including sub-text information, and the sub-text information in the plurality of sub-areas is spliced to obtain text information;
[0100] A drawing module 803, used for drawing sub-text images corresponding to the sub-text information in the multiple sub-areas;
[0101] The replacement module 804 is used to replace the text information with multiple sub-text images to obtain the target information.
[0102] In some embodiments, the partitioning module 802 is specifically configured to:
[0103] Dividing the area corresponding to the text information by using the text dividing line to obtain a first divided area and a second divided area;
[0104] The text division line is translated along a first direction by a first distance to obtain a first target division line, where the first direction is the direction pointing to the first division area; the text division line is translated along a second direction by a first distance to obtain a second target division line, where the second direction is the direction pointing to the second division area;
[0105] The text information corresponding to the area included in the first target dividing line along the second direction is determined as the first sub-text information; and the text information corresponding to the area included in the second target dividing line along the first direction is determined as the second sub-text information.
[0106] In some embodiments, the drawing module 803 is specifically used to:
[0107] Printing the first sub-text information on a preset first canvas to obtain a first sub-text image;
[0108] The second sub-text information is printed on a preset second canvas to obtain a second sub-text image.
[0109] In some embodiments, the text information processing apparatus further includes a determination module, the determination module being used to determine a first canvas corresponding to the size of the area where the first subtext information is located; and determine a second canvas corresponding to the size of the area where the second subtext information is located.
[0110] In some embodiments, the text information processing device also includes a detection module, which is used to detect a first sub-text picture and a second sub-text picture; when the first sub-text picture and the second sub-text picture are detected, the first sub-text picture and the second sub-text picture replace the text information to obtain the target information.
[0111] Fig. 9 Each module / unit in the device shown has the function of realizing Figure 1 , Figure 3 , Figure 6 , Figure 8 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0112] Fig.10 A schematic diagram of the hardware structure of text information processing provided by an embodiment of the present disclosure is shown.
[0113] The text information processing device may include a processor 1301 and a memory 1302 storing computer program instructions.
[0114] Specifically, the processor 1301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0115] The memory 1302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1302 is a non-volatile solid-state memory.
[0116] The memory 1302 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0117] The processor 1301 implements any one of the text information processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 1302 .
[0118] In one example, the text information processing device may further include a communication interface 1303 and a bus 1304. Fig.10 As shown, the processor 1301, the memory 1302, and the communication interface 1303 are connected via a bus 1304 and communicate with each other.
[0119] The communication interface 1303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0120] Bus 1304 includes hardware, software or both, and couples the components of the online data traffic billing device to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses or a combination of two or more of these. In appropriate cases, bus 1304 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection. In addition, in conjunction with the method for text information processing in the above-mentioned embodiment, the embodiment of the present application also provides a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the text information processing methods in the above embodiments is implemented.
[0121] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the text information processing methods in the above embodiments when the computer program is processed and executed.
[0122] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0123] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact discs (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0124] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0125] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0126] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.< / canvas> < / canvas> < / canvas> < / canvas> < / canvas>
Claims
1. A method for text information processing, characterized in that: include: Acquire text information in a word unit, where the word unit is a set of target words in a web page; Using text dividing lines to divide the area corresponding to the text information to obtain multiple sub-areas including sub-text information, wherein the sub-text information in the sub-areas is a part of the text information, and the sub-text information in the multiple sub-areas is spliced to obtain the text information; Draw sub-text pictures corresponding to the sub-text information in the plurality of sub-areas; The text information is replaced by the multiple sub-text images to obtain target information.
2. The method according to claim 1, characterized in that: The sub-region including the sub-text information includes a first divided region and a second divided region, the sub-text information includes first sub-text information and second sub-text information, and the region corresponding to the text information is divided by a text dividing line to obtain a plurality of sub-regions including the sub-text information, including: Dividing the area corresponding to the text information by using the text dividing line to obtain a first divided area and a second divided area; The text dividing line is translated along a first direction by a first distance to obtain a first target dividing line, wherein the first direction is a direction pointing to the first divided area; the text dividing line is translated along a second direction by the first distance to obtain a second target dividing line, wherein the second direction is a direction pointing to the second divided area; The text information corresponding to the area included in the first target dividing line along the second direction is determined as the first sub-text information; and the text information corresponding to the area included in the second target dividing line along the first direction is determined as the second sub-text information.
3. The method according to claim 2, characterized in that The sub-text picture includes a first sub-text picture and a second sub-text picture, and the drawing of the sub-text pictures corresponding to the sub-text information in the plurality of sub-areas includes: Printing the first sub-text information on a preset first canvas to obtain a first sub-text image; The second sub-text information is printed on a preset second canvas to obtain a second sub-text image.
4. The method according to claim 3, characterized in that: Before printing the first subtext information on a preset first canvas to obtain a first subtext image; and before printing the second subtext information on a preset second canvas to obtain a second subtext image, the method further includes: The first canvas is determined to have a size corresponding to the area where the first subtext information is located; and the second canvas is determined to have a size corresponding to the area where the second subtext information is located.
5. The method according to any one of claims 2 to 4, characterized in that: Before replacing the text information with the multiple sub-text images to obtain the target information, the method further includes: Detecting the first sub-text picture and the second sub-text picture; When the first subtext picture and the second subtext picture are detected, the first subtext picture and the second subtext picture are used to replace the text information to obtain target information.
6. A device for text information processing, characterized in that: The device comprises: An acquisition module, the acquisition module is used to acquire text information in a word unit, the word unit is a set of target words in a web page; A division module, the division module is used to divide the area corresponding to the text information by using a text division line to obtain a plurality of sub-areas including sub-text information, and the sub-text information in the plurality of sub-areas is spliced to obtain the text information; A drawing module, the drawing module is used to draw sub-text pictures corresponding to the sub-text information in the plurality of sub-areas; A replacement module is used to replace the text information with the multiple sub-text images to obtain target information.
7. The device according to claim 6, characterized in that The sub-region including the sub-text information includes a first divided region and a second divided region, the sub-text information includes first sub-text information and second sub-text information, and the dividing module divides the region corresponding to the text information using a text dividing line in the following manner to obtain a plurality of sub-regions including the sub-text information: Dividing the area corresponding to the text information by using the text dividing line to obtain a first divided area and a second divided area; The text dividing line is translated along a first direction by a first distance to obtain a first target dividing line, wherein the first direction is a direction pointing to the first divided area; the text dividing line is translated along a second direction by the first distance to obtain a second target dividing line, wherein the second direction is a direction pointing to the second divided area; The text information corresponding to the area included in the first target dividing line along the second direction is determined as the first sub-text information; and the text information corresponding to the area included in the second target dividing line along the first direction is determined as the second sub-text information.
8. A device for processing text information, characterized in that: The device comprises: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the text information processing method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for processing text information according to any one of claims 1 to 5 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, wherein when the computer program is executed, the method for processing text information according to any one of claims 1 to 5 is implemented.
