WO2020248849A1 - Webpage language switching method and apparatus, and terminal device - Google Patents

Webpage language switching method and apparatus, and terminal device Download PDF

Info

Publication number
WO2020248849A1
WO2020248849A1 PCT/CN2020/093600 CN2020093600W WO2020248849A1 WO 2020248849 A1 WO2020248849 A1 WO 2020248849A1 CN 2020093600 W CN2020093600 W CN 2020093600W WO 2020248849 A1 WO2020248849 A1 WO 2020248849A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
type
target
language
web page
Prior art date
Application number
PCT/CN2020/093600
Other languages
French (fr)
Chinese (zh)
Inventor
陈彩霞
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020248849A1 publication Critical patent/WO2020248849A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Definitions

  • This application belongs to the field of Internet technology, and in particular relates to a method, device, terminal device, and computer-readable storage medium for switching webpage language.
  • the inventor found that based on the existing website deployment method, when a user browses to a certain page, if the language switch event is triggered on the website, the browser will reload the resource information of the website and return to the homepage of the website. For example, reload another code page resource written in English and return to the homepage of the website. In this case, the user needs to search the webpage again before entering the hierarchical webpage visited last time. It can be seen that the existing webpage access methods have the problems of high cumbersome operation and low flexibility, and it is difficult to meet the webpage access requirements of users.
  • the embodiments of the present application provide a method, device, terminal device, and computer-readable storage medium for switching web page languages to solve the problems of high cumbersome operation and low flexibility of existing web page access methods. problem.
  • the first aspect of the embodiments of the present application provides a method for switching the language of a webpage, including: receiving a language switching instruction issued by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about the target language type Obtain the object type of the selected object; Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the back-end server, so that the back-end server will After the language type of the web page information to be converted is switched from the source language type to the target language type, target information is obtained; the target information returned by the back-end server is received, and the target information is displayed for the selected object Create a new label page.
  • a second aspect of the embodiments of the present application provides a webpage language switching device, including: a receiving unit, configured to receive a language switching instruction issued by a user for a selected object in a target webpage, and the language switching instruction carries information about the target The attribute information of the language type; the first obtaining unit is used to obtain the object type of the selected object; the determining unit is used to determine the corresponding web page information to be converted based on the selected object and the object type, and compare the The webpage information to be converted is sent to the backend server, so that the backend server obtains the target information after switching the language type of the webpage information to be converted from the source language type to the target language type; the display unit is configured to receive the The target information returned by the background server is displayed in a new tab page created for the selected object.
  • a third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the following is achieved Step: Receive a language switching instruction issued by the user for the selected object in the target web page, the language switching instruction carries attribute information about the target language type; obtain the object type of the selected object; based on the selected object and the Object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the background server, so that the background server switches the language type of the web page information to be converted from the source language type to the target language After the type, target information is obtained; the target information returned by the background server is received, and the target information is displayed in a new tab page created for the selected object.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium
  • the computer-readable storage medium stores a computer program
  • the processor executes the computer program, the following steps are implemented: A language switching instruction issued for a selected object, the language switching instruction carrying attribute information about the target language type; acquiring the object type of the selected object; determining the corresponding to be converted based on the selected object and the object type Web page information, and send the web page information to be converted to a back-end server, so that the back-end server obtains the target information after switching the language type of the web page information to be converted from the source language type to the target language type; receiving The target information returned by the background server is displayed in a new tab page created for the selected object.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • FIG. 1 is a schematic diagram of the implementation process of a method for switching web page languages provided by an embodiment of the present application.
  • FIG. 2 is a specific implementation flow chart of the method S103 for switching web page languages provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the implementation process of a method for switching web page languages provided by another embodiment of the present application.
  • FIG. 4 is a schematic diagram of the implementation process of a method for switching web page languages provided by another embodiment of the present application.
  • FIG. 5 is another specific implementation flow chart of the method S103 for switching webpage language provided by an embodiment of the present application.
  • Fig. 6 is a structural block diagram of a webpage language switching device provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • Fig. 1 shows an implementation flowchart of a webpage language switching method provided by an embodiment of the present application, which is detailed as follows.
  • S101 Receive a language switching instruction issued by a user for a selected object in a target webpage, where the language switching instruction carries attribute information about the target language type.
  • the webpage that the user needs to browse is the target webpage.
  • the webpage source code of the target webpage is parsed, and the character string of the target webpage is loaded and displayed in the browser interface in the language type preset by the webpage source code.
  • the user can select any object in the target webpage by moving the cursor running in the browser interface. After any object is selected, if it is detected that the language switching control in the browser interface is triggered by clicking, it is confirmed that the language switching instruction issued by the user for the selected object is received. Among them, when the language switching control is clicked and triggered, the browser interface will generate a language type display list.
  • the language type display list contains preset multiple language types, such as Chinese, English, Chinese, Japanese, Spanish, Thai, and French.
  • the language type selected by the user in the language type display list is encapsulated into the language switching instruction as a piece of attribute information.
  • the user identification carried in the access request is acquired.
  • search for a page browsing record matching the user ID and extract the historical access language associated with the page browsing record.
  • the script code corresponding to the historical access language is obtained. After the script code is parsed by the browser, the target page displayed in the historical access language is obtained by loading.
  • the display target is initialized with the associated historical access language by obtaining the page browsing records matching the user ID
  • the page can reduce the number of operations for the user to switch the language of the target webpage, thereby improving the efficiency of webpage browsing.
  • the object type of the selected object is determined by recognizing the tag attribute of the selected object in the webpage code.
  • Object types include, but are not limited to, primary label types, secondary label types, and other level label types.
  • first-level tag types can be, for example, titles and subtitles; for example, the second-level tag types can be text paragraphs, tables, pictures, and videos.
  • the picture may be determined as the selected object.
  • the source code information of the target webpage locate the label attribute corresponding to the selected object. If it is detected that the tag attribute is the image tag ⁇ img>, the object type of the selected object can be identified as a secondary tag.
  • the user wants to switch the language of a text paragraph in the target webpage he can select the text paragraph by moving the cursor. If the source code information corresponding to the selected object is ⁇ p>This is a paragraph ⁇ /p>, it can be recognized that the tag attribute of the selected object is a text paragraph, so it is determined that the object type is a secondary tag.
  • S103 Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to a back-end server, so that the back-end server will report the language type of the web page information to be converted After switching from the source language type to the target language type, the target information is obtained.
  • the information of the webpage to be converted represents part of the string content that the background server needs to perform language conversion processing during the subsequent language type switching process.
  • the selected object and the web page information to be converted may be the same or different, which is determined according to the object type and/or tag attribute of the selected object.
  • the preset conversion rule is loaded.
  • the corresponding web page information to be converted is determined.
  • the above conversion rule includes: if the tag attribute of the selected object is a title, the corresponding web page information to be converted is the title text and multiple text paragraphs consecutively appearing under the title; if the tag attribute of the selected object is a text paragraph, then The corresponding web page information to be converted is each character string contained in the selected object itself; if the tag attribute of the selected object is a picture, the corresponding web page information to be converted is the text character contained in the picture; if the tag attribute of the selected object is video /Audio, the corresponding web page information to be converted is the subtitle text information of the video source/audio source.
  • the determined webpage information to be converted and the received language switching instruction are sent to the backend server for executing the text translation operation.
  • the backend server performs language conversion processing on the web page information to be converted, so as to switch the language type of the web page information to be converted from the source language type to the target language type, and then return the generated target information .
  • the source address of the picture is sent to the backend server, so that after the backend server loads the picture based on the source address, it uses a preset picture detection algorithm to identify the contained characters. Text characters.
  • the information to be converted is the subtitle text information of the video source/audio source
  • the source server information of the video source/audio source is obtained. Based on the source server information, after requesting to download the subtitle text information associated with the video source/audio source, the subtitle text information is sent to the background server.
  • S104 Receive the target information returned by the background server, and display the target information in a new tab page created for the selected object.
  • the target information returned by the background server is received.
  • a new tab page is additionally generated in the browser interface.
  • the updated copy of the code containing the second source code is parsed to re-render the visit page displayed in the target language in the new tab page.
  • the corresponding webpage information to be converted is determined based on the selected object and its object type, which ensures that during the operation process of website language switching, It can only perform conversions on part of the layout content, which improves the flexibility of web page language switching; by displaying the target information returned by the background server in the currently created new tab page, the user does not need to refresh the original website page , You can also quickly view the content of the page in the language you need, and the original page will not return to the home page, thus reducing the cumbersome operation of the user during the web page access process.
  • FIG. 2 shows the specific implementation process of the webpage language conversion method S103 provided by the embodiment of the present application, which is described in detail as follows.
  • the object type of the selected object is determined by detecting the label attribute of the selected object, and according to the preset label attribute and the correspondence table of the object type. If the object type of the selected object is the first-level tag type, the source code information of the target webpage is read, and the source code information matched by the selected object is located.
  • S1032 In the source code information, locate each secondary label successively appearing after the selected object, and obtain the selected object and code information associated with the secondary label respectively.
  • the code module includes one or more object tags.
  • the code distribution position of the selected object is used as the starting point to detect each secondary label consecutively appearing after the code distribution position, and the primary label and subsequent ones The code information contained in each secondary label is read.
  • S1033 Determine the code information as the web page information to be converted corresponding to the selected object.
  • the system can locate the selected object and the successive second-level objects. Label, and obtain the code information associated with the primary label and secondary label, thereby automatically determining the corresponding web page information to be converted, avoiding the need for users to click one by one to select the web page information to be converted with a wider distribution, thereby reducing the user’s
  • the operation is cumbersome, and the efficiency of selecting the selected objects is improved; since the selected objects include multiple types of object types such as titles, text paragraphs, images, videos, and voices, the scope of application of language type conversion events is expanded, and web page language switching It is not limited to the text content of the target webpage, thus improving flexibility and meeting the webpage access needs of more users.
  • FIG. 3 shows an implementation process of a method for switching web page languages provided by another embodiment of the present application.
  • S104 further includes: S105: Detect the first currency identifier existing in the target information, and determine the first currency type and the first amount corresponding to the first currency identifier value.
  • the first currency identifier is any type of currency identifier existing in the preset list, including but not limited to " ⁇ ", "£", " ⁇ " and so on.
  • the first currency type corresponding to the first currency identifier is obtained according to the preset currency conversion list.
  • the currency conversion list is used to record the mapping relationship between currency identifiers, currency types, and language types. For example, if the first currency identifier in the target information is Then the first currency type obtained is US dollars, and the corresponding language type is English.
  • the digital information displayed adjacent to the first currency identifier in the target information is extracted, and the extracted value is output as the first currency value corresponding to the first currency identifier to represent the currency amount value of the currency type size.
  • S106 According to a preset currency conversion list, obtain a second currency identifier and a second currency type that match the target language type.
  • search for the second currency identifier and the second currency type that match the target language type By sending the first currency type and the second currency type to the exchange rate conversion platform or by calling the exchange rate query interface, the return value of the real-time exchange rate of the first currency type and the second currency type is obtained.
  • S107 Obtain real-time exchange rates of the first currency type and the second currency type, and calculate a second amount value corresponding to the first amount value based on the real-time exchange rate.
  • the second amount value corresponding to the first amount value is calculated according to the first amount value obtained above and the real-time exchange rate, and the first amount value in the target information is replaced and displayed as the second amount value, Replace the first currency identifier with the second currency identifier.
  • the first currency type detected is US dollars; if the target language type carried by the language switching instruction is Chinese, the currency conversion list can be used It is determined that the second currency type matching Chinese is RMB, and its currency identifier is " ⁇ ".
  • RMB the second currency type matching Chinese
  • the currency identifier
  • real-time exchange rates between RMB and U.S. dollars are obtained. If the real-time exchange rate is 1:6, based on the exchange rate, convert the in the target information to " ⁇ 1200" and display the string " ⁇ 1200" on the new label page.
  • the currency type applicable to the target language is automatically determined, and the second currency type matching the currency type is displayed.
  • the currency identifier and the second currency amount ensure that the user can have a better experience when browsing the website pages, and it is convenient to view the currency exchange value between different regions, thereby improving the interactive performance of the web page.
  • the method for obtaining the target language type is further limited. As shown in FIG. 4, before the above S101, the method further includes: S109: Extract the chat history information of the user in the latest preset time period in the currently running communication media window.
  • the communication media window related to the communication application software is searched and called. According to the communication account matched by the communication media window, read the chat history information about the communication account within the last preset time period.
  • the chat history information is usually composed of strings in multiple languages and multimedia files.
  • the language type of each character in the chat record information is obtained. If the chat record information includes a picture file, the characters contained in the picture file are recognized, and the language type of the character is obtained.
  • S111 Count the total number of characters of each language type respectively, and determine the language type with the largest total number of characters as the target language type of the user.
  • each language type For each language type, count the total number of characters corresponding to the language type detected in the chat record information. By comparing the numerical value of the total number of characters in each language type, the language type with the largest total number of characters is selected, and the language type is determined as the target language type that the user needs to use in the target page.
  • the chat history information of the latest preset duration contains 50 Chinese characters and 20 English characters
  • the language type with the largest total number of characters is Chinese. Therefore, Chinese is determined as the user's target language type.
  • the text input method currently switched by the user is detected, and the language type corresponding to the text input method is obtained. If the obtained language type is the same as the language type with the largest total number of characters, then the language type is determined as the user's target language type.
  • the language type of the characters contained in the chat record information is related to the user's browsing target page There is a high degree of coincidence between the language types used at the time. Therefore, by detecting the language type of each character in the chat record information, the language type with the largest total number of characters is determined as the user's target language type, which realizes the automatic positioning of the target language , So that the user does not need to manually switch the webpage language in the target page, thus reducing the cumbersome operation and improving the interactive performance of the webpage.
  • FIG. 5 shows another specific implementation process of the webpage language switching method S103 provided by the embodiment of the present application, which is detailed as follows.
  • S1034 Determine corresponding web page information to be converted based on the selected object and the object type, and detect each phrase element contained in the web page information to be converted.
  • the web page information to be converted is word segmented to obtain each phrase element contained in the web page information to be converted .
  • S1035 Invoke a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element.
  • the language switch interface is used to compare the phrase elements before and after the language switch. In an element set containing pre-collected elements of various language types, if the query finds that the phrase element has a target conversion element that matches the target language type, it means that after the language switching processing operation, the phrase element has a character change.
  • the phrase element includes “USB”.
  • USB since it should be displayed as “USB” before the language conversion and after the language conversion, it is determined that the phrase element does not have a matching target conversion element through the above language switching interface .
  • the phrase element that does not have a matching target conversion element is removed from the webpage information to be converted.
  • a preset mark is added to the original position of the phrase element.
  • the webpage information to be converted that does not contain the phrase element is sent to the backend server, so that the backend server only performs language conversion processing on each received phrase element and returns related target information.
  • the above-mentioned eliminated phrase elements are re-added to the page position corresponding to the preset mark. So far, the fusion display of phrase elements and target information has been realized.
  • the phrase element by detecting each phrase element contained in the webpage information to be converted, calling the language switching interface to determine whether the phrase element has a matching target conversion element, and when the judgment result is no, the phrase element other than the phrase element.
  • the information of the webpage to be converted is sent to the back-end server, which realizes the modular language conversion of phrase elements, and ensures that the back-end server does not need to perform repeated conversion processing on phrase elements that do not have target conversion elements. Therefore, the language switching efficiency of the target webpage is improved.
  • FIG. 6 shows a structural block diagram of a webpage language switching device provided in an embodiment of the present application.
  • the device for switching webpage language illustrated in FIG. 6 may be the execution subject of the method for switching webpage language provided in the foregoing embodiment.
  • the webpage language switching device includes: a receiving unit 61, configured to receive a language switching instruction issued by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about the target language type.
  • the first obtaining unit 62 is configured to obtain the object type of the selected object.
  • the determining unit 63 is configured to determine the corresponding web page information to be converted based on the selected object and the object type, and send the web page information to be converted to a back-end server, so that the back-end server transmits the web page to be converted After the language type of the information is switched from the source language type to the target language type, the target information is obtained.
  • the display unit 64 is configured to receive the target information returned by the background server, and display the target information in a new tab page created for the selected object.
  • the above-mentioned webpage language switching device further includes: a first detection unit, configured to detect the first currency identifier present in the target information, and determine the first currency type corresponding to the first currency identifier And the first amount value.
  • the second obtaining unit is configured to obtain a second currency identifier and a second currency type that match the target language type according to a preset currency conversion list.
  • the calculation unit is configured to obtain the real-time exchange rate of the first currency type and the second currency type, and calculate a second amount value corresponding to the first amount value based on the real-time exchange rate.
  • the updating unit is configured to update the first amount value and the first currency identifier in the target information to the second amount value and the second currency identifier, respectively.
  • the determining unit 63 includes: an obtaining subunit, configured to obtain source code information of the target webpage if the object type is a first-level tag type.
  • the locating subunit is used for locating, in the source code information, each secondary label successively appearing after the selected object, and respectively obtain the selected object and code information associated with the secondary label.
  • the determining subunit is configured to determine the code information as the web page information to be converted corresponding to the selected object.
  • the determining unit 63 includes: a detection subunit, configured to determine corresponding webpage information to be converted based on the selected object and the object type, and detect each phrase element contained in the webpage information to be converted .
  • the traversal subunit is used to call a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element.
  • the reservation subunit is configured to, if the phrase element does not have a matching target conversion element, retain the phrase element for display, and send the webpage information to be converted except for the phrase element to the background server.
  • the webpage language switching device further includes: an extracting unit, configured to extract the chat history information of the user in the latest preset time period in the currently running communication media window.
  • the second detection unit is used to detect the language type of each character in the chat record information.
  • the statistical unit is configured to separately count the total number of characters of each language type, and determine the language type with the largest total number of characters as the target language type of the user.
  • the corresponding webpage information to be converted is determined based on the selected object and its object type, which ensures that during the operation process of website language switching, It can only perform conversions on part of the layout content, which improves the flexibility of web page language switching; by displaying the target information returned by the background server in the currently created new tab page, the user does not need to refresh the original website page , You can also quickly view the content of the page in the language you need, and the original page will not return to the home page, thus reducing the cumbersome operation of the user during the web page access process.
  • Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 7 of this embodiment includes a processor 70 and a memory 71, and the memory 71 stores a computer program 72 that can run on the processor 70.
  • the processor 70 executes the computer program 72, the steps in the above embodiments of the method for switching web page languages are implemented, such as steps 101 to 104 shown in FIG. 1.
  • the processor 70 executes the computer program 72
  • the functions of the modules/units in the foregoing device embodiments, such as the functions of the units 61 to 64 shown in FIG. 6, are realized.
  • the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 70 and a memory 71.
  • FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
  • the terminal device may also include an input sending device, a network access device, a bus, and the like.
  • the so-called processor 70 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
  • the memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk equipped on the terminal device 7, a smart memory card (Smart Media Card, SMC), or a Secure Digital (SD). Card, Flash Card, etc.
  • the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device.
  • the memory 71 is used to store the computer program and other programs and data required by the terminal device.
  • the memory 71 can also be used to temporarily store data that has been sent or will be sent.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM) , Random Access Memory (Random Access Memory, RAM), electrical carrier signal, telecommunications signal, and software distribution media.
  • the computer-readable storage medium may be a non-volatile storage medium or a volatile storage medium.

Landscapes

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

Abstract

The present application provides a webpage language switching method and apparatus, and a terminal device, applicable to the Internet technology field. The method comprises: receiving a language switching instruction sent by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about a target language type; obtaining the object type of the selected object; determining, on the basis of the selected object and the object type, corresponding webpage information to be translated, and sending the webpage information to be translated to a background server, so that the background server switches the language type of the webpage information to be translated from a source language type to the target language type to obtain target information; and receiving the target information returned by the background server, and displaying the target information in a new label page created for the selected object. The present application improves the flexibility of webpage language switching; a user can check page content of a desired language type without refreshing an original website page, so that the operation complexity in a webpage access process is reduced.

Description

一种网页语言的切换方法、装置及终端设备Method, device and terminal equipment for switching webpage language
本申请要求于2019年6月14日提交中国专利局、申请号为201910517960.8,发明名称为“一种网页语言的切换方法、装置及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 14, 2019, the application number is 201910517960.8, and the invention title is "a webpage language switching method, device and terminal device", the entire content of which is by reference Incorporated in this application.
技术领域Technical field
本申请属于互联网技术领域,尤其涉及一种网页语言的切换方法、装置、终端设备及计算机可读存储介质。This application belongs to the field of Internet technology, and in particular relates to a method, device, terminal device, and computer-readable storage medium for switching webpage language.
背景技术Background technique
随着互联网技术的不断发展,越来越多的网站开始趋向于国际化处理,以实现将网站的内容展示给不同地区的用户。例如,许多网站都支持中文以及英文。当用户选择的语言类型为中文时,以中文显示网页中的文本内容;当用户选择的语言类型为英文时,以英文显示网页中的文本内容。With the continuous development of Internet technology, more and more websites begin to tend to be internationalized in order to display the content of the website to users in different regions. For example, many websites support Chinese and English. When the language type selected by the user is Chinese, the text content in the web page is displayed in Chinese; when the language type selected by the user is English, the text content in the web page is displayed in English.
然而,发明人发现,基于现有的网站部署方式,当用户浏览到某一页面时,若其在网站上触发语言切换事件,则浏览器将会重新加载该网站的资源信息并返回网站首页,例如,重新加载以英文编写的另一代码页面资源并返回网站首页。这种情况下,用户需要再次进行网页的搜寻操作后,才能再次进入上次所访问的层级网页。可见,现有的网页访问方式存在操作繁琐度较高以及灵活性较低的问题,难以满足用户的网页访问需求。However, the inventor found that based on the existing website deployment method, when a user browses to a certain page, if the language switch event is triggered on the website, the browser will reload the resource information of the website and return to the homepage of the website. For example, reload another code page resource written in English and return to the homepage of the website. In this case, the user needs to search the webpage again before entering the hierarchical webpage visited last time. It can be seen that the existing webpage access methods have the problems of high cumbersome operation and low flexibility, and it is difficult to meet the webpage access requirements of users.
技术问题technical problem
有鉴于此,本申请实施例提供了一种网页语言的切换方法、装置、终端设备及计算机可读存储介质,以解决现有的网页访问方式所存在的操作繁琐度高以及灵活性较低的问题。In view of this, the embodiments of the present application provide a method, device, terminal device, and computer-readable storage medium for switching web page languages to solve the problems of high cumbersome operation and low flexibility of existing web page access methods. problem.
技术解决方案Technical solutions
本申请实施例的第一方面提供了一种网页语言的切换方法,包括:接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;获取所述选取对象的对象类型;基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。The first aspect of the embodiments of the present application provides a method for switching the language of a webpage, including: receiving a language switching instruction issued by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about the target language type Obtain the object type of the selected object; Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the back-end server, so that the back-end server will After the language type of the web page information to be converted is switched from the source language type to the target language type, target information is obtained; the target information returned by the back-end server is received, and the target information is displayed for the selected object Create a new label page.
本申请实施例的第二方面提供了一种网页语言的切换装置,包括:接收单元,用于接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;第一获取单元,用于获取所述选取对象的对象类型;确定单元,用于基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;展示单元,用于接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。A second aspect of the embodiments of the present application provides a webpage language switching device, including: a receiving unit, configured to receive a language switching instruction issued by a user for a selected object in a target webpage, and the language switching instruction carries information about the target The attribute information of the language type; the first obtaining unit is used to obtain the object type of the selected object; the determining unit is used to determine the corresponding web page information to be converted based on the selected object and the object type, and compare the The webpage information to be converted is sent to the backend server, so that the backend server obtains the target information after switching the language type of the webpage information to be converted from the source language type to the target language type; the display unit is configured to receive the The target information returned by the background server is displayed in a new tab page created for the selected object.
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;获取所述选取对象的对象类型;基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。A third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the following is achieved Step: Receive a language switching instruction issued by the user for the selected object in the target web page, the language switching instruction carries attribute information about the target language type; obtain the object type of the selected object; based on the selected object and the Object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the background server, so that the background server switches the language type of the web page information to be converted from the source language type to the target language After the type, target information is obtained; the target information returned by the background server is received, and the target information is displayed in a new tab page created for the selected object.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;获取所述选取对象的对象类型;基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。可选的,该计算机可读存储介质可以为计算机非易失性可读存储介质。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the processor executes the computer program, the following steps are implemented: A language switching instruction issued for a selected object, the language switching instruction carrying attribute information about the target language type; acquiring the object type of the selected object; determining the corresponding to be converted based on the selected object and the object type Web page information, and send the web page information to be converted to a back-end server, so that the back-end server obtains the target information after switching the language type of the web page information to be converted from the source language type to the target language type; receiving The target information returned by the background server is displayed in a new tab page created for the selected object. Optionally, the computer-readable storage medium may be a non-volatile computer-readable storage medium.
有益效果Beneficial effect
本申请实施例中,保证了在网站语言切换的操作过程中,能够只执行关于部分版面内容的转换,提高了网页语言切换的灵活性;降低了用户在网页访问过程中的操作繁琐度。In the embodiments of the present application, it is ensured that during the operation process of website language switching, only partial page content conversion can be performed, which improves the flexibility of web page language switching and reduces the cumbersome operation of users during web page access.
附图说明Description of the drawings
图1是本申请实施例提供的网页语言的切换方法的实现流程示意图。FIG. 1 is a schematic diagram of the implementation process of a method for switching web page languages provided by an embodiment of the present application.
图2是本申请实施例提供的网页语言的切换方法S103的具体实现流程图。FIG. 2 is a specific implementation flow chart of the method S103 for switching web page languages provided by an embodiment of the present application.
图3是本申请另一实施例提供的网页语言的切换方法的实现流程示意图。FIG. 3 is a schematic diagram of the implementation process of a method for switching web page languages provided by another embodiment of the present application.
图4是本申请又一实施例提供的网页语言的切换方法的实现流程示意图。FIG. 4 is a schematic diagram of the implementation process of a method for switching web page languages provided by another embodiment of the present application.
图5是本申请实施例提供的网页语言的切换方法S103的另一具体实现流程图。FIG. 5 is another specific implementation flow chart of the method S103 for switching webpage language provided by an embodiment of the present application.
图6是本申请实施例提供的网页语言的切换装置的结构框图。Fig. 6 is a structural block diagram of a webpage language switching device provided by an embodiment of the present application.
图7是本申请实施例提供的终端设备的示意图。Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便理解本申请实施例。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed to facilitate understanding of the embodiments of the present application.
本申请的技术方案可应用于人工智能领域。应当理解的是,虽然术语“第一”、“第二”等在文本中在一些本申请实施例中用来描述各种元素,但是这些元素不应该受到这些术语的限制。这些术语只是用来将一个元素与另一元素区分开。The technical solution of this application can be applied to the field of artificial intelligence. It should be understood that although the terms "first", "second", etc. are used in the text in some embodiments of the present application to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
图1示出了本申请实施例提供的网页语言的切换方法的实现流程图,详述如下。Fig. 1 shows an implementation flowchart of a webpage language switching method provided by an embodiment of the present application, which is detailed as follows.
S101:接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息。S101: Receive a language switching instruction issued by a user for a selected object in a target webpage, where the language switching instruction carries attribute information about the target language type.
本申请实施例中,用户所需浏览的网页为目标网页。根据接收到的网页访问指令,解析目标网页的网页源代码,并在浏览器界面中以网页源代码所预置的语言类型,对目标网页的字符串进行加载显示。用户通过对浏览器界面中所运行的光标进行移动,可选取目标网页中的任一对象。在任一对象被选取后,若检测到浏览器界面中的语言切换控件被点击触发,则确认接收到用户针对该选取对象所发出的语言切换指令。其中,在语言切换控件被点击触发时,浏览器界面将生成一语言类型展示列表。语言类型展示列表包含预设的多种语言类型,例如汉语、英语、汉语、日语、西班牙语、泰语以及法语等。将用户在语言类型展示列表中所选定的语言类型作为一项属性信息封装至语言切换指令中。In this embodiment of the application, the webpage that the user needs to browse is the target webpage. According to the received webpage access instruction, the webpage source code of the target webpage is parsed, and the character string of the target webpage is loaded and displayed in the browser interface in the language type preset by the webpage source code. The user can select any object in the target webpage by moving the cursor running in the browser interface. After any object is selected, if it is detected that the language switching control in the browser interface is triggered by clicking, it is confirmed that the language switching instruction issued by the user for the selected object is received. Among them, when the language switching control is clicked and triggered, the browser interface will generate a language type display list. The language type display list contains preset multiple language types, such as Chinese, English, Chinese, Japanese, Spanish, Thai, and French. The language type selected by the user in the language type display list is encapsulated into the language switching instruction as a piece of attribute information.
优选地,当检测到关于目标网页的访问请求时,获取访问请求所携带的用户标识。在预设的历史信息库中,查找与该用户标识匹配的页面浏览记录,并提取该条页面浏览记录所关联的历史访问语言。在存储该目标网页所对应源代码的信息库中,获取与该历史访问语言对应的脚本代码。通过浏览器解析该脚本代码后,加载得到以该历史访问语言显示的目标页面。Preferably, when an access request for the target webpage is detected, the user identification carried in the access request is acquired. In the preset historical information database, search for a page browsing record matching the user ID, and extract the historical access language associated with the page browsing record. In the information library storing the source code corresponding to the target webpage, the script code corresponding to the historical access language is obtained. After the script code is parsed by the browser, the target page displayed in the historical access language is obtained by loading.
本申请实施例中,对于同一用户而言,由于其常用语言类型通常都是相对稳定不变的,因此,通过获取与其用户标识相匹配的页面浏览记录,以关联的历史访问语言来初始化显示目标页面,能够减少用户对目标网页进行语言切换的操作次数,从而提高了网页浏览效率。In the embodiment of the present application, for the same user, since the common language types are usually relatively stable, the display target is initialized with the associated historical access language by obtaining the page browsing records matching the user ID The page can reduce the number of operations for the user to switch the language of the target webpage, thereby improving the efficiency of webpage browsing.
S102:获取所述选取对象的对象类型。S102: Obtain the object type of the selected object.
本申请实施例中,对于语言切换指令所关联的选取对象,通过识读该选取对象在网页代码中的标签属性,确定该选取对象的对象类型。对象类型包括但不限于一级标签类型、二级标签类型以及其他级别标签类型。In the embodiment of the present application, for the selected object associated with the language switching instruction, the object type of the selected object is determined by recognizing the tag attribute of the selected object in the webpage code. Object types include, but are not limited to, primary label types, secondary label types, and other level label types.
上述一级标签类型例如可以是标题以及副标题等;二级标签类型例如可以是文本段落、表格、图片以及视频等。The above-mentioned first-level tag types can be, for example, titles and subtitles; for example, the second-level tag types can be text paragraphs, tables, pictures, and videos.
示例性地,若用户想要对目标网页中某一图片上的文本内容进行语言切换,则可将该图片确定为选取对象。在目标网页的源代码信息中,定位该选取对象所对应的标签属性。若检测到其标签属性为图片标签<img>,则可识别该选取对象的对象类型为二级标签。同理,若用户想要对目标网页中的一个文本段落进行语言切换,则可通过移动光标来对该文本段落进行选取。若该选取对象对应的源代码信息为<p>This is a paragraph</p>,则可识别该选取对象的标签属性为文本段落,因此,确定出其对象类型为二级标签。Exemplarily, if the user wants to switch the language of the text content on a certain picture in the target webpage, the picture may be determined as the selected object. In the source code information of the target webpage, locate the label attribute corresponding to the selected object. If it is detected that the tag attribute is the image tag <img>, the object type of the selected object can be identified as a secondary tag. Similarly, if the user wants to switch the language of a text paragraph in the target webpage, he can select the text paragraph by moving the cursor. If the source code information corresponding to the selected object is <p>This is a paragraph</p>, it can be recognized that the tag attribute of the selected object is a text paragraph, so it is determined that the object type is a secondary tag.
S103:基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息。S103: Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to a back-end server, so that the back-end server will report the language type of the web page information to be converted After switching from the source language type to the target language type, the target information is obtained.
待转换网页信息表示在后续的语言类型切换过程中,后台服务器需要进行语言转换处理的部分字符串内容。选取对象与待转换网页信息可能相同也可能不同,其根据选取对象的对象类型和/或标签属性来确定。The information of the webpage to be converted represents part of the string content that the background server needs to perform language conversion processing during the subsequent language type switching process. The selected object and the web page information to be converted may be the same or different, which is determined according to the object type and/or tag attribute of the selected object.
本申请实施例中,加载预设的转换规则。通过将当前选取对象的对象类型输入该转换规则进行检测处理,确定对应的待转换网页信息。示例性地,上述转换规则包括:若选取对象的标签属性为标题,则对应的待转换网页信息为标题文本及标题下连续出现的多个文本段落;若选取对象的标签属性为文本段落,则对应的待转换网页信息为选取对象本身所包含的各个字符串;若选取对象的标签属性为图片,则对应的待转换网页信息为包含于图片中的文本字符;若选取对象的标签属性为视频/音频,则对应的待转换网页信息为视频源/音源的字幕文本信息。In the embodiment of this application, the preset conversion rule is loaded. By inputting the object type of the currently selected object into the conversion rule for detection processing, the corresponding web page information to be converted is determined. Exemplarily, the above conversion rule includes: if the tag attribute of the selected object is a title, the corresponding web page information to be converted is the title text and multiple text paragraphs consecutively appearing under the title; if the tag attribute of the selected object is a text paragraph, then The corresponding web page information to be converted is each character string contained in the selected object itself; if the tag attribute of the selected object is a picture, the corresponding web page information to be converted is the text character contained in the picture; if the tag attribute of the selected object is video /Audio, the corresponding web page information to be converted is the subtitle text information of the video source/audio source.
本申请实施例中,将确定出的待转换网页信息以及接收到的语言切换指令发送至用于执行文本翻译操作的后台服务器。根据语言切换指令所携带的目标语言类型,后台服务器对待转换网页信息进行语言转换处理,以实现将待转换网页信息的语言类型从源语言类型切换为目标语言类型后,将生成的目标信息进行返回。In the embodiment of the present application, the determined webpage information to be converted and the received language switching instruction are sent to the backend server for executing the text translation operation. According to the target language type carried by the language switching instruction, the backend server performs language conversion processing on the web page information to be converted, so as to switch the language type of the web page information to be converted from the source language type to the target language type, and then return the generated target information .
优选地,若待转换网页信息为图片所包含的文本字符,则将图片的来源地址发送至后台服务器,以使后台服务器基于该来源地址加载图片后,利用预设的图片检测算法识别其所包含的文本字符。若待转换信息为视频源/音源的字幕文本信息,则获取视频源/音源的来源服务器信息。基于来源服务器信息,请求下载与视频源/音源关联的字幕文本信息后,再将字幕文本信息发送至后台服务器。Preferably, if the webpage information to be converted is text characters contained in the picture, the source address of the picture is sent to the backend server, so that after the backend server loads the picture based on the source address, it uses a preset picture detection algorithm to identify the contained characters. Text characters. If the information to be converted is the subtitle text information of the video source/audio source, the source server information of the video source/audio source is obtained. Based on the source server information, after requesting to download the subtitle text information associated with the video source/audio source, the subtitle text information is sent to the background server.
S104:接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。S104: Receive the target information returned by the background server, and display the target information in a new tab page created for the selected object.
本申请实施例中,接收后台服务器返回的目标信息。获取目标网页中各个模块的代码副本,并在代码副本中,将待转换网页信息所属模块的第一源代码替换为与目标信息关联的第二源代码。同时,在浏览器界面中,额外生成一个新标签页面。对更新后的包含第二源代码的上述代码副本进行解析,以在上述新标签页面中重新渲染以目标语言显示的访问页面。In this embodiment of the application, the target information returned by the background server is received. Obtain the code copy of each module in the target webpage, and replace the first source code of the module to which the webpage information to be converted belongs to the second source code associated with the target information in the code copy. At the same time, a new tab page is additionally generated in the browser interface. The updated copy of the code containing the second source code is parsed to re-render the visit page displayed in the target language in the new tab page.
本申请实施例中,通过接收用户在目标网页中针对选取对象所发出的语言切换指令,基于选取对象及其对象类型来确定对应的待转换网页信息,保证了在网站语言切换的操作过程中,能够只执行关于部分版面内容的转换,提高了网页语言切换的灵活性;通过将后台服务器返回的目标信息展示于当前创建的新标签页面中,使得用户在无须刷新原有网站页面的情况之下,也能够快速查看自己所需语言类型的页面内容,不会出现原始页面返回主页的情况,因而降低了用户在网页访问过程中的操作繁琐度。In the embodiment of the present application, by receiving the language switching instruction issued by the user for the selected object in the target webpage, the corresponding webpage information to be converted is determined based on the selected object and its object type, which ensures that during the operation process of website language switching, It can only perform conversions on part of the layout content, which improves the flexibility of web page language switching; by displaying the target information returned by the background server in the currently created new tab page, the user does not need to refresh the original website page , You can also quickly view the content of the page in the language you need, and the original page will not return to the home page, thus reducing the cumbersome operation of the user during the web page access process.
作为本申请的一个实施例,图2示出了本申请实施例提供的网页语言的转换方法S103的具体实现流程,详述如下。As an embodiment of the present application, FIG. 2 shows the specific implementation process of the webpage language conversion method S103 provided by the embodiment of the present application, which is described in detail as follows.
S1031:若所述对象类型为一级标签类型,则获取所述目标网页的源代码信息。S1031: If the object type is a first-level tag type, obtain source code information of the target webpage.
本申请实施例中,通过检测选取对象的标签属性,并根据预设的标签属性以及对象类型的对应关系表,确定出选取对象的对象类型。若选取对象的对象类型为一级标签类型,则读取目标网页的源代码信息,并从中定位出选取对象所匹配的源代码信息。In the embodiment of the present application, the object type of the selected object is determined by detecting the label attribute of the selected object, and according to the preset label attribute and the correspondence table of the object type. If the object type of the selected object is the first-level tag type, the source code information of the target webpage is read, and the source code information matched by the selected object is located.
S1032:在所述源代码信息中,定位所述选取对象之后所连续出现的各个二级标签,并分别获取所述选取对象以及所述二级标签关联的代码信息。S1032: In the source code information, locate each secondary label successively appearing after the selected object, and obtain the selected object and code information associated with the secondary label respectively.
通常来说,在网页的源代码信息中,一级标签的源代码信息之后都会出现关联的多个代码模块,且代码模块会包含一个或多个对象标签。本申请实施例中,对选取对象所匹配的源代码信息,以其所属代码分布位置为起点,检测在该代码分布位置之后所连续出现的各个二级标签,并对该一级标签以及其后每一二级标签所包含的代码信息进行读取。Generally speaking, in the source code information of a webpage, multiple associated code modules appear after the source code information of the first-level label, and the code module includes one or more object tags. In the embodiment of the present application, for the source code information matched by the selected object, the code distribution position of the selected object is used as the starting point to detect each secondary label consecutively appearing after the code distribution position, and the primary label and subsequent ones The code information contained in each secondary label is read.
例如,若一级标签所属代码分布位置之后存在以下连续出现的两个文本段落标签<p>:<p>This is a paragraph1</p><p>This is a paragraph2</p>,则与上述两个二级标签关联的代码信息为“This is a paragraph1”以及“This is a paragraph2”。For example, if there are two consecutive text paragraph tags <p> after the code distribution of the first-level tag: <p>This is a paragraph1</p><p>This is a paragraph2</p>, the code information associated with the above two second-level tags is "This is a paragraph1" and "This is a paragraph paragraph2".
S1033:将所述代码信息确定为与所述选取对象对应的待转换网页信息。S1033: Determine the code information as the web page information to be converted corresponding to the selected object.
本申请实施例中,由于用户只需将对象类型为一级标签类型的对象进行选取,例如,选取目标网页的标题文字部分,系统便能够定位出选取对象及其之后所连续出现的各个二级标签,并分别获取一级标签以及二级标签所关联的代码信息,从而自动确定对应的待转换网页信息,避免了用户需要逐一点击选取分布范围较广的待转换网页信息,因而降低了用户的操作繁琐度,提高了对选取对象的选择效率;由于选取对象包括标题、文本段落、图像、视频以及语音等多种类型的对象类型,因而扩大了语言类型转换事件的适用范围,使得网页语言切换不仅限于目标网页的文本内容,因而提高了灵活性,满足了更多用户的网页访问需求。In the embodiment of this application, since the user only needs to select the objects whose object type is the first-level label type, for example, by selecting the title text part of the target webpage, the system can locate the selected object and the successive second-level objects. Label, and obtain the code information associated with the primary label and secondary label, thereby automatically determining the corresponding web page information to be converted, avoiding the need for users to click one by one to select the web page information to be converted with a wider distribution, thereby reducing the user’s The operation is cumbersome, and the efficiency of selecting the selected objects is improved; since the selected objects include multiple types of object types such as titles, text paragraphs, images, videos, and voices, the scope of application of language type conversion events is expanded, and web page language switching It is not limited to the text content of the target webpage, thus improving flexibility and meeting the webpage access needs of more users.
作为本申请的另一个实施例,图3示出了本申请另一实施例提供的网页语言的切换方法的实现流程。如图3所示,在上述S104之后,还包括:S105:检测所述目标信息中所存在的第一货币标识符,并确定对应所述第一货币标识符的第一货币类型以及第一金额值。As another embodiment of the present application, FIG. 3 shows an implementation process of a method for switching web page languages provided by another embodiment of the present application. As shown in FIG. 3, after the above S104, it further includes: S105: Detect the first currency identifier existing in the target information, and determine the first currency type and the first amount corresponding to the first currency identifier value.
本申请实施例中,对后台服务器返回的待展示于新标签页面中的目标信息,检测目标信息中是否存在第一货币标识符。其中,第一货币标识符为存在于预设列表中的任意类型的货币标识符,包括但不限于 “¥”、“£”、“円”以及 等。In the embodiment of the present application, for the target information to be displayed in the new tab page returned by the background server, it is detected whether the first currency identifier exists in the target information. Wherein, the first currency identifier is any type of currency identifier existing in the preset list, including but not limited to "¥", "£", "円" and so on.
若检测到目标信息中存在第一货币标识符,则根据预设的货币转换列表,获取对应该第一货币标识符的第一货币类型。货币转换列表用于记录货币标识符、货币类型以及语言类型的映射关系。例如,若目标信息中所存在的第一货币标识符为 则获取得到的第一货币类型为美元,其对应的语言类型为英语。If it is detected that the first currency identifier exists in the target information, the first currency type corresponding to the first currency identifier is obtained according to the preset currency conversion list. The currency conversion list is used to record the mapping relationship between currency identifiers, currency types, and language types. For example, if the first currency identifier in the target information is Then the first currency type obtained is US dollars, and the corresponding language type is English.
本申请实施例中,提取目标信息中与第一货币标识符相邻显示的数字信息,将提取值输出为与该第一货币标识对应的第一货币值,以用于表示该货币类型的货币金额价值大小。In the embodiment of the present application, the digital information displayed adjacent to the first currency identifier in the target information is extracted, and the extracted value is output as the first currency value corresponding to the first currency identifier to represent the currency amount value of the currency type size.
S106:根据预设的货币转换列表,获取与所述目标语言类型匹配的第二货币标识符以及第二货币类型。S106: According to a preset currency conversion list, obtain a second currency identifier and a second currency type that match the target language type.
根据上述货币转换列表,查找与目标语言类型匹配的第二货币标识符以及第二货币类型。通过将第一货币类型以及第二货币类型发送至汇率转换平台或通过调用汇率查询接口,获取关于第一货币类型以及第二货币类型的实时汇率返回值。According to the above currency conversion list, search for the second currency identifier and the second currency type that match the target language type. By sending the first currency type and the second currency type to the exchange rate conversion platform or by calling the exchange rate query interface, the return value of the real-time exchange rate of the first currency type and the second currency type is obtained.
S107:获取所述第一货币类型与所述第二货币类型的实时汇率,并基于所述实时汇率计算与所述第一金额值对应的第二金额值。S107: Obtain real-time exchange rates of the first currency type and the second currency type, and calculate a second amount value corresponding to the first amount value based on the real-time exchange rate.
S108:将所述目标信息中的所述第一金额值以及所述第一货币标识符分别更新为所述第二金额值以及所述第二货币标识符。S108: Update the first amount value and the first currency identifier in the target information to the second amount value and the second currency identifier respectively.
本申请实施例中,根据上述获取得到的第一金额值以及实时汇率,计算与第一金额值对应的第二金额值,并将目标信息中的第一金额值替换显示为第二金额值,将第一货币标识符替换显示为第二货币标识符。In the embodiment of the present application, the second amount value corresponding to the first amount value is calculated according to the first amount value obtained above and the real-time exchange rate, and the first amount value in the target information is replaced and displayed as the second amount value, Replace the first currency identifier with the second currency identifier.
示例性地,若后台服务器所返回的目标信息中包含 这一字符串,则检测得到的第一货币类型为美元;若语言切换指令所携带的目标语言类型为中文,则通过货币转换列表,可确定出与中文匹配的第二货币类型为人民币,其货币标识符为“¥”。与此同时,通过预设的汇率查询接口,获取人民币与美金的实时汇率。若实时汇率为1:6,则根据该兑换汇率,将目标信息中的 转换为“¥1200”,并将“¥1200”这一字符串展示于新标签页面中。Exemplarily, if the target information returned by the back-end server contains this character string, the first currency type detected is US dollars; if the target language type carried by the language switching instruction is Chinese, the currency conversion list can be used It is determined that the second currency type matching Chinese is RMB, and its currency identifier is "¥". At the same time, through the preset exchange rate query interface, real-time exchange rates between RMB and U.S. dollars are obtained. If the real-time exchange rate is 1:6, based on the exchange rate, convert the in the target information to "¥1200" and display the string "¥1200" on the new label page.
本申请实施例中,通过检测目标信息中的第一货币标识符,并在第一货币标识符存在的情况之下,自动确定目标语言所适用的货币类型,展示与该货币类型匹配的第二货币标识符以及第二货币金额,保证了用户在浏览网站页面的过程中能够具有较好的体验效果,便于查看不同地区之间的货币兑换等价值,从而提升了网页的交互性能。In the embodiment of this application, by detecting the first currency identifier in the target information, and when the first currency identifier exists, the currency type applicable to the target language is automatically determined, and the second currency type matching the currency type is displayed. The currency identifier and the second currency amount ensure that the user can have a better experience when browsing the website pages, and it is convenient to view the currency exchange value between different regions, thereby improving the interactive performance of the web page.
作为本申请的又一个实施例,在上述实施例的基础之上,对目标语言类型的获取方式作进一步的限定。如图4所示,在上述S101之前,还包括:S109:在当前运行的通讯媒介窗口中,提取最近预设时长内所述用户的聊天记录信息。As another embodiment of the present application, on the basis of the foregoing embodiment, the method for obtaining the target language type is further limited. As shown in FIG. 4, before the above S101, the method further includes: S109: Extract the chat history information of the user in the latest preset time period in the currently running communication media window.
本申请实施例中,若监测到通讯应用软件处于启动状态,包括前台运行状态以及后台运行状态,则查找并调用与通讯应用软件相关的通讯媒介窗口。根据该通讯媒介窗口所匹配的通讯账户,读取最近预设时长内关于该通讯账户的聊天记录信息。In the embodiment of the present application, if it is detected that the communication application software is in the startup state, including the foreground operation state and the background operation state, the communication media window related to the communication application software is searched and called. According to the communication account matched by the communication media window, read the chat history information about the communication account within the last preset time period.
S110:检测所述聊天记录信息中各个字符的语言类型。S110: Detect the language type of each character in the chat record information.
聊天记录信息通常由多种语言类型的字符串以及多媒体文件组成。本申请实施例中,获取聊天记录信息中每一字符的语言类型。若聊天记录信息包括图片文件,则识别图片文件中所包含的字符,并获取该字符的语言类型。The chat history information is usually composed of strings in multiple languages and multimedia files. In this embodiment of the application, the language type of each character in the chat record information is obtained. If the chat record information includes a picture file, the characters contained in the picture file are recognized, and the language type of the character is obtained.
S111:分别统计每一所述语言类型的字符总数,并将所述字符总数最大的所述语言类型确定为所述用户的目标语言类型。S111: Count the total number of characters of each language type respectively, and determine the language type with the largest total number of characters as the target language type of the user.
对每一语言类型,统计在聊天记录信息中所检测得到的与该语言类型对应的字符的总数。通过比对各个语言类型的字符总数的数值大小,选取出其中字符总数最大的语言类型,并将该语言类型确定为用户在目标页面中所需使用的目标语言类型。For each language type, count the total number of characters corresponding to the language type detected in the chat record information. By comparing the numerical value of the total number of characters in each language type, the language type with the largest total number of characters is selected, and the language type is determined as the target language type that the user needs to use in the target page.
例如,若最近预设时长的聊天记录信息中包含有50个中文字符以及20个英文字符,则字符总数最大的语言类型为中文,因此,将中文确定为用户的目标语言类型。For example, if the chat history information of the latest preset duration contains 50 Chinese characters and 20 English characters, the language type with the largest total number of characters is Chinese. Therefore, Chinese is determined as the user's target language type.
优选地,在确定出字符总数最大的语言类型之后,在网页运行界面中,检测当前用户所切换使用的文字输入法,并获取与该文字输入法对应的语言类型。若获取得到的语言类型与字符总数最大的语言类型相同,则才将该语言类型确定为用户的目标语言类型。Preferably, after determining the language type with the largest total number of characters, in the webpage running interface, the text input method currently switched by the user is detected, and the language type corresponding to the text input method is obtained. If the obtained language type is the same as the language type with the largest total number of characters, then the language type is determined as the user's target language type.
本申请实施例中,由于最近预设时长内通讯媒介窗口中的聊天记录信息通常是终端用户根据自身语言需求所录入的通讯内容,故聊天记录信息所包含字符的语言类型与用户在浏览目标页面时所需使用的语言类型存在较高的吻合度,因此,通过检测聊天记录信息中各个字符的语言类型,将字符总数最大的语言类型确定为用户的目标语言类型,实现了目标语言的自动定位,使得用户在目标页面中无需进行网页语言的手工切换,因而降低了操作繁琐度,提高了网页交互性能。In the embodiment of this application, since the chat record information in the communication media window within the latest preset time period is usually the communication content entered by the terminal user according to their own language requirements, the language type of the characters contained in the chat record information is related to the user's browsing target page There is a high degree of coincidence between the language types used at the time. Therefore, by detecting the language type of each character in the chat record information, the language type with the largest total number of characters is determined as the user's target language type, which realizes the automatic positioning of the target language , So that the user does not need to manually switch the webpage language in the target page, thus reducing the cumbersome operation and improving the interactive performance of the webpage.
作为本申请的一个实施例,图5示出了本申请实施例提供的网页语言的切换方法S103的另一具体实现流程,详述如下。As an embodiment of the present application, FIG. 5 shows another specific implementation process of the webpage language switching method S103 provided by the embodiment of the present application, which is detailed as follows.
S1034:基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并检测所述待转换网页信息所包含的各个词组元素。S1034: Determine corresponding web page information to be converted based on the selected object and the object type, and detect each phrase element contained in the web page information to be converted.
在通过上述实施例中所提及的各个实施步骤确定与选取对象及其对象类型相对应的待转换网页信息后,对待转换网页信息进行分词处理,以获取待转换网页信息所包含的各个词组元素。After determining the web page information to be converted corresponding to the selected object and its object type through the various implementation steps mentioned in the above embodiment, the web page information to be converted is word segmented to obtain each phrase element contained in the web page information to be converted .
S1035:调用预设的语言切换接口,遍历各个所述词组元素,分别确定其中每一所述词组元素是否存在匹配的目标转换元素。S1035: Invoke a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element.
本申请实施例中,对每一词组元素,通过调用预设的语言切换接口,确定该词组元素是否存在与目标语言类型匹配的目标转换元素。其中,语言切换接口用于对语言切换前后的词组元素进行比对。在包含预先收集的各类语言类型元素的元素集中,若查询得到该词组元素存在与目标语言类型匹配的目标转换元素,则表示在语言切换处理操作之后,该词组元素出现字符变更。In the embodiment of the present application, for each phrase element, by invoking a preset language switching interface, it is determined whether the phrase element has a target conversion element matching the target language type. Among them, the language switch interface is used to compare the phrase elements before and after the language switch. In an element set containing pre-collected elements of various language types, if the query finds that the phrase element has a target conversion element that matches the target language type, it means that after the language switching processing operation, the phrase element has a character change.
示例性地,若待转换网页信息为“三个USB口”,目标语言类型为英文,则其词组元素包括“USB”。对于“USB”这一词组元素来说,由于其在语言转换之前与其在语言转换之后应当同样展示为“USB”,因此,通过上述语言切换接口,确定出该词组元素不存在匹配的目标转换元素。Exemplarily, if the web page information to be converted is "three USB ports" and the target language type is English, the phrase element includes "USB". For the phrase element "USB", since it should be displayed as "USB" before the language conversion and after the language conversion, it is determined that the phrase element does not have a matching target conversion element through the above language switching interface .
S1036:若所述词组元素不存在匹配的目标转换元素,则保留显示该词组元素,并将除该词组元素之外的所述待转换网页信息发送至后台服务器。S1036: If the phrase element does not have a matching target conversion element, keep displaying the phrase element, and send the webpage information to be converted except for the phrase element to the background server.
本申请实施例中,将不存在与之匹配的目标转换元素的词组元素从待转换网页信息中进行剔除处理。在待转换网页信息中,对该词组元素所属原位置添加预设标记。将未包含该词组元素的待转换网页信息发送至后台服务器,以使得后台服务器仅对接收到的各个词组元素执行语言转换处理并返回相关的目标信息。In the embodiment of the present application, the phrase element that does not have a matching target conversion element is removed from the webpage information to be converted. In the web page information to be converted, a preset mark is added to the original position of the phrase element. The webpage information to be converted that does not contain the phrase element is sent to the backend server, so that the backend server only performs language conversion processing on each received phrase element and returns related target information.
在接收到后台服务器返回的目标信息时,将上述剔除的词组元素重新添加至预设标记所对应的页面位置。至此,实现了词组元素与目标信息的融合展示。Upon receiving the target information returned by the background server, the above-mentioned eliminated phrase elements are re-added to the page position corresponding to the preset mark. So far, the fusion display of phrase elements and target information has been realized.
本申请实施例中,通过检测待转换网页信息所包含的各个词组元素,调用语言切换接口来判断词组元素是否存在匹配的目标转换元素,在判断结果为否时,将除该词组元素之外的待转换网页信息发送至后台服务器,实现了词组元素的模块化语言转换,保证了后台服务器无需对不存在目标转换元素的词组元素进行重复转换处理,因此,提高了对目标网页的语言切换效率。In the embodiment of this application, by detecting each phrase element contained in the webpage information to be converted, calling the language switching interface to determine whether the phrase element has a matching target conversion element, and when the judgment result is no, the phrase element other than the phrase element The information of the webpage to be converted is sent to the back-end server, which realizes the modular language conversion of phrase elements, and ensures that the back-end server does not need to perform repeated conversion processing on phrase elements that do not have target conversion elements. Therefore, the language switching efficiency of the target webpage is improved.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例的方法,图6示出了本申请实施例提供的网页语言的切换装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。图6示例的网页语言的切换装置可以是前述实施例提供的网页语言的切换方法的执行主体。Corresponding to the method of the above embodiment, FIG. 6 shows a structural block diagram of a webpage language switching device provided in an embodiment of the present application. For ease of description, only the parts related to the embodiment of the present application are shown. The device for switching webpage language illustrated in FIG. 6 may be the execution subject of the method for switching webpage language provided in the foregoing embodiment.
参照图6,该网页语言的切换装置包括:接收单元61,用于接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息。第一获取单元62,用于获取所述选取对象的对象类型。确定单元63,用于基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息。展示单元64,用于接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。6, the webpage language switching device includes: a receiving unit 61, configured to receive a language switching instruction issued by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about the target language type. The first obtaining unit 62 is configured to obtain the object type of the selected object. The determining unit 63 is configured to determine the corresponding web page information to be converted based on the selected object and the object type, and send the web page information to be converted to a back-end server, so that the back-end server transmits the web page to be converted After the language type of the information is switched from the source language type to the target language type, the target information is obtained. The display unit 64 is configured to receive the target information returned by the background server, and display the target information in a new tab page created for the selected object.
可选地,上述网页语言的切换装置还包括:第一检测单元,用于检测所述目标信息中所存在的第一货币标识符,并确定对应所述第一货币标识符的第一货币类型以及第一金额值。第二获取单元,用于根据预设的货币转换列表,获取与所述目标语言类型匹配的第二货币标识符以及第二货币类型。计算单元,用于获取所述第一货币类型与所述第二货币类型的实时汇率,并基于所述实时汇率计算与所述第一金额值对应的第二金额值。更新单元,用于将所述目标信息中的所述第一金额值以及所述第一货币标识符分别更新为所述第二金额值以及所述第二货币标识符。Optionally, the above-mentioned webpage language switching device further includes: a first detection unit, configured to detect the first currency identifier present in the target information, and determine the first currency type corresponding to the first currency identifier And the first amount value. The second obtaining unit is configured to obtain a second currency identifier and a second currency type that match the target language type according to a preset currency conversion list. The calculation unit is configured to obtain the real-time exchange rate of the first currency type and the second currency type, and calculate a second amount value corresponding to the first amount value based on the real-time exchange rate. The updating unit is configured to update the first amount value and the first currency identifier in the target information to the second amount value and the second currency identifier, respectively.
可选地,所述确定单元63包括:获取子单元,用于若所述对象类型为一级标签类型,则获取所述目标网页的源代码信息。定位子单元,用于在所述源代码信息中,定位所述选取对象之后所连续出现的各个二级标签,并分别获取所述选取对象以及所述二级标签关联的代码信息。确定子单元,用于将所述代码信息确定为与所述选取对象对应的待转换网页信息。Optionally, the determining unit 63 includes: an obtaining subunit, configured to obtain source code information of the target webpage if the object type is a first-level tag type. The locating subunit is used for locating, in the source code information, each secondary label successively appearing after the selected object, and respectively obtain the selected object and code information associated with the secondary label. The determining subunit is configured to determine the code information as the web page information to be converted corresponding to the selected object.
可选地,所述确定单元63包括:检测子单元,用于基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并检测所述待转换网页信息所包含的各个词组元素。遍历子单元,用于调用预设的语言切换接口,遍历各个所述词组元素,分别确定其中每一所述词组元素是否存在匹配的目标转换元素。保留子单元,用于若所述词组元素不存在匹配的目标转换元素,则保留显示该词组元素,并将除该词组元素之外的所述待转换网页信息发送至后台服务器。Optionally, the determining unit 63 includes: a detection subunit, configured to determine corresponding webpage information to be converted based on the selected object and the object type, and detect each phrase element contained in the webpage information to be converted . The traversal subunit is used to call a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element. The reservation subunit is configured to, if the phrase element does not have a matching target conversion element, retain the phrase element for display, and send the webpage information to be converted except for the phrase element to the background server.
可选地,所述网页语言的切换装置还包括:提取单元,用于在当前运行的通讯媒介窗口中,提取最近预设时长内所述用户的聊天记录信息。第二检测单元,用于检测所述聊天记录信息中各个字符的语言类型。统计单元,用于分别统计每一所述语言类型的字符总数,并将所述字符总数最大的所述语言类型确定为所述用户的目标语言类型。Optionally, the webpage language switching device further includes: an extracting unit, configured to extract the chat history information of the user in the latest preset time period in the currently running communication media window. The second detection unit is used to detect the language type of each character in the chat record information. The statistical unit is configured to separately count the total number of characters of each language type, and determine the language type with the largest total number of characters as the target language type of the user.
本申请实施例中,通过接收用户在目标网页中针对选取对象所发出的语言切换指令,基于选取对象及其对象类型来确定对应的待转换网页信息,保证了在网站语言切换的操作过程中,能够只执行关于部分版面内容的转换,提高了网页语言切换的灵活性;通过将后台服务器返回的目标信息展示于当前创建的新标签页面中,使得用户在无须刷新原有网站页面的情况之下,也能够快速查看自己所需语言类型的页面内容,不会出现原始页面返回主页的情况,因而降低了用户在网页访问过程中的操作繁琐度。In the embodiment of the present application, by receiving the language switching instruction issued by the user for the selected object in the target webpage, the corresponding webpage information to be converted is determined based on the selected object and its object type, which ensures that during the operation process of website language switching, It can only perform conversions on part of the layout content, which improves the flexibility of web page language switching; by displaying the target information returned by the background server in the currently created new tab page, the user does not need to refresh the original website page , You can also quickly view the content of the page in the language you need, and the original page will not return to the home page, thus reducing the cumbersome operation of the user during the web page access process.
图7是本申请一实施例提供的终端设备的示意图。如图6所示,该实施例的终端设备7包括:处理器70以及存储器71,所述存储器71中存储有可在所述处理器70上运行的计算机程序72。所述处理器70执行所述计算机程序72时实现上述各个网页语言的切换方法实施例中的步骤,例如图1所示的步骤101至104。或者,所述处理器70执行所述计算机程序72时实现上述各装置实施例中各模块/单元的功能,例如图6所示单元61至64的功能。Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 6, the terminal device 7 of this embodiment includes a processor 70 and a memory 71, and the memory 71 stores a computer program 72 that can run on the processor 70. When the processor 70 executes the computer program 72, the steps in the above embodiments of the method for switching web page languages are implemented, such as steps 101 to 104 shown in FIG. 1. Alternatively, when the processor 70 executes the computer program 72, the functions of the modules/units in the foregoing device embodiments, such as the functions of the units 61 to 64 shown in FIG. 6, are realized.
所述终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入发送设备、网络接入设备、总线等。The terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The terminal device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art can understand that FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input sending device, a network access device, a bus, and the like.
所称处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 70 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经发送或者将要发送的数据。The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk equipped on the terminal device 7, a smart memory card (Smart Media Card, SMC), or a Secure Digital (SD). Card, Flash Card, etc. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device. The memory 71 is used to store the computer program and other programs and data required by the terminal device. The memory 71 can also be used to temporarily store data that has been sent or will be sent.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、电载波信号、电信信号以及软件分发介质等。可选的,该计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM) , Random Access Memory (Random Access Memory, RAM), electrical carrier signal, telecommunications signal, and software distribution media. Optionally, the computer-readable storage medium may be a non-volatile storage medium or a volatile storage medium.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使对应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种网页语言的切换方法,其中,包括:A method for switching webpage languages, including:
    接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;Receiving a language switching instruction issued by the user for the selected object in the target webpage, the language switching instruction carrying attribute information about the target language type;
    获取所述选取对象的对象类型;Obtaining the object type of the selected object;
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the back-end server, so that the back-end server can change the language type of the web page information to be converted from the source After the language type is switched to the target language type, target information is obtained;
    接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。Receiving the target information returned by the background server, and displaying the target information in a new tab page created for the selected object.
  2. 如权利要求1所述的网页语言的切换方法,其中,还包括:The method for switching web page languages according to claim 1, further comprising:
    检测所述目标信息中所存在的第一货币标识符,并确定对应所述第一货币标识符的第一货币类型以及第一金额值;Detecting the first currency identifier existing in the target information, and determining the first currency type and the first amount value corresponding to the first currency identifier;
    根据预设的货币转换列表,获取与所述目标语言类型匹配的第二货币标识符以及第二货币类型;According to a preset currency conversion list, obtain a second currency identifier and a second currency type that match the target language type;
    获取所述第一货币类型与所述第二货币类型的实时汇率,并基于所述实时汇率计算与所述第一金额值对应的第二金额值;Acquiring the real-time exchange rate of the first currency type and the second currency type, and calculating a second amount value corresponding to the first amount value based on the real-time exchange rate;
    将所述目标信息中的所述第一金额值以及所述第一货币标识符分别更新为所述第二金额值以及所述第二货币标识符。The first amount value and the first currency identifier in the target information are respectively updated to the second amount value and the second currency identifier.
  3. 如权利要求1所述的网页语言的切换方法,其中,所述基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,包括:The method for switching webpage languages according to claim 1, wherein said determining corresponding webpage information to be converted based on said selected object and said object type comprises:
    若所述对象类型为一级标签类型,则获取所述目标网页的源代码信息;If the object type is a first-level tag type, acquiring source code information of the target webpage;
    在所述源代码信息中,定位所述选取对象之后所连续出现的各个二级标签,并分别获取所述选取对象以及所述二级标签关联的代码信息;In the source code information, locate each secondary label that appears continuously after the selected object, and obtain the selected object and code information associated with the secondary label respectively;
    将所述代码信息确定为与所述选取对象对应的待转换网页信息。The code information is determined as the web page information to be converted corresponding to the selected object.
  4. 如权利要求1所述的网页语言的切换方法,其中,所述基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,包括:The method for switching webpage languages according to claim 1, wherein said determining corresponding webpage information to be converted based on said selected object and said object type, and sending said webpage information to be converted to a background server, comprises :
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并检测所述待转换网页信息所包含的各个词组元素;Determine the corresponding web page information to be converted based on the selected object and the object type, and detect each phrase element contained in the web page information to be converted;
    调用预设的语言切换接口,遍历各个所述词组元素,分别确定其中每一所述词组元素是否存在匹配的目标转换元素;Call a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element;
    若所述词组元素不存在匹配的目标转换元素,则保留显示该词组元素,并将除该词组元素之外的所述待转换网页信息发送至后台服务器。If the phrase element does not have a matching target conversion element, the phrase element is retained to be displayed, and the web page information to be converted except the phrase element is sent to the background server.
  5. 如权利要求1所述的网页语言的切换方法,其中,在所述接收用户在目标网页中针对选取对象所发出的语言切换指令之前,还包括:5. The method for switching web page languages according to claim 1, wherein before said receiving a language switching instruction issued by a user for selected objects in the target web page, the method further comprises:
    在当前运行的通讯媒介窗口中,提取最近预设时长内所述用户的聊天记录信息;In the currently running communication media window, extract the chat history information of the user in the most recent preset time period;
    检测所述聊天记录信息中各个字符的语言类型;Detecting the language type of each character in the chat record information;
    分别统计每一所述语言类型的字符总数,并将所述字符总数最大的所述语言类型确定为所述用户的目标语言类型。The total number of characters of each language type is counted separately, and the language type with the largest total number of characters is determined as the target language type of the user.
  6. 如权利要求1所述的网页语言的切换方法,其中,还包括:The method for switching web page languages according to claim 1, further comprising:
    当检测到关于目标网页的访问请求时,获取访问请求所携带的用户标识;When an access request for the target webpage is detected, obtain the user identification carried in the access request;
    在预设的历史信息库中,查找与所述用户标识匹配的页面浏览记录,并提取所述页面浏览记录所关联的历史访问语言;In a preset historical information database, search for page browsing records matching the user ID, and extract the historical access language associated with the page browsing records;
    在存储所述目标网页所对应源代码的信息库中,获取与所述历史访问语言对应的脚本代码;Acquiring the script code corresponding to the historical access language in the information database storing the source code corresponding to the target webpage;
    通过浏览器解析所述脚本代码后,加载得到以所述历史访问语言显示的目标网页。After the script code is parsed by the browser, the target webpage displayed in the historical access language is obtained by loading.
  7. 如权利要求1或4所述的网页语言的切换方法,其中,所述基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,包括:The method for switching webpage languages according to claim 1 or 4, wherein said determining corresponding webpage information to be converted based on said selected object and said object type comprises:
    加载预设的转换规则,通过将当前选取对象的对象类型输入所述转换规则进行检测处理,确定对应的待转换网页信息;Load a preset conversion rule, and determine the corresponding web page information to be converted by inputting the object type of the currently selected object into the conversion rule for detection processing;
    其中,所述转换规则包括:Wherein, the conversion rule includes:
    若选取对象的标签属性为标题,则对应的待转换网页信息为标题文本及标题下连续出现的多个文本段落;若选取对象的标签属性为文本段落,则对应的待转换网页信息为选取对象本身所包含的各个字符串;若选取对象的标签属性为图片,则对应的待转换网页信息为包含于图片中的文本字符;若选取对象的标签属性为视频/音频,则对应的待转换网页信息为视频源/音源的字幕文本信息。If the label attribute of the selected object is a title, the corresponding web page information to be converted is the title text and multiple text paragraphs consecutively appearing under the title; if the label attribute of the selected object is a text paragraph, the corresponding web page information to be converted is the selected object Each character string contained in itself; if the label attribute of the selected object is a picture, the corresponding web page information to be converted is the text character contained in the picture; if the label attribute of the selected object is video/audio, the corresponding web page to be converted The information is the subtitle text information of the video source/audio source.
  8. 一种网页语言的切换装置,其中,包括:A webpage language switching device, which includes:
    接收单元,用于接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;A receiving unit, configured to receive a language switching instruction issued by a user for a selected object in a target webpage, the language switching instruction carrying attribute information about the target language type;
    第一获取单元,用于获取所述选取对象的对象类型;The first obtaining unit is configured to obtain the object type of the selected object;
    确定单元,用于基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;The determining unit is configured to determine the corresponding web page information to be converted based on the selected object and the object type, and send the web page information to be converted to a back-end server, so that the back-end server transmits the web page information to be converted After the language type of is switched from the source language type to the target language type, the target information is obtained;
    展示单元,用于接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。The display unit is configured to receive the target information returned by the background server, and display the target information in a new tab page created for the selected object.
  9. 一种终端设备,包括存储器以及处理器,所述存储器存储有可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:A terminal device includes a memory and a processor, the memory stores a computer program that can be run on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;Receiving a language switching instruction issued by the user for the selected object in the target webpage, the language switching instruction carrying attribute information about the target language type;
    获取所述选取对象的对象类型;Obtaining the object type of the selected object;
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the back-end server, so that the back-end server can change the language type of the web page information to be converted from the source After the language type is switched to the target language type, target information is obtained;
    接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。Receiving the target information returned by the background server, and displaying the target information in a new tab page created for the selected object.
  10. 如权利要求9所述的终端设备,其中,所述处理器还用于执行以下步骤:The terminal device according to claim 9, wherein the processor is further configured to perform the following steps:
    检测所述目标信息中所存在的第一货币标识符,并确定对应所述第一货币标识符的第一货币类型以及第一金额值;Detecting the first currency identifier existing in the target information, and determining the first currency type and the first amount value corresponding to the first currency identifier;
    根据预设的货币转换列表,获取与所述目标语言类型匹配的第二货币标识符以及第二货币类型;According to a preset currency conversion list, obtain a second currency identifier and a second currency type that match the target language type;
    获取所述第一货币类型与所述第二货币类型的实时汇率,并基于所述实时汇率计算与所述第一金额值对应的第二金额值;Acquiring the real-time exchange rate of the first currency type and the second currency type, and calculating a second amount value corresponding to the first amount value based on the real-time exchange rate;
    将所述目标信息中的所述第一金额值以及所述第一货币标识符分别更新为所述第二金额值以及所述第二货币标识符。The first amount value and the first currency identifier in the target information are respectively updated to the second amount value and the second currency identifier.
  11. 如权利要求9所述的终端设备,其中,所述处理器执行基于所述选取对象以及所述对象类型,确定对应的待转换网页信息时,具体执行以下步骤:9. The terminal device of claim 9, wherein the processor executes the following steps when determining the corresponding web page information to be converted based on the selected object and the object type:
    若所述对象类型为一级标签类型,则获取所述目标网页的源代码信息;If the object type is a first-level tag type, acquiring source code information of the target webpage;
    在所述源代码信息中,定位所述选取对象之后所连续出现的各个二级标签,并分别获取所述选取对象以及所述二级标签关联的代码信息;In the source code information, locate each secondary label that appears continuously after the selected object, and obtain the selected object and code information associated with the secondary label respectively;
    将所述代码信息确定为与所述选取对象对应的待转换网页信息。The code information is determined as the web page information to be converted corresponding to the selected object.
  12. 如权利要求9所述的终端设备,其中,所述处理器执行基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器时,具体执行以下步骤:9. The terminal device of claim 9, wherein when the processor executes determining the corresponding web page information to be converted based on the selected object and the object type, and sending the web page information to be converted to a background server, Specifically perform the following steps:
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并检测所述待转换网页信息所包含的各个词组元素;Determine the corresponding web page information to be converted based on the selected object and the object type, and detect each phrase element contained in the web page information to be converted;
    调用预设的语言切换接口,遍历各个所述词组元素,分别确定其中每一所述词组元素是否存在匹配的目标转换元素;Call a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element;
    若所述词组元素不存在匹配的目标转换元素,则保留显示该词组元素,并将除该词组元素之外的所述待转换网页信息发送至后台服务器。If the phrase element does not have a matching target conversion element, the phrase element is retained to be displayed, and the web page information to be converted except the phrase element is sent to the background server.
  13. 如权利要求9所述的终端设备,其中,所述处理器还用于执行以下步骤:The terminal device according to claim 9, wherein the processor is further configured to perform the following steps:
    在当前运行的通讯媒介窗口中,提取最近预设时长内所述用户的聊天记录信息;In the currently running communication media window, extract the chat history information of the user in the most recent preset time period;
    检测所述聊天记录信息中各个字符的语言类型;Detecting the language type of each character in the chat record information;
    分别统计每一所述语言类型的字符总数,并将所述字符总数最大的所述语言类型确定为所述用户的目标语言类型。The total number of characters of each language type is counted separately, and the language type with the largest total number of characters is determined as the target language type of the user.
  14. 如权利要求9所述的终端设备,其中,所述处理器还用于执行以下步骤:The terminal device according to claim 9, wherein the processor is further configured to perform the following steps:
    当检测到关于目标网页的访问请求时,获取访问请求所携带的用户标识;When an access request for the target webpage is detected, obtain the user identification carried in the access request;
    在预设的历史信息库中,查找与所述用户标识匹配的页面浏览记录,并提取所述页面浏览记录所关联的历史访问语言;In a preset historical information database, search for page browsing records matching the user ID, and extract the historical access language associated with the page browsing records;
    在存储所述目标网页所对应源代码的信息库中,获取与所述历史访问语言对应的脚本代码;Acquiring the script code corresponding to the historical access language in the information database storing the source code corresponding to the target webpage;
    通过浏览器解析所述脚本代码后,加载得到以所述历史访问语言显示的目标网页。After the script code is parsed by the browser, the target webpage displayed in the historical access language is obtained by loading.
  15. 如权利要求9或12所述的终端设备,其中,所述处理器执行基于所述选取对象以及所述对象类型,确定对应的待转换网页信息时,具体执行以下步骤:The terminal device according to claim 9 or 12, wherein the processor executes the following steps when determining the corresponding web page information to be converted based on the selected object and the object type:
    加载预设的转换规则,通过将当前选取对象的对象类型输入所述转换规则进行检测处理,确定对应的待转换网页信息;Load a preset conversion rule, and determine the corresponding web page information to be converted by inputting the object type of the currently selected object into the conversion rule for detection processing;
    其中,所述转换规则包括:Wherein, the conversion rule includes:
    若选取对象的标签属性为标题,则对应的待转换网页信息为标题文本及标题下连续出现的多个文本段落;若选取对象的标签属性为文本段落,则对应的待转换网页信息为选取对象本身所包含的各个字符串;若选取对象的标签属性为图片,则对应的待转换网页信息为包含于图片中的文本字符;若选取对象的标签属性为视频/音频,则对应的待转换网页信息为视频源/音源的字幕文本信息。If the label attribute of the selected object is a title, the corresponding web page information to be converted is the title text and multiple text paragraphs consecutively appearing under the title; if the label attribute of the selected object is a text paragraph, the corresponding web page information to be converted is the selected object Each character string contained in itself; if the label attribute of the selected object is a picture, the corresponding web page information to be converted is the text character contained in the picture; if the label attribute of the selected object is video/audio, the corresponding web page to be converted The information is the subtitle text information of the video source/audio source.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
    接收用户在目标网页中针对选取对象所发出的语言切换指令,所述语言切换指令携带有关于目标语言类型的属性信息;Receiving a language switching instruction issued by the user for the selected object in the target webpage, the language switching instruction carrying attribute information about the target language type;
    获取所述选取对象的对象类型;Obtaining the object type of the selected object;
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器,以使所述后台服务器将所述待转换网页信息的语言类型从源语言类型切换为所述目标语言类型后,得到目标信息;Based on the selected object and the object type, determine the corresponding web page information to be converted, and send the web page information to be converted to the back-end server, so that the back-end server can change the language type of the web page information to be converted from the source After the language type is switched to the target language type, target information is obtained;
    接收所述后台服务器返回的所述目标信息,并将所述目标信息展示于针对所述选取对象创建的新标签页面中。Receiving the target information returned by the background server, and displaying the target information in a new tab page created for the selected object.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述计算机程序还被处理器执行实现以下步骤:15. The computer-readable storage medium of claim 16, wherein the computer program is further executed by the processor to implement the following steps:
    检测所述目标信息中所存在的第一货币标识符,并确定对应所述第一货币标识符的第一货币类型以及第一金额值;Detecting the first currency identifier existing in the target information, and determining the first currency type and the first amount value corresponding to the first currency identifier;
    根据预设的货币转换列表,获取与所述目标语言类型匹配的第二货币标识符以及第二货币类型;According to a preset currency conversion list, obtain a second currency identifier and a second currency type that match the target language type;
    获取所述第一货币类型与所述第二货币类型的实时汇率,并基于所述实时汇率计算与所述第一金额值对应的第二金额值;Acquiring the real-time exchange rate of the first currency type and the second currency type, and calculating a second amount value corresponding to the first amount value based on the real-time exchange rate;
    将所述目标信息中的所述第一金额值以及所述第一货币标识符分别更新为所述第二金额值以及所述第二货币标识符。The first amount value and the first currency identifier in the target information are respectively updated to the second amount value and the second currency identifier.
  18. 如权利要求16所述的计算机可读存储介质,其中,所述基于所述选取对象以及所述对象类型,确定对应的待转换网页信息时,所述计算机程序被处理器执行具体实现以下步骤:15. The computer-readable storage medium according to claim 16, wherein when the corresponding web page information to be converted is determined based on the selected object and the object type, the computer program is executed by the processor to specifically implement the following steps:
    若所述对象类型为一级标签类型,则获取所述目标网页的源代码信息;If the object type is a first-level tag type, acquiring source code information of the target webpage;
    在所述源代码信息中,定位所述选取对象之后所连续出现的各个二级标签,并分别获取所述选取对象以及所述二级标签关联的代码信息;In the source code information, locate each secondary label that appears continuously after the selected object, and obtain the selected object and code information associated with the secondary label respectively;
    将所述代码信息确定为与所述选取对象对应的待转换网页信息。The code information is determined as the web page information to be converted corresponding to the selected object.
  19. 如权利要求16所述的计算机可读存储介质,其中,所述基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并将所述待转换网页信息发送至后台服务器时,所述计算机程序被处理器执行具体实现以下步骤:15. The computer-readable storage medium according to claim 16, wherein when the corresponding web page information to be converted is determined based on the selected object and the object type, and the web page information to be converted is sent to a background server, The computer program is executed by the processor to specifically implement the following steps:
    基于所述选取对象以及所述对象类型,确定对应的待转换网页信息,并检测所述待转换网页信息所包含的各个词组元素;Determine the corresponding web page information to be converted based on the selected object and the object type, and detect each phrase element contained in the web page information to be converted;
    调用预设的语言切换接口,遍历各个所述词组元素,分别确定其中每一所述词组元素是否存在匹配的目标转换元素;Call a preset language switching interface, traverse each of the phrase elements, and respectively determine whether each of the phrase elements has a matching target conversion element;
    若所述词组元素不存在匹配的目标转换元素,则保留显示该词组元素,并将除该词组元素之外的所述待转换网页信息发送至后台服务器。If the phrase element does not have a matching target conversion element, the phrase element is retained to be displayed, and the web page information to be converted except the phrase element is sent to the background server.
  20. 如权利要求16所述的计算机可读存储介质,其中,在所述接收用户在目标网页中针对选取对象所发出的语言切换指令之前,所述计算机程序还被处理器执行实现以下步骤:16. The computer-readable storage medium according to claim 16, wherein, before the receiving the language switching instruction issued by the user for the selected object in the target webpage, the computer program is further executed by the processor to implement the following steps:
    在当前运行的通讯媒介窗口中,提取最近预设时长内所述用户的聊天记录信息;In the currently running communication media window, extract the chat history information of the user in the most recent preset time period;
    检测所述聊天记录信息中各个字符的语言类型;Detecting the language type of each character in the chat record information;
    分别统计每一所述语言类型的字符总数,并将所述字符总数最大的所述语言类型确定为所述用户的目标语言类型。The total number of characters of each language type is counted separately, and the language type with the largest total number of characters is determined as the target language type of the user.
PCT/CN2020/093600 2019-06-14 2020-05-30 Webpage language switching method and apparatus, and terminal device WO2020248849A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910517960.8A CN110362370B (en) 2019-06-14 2019-06-14 Webpage language switching method and device and terminal equipment
CN201910517960.8 2019-06-14

Publications (1)

Publication Number Publication Date
WO2020248849A1 true WO2020248849A1 (en) 2020-12-17

Family

ID=68217375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093600 WO2020248849A1 (en) 2019-06-14 2020-05-30 Webpage language switching method and apparatus, and terminal device

Country Status (2)

Country Link
CN (1) CN110362370B (en)
WO (1) WO2020248849A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783960A (en) * 2021-01-22 2021-05-11 北京澎思科技有限公司 Data processing system and method, electronic device, computer-readable storage medium
CN112817655A (en) * 2021-01-29 2021-05-18 北京达佳互联信息技术有限公司 Document information processing method, device, storage medium and electronic equipment
CN112965772A (en) * 2021-03-02 2021-06-15 网易(杭州)网络有限公司 Web page display method and device and electronic equipment
CN114491359A (en) * 2021-12-28 2022-05-13 北京航天智造科技发展有限公司 Webpage internationalization processing method and device
CN114816204A (en) * 2021-01-27 2022-07-29 北京猎户星空科技有限公司 Control method, control device, control equipment and storage medium of intelligent robot
CN115098200A (en) * 2022-05-20 2022-09-23 北京快乐茄信息技术有限公司 Language switching method and device, electronic equipment and storage medium
CN116521572A (en) * 2023-07-03 2023-08-01 天津金城银行股份有限公司 Webpage script visual verification method, system, terminal equipment and storage medium
CN117421000A (en) * 2023-09-06 2024-01-19 北京饼干科技有限公司 Method, device, electronic equipment and storage medium for generating distribution webpage
CN117590980A (en) * 2023-04-28 2024-02-23 北京拉酷网络科技有限公司 Cognitive interface, object processing method, object processing system, object processing device and cloud computing platform
CN117421000B (en) * 2023-09-06 2024-06-04 北京饼干科技有限公司 Method, device, electronic equipment and storage medium for generating distribution webpage

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362370B (en) * 2019-06-14 2022-10-18 平安科技(深圳)有限公司 Webpage language switching method and device and terminal equipment
CN110795192B (en) * 2019-10-29 2023-08-25 Vidaa(荷兰)国际控股有限公司 Language switching method and device and terminal equipment
CN111124406A (en) * 2019-12-10 2020-05-08 东软集团股份有限公司 Static page language switching method and device, storage medium and electronic equipment
CN111061533A (en) * 2019-12-18 2020-04-24 深圳前海环融联易信息科技服务有限公司 Page multi-language display method and device, electronic equipment and computer storage medium
CN111767104B (en) * 2020-05-07 2023-09-01 北京奇艺世纪科技有限公司 Language type switching method and device, computer equipment and storage medium
CN111857906B (en) * 2020-06-03 2022-02-01 北京旷视科技有限公司 Text display method, device and system of terminal and storage medium
CN111859087A (en) * 2020-07-23 2020-10-30 北京好扑信息科技有限公司 Block chain-based government affair announcement publishing system
CN112068912A (en) * 2020-08-18 2020-12-11 深圳传音控股股份有限公司 System language type switching method, terminal and computer storage medium
CN114666674A (en) * 2020-12-23 2022-06-24 富泰华工业(深圳)有限公司 Subtitle information conversion method and device, electronic equipment and storage medium
CN112596841B (en) * 2020-12-24 2022-08-12 厦门亿联网络技术股份有限公司 Interface language switching method, device, equipment and storage medium
CN114217891A (en) * 2021-11-19 2022-03-22 建信金融科技有限责任公司 Page data conversion method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130262078A1 (en) * 2012-03-30 2013-10-03 George Gleadall System and method for providing text content on web pages in multiple human languages
CN104881406A (en) * 2015-06-15 2015-09-02 携程计算机技术(上海)有限公司 Web page translation method and system
CN105183725A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Method for translating word on web page and electronic device
CN105183724A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Translation method and electronic device
CN105740239A (en) * 2016-02-01 2016-07-06 中译语通科技(北京)有限公司 Translation method and system of character on webpage
CN107256234A (en) * 2017-05-18 2017-10-17 腾讯科技(深圳)有限公司 A kind of web page text method of adjustment and its equipment
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464438A (en) * 2002-06-18 2003-12-31 力捷电脑股份有限公司 Process for changing user interface language with no need to restart the application programs
TWI344288B (en) * 2007-07-23 2011-06-21 Arcadyan Technology Corp Embedded system with web-based user interface, firmware structure thereof, and method for providing information thereof
EP2058734A1 (en) * 2007-11-06 2009-05-13 Sercomm Corporation Multi-language interfaces switch system and method therefore
CN102456041A (en) * 2010-10-29 2012-05-16 金蝶软件(中国)有限公司 Webpage language switching method and device as well as network application system
CN102567384B (en) * 2010-12-29 2017-02-01 上海掌门科技有限公司 Webpage multi-language dynamic switching method and system based on webpage browser engine
US20130326347A1 (en) * 2012-05-31 2013-12-05 Microsoft Corporation Application language libraries for managing computing environment languages
CN104462074B (en) * 2014-12-26 2018-04-10 北京奇虎科技有限公司 A kind of method, apparatus and browser client for carrying out web data translation
CN107958251A (en) * 2017-11-16 2018-04-24 维沃移动通信有限公司 A kind of amount of currency conversion method, device and mobile terminal
CN109669741B (en) * 2018-09-26 2022-02-18 深圳壹账通智能科技有限公司 Language switching method, server and storage medium for terminal application dynamic document

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130262078A1 (en) * 2012-03-30 2013-10-03 George Gleadall System and method for providing text content on web pages in multiple human languages
CN104881406A (en) * 2015-06-15 2015-09-02 携程计算机技术(上海)有限公司 Web page translation method and system
CN105183725A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Method for translating word on web page and electronic device
CN105183724A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Translation method and electronic device
CN105740239A (en) * 2016-02-01 2016-07-06 中译语通科技(北京)有限公司 Translation method and system of character on webpage
CN107256234A (en) * 2017-05-18 2017-10-17 腾讯科技(深圳)有限公司 A kind of web page text method of adjustment and its equipment
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783960A (en) * 2021-01-22 2021-05-11 北京澎思科技有限公司 Data processing system and method, electronic device, computer-readable storage medium
CN114816204B (en) * 2021-01-27 2024-01-26 北京猎户星空科技有限公司 Control method, control device, control equipment and storage medium of intelligent robot
CN114816204A (en) * 2021-01-27 2022-07-29 北京猎户星空科技有限公司 Control method, control device, control equipment and storage medium of intelligent robot
CN112817655A (en) * 2021-01-29 2021-05-18 北京达佳互联信息技术有限公司 Document information processing method, device, storage medium and electronic equipment
CN112817655B (en) * 2021-01-29 2024-05-14 北京达佳互联信息技术有限公司 Document information processing method and device, storage medium and electronic equipment
CN112965772A (en) * 2021-03-02 2021-06-15 网易(杭州)网络有限公司 Web page display method and device and electronic equipment
CN114491359A (en) * 2021-12-28 2022-05-13 北京航天智造科技发展有限公司 Webpage internationalization processing method and device
CN115098200A (en) * 2022-05-20 2022-09-23 北京快乐茄信息技术有限公司 Language switching method and device, electronic equipment and storage medium
CN117590980A (en) * 2023-04-28 2024-02-23 北京拉酷网络科技有限公司 Cognitive interface, object processing method, object processing system, object processing device and cloud computing platform
CN116521572B (en) * 2023-07-03 2023-09-19 天津金城银行股份有限公司 Webpage script visual verification method, system, terminal equipment and storage medium
CN116521572A (en) * 2023-07-03 2023-08-01 天津金城银行股份有限公司 Webpage script visual verification method, system, terminal equipment and storage medium
CN117421000A (en) * 2023-09-06 2024-01-19 北京饼干科技有限公司 Method, device, electronic equipment and storage medium for generating distribution webpage
CN117421000B (en) * 2023-09-06 2024-06-04 北京饼干科技有限公司 Method, device, electronic equipment and storage medium for generating distribution webpage

Also Published As

Publication number Publication date
CN110362370A (en) 2019-10-22
CN110362370B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
WO2020248849A1 (en) Webpage language switching method and apparatus, and terminal device
US11294968B2 (en) Combining website characteristics in an automatically generated website
US8577882B2 (en) Method and system for searching multilingual documents
JP2020027649A (en) Method, apparatus, device and storage medium for generating entity relationship data
CN109670033B (en) Content retrieval method, device, equipment and storage medium
CN109947903B (en) Idiom query method and device
CN107515866B (en) Data operation method, device and system
CN114547257B (en) Class matching method and device, computer equipment and storage medium
US11829710B2 (en) Deriving global intent from a composite document to facilitate editing of the composite document
CN111459977B (en) Conversion of natural language queries
US9898467B1 (en) System for data normalization
CN109325135B (en) Text-based video generation method, device, computer equipment and storage medium
CN111602129B (en) Smart search for notes and ink
WO2021097629A1 (en) Data processing method and apparatus, and electronic device and storage medium
CN109145261B (en) Method and device for generating label
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
CN114402384A (en) Data processing method, device, server and storage medium
WO2019231635A1 (en) Method and apparatus for generating digest for broadcasting
CN110750708A (en) Keyword recommendation method and device and electronic equipment
WO2021098491A1 (en) Knowledge graph generating method, apparatus, and terminal, and storage medium
WO2021135103A1 (en) Method and apparatus for semantic analysis, computer device, and storage medium
CN113157964A (en) Method and device for searching data set through voice and electronic equipment
CN113312540A (en) Information processing method, device, equipment, system and readable storage medium
CN111241313A (en) Retrieval method and device supporting image input
US20150324333A1 (en) Systems and methods for automatically generating hyperlinks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20822041

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20822041

Country of ref document: EP

Kind code of ref document: A1